DIGITS-CNN/cars/data-aug-investigations/data-aug.ipynb

326 lines
494 KiB
Plaintext
Raw Permalink Normal View History

{
"cells": [
{
"cell_type": "code",
2021-04-30 19:47:47 +01:00
"execution_count": 73,
"id": "3c568ab9",
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import matplotlib as mpl\n",
"from matplotlib import pyplot as plt\n",
"\n",
"fig_dpi = 200"
]
},
{
"cell_type": "markdown",
"id": "7ecc547f",
"metadata": {},
"source": [
"# Rotations\n",
"\n",
"80/10/10 Split, 30 epochs\n",
"\n",
"Expansion Factor: 2\n",
"\n",
"## Index\n",
"0. degrees\n",
"1. top-1 accuracy\n",
"2. top-5 accuracy\n",
"3. last val loss\n",
"4. last val accuracy"
]
},
{
"cell_type": "code",
2021-04-30 19:47:47 +01:00
"execution_count": 74,
"id": "1b2471d2",
"metadata": {},
"outputs": [],
"source": [
"standard_res = [20.88, 48.24, 3.34, 25.25]\n",
"\n",
"flipped_res = [44.84, 72.45, 2.84, 49.02]\n",
"flipped_batch256_res = [31.5, 60.59, 3.44, 36.33]\n",
"\n",
"# default batch size (128)\n",
"rot_results = np.array([\n",
" [1, 44.6, 71.34, 2.84, 48.71],\n",
" [5, 46.45, 73.5, 2.85, 47.61],\n",
" [10, 45.71, 72.64, 2.93, 45.89],\n",
" [20, 42.12, 70.41, 2.95, 40.99],\n",
" [30, 28.17, 56.52, 3.44, 30.58],\n",
" [40, 25.08, 51.33, 3.46, 28.37]\n",
"])\n",
"\n",
"rot_batch256_results = np.array([\n",
" [1, 34.22, 62.08, 3.45, 38.23],\n",
" [5, 32.43, 60.90, 3.35, 34.77],\n",
" [10, 30.27, 58.62, 3.47, 30.86],\n",
" [20, 26.87, 53.80, 3.36, 28.96],\n",
" [30, 18.47, 41.2, 3.79, 21.82],\n",
" [40, 15.19, 37.37, 3.87, 18.19],\n",
"])"
]
},
{
"cell_type": "code",
2021-04-30 19:47:47 +01:00
"execution_count": 75,
"id": "c664a31c",
"metadata": {},
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": "<Figure size 1000x800 with 1 Axes>",
2021-04-30 19:47:47 +01:00
"image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg height=\"279.754375pt\" version=\"1.1\" viewBox=\"0 0 352.343125 279.754375\" width=\"352.343125pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <metadata>\n <rdf:RDF xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n <cc:Work>\n <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n <dc:date>2021-04-29T18:09:31.160887</dc:date>\n <dc:format>image/svg+xml</dc:format>\n <dc:creator>\n <cc:Agent>\n <dc:title>Matplotlib v3.4.1, https://matplotlib.org/</dc:title>\n </cc:Agent>\n </dc:creator>\n </cc:Work>\n </rdf:RDF>\n </metadata>\n <defs>\n <style type=\"text/css\">*{stroke-linecap:butt;stroke-linejoin:round;}</style>\n </defs>\n <g id=\"figure_1\">\n <g id=\"patch_1\">\n <path d=\"M 0 279.754375 \nL 352.343125 279.754375 \nL 352.343125 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n </g>\n <g id=\"axes_1\">\n <g id=\"patch_2\">\n <path d=\"M 40.603125 242.198125 \nL 345.143125 242.198125 \nL 345.143125 22.318125 \nL 40.603125 22.318125 \nz\n\" style=\"fill:#ffffff;\"/>\n </g>\n <g id=\"matplotlib.axis_1\">\n <g id=\"xtick_1\">\n <g id=\"line2d_1\">\n <path clip-path=\"url(#p1f9de53cbc)\" d=\"M 47.347018 242.198125 \nL 47.347018 22.318125 \n\" style=\"fill:none;stroke:#b0b0b0;stroke-linecap:square;stroke-width:0.8;\"/>\n </g>\n <g id=\"line2d_2\">\n <defs>\n <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"m2bf4a6f4ec\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"47.347018\" xlink:href=\"#m2bf4a6f4ec\" y=\"242.198125\"/>\n </g>\n </g>\n <g id=\"text_1\">\n <!-- 0 -->\n <g transform=\"translate(44.165768 256.796563)scale(0.1 -0.1)\">\n <defs>\n <path d=\"M 2034 4250 \nQ 1547 4250 1301 3770 \nQ 1056 3291 1056 2328 \nQ 1056 1369 1301 889 \nQ 1547 409 2034 409 \nQ 2525 409 2770 889 \nQ 3016 1369 3016 2328 \nQ 3016 3291 2770 3770 \nQ 2525 4250 2034 4250 \nz\nM 2034 4750 \nQ 2819 4750 3233 4129 \nQ 3647 3509 3647 2328 \nQ 3647 1150 3233 529 \nQ 2819 -91 2034 -91 \nQ 1250 -91 836 529 \nQ 422 1150 422 2328 \nQ 422 3509 836 4129 \nQ 1250 4750 2034 4750 \nz\n\" id=\"DejaVuSans-30\" transform=\"scale(0.015625)\"/>\n </defs>\n <use xlink:href=\"#DejaVuSans-30\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_2\">\n <g id=\"line2d_3\">\n <path clip-path=\"url(#p1f9de53cbc)\" d=\"M 82.84119 242.198125 \nL 82.84119 22.318125 \n\" style=\"fill:none;stroke:#b0b0b0;stroke-linecap:square;stroke-width:0.8;\"/>\n </g>\n <g id=\"line2d_4\">\n <g>\n <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"82.84119\" xlink:href=\"#m2bf4a6f4ec\" y=\"242.198125\"/>\n </g>\n </g>\n <g id=\"text_2\">\n <!-- 5 -->\n <g transform=\"translate(79.65994 256.796563)scale(0.1 -0.1)\">\n <defs>\n <path d=\"M 691 4666 \nL 3169 4666 \nL 3169 4134 \nL 1269 4134 \nL 1269 2991 \nQ 1406 3038 1543 3061 \nQ 1681 3084 1819 3084 \nQ 2600 3084 3056 2656 \nQ 3513 2228 3513 1497 \nQ 3513 744 3044 326 \nQ 2575 -91 1722 -91 \nQ 1428 -91 1123 -41 \nQ 819 9 494 109 \nL 494 744 \nQ 775 591 1075 516 \nQ 1375 441 1709 441 \nQ 2250 441 2565 725 \nQ 2881 1009 2881 1497 \nQ 2881 1984 2565 2268 \nQ 2250 2553 1709 2553 \nQ 1456 2553 1204 2497 \nQ 953 2441 691 2322 \nL 691 4666 \nz\n\" id=\"DejaVuSans-35\" transform=\"scale(0.015625)\"/>\n </defs>\n <use xlink:href=\"#DejaVuSans-35\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_3\">\n <g id=\"line2d_5\">\n <path clip-path=\"url(#p1f9de53cbc)\" d=\"M 118.335363 242.198125 \nL 118.335363 22.318125 \n\" style=\"fill:none;stroke:#b0b0b0;stroke-linecap:square;stroke-width:0.8;\"/>\n </g>\n <g id=\
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA9QAAAMMCAYAAACyue/GAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAB7CAAAewgFu0HU+AAEAAElEQVR4nOzdd3Rc1bn38e+j3my5yL0XjA0u2Nhgh2ZKCBBIBxKSAAmkEOAGUm6SSwq5N9y0NwlcQkiBBBLSCyEFCCUYU2wwGFzANi64N8lFlmR17fePfUY6I400o7E0Gkm/z1pnzSn77LNnzmg0z+xmzjlEREREREREpHMyeroAIiIiIiIiIr2RAmoRERERERGRJCigFhEREREREUmCAmoRERERERGRJCigFhEREREREUmCAmoRERERERGRJCigFhEREREREUmCAmoRERERERGRJCigFhEREREREUmCAmoRERERERGRJCigFhEREREREUmCAmoRERERERGRJCigFhEREREREUmCAmoRERERERGRJCigFhEREREREUmCAmoRERERERGRJCigFhEREREREUmCAmoRERERERGRJCigFhERE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3HTtvmqQk1le5EuU8N5f37FLzePw3l8404ab8XSvvzLniuV4fyuy9O2o+0el/M7SDtgtCXuXa/BBMdUDvgli6+lxNb5R/zPRWkLST6B4OttP+F9elQuueAnA7yvSOUtpx2fgQJl7MrX4NOvqfvC6W7OsG8nwydc3OctIX4GrVI+jY/QOGDz3BQNL2D/D7Y6v52+WsXutbWRF6bNPp8insviQ6oHfCbDvLLw/+4EUl7eTv
},
"metadata": {
"needs_background": "light"
}
}
],
"source": [
"fig = plt.figure(figsize=(5, 4))\n",
"fig.set_dpi(fig_dpi)\n",
"\n",
"plt.plot(rot_results[:, 0], rot_results[:, 1], 'x-', label=\"Top-1 Accuracy\")\n",
"plt.plot(rot_results[:, 0], rot_results[:, 2], 'x-', label=\"Top-5 Accuracy\")\n",
"plt.plot(rot_results[:, 0], rot_results[:, 4], 'x-', label=\"Final Val. Accuracy\")\n",
"\n",
"plt.ylim(10, 80)\n",
"\n",
"plt.title('Accuracy for Rotated Training Data')\n",
"plt.ylabel('% Accuracy')\n",
"plt.xlabel('Degrees Rotation')\n",
"\n",
"plt.legend()\n",
"plt.grid()\n",
"\n",
"plt.tight_layout()\n",
"plt.savefig('rot-accuracy.png')\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
2021-04-30 19:47:47 +01:00
"execution_count": 76,
"id": "1d3ecda0",
"metadata": {},
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": "<Figure size 1000x800 with 1 Axes>",
2021-04-30 19:47:47 +01:00
"image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg height=\"279.754375pt\" version=\"1.1\" viewBox=\"0 0 352.343125 279.754375\" width=\"352.343125pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <metadata>\n <rdf:RDF xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n <cc:Work>\n <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n <dc:date>2021-04-29T18:09:31.627670</dc:date>\n <dc:format>image/svg+xml</dc:format>\n <dc:creator>\n <cc:Agent>\n <dc:title>Matplotlib v3.4.1, https://matplotlib.org/</dc:title>\n </cc:Agent>\n </dc:creator>\n </cc:Work>\n </rdf:RDF>\n </metadata>\n <defs>\n <style type=\"text/css\">*{stroke-linecap:butt;stroke-linejoin:round;}</style>\n </defs>\n <g id=\"figure_1\">\n <g id=\"patch_1\">\n <path d=\"M 0 279.754375 \nL 352.343125 279.754375 \nL 352.343125 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n </g>\n <g id=\"axes_1\">\n <g id=\"patch_2\">\n <path d=\"M 40.603125 242.198125 \nL 345.143125 242.198125 \nL 345.143125 22.318125 \nL 40.603125 22.318125 \nz\n\" style=\"fill:#ffffff;\"/>\n </g>\n <g id=\"matplotlib.axis_1\">\n <g id=\"xtick_1\">\n <g id=\"line2d_1\">\n <path clip-path=\"url(#p845f6bbce1)\" d=\"M 47.347018 242.198125 \nL 47.347018 22.318125 \n\" style=\"fill:none;stroke:#b0b0b0;stroke-linecap:square;stroke-width:0.8;\"/>\n </g>\n <g id=\"line2d_2\">\n <defs>\n <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"m4ac8217b3c\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"47.347018\" xlink:href=\"#m4ac8217b3c\" y=\"242.198125\"/>\n </g>\n </g>\n <g id=\"text_1\">\n <!-- 0 -->\n <g transform=\"translate(44.165768 256.796563)scale(0.1 -0.1)\">\n <defs>\n <path d=\"M 2034 4250 \nQ 1547 4250 1301 3770 \nQ 1056 3291 1056 2328 \nQ 1056 1369 1301 889 \nQ 1547 409 2034 409 \nQ 2525 409 2770 889 \nQ 3016 1369 3016 2328 \nQ 3016 3291 2770 3770 \nQ 2525 4250 2034 4250 \nz\nM 2034 4750 \nQ 2819 4750 3233 4129 \nQ 3647 3509 3647 2328 \nQ 3647 1150 3233 529 \nQ 2819 -91 2034 -91 \nQ 1250 -91 836 529 \nQ 422 1150 422 2328 \nQ 422 3509 836 4129 \nQ 1250 4750 2034 4750 \nz\n\" id=\"DejaVuSans-30\" transform=\"scale(0.015625)\"/>\n </defs>\n <use xlink:href=\"#DejaVuSans-30\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_2\">\n <g id=\"line2d_3\">\n <path clip-path=\"url(#p845f6bbce1)\" d=\"M 82.84119 242.198125 \nL 82.84119 22.318125 \n\" style=\"fill:none;stroke:#b0b0b0;stroke-linecap:square;stroke-width:0.8;\"/>\n </g>\n <g id=\"line2d_4\">\n <g>\n <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"82.84119\" xlink:href=\"#m4ac8217b3c\" y=\"242.198125\"/>\n </g>\n </g>\n <g id=\"text_2\">\n <!-- 5 -->\n <g transform=\"translate(79.65994 256.796563)scale(0.1 -0.1)\">\n <defs>\n <path d=\"M 691 4666 \nL 3169 4666 \nL 3169 4134 \nL 1269 4134 \nL 1269 2991 \nQ 1406 3038 1543 3061 \nQ 1681 3084 1819 3084 \nQ 2600 3084 3056 2656 \nQ 3513 2228 3513 1497 \nQ 3513 744 3044 326 \nQ 2575 -91 1722 -91 \nQ 1428 -91 1123 -41 \nQ 819 9 494 109 \nL 494 744 \nQ 775 591 1075 516 \nQ 1375 441 1709 441 \nQ 2250 441 2565 725 \nQ 2881 1009 2881 1497 \nQ 2881 1984 2565 2268 \nQ 2250 2553 1709 2553 \nQ 1456 2553 1204 2497 \nQ 953 2441 691 2322 \nL 691 4666 \nz\n\" id=\"DejaVuSans-35\" transform=\"scale(0.015625)\"/>\n </defs>\n <use xlink:href=\"#DejaVuSans-35\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_3\">\n <g id=\"line2d_5\">\n <path clip-path=\"url(#p845f6bbce1)\" d=\"M 118.335363 242.198125 \nL 118.335363 22.318125 \n\" style=\"fill:none;stroke:#b0b0b0;stroke-linecap:square;stroke-width:0.8;\"/>\n </g>\n <g id=\
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA9QAAAMMCAYAAACyue/GAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAB7CAAAewgFu0HU+AAEAAElEQVR4nOzdd5gURf7H8XdtgmWXJUuUKByiqCSzBEU9IwYwAYrKGc4z3enPO/UU9Ty90ztPMZwBQRBBRETwDAgSJEo0gYDAkkEyLiywoX5/1Mxsz+zM7OyyYWA/r+fpZ3u6q6qrp3t35ztVXWWstYiIiIiIiIhI8SRUdAVEREREREREjkQKqEVERERERERKQAG1iIiIiIiISAkooBYREREREREpAQXUIiIiIiIiIiWggFpERERERESkBBRQi4iIiIiIiJSAAmoRERERERGRElBALSIiIiIiIlICCqhFRERERERESkABtYiIiIiIiEgJKKAWERERERERKQEF1CIiIiIiIiIloIBaREREREREpAQUUIuIiIiIiIiUgAJqERERERERkRJQQC0iIiIiIiJSAgqoRUREREREREpAAbWIiIiIiIhICSigFhGRcmWMqWOMedwYM88Ys8sYk2eMsb5lQEXXTyQaz71qK7ou8cIYM6wifoeNMd09x51WXscVEfFKqugKiEjFMMa8C/T1bPqztfYfFVUfqRyMMS2BGUDjiq5LaTPGNAfWREmSB+wFtgCLgYnAOGvtobKvncQLY8wg4PFSLraFtTazlMuUOGaMyQSaRdidDezB/b3ZBCz0LVOstb+USwVFKhEF1CKVkDGmOnBlyOabAAXUUtZepyCYzgYmAxtxwSbAsoqoVDlJBGr5luOBG4BMY8yN1tqvy7Mi3tZVa60pz2N76jAM93cH4GZr7bCKqIfIUSjVtzQA2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",
"plt.plot(rot_batch256_results[:, 0], rot_batch256_results[:, 1], 'x-', label=\"Top-1 Accuracy\")\n",
"plt.plot(rot_batch256_results[:, 0], rot_batch256_results[:, 2], 'x-', label=\"Top-5 Accuracy\")\n",
"plt.plot(rot_batch256_results[:, 0], rot_batch256_results[:, 4], 'x-', label=\"Final Val. Accuracy\")\n",
"\n",
"plt.ylim(10, 80)\n",
"\n",
"plt.title('Accuracy for Rotated Training Data')\n",
"plt.ylabel('% Accuracy')\n",
"plt.xlabel('Degrees Rotation')\n",
"\n",
"plt.legend()\n",
"plt.grid()\n",
"\n",
"plt.tight_layout()\n",
"plt.savefig('rot-accuracy-256batch.png')\n",
"\n",
"plt.show()"
]
},
2021-04-25 19:56:49 +01:00
{
"cell_type": "markdown",
"id": "c75a7fcb",
"metadata": {},
2021-04-25 19:56:49 +01:00
"source": [
"# All\n",
"\n",
"Flip, rotate both ways, flip both rotations\n",
"\n",
"Expansion Factor: 6\n",
"\n",
"## Index\n",
"0. degrees\n",
"1. top-1 accuracy\n",
"2. top-5 accuracy\n",
"3. last val loss\n",
"4. last val accuracy"
]
2021-04-25 19:56:49 +01:00
},
{
"cell_type": "code",
2021-04-30 19:47:47 +01:00
"execution_count": 77,
"id": "dd63f155",
2021-04-25 19:56:49 +01:00
"metadata": {},
"outputs": [],
"source": [
"all_results = np.array([\n",
" [5, 53.24, 79.49, 2.69, 55.64]\n",
2021-04-29 00:53:46 +01:00
"])\n",
"\n",
"all_results_ba = np.array([\n",
" [5, 26.37, 48.05, 5.07, 27.39]\n",
2021-04-25 19:56:49 +01:00
"])"
]
},
{
"cell_type": "code",
2021-04-30 19:47:47 +01:00
"execution_count": 78,
"id": "3d6e9057",
"metadata": {},
"outputs": [
{
"output_type": "display_data",
"data": {
2021-04-30 19:47:47 +01:00
"text/plain": "<Figure size 1200x600 with 1 Axes>",
"image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg height=\"207.754375pt\" version=\"1.1\" viewBox=\"0 0 424.418125 207.754375\" width=\"424.418125pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <metadata>\n <rdf:RDF xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n <cc:Work>\n <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n <dc:date>2021-04-29T18:09:32.088697</dc:date>\n <dc:format>image/svg+xml</dc:format>\n <dc:creator>\n <cc:Agent>\n <dc:title>Matplotlib v3.4.1, https://matplotlib.org/</dc:title>\n </cc:Agent>\n </dc:creator>\n </cc:Work>\n </rdf:RDF>\n </metadata>\n <defs>\n <style type=\"text/css\">*{stroke-linecap:butt;stroke-linejoin:round;}</style>\n </defs>\n <g id=\"figure_1\">\n <g id=\"patch_1\">\n <path d=\"M 0 207.754375 \nL 424.418125 207.754375 \nL 424.418125 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n </g>\n <g id=\"axes_1\">\n <g id=\"patch_2\">\n <path d=\"M 101.446875 170.198125 \nL 407.674375 170.198125 \nL 407.674375 22.318125 \nL 101.446875 22.318125 \nz\n\" style=\"fill:#ffffff;\"/>\n </g>\n <g id=\"patch_3\">\n <path clip-path=\"url(#p0502d757c1)\" d=\"M 101.446875 163.476307 \nL 264.482396 163.476307 \nL 264.482396 135.173914 \nL 101.446875 135.173914 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_4\">\n <path clip-path=\"url(#p0502d757c1)\" d=\"M 101.446875 128.098316 \nL 243.689549 128.098316 \nL 243.689549 99.795924 \nL 101.446875 99.795924 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_5\">\n <path clip-path=\"url(#p0502d757c1)\" d=\"M 101.446875 92.720326 \nL 238.759286 92.720326 \nL 238.759286 64.417934 \nL 101.446875 64.417934 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_6\">\n <path clip-path=\"url(#p0502d757c1)\" d=\"M 101.446875 57.342336 \nL 165.387177 57.342336 \nL 165.387177 29.039943 \nL 101.446875 29.039943 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_7\">\n <path clip-path=\"url(#p0502d757c1)\" d=\"M 264.482396 163.476307 \nL 344.867115 163.476307 \nL 344.867115 135.173914 \nL 264.482396 135.173914 \nz\n\" style=\"fill:#ff7f0e;\"/>\n </g>\n <g id=\"patch_8\">\n <path clip-path=\"url(#p0502d757c1)\" d=\"M 243.689549 128.098316 \nL 326.524087 128.098316 \nL 326.524087 99.795924 \nL 243.689549 99.795924 \nz\n\" style=\"fill:#ff7f0e;\"/>\n </g>\n <g id=\"patch_9\">\n <path clip-path=\"url(#p0502d757c1)\" d=\"M 238.759286 92.720326 \nL 323.308699 92.720326 \nL 323.308699 64.417934 \nL 238.759286 64.417934 \nz\n\" style=\"fill:#ff7f0e;\"/>\n </g>\n <g id=\"patch_10\">\n <path clip-path=\"url(#p0502d757c1)\" d=\"M 165.387177 57.342336 \nL 249.171021 57.342336 \nL 249.171021 29.039943 \nL 165.387177 29.039943 \nz\n\" style=\"fill:#ff7f0e;\"/>\n </g>\n <g id=\"matplotlib.axis_1\">\n <g id=\"xtick_1\">\n <g id=\"line2d_1\">\n <path clip-path=\"url(#p0502d757c1)\" d=\"M 101.446875 170.198125 \nL 101.446875 22.318125 \n\" style=\"fill:none;stroke:#b0b0b0;stroke-linecap:square;stroke-width:0.8;\"/>\n </g>\n <g id=\"line2d_2\">\n <defs>\n <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"mc72930aa22\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"101.446875\" xlink:href=\"#mc72930aa22\" y=\"170.198125\"/>\n </g>\n </g>\n <g id=\"text_1\">\n <!-- 0 -->\n <g transform=\"translate(98.265625 184.796562)scale(0.1 -0.1)\">\n <defs>\n <path d=\"M 2034 4250 \nQ 1547 4250 1301 3770 \nQ 1056 3291 1056 2328 \nQ 1056 1369 1301 889 \nQ 1547 409 2034 409 \nQ 2525 409 2770 889 \nQ 3016 1369 3016 2328 \nQ 3016 3291 2770 3770 \nQ 2525 4250 2034 4250 \nz\nM 2034 4750 \nQ 2819 4750 3233 4129 \nQ 3647 3509 3647 2328 \nQ 3647
"image/png": "iVBORw0KGgoAAAANSUhEUgAABJsAAAJECAYAAACxTyXdAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAB7CAAAewgFu0HU+AACsmklEQVR4nOzdd7gcZdn48e+dhNBCEJAOAqIoEpoUOwSxi4qKoKI0G4q966svAV8sP3sDFRUEbIiAWFBECQiiFEFpgiJBmgjSDAQCyf3745nNmSzbzjm7e1K+n+uaa2dnnnnm3tk5e87e5ymRmUiSJEmSJEn9MGmiA5AkSZIkSdKyw2STJEmSJEmS+sZkkyRJkiRJkvrGZJMkSZIkSZL6xmSTJEmSJEmS+sZkkyRJkiRJkvrGZJMkSZIkSZL6xmSTJEmSJEmS+sZkkyRJkiRJkvrGZJMkSZIkSZL6xmSTJEmSJEmS+sZkkyRJkiRJkvrGZJMkSZIkSZL6xmSTJEmSJEmS+sZkkyRJkiRJkvrGZJMkSZIkSZL6xmSTJEmSJEmS+sZkkyRJkiRJkvrGZJMkSZIkSZL6xmSTJEnSciAiXhERP42ImyLigYjIapk90bFJ0pIgIubUPhs3neh4pKWZySZJEhExu/bHVatlYUT8NyKui4hTI+INEbHaRMe9tImIZzVd16smOiYt+6L4LnAisAewATB1YqPqny6fX/dHxK0R8beIODcivhwRB0T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C9Sv2p6j57Upr4DWryXs2nRYgBYcYyvr34Ptrynuhy/Cov/9//jbcodSflit3Kb/ZOr1zu3qmc
},
"metadata": {
"needs_background": "light"
}
}
],
"source": [
"best_results = [standard_res, flipped_res]\n",
"best_labels = ['Unaugmented\\nE: 1', 'Flipped\\nE: 2']\n",
"\n",
"# Clockwise Rotation\n",
"b_clock = rot_results[np.argmax(rot_results[:, 1])]\n",
"best_results.append(b_clock[1:])\n",
"best_labels.append(f'Clockwise {b_clock[0]}°\\nE: 2')\n",
"\n",
"best_results.append(all_results[0, 1:])\n",
2021-04-29 00:53:46 +01:00
"best_labels.append(f'Full {all_results[0, 0]}°\\nE: 6')\n",
"\n",
"best_results = best_results[::-1]\n",
"best_labels = best_labels[::-1]\n",
"\n",
2021-04-30 19:47:47 +01:00
"fig = plt.figure(figsize=(6, 3))\n",
"fig.set_dpi(fig_dpi)\n",
"\n",
"plt.barh(range(len(best_labels)), [i[0] for i in best_results], tick_label=best_labels, label='Top-1')\n",
"plt.barh(range(len(best_labels)), [i[1] - i[0] for i in best_results], tick_label=best_labels, label='Top-5', left=[i[0] for i in best_results])\n",
"\n",
"plt.legend()\n",
"plt.grid(axis='x')\n",
"plt.title('Best Accuracy for Data Augmentations')\n",
"plt.xlabel('% Test Accuracy')\n",
"plt.ylabel('Data Augmentation Methods')\n",
"\n",
2021-04-29 00:53:46 +01:00
"plt.xlim(0, 100)\n",
"plt.xticks(np.linspace(0, 100, 11))\n",
"\n",
"plt.tight_layout()\n",
"plt.savefig('best-barh.png')\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
2021-04-30 19:47:47 +01:00
"execution_count": 79,
"id": "bcdf6d2a",
"metadata": {},
"outputs": [
{
"output_type": "display_data",
"data": {
2021-04-30 19:47:47 +01:00
"text/plain": "<Figure size 1200x600 with 1 Axes>",
"image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg height=\"207.754375pt\" version=\"1.1\" viewBox=\"0 0 424.418125 207.754375\" width=\"424.418125pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <metadata>\n <rdf:RDF xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n <cc:Work>\n <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n <dc:date>2021-04-29T18:09:32.532682</dc:date>\n <dc:format>image/svg+xml</dc:format>\n <dc:creator>\n <cc:Agent>\n <dc:title>Matplotlib v3.4.1, https://matplotlib.org/</dc:title>\n </cc:Agent>\n </dc:creator>\n </cc:Work>\n </rdf:RDF>\n </metadata>\n <defs>\n <style type=\"text/css\">*{stroke-linecap:butt;stroke-linejoin:round;}</style>\n </defs>\n <g id=\"figure_1\">\n <g id=\"patch_1\">\n <path d=\"M 0 207.754375 \nL 424.418125 207.754375 \nL 424.418125 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n </g>\n <g id=\"axes_1\">\n <g id=\"patch_2\">\n <path d=\"M 101.446875 170.198125 \nL 407.674375 170.198125 \nL 407.674375 22.318125 \nL 101.446875 22.318125 \nz\n\" style=\"fill:#ffffff;\"/>\n </g>\n <g id=\"patch_3\">\n <path clip-path=\"url(#pbaf709855b)\" d=\"M 101.446875 163.476307 \nL 182.199067 163.476307 \nL 182.199067 135.173914 \nL 101.446875 135.173914 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_4\">\n <path clip-path=\"url(#pbaf709855b)\" d=\"M 101.446875 128.098316 \nL 206.237925 128.098316 \nL 206.237925 99.795924 \nL 101.446875 99.795924 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_5\">\n <path clip-path=\"url(#pbaf709855b)\" d=\"M 101.446875 92.720326 \nL 197.908537 92.720326 \nL 197.908537 64.417934 \nL 101.446875 64.417934 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_6\">\n <path clip-path=\"url(#pbaf709855b)\" d=\"M 101.446875 57.342336 \nL 165.387177 57.342336 \nL 165.387177 29.039943 \nL 101.446875 29.039943 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_7\">\n <path clip-path=\"url(#pbaf709855b)\" d=\"M 182.199067 163.476307 \nL 248.589189 163.476307 \nL 248.589189 135.173914 \nL 182.199067 135.173914 \nz\n\" style=\"fill:#ff7f0e;\"/>\n </g>\n <g id=\"patch_8\">\n <path clip-path=\"url(#pbaf709855b)\" d=\"M 206.237925 128.098316 \nL 291.552907 128.098316 \nL 291.552907 99.795924 \nL 206.237925 99.795924 \nz\n\" style=\"fill:#ff7f0e;\"/>\n </g>\n <g id=\"patch_9\">\n <path clip-path=\"url(#pbaf709855b)\" d=\"M 197.908537 92.720326 \nL 286.990117 92.720326 \nL 286.990117 64.417934 \nL 197.908537 64.417934 \nz\n\" style=\"fill:#ff7f0e;\"/>\n </g>\n <g id=\"patch_10\">\n <path clip-path=\"url(#pbaf709855b)\" d=\"M 165.387177 57.342336 \nL 249.171021 57.342336 \nL 249.171021 29.039943 \nL 165.387177 29.039943 \nz\n\" style=\"fill:#ff7f0e;\"/>\n </g>\n <g id=\"matplotlib.axis_1\">\n <g id=\"xtick_1\">\n <g id=\"line2d_1\">\n <path clip-path=\"url(#pbaf709855b)\" d=\"M 101.446875 170.198125 \nL 101.446875 22.318125 \n\" style=\"fill:none;stroke:#b0b0b0;stroke-linecap:square;stroke-width:0.8;\"/>\n </g>\n <g id=\"line2d_2\">\n <defs>\n <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"mc79a1a3301\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"101.446875\" xlink:href=\"#mc79a1a3301\" y=\"170.198125\"/>\n </g>\n </g>\n <g id=\"text_1\">\n <!-- 0 -->\n <g transform=\"translate(98.265625 184.796562)scale(0.1 -0.1)\">\n <defs>\n <path d=\"M 2034 4250 \nQ 1547 4250 1301 3770 \nQ 1056 3291 1056 2328 \nQ 1056 1369 1301 889 \nQ 1547 409 2034 409 \nQ 2525 409 2770 889 \nQ 3016 1369 3016 2328 \nQ 3016 3291 2770 3770 \nQ 2525 4250 2034 4250 \nz\nM 2034 4750 \nQ 2819 4750 3233 4129 \nQ 3647 3509 3647 2328 \nQ 3647
"image/png": "iVBORw0KGgoAAAANSUhEUgAABJsAAAJECAYAAACxTyXdAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAB7CAAAewgFu0HU+AACrzklEQVR4nOzdd5hcZdn48e+dQGghCEgHAVEU6VLsEMQu+qIiiCjNhmLv9TXgi+Vnb6CigIANERALiigBQRREVJqgSJAuSDMQCCT374/nTPZkmLa7M7Ob5Pu5rnPNmXOe85x7zpyd3bn3KZGZSJIkSZIkSf0wZaIDkCRJkiRJ0tLDZJMkSZIkSZL6xmSTJEmSJEmS+sZkkyRJkiRJkvrGZJMkSZIkSZL6xmSTJEmSJEmS+sZkkyRJkiRJkvrGZJMkSZIkSZL6xmSTJEmSJEmS+sZkkyRJkiRJkvrGZJMkSZIkSZL6xmSTJEmSJEmS+sZkkyRJkiRJkvrGZJMkSZIkSZL6xmSTJEmSJEmS+sZkkyRJkiRJkvrGZJMkSZIkSZL6xmSTJEmSJEmS+sZkkyRJkiRJkvrGZJMkSdIyICJeHhE/iYgbI+KBiMhqmT3RsUnSZBARc2qfjZtMdDzSksxkkySJiJhd++Oq1bIwIv4bEddGxGkR8bqIWHWi417SRMSzmq7rlRMdk5Z+UXwHOAnYA1gfmDaxUfVPl8+v+yPi1oj4e0ScFxF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98gqZWEZQvUr9seo+e1Ka+A1u8l7Np0WIAWGGMr69+D7a8p7ocvzKL//f/423KHUn5YrdSm/1Tq9c7t6pnPh1
},
"metadata": {
"needs_background": "light"
}
}
],
"source": [
"best_results_256 = [standard_res, flipped_batch256_res]\n",
"best_labels_256 = ['Unaugmented\\nE: 1', 'Flipped\\nE: 2']\n",
"\n",
"# Clockwise Rotation\n",
"b_clock_256 = rot_batch256_results[np.argmax(rot_batch256_results[:, 1])]\n",
"best_results_256.append(b_clock_256[1:])\n",
"best_labels_256.append(f'Clockwise {b_clock_256[0]}°\\nE: 2')\n",
"\n",
2021-04-29 00:53:46 +01:00
"best_results_256.append(all_results_ba[0, 1:])\n",
"best_labels_256.append(f'Full {all_results_ba[0, 0]}°\\nE: 6')\n",
"\n",
"best_results_256 = best_results_256[::-1]\n",
"best_labels_256 = best_labels_256[::-1]\n",
"\n",
2021-04-30 19:47:47 +01:00
"fig = plt.figure(figsize=(6, 3))\n",
"fig.set_dpi(fig_dpi)\n",
"\n",
"plt.barh(range(len(best_labels_256)), [i[0] for i in best_results_256], tick_label=best_labels_256, label='Top-1')\n",
"plt.barh(range(len(best_labels_256)), [i[1] - i[0] for i in best_results_256], tick_label=best_labels_256, label='Top-5', left=[i[0] for i in best_results_256])\n",
"\n",
"plt.legend()\n",
"plt.grid(axis='x')\n",
"plt.title('Best Accuracy for Data Augmentations')\n",
"plt.xlabel('% Test Accuracy')\n",
"plt.ylabel('Data Augmentation Methods')\n",
"\n",
2021-04-29 00:53:46 +01:00
"plt.xlim(0, 100)\n",
"plt.xticks(np.linspace(0, 100, 11))\n",
"\n",
"plt.tight_layout()\n",
"plt.savefig('best-barh-256batch.png')\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"name": "pythonjvsc74a57bd0333605e348ea7c6bf4ca805dbc845da062650cb5bf1d8f33f5f4a9d3bca7d68b",
"display_name": "Python 3.9.3 ('.venv': venv)"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.3"
},
"metadata": {
"interpreter": {
"hash": "333605e348ea7c6bf4ca805dbc845da062650cb5bf1d8f33f5f4a9d3bca7d68b"
}
}
},
"nbformat": 4,
"nbformat_minor": 5
}