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

326 lines
500 KiB
Plaintext
Raw Normal View History

{
"cells": [
{
"cell_type": "code",
2021-04-29 00:53:46 +01:00
"execution_count": 60,
"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-29 00:53:46 +01:00
"execution_count": 61,
"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-29 00:53:46 +01:00
"execution_count": 62,
"id": "c664a31c",
"metadata": {},
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": "<Figure size 1000x800 with 1 Axes>",
2021-04-29 00:53:46 +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-28T17:25:39.785125</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(#p9a9abbeb39)\" 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=\"mc9a2f6b3ad\" 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=\"#mc9a2f6b3ad\" 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(#p9a9abbeb39)\" 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=\"#mc9a2f6b3ad\" 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(#p9a9abbeb39)\" 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+xmzjlEREREREREpHMyeroAIiIiIiIiIr2RAmoRERERERGRJCigFhEREREREUmCAmoRERERERGRJCigFhEREREREUmCAmoRERERERGRJCigFhEREREREUmCAmoRERERERGRJCigFhEREREREUmCAmoRERERERGRJCigFhEREREREUmCAmoRERERERGRJCigFhEREREREUmCAmoRERERERGRJCigFhEREREREUmCAmoRERERERGRJCigFhEREREREUmCAmoRERERERGRJCigFhEREREREUm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vmqQk1le5EuU8N5f37FLzePw3l8404ab8XSvvzLniuV4fyuy9O2o+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-29 00:53:46 +01:00
"execution_count": 63,
"id": "1d3ecda0",
"metadata": {},
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": "<Figure size 1000x800 with 1 Axes>",
2021-04-29 00:53:46 +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-28T17:25:40.304379</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(#pd7d20fd8d2)\" 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=\"m885409f259\" 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=\"#m885409f259\" 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(#pd7d20fd8d2)\" 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=\"#m885409f259\" 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(#pd7d20fd8d2)\" 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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ot_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-29 00:53:46 +01:00
"execution_count": 64,
"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-29 00:53:46 +01:00
"execution_count": 71,
"id": "3d6e9057",
"metadata": {},
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": "<Figure size 1200x800 with 1 Axes>",
2021-04-29 00:53:46 +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 424.418125 279.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-28T22:44:04.811416</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.418125 279.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 242.198125 \nL 407.674375 242.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(#p5e78ee0ed4)\" d=\"M 101.446875 232.20358 \nL 264.482396 232.20358 \nL 264.482396 190.121283 \nL 101.446875 190.121283 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_4\">\n <path clip-path=\"url(#p5e78ee0ed4)\" d=\"M 101.446875 179.600709 \nL 243.689549 179.600709 \nL 243.689549 137.518412 \nL 101.446875 137.518412 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_5\">\n <path clip-path=\"url(#p5e78ee0ed4)\" d=\"M 101.446875 126.997838 \nL 238.759286 126.997838 \nL 238.759286 84.915541 \nL 101.446875 84.915541 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_6\">\n <path clip-path=\"url(#p5e78ee0ed4)\" d=\"M 101.446875 74.394967 \nL 165.387177 74.394967 \nL 165.387177 32.31267 \nL 101.446875 32.31267 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_7\">\n <path clip-path=\"url(#p5e78ee0ed4)\" d=\"M 264.482396 232.20358 \nL 344.867115 232.20358 \nL 344.867115 190.121283 \nL 264.482396 190.121283 \nz\n\" style=\"fill:#ff7f0e;\"/>\n </g>\n <g id=\"patch_8\">\n <path clip-path=\"url(#p5e78ee0ed4)\" d=\"M 243.689549 179.600709 \nL 326.524087 179.600709 \nL 326.524087 137.518412 \nL 243.689549 137.518412 \nz\n\" style=\"fill:#ff7f0e;\"/>\n </g>\n <g id=\"patch_9\">\n <path clip-path=\"url(#p5e78ee0ed4)\" d=\"M 238.759286 126.997838 \nL 323.308699 126.997838 \nL 323.308699 84.915541 \nL 238.759286 84.915541 \nz\n\" style=\"fill:#ff7f0e;\"/>\n </g>\n <g id=\"patch_10\">\n <path clip-path=\"url(#p5e78ee0ed4)\" d=\"M 165.387177 74.394967 \nL 249.171021 74.394967 \nL 249.171021 32.31267 \nL 165.387177 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(#p5e78ee0ed4)\" 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=\"me39d6a6c1a\" 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=\"#me39d6a6c1a\" 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
"image/png": "iVBORw0KGgoAAAANSUhEUgAABJsAAAMMCAYAAAD0M6ZoAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAB7CAAAewgFu0HU+AAC0v0lEQVR4nOzdd5xcdbn48c+ThNCSIL0qIIoiAVGKHYJgLxcFQUUpFsR67ddy/RHwWrh2VPSKUgRREQGxoIISEERABKmCIkGaSAjFQCCQPL8/vmeyJ5Odsrszsymf9+t1XnPmnO/5nmfOnJ3defZbIjORJEmSJEmSemHCeAcgSZIkSZKkFYfJJkmSJEmSJPWMySZJkiRJkiT1jMkmSZIkSZIk9YzJJkmSJEmSJPWMySZJkiRJkiT1jMkmSZIkSZIk9YzJJkmSJEmSJPWMySZJkiRJkiT1jMkmSZIkSZIk9YzJJkmSJEmSJPWMySZJkiRJkiT1jMkmSZIkSZIk9YzJJkmSJEmSJPWMySZJkiRJkiT1jMkmSZIkSZIk9YzJJkmSJEmSJPWMySZJkiRJkiT1jMkmSZIkSZIk9YzJJkmSpJVARLwmIn4aEbdFxMMRkdUya7xjk6RlQUTMrn02bjHe8UjLM5NNkiQiYlbtj6vhlkUR8e+IuCkizoiIt0bE1PGOe3kTEXs2Xdfrxjsmrfii+B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Uf+3+329WbI1xOFdXKN6C5q2rQa7vAcXv89dlP1w033xGZpaRVC+SP2q6T16Rov6DhrmvZzFMC0GgFVH+frq9+Cw91SH49dgyf/+f7pFuaMpX+xWb7F/YvV
},
"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",
"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",
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-29 00:53:46 +01:00
"execution_count": 72,
"id": "bcdf6d2a",
"metadata": {},
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": "<Figure size 1200x800 with 1 Axes>",
2021-04-29 00:53:46 +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 424.418125 279.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-28T22:44:05.211350</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.418125 279.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 242.198125 \nL 407.674375 242.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(#pabe25b91b0)\" d=\"M 101.446875 232.20358 \nL 182.199067 232.20358 \nL 182.199067 190.121283 \nL 101.446875 190.121283 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_4\">\n <path clip-path=\"url(#pabe25b91b0)\" d=\"M 101.446875 179.600709 \nL 206.237925 179.600709 \nL 206.237925 137.518412 \nL 101.446875 137.518412 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_5\">\n <path clip-path=\"url(#pabe25b91b0)\" d=\"M 101.446875 126.997838 \nL 197.908537 126.997838 \nL 197.908537 84.915541 \nL 101.446875 84.915541 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_6\">\n <path clip-path=\"url(#pabe25b91b0)\" d=\"M 101.446875 74.394967 \nL 165.387177 74.394967 \nL 165.387177 32.31267 \nL 101.446875 32.31267 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_7\">\n <path clip-path=\"url(#pabe25b91b0)\" d=\"M 182.199067 232.20358 \nL 248.589189 232.20358 \nL 248.589189 190.121283 \nL 182.199067 190.121283 \nz\n\" style=\"fill:#ff7f0e;\"/>\n </g>\n <g id=\"patch_8\">\n <path clip-path=\"url(#pabe25b91b0)\" d=\"M 206.237925 179.600709 \nL 291.552907 179.600709 \nL 291.552907 137.518412 \nL 206.237925 137.518412 \nz\n\" style=\"fill:#ff7f0e;\"/>\n </g>\n <g id=\"patch_9\">\n <path clip-path=\"url(#pabe25b91b0)\" d=\"M 197.908537 126.997838 \nL 286.990117 126.997838 \nL 286.990117 84.915541 \nL 197.908537 84.915541 \nz\n\" style=\"fill:#ff7f0e;\"/>\n </g>\n <g id=\"patch_10\">\n <path clip-path=\"url(#pabe25b91b0)\" d=\"M 165.387177 74.394967 \nL 249.171021 74.394967 \nL 249.171021 32.31267 \nL 165.387177 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(#pabe25b91b0)\" 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=\"mde2c9413fe\" 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=\"#mde2c9413fe\" 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
"image/png": "iVBORw0KGgoAAAANSUhEUgAABJsAAAMMCAYAAAD0M6ZoAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAB7CAAAewgFu0HU+AACz9klEQVR4nOzdd5xcdbn48c+ThNCSIL0qIIoiAVGKHYJgLxcFQUQpVhT12q96f14CVq4dFb2iFEFUREAsqKAEBBEQQaqgSFCKSAjFQCCQPL8/vmeyJ5Odsrszsymf9+t1XnPmnO/5nmfOnJ3defZbIjORJEmSJEmSemHCeAcgSZIkSZKkFYfJJkmSJEmSJPWMySZJkiRJkiT1jMkmSZIkSZIk9YzJJkmSJEmSJPWMySZJkiRJkiT1jMkmSZIkSZIk9YzJJkmSJEmSJPWMySZJkiRJkiT1jMkmSZIkSZIk9YzJJkmSJEmSJPWMySZJkiRJkiT1jMkmSZIkSZIk9YzJJkmSJEmSJPWMySZJkiRJkiT1jMkmSZIkSZIk9YzJJkmSJEmSJPWMySZJkiRJkiT1jMkmSZIkSZIk9YzJJkmSpJVARLwmIn4SEbdFxMMRkdUya7xjk6RlQUTMrn02bjHe8UjLM5NNkiQiYlbtj6vhlkUR8e+IuDkizoyIt0TE1PGOe3kTEXs2Xdfrxzsmrfii+C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11mzD1L0l5ctUo/5v9ft6s2RriCO6uEb1FjRtWw12eQ8ufp+7KPuhpvvi0zS1iqB8kfpl03v0jBb1HTzMezmLYVoMAKuO8vXV78Fh76kOx6/Bkv/9/1SLcsdQvtit3mL/xOr
},
"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",
"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",
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
}