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

320 lines
489 KiB
Plaintext
Raw Normal View History

{
"cells": [
{
"cell_type": "code",
"execution_count": 50,
"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",
"execution_count": 51,
"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",
"execution_count": 52,
"id": "c664a31c",
"metadata": {},
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": "<Figure size 1000x800 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=\"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-27T22:51:52.499475</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(#p0c9f28887c)\" 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=\"m24732ccbd2\" 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=\"#m24732ccbd2\" 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(#p0c9f28887c)\" 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=\"#m24732ccbd2\" 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(#p0c9f28887c)\" 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+xmzjlEREREREREpHMyeroAIiIiIiIiIr2RAmoRERERERGRJCigFhEREREREUmCAmoRERERERGRJCigFhEREREREUmCAmoRERERERGRJCigFhEREREREUmCAmoRERERERGRJCigFhEREREREUmCAmoRERERERGRJCigFhEREREREUmCAmoRERERERGRJCigFhEREREREUmCAmoRERERERGRJCigFhEREREREUmCAmoRERERERGRJCigFhEREREREUmCAmoRERERERGRJCigFhEREREREUmCAmoREUkpMxtqZl8zsxfM7JCZNZqZC5are7p8Ih0JvVddT5clXZjZfT3xN2xmi0PXXZKq64qIhGX1dAFEpGeY2QPA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WkLST6B4OttP+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",
"execution_count": 53,
"id": "1d3ecda0",
"metadata": {},
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": "<Figure size 1000x800 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=\"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-27T22:51:52.986917</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(#pbd0e29e497)\" 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=\"m7216e5b0db\" 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=\"#m7216e5b0db\" 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(#pbd0e29e497)\" 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=\"#m7216e5b0db\" 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(#pbd0e29e497)\" 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+USwVFKhEF1CKVkDGmOnBlyOabAAXUUtZepyCYzgYmAxtxwSbAsoqoVDlJBGr5luOBG4BMY8yN1tqvy7Mi3tZVa60pz2N76jAM93cH4GZr7bCKqIfIUSjVtzQA2gDdfdsPGWM+Al6w1s6riIqFfBGgL4LkqKCAWqRy6gNUC9l2vDGmi7V2fkVUSI5+xpiGQE/fy4PAydbalRVYpbI2HPjV8zoJqA+cBdTzbWsOfGGMOddaO7d8qycV5BvglSLS3A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H5bj/m7n4P6WdMD9jgJcB2QYYy4N+fsnUnYqOqLXokVL+Sy4kYT3UPAt7iUh+x/27FsUQ3kdCG4JWQScFiFtA9zgZ/8XZl8SMNNTzn7ch/3kMGlTcB8APgqzr7mnjMwY35NMT57mMaTJwX1Q+h1gQtJVCXn9DO4DbkaEco3vXH7xlH92Wb7fuA+xv1LQ8lRUi247z/GygOqHeQ8O8JQ3rIi0KRQEzhYXbPYMk+4C3BgA/nQLw907vrTTQq5lPvBoaPrQa1mM8/PegxHvqZC6e9NfEiHdmbjAx5/uU6B+aJ1xwZS3vD9GOXYgXTHOr7Tv6WGedANirMMJuL8R/nv4OaBmmHQtcUFa4D2Lcp8t9aRbB5wRJt2NwAHc73+x37sS3EuZsbw3xM/fpyKvJcEt1Ad8P4cBtUPSVQPe86T9FUiLUGZ3T7ppEdI096Q56LtvfgZODZO2D66Xlj/9jVHOeYQnXTZhev3g/m6vDDlnS3y0ULfx3svAbRF+P972vc+R/q5WAR703X8W9xhLeoz1bh5jXR/E/f+oGyXNOZ732hKhtVyLlrJYKrwCWrRoKZ8F1+rs/0fzC5AUsr8ZwV2q2hdRnjcInh/tH2gR5Xi7FB8CzilhOd4PTZkx5inyHzuFu6fG1FW6GPU+zVP2++Xwfr/hKedvRaT9lyft26VwrgM85Q0rIu3NIfdFhyhpu3g+zEX8EExwQG2BR0r5WjYPKT/sPeVLm0bwFwaZRP7AOt2TbhaQEqXcFz1p9xDhSxBvPUvzPSjmPT3Mk25AjGVP8eS5v4i0abgWNX/6Ql9A4YJPb1DUNkp5fUOub6m/d55jZcby3sTR36c
},
"metadata": {
"needs_background": "light"
}
}
],
"source": [
"fig = plt.figure(figsize=(5, 4))\n",
"fig.set_dpi(fig_dpi)\n",
"\n",
"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",
"execution_count": 54,
"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",
"])"
]
},
{
"cell_type": "code",
"execution_count": 57,
"id": "3d6e9057",
"metadata": {},
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": "<Figure size 1200x800 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=\"279.754375pt\" version=\"1.1\" viewBox=\"0 0 424.436875 279.754375\" width=\"424.436875pt\" 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-27T23:05:55.199774</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 424.436875 279.754375 \nL 424.436875 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 242.198125 \nL 417.236875 242.198125 \nL 417.236875 22.318125 \nL 101.446875 22.318125 \nz\n\" style=\"fill:#ffffff;\"/>\n </g>\n <g id=\"patch_3\">\n <path clip-path=\"url(#pf6065f082e)\" d=\"M 101.446875 232.20358 \nL 299.24287 232.20358 \nL 299.24287 190.121283 \nL 101.446875 190.121283 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_4\">\n <path clip-path=\"url(#pf6065f082e)\" d=\"M 101.446875 179.600709 \nL 274.016822 179.600709 \nL 274.016822 137.518412 \nL 101.446875 137.518412 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_5\">\n <path clip-path=\"url(#pf6065f082e)\" d=\"M 101.446875 126.997838 \nL 268.035388 126.997838 \nL 268.035388 84.915541 \nL 101.446875 84.915541 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_6\">\n <path clip-path=\"url(#pf6065f082e)\" d=\"M 101.446875 74.394967 \nL 179.01976 74.394967 \nL 179.01976 32.31267 \nL 101.446875 32.31267 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_7\">\n <path clip-path=\"url(#pf6065f082e)\" d=\"M 299.24287 232.20358 \nL 396.766253 232.20358 \nL 396.766253 190.121283 \nL 299.24287 190.121283 \nz\n\" style=\"fill:#ff7f0e;\"/>\n </g>\n <g id=\"patch_8\">\n <path clip-path=\"url(#pf6065f082e)\" d=\"M 274.016822 179.600709 \nL 374.512346 179.600709 \nL 374.512346 137.518412 \nL 274.016822 137.518412 \nz\n\" style=\"fill:#ff7f0e;\"/>\n </g>\n <g id=\"patch_9\">\n <path clip-path=\"url(#pf6065f082e)\" d=\"M 268.035388 126.997838 \nL 370.61141 126.997838 \nL 370.61141 84.915541 \nL 268.035388 84.915541 \nz\n\" style=\"fill:#ff7f0e;\"/>\n </g>\n <g id=\"patch_10\">\n <path clip-path=\"url(#pf6065f082e)\" d=\"M 179.01976 74.394967 \nL 280.666988 74.394967 \nL 280.666988 32.31267 \nL 179.01976 32.31267 \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(#pf6065f082e)\" d=\"M 101.446875 242.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=\"mae4dbeb77d\" 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=\"#mae4dbeb77d\" y=\"242.198125\"/>\n </g>\n </g>\n <g id=\"text_1\">\n <!-- 0 -->\n <g transform=\"translate(98.265625 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 \n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AX5UvQXZSfve0pX4hWAo6MiJUy8+s9xLQUcArlWj0G/ImSuF6KBQc2H7afMvJzEMALKXE2a7Rcehi4nJJIvrc65gmUz7HVKPfEIRFBZn6hRT2N9+A1lAQcwMmUz8VmVzY9X5syWQPAv6r9t1N+NlYCNqXMxgfwYuCMiHhuZj7cou7xeDMjrTbPy8yrATLzlog4HXh5tW9vRrrZDVVELEX57Kh/TtxE+X11P+Vz+YXAC4ATKddzNNal/GyvDtwBnEn5GVmP8jOyBGX8tN9ExFMpn6UnM5JYOQe4j/JPlBdR/jGzDmX212dl5mMdXtvXgPfVNt0BnEv5vFsaeBawCeU9eguwdkS8Krt3qZ1OuWabUD43/wjcQPmduT3lMxZgX+AqyniEdedT7u91gF2qbTcBJ7U4V/Pn7tTqOCjvz+WU9+Q+yjVbl/JerkBpVX10RDyamT9pquc+Rn7G9qpih/J7vtVMlK1+7rqKiG+y4Gfr/ZSWXbdQEpjbU67n0sDnI2KtzPxAj9V/l/KzMw84D/g75f54LiO/i55NeU2vbBPf+4ADa5vuAP5M+b2VlPEjn0H5vTj1cRVIrUx0xsvFxcXFZeFcGEULAcrguvX/6J7YpfzBtbI3U1qhPK4FE2Ug8ntqZXdvUeZ9tf2XA09vc86o4jwMeGKL/evX6pk94Gt7eO1cP23aty4lydPYv1mXuqZREi6N8g9S/uBdokXZJSmDkZ/Upq79WfC/mz9pda2qspsAXwde2uXemdHD9ZjZ7V5rKvNo49oBqzeVm1J/7dXr/Ri1Vm0t6t6A8oWqUf/3Bn29WbBVxEE9XKN6S5qOrQd7vAfnv889lP1o033xOZpaR1C+TP2m6T16Tpv69mnxXs6iRcsBYKkxvr76Pdjynupy/LIs2Args23KHUb5crdMm/1Tq9d7f1XPI3R
},
"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",
"best_labels.append(f'All {all_results[0, 0]}°\\nE: 6')\n",
"\n",
"best_results = best_results[::-1]\n",
"best_labels = best_labels[::-1]\n",
"\n",
"fig = plt.figure(figsize=(6, 4))\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",
"plt.xlim(0, 85)\n",
"\n",
"plt.tight_layout()\n",
"plt.savefig('best-barh.png')\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 58,
"id": "bcdf6d2a",
"metadata": {},
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": "<Figure size 1200x800 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=\"279.754375pt\" version=\"1.1\" viewBox=\"0 0 424.436875 279.754375\" width=\"424.436875pt\" 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-27T23:06:08.891063</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 424.436875 279.754375 \nL 424.436875 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 242.198125 \nL 417.236875 242.198125 \nL 417.236875 22.318125 \nL 101.446875 22.318125 \nz\n\" style=\"fill:#ffffff;\"/>\n </g>\n <g id=\"patch_3\">\n <path clip-path=\"url(#pfaeaf91720)\" d=\"M 101.446875 232.20358 \nL 228.580214 232.20358 \nL 228.580214 175.091891 \nL 101.446875 175.091891 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_4\">\n <path clip-path=\"url(#pfaeaf91720)\" d=\"M 101.446875 160.813969 \nL 218.474934 160.813969 \nL 218.474934 103.702281 \nL 101.446875 103.702281 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_5\">\n <path clip-path=\"url(#pfaeaf91720)\" d=\"M 101.446875 89.424359 \nL 179.01976 89.424359 \nL 179.01976 32.31267 \nL 101.446875 32.31267 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_6\">\n <path clip-path=\"url(#pfaeaf91720)\" d=\"M 228.580214 232.20358 \nL 332.08503 232.20358 \nL 332.08503 175.091891 \nL 228.580214 175.091891 \nz\n\" style=\"fill:#ff7f0e;\"/>\n </g>\n <g id=\"patch_7\">\n <path clip-path=\"url(#pfaeaf91720)\" d=\"M 218.474934 160.813969 \nL 326.549417 160.813969 \nL 326.549417 103.702281 \nL 218.474934 103.702281 \nz\n\" style=\"fill:#ff7f0e;\"/>\n </g>\n <g id=\"patch_8\">\n <path clip-path=\"url(#pfaeaf91720)\" d=\"M 179.01976 89.424359 \nL 280.666988 89.424359 \nL 280.666988 32.31267 \nL 179.01976 32.31267 \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(#pfaeaf91720)\" d=\"M 101.446875 242.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=\"m46fb55e567\" 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=\"#m46fb55e567\" y=\"242.198125\"/>\n </g>\n </g>\n <g id=\"text_1\">\n <!-- 0 -->\n <g transform=\"translate(98.265625 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(#pfaeaf91720)\" d=\"M 138.59864 242.198125 \nL 138.59864 22.318125 \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y9D4IYAdKnO1aLZceB/5MSSQ/WO2zNuVzbHXKNfG5iCAz/7dDPa3X4HWUBBzAmZTPxXbXtT1eh3KzBoB/VNvvprw3VgY2p9yND+ClwHkR8YLMfLxD3QvjLQy12vx9Zl4PkJl3RMQvgVdW2/ZnqJtdoyJiacpnR/1z4jbK36uHKZ/LOwAvBk6nnM/RWI/y3l4DuAe4kPIeWZ/yHlmKMn7azyPiWZTP0jMZSqxcDDxE+RHlJZQfZtal3P1168x8qstz+zLw/tqqe4BLKJ93ywBbA5tRXqO3AetExGty5C61UyjnbDPK5+avgVsofzN3pnzGAhwI/JUyHmHdpZTre11gj2rdbcAZHY7V/rk7sdoPyuvzZ8pr8hDlnK1HeS1XpLSqPikinszMH7TV8xBD77G3VrFD+Tvf6U6Und53I4qIo5j3s/VhSsuuOygJzJ0p53MZ4LMRMTUzP9hj9d+kvHfmAL8H/kK5Pl7A0N+i51Ge06uHie/9wKG1VfcAv6P83UrK+JHPofxdnDhfBVInY53xcnJycnJaNCdG0UKAMrhu/Rfd00cof3it7O2UVijztWCiDET+QK3s3h3KvL+2/c/As4c5ZlRxHg08rcP2DWr1zBzwuT22dqwftm1bj5LkaW3fYoS6JlESLq3yj1L+4V2qQ9nJlMHIzximroOY99fNH3Q6V1XZzYCvAC8f4dqZ1sP5mD7StdZW5snWuQPWaCs3of7cq+f7MWqt2jrUvSHlC1Wr/m8N+nwzb6uIw3o4R/WWNF1bD/Z4Dc59nXso+x9t18VnaGsdQfky9fO21+j5w9R3QIfXcgYdWg4ASy/g86tfgx2vqRH2X455WwH8zzDljqZ8uVt
},
"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",
"# best_results_256.append(all_results[0, 1:])\n",
"# best_labels_256.append(f'All {all_results[0, 0]}°\\nE: 6')\n",
"\n",
"best_results_256 = best_results_256[::-1]\n",
"best_labels_256 = best_labels_256[::-1]\n",
"\n",
"fig = plt.figure(figsize=(6, 4))\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",
"plt.xlim(0, 85)\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
}