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

197 lines
132 KiB
Plaintext
Raw Normal View History

{
"cells": [
{
"cell_type": "code",
"execution_count": 14,
"id": "3c568ab9",
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import matplotlib as mpl\n",
"from matplotlib import pyplot as plt"
]
},
{
"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": 15,
"id": "1b2471d2",
"metadata": {},
"outputs": [],
"source": [
"standard_res = [20.88, 48.24, 3.34, 25.25]\n",
"flipped_res = [44.84, 72.45, 2.84, 49.02]\n",
"\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",
" [5, 32.43, 60.9, 3.35, 34.77]\n",
"])"
]
},
{
"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"
],
"cell_type": "markdown",
"metadata": {}
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [],
"source": [
"all_results = np.array([\n",
" [5, 53.24, 79.49, 2.69, 55.64]\n",
"])"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "c664a31c",
"metadata": {},
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": "<Figure size 432x288 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=\"277.314375pt\" version=\"1.1\" viewBox=\"0 0 382.603125 277.314375\" width=\"382.603125pt\" 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-19T23:24:37.147700</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 277.314375 \nL 382.603125 277.314375 \nL 382.603125 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 239.758125 \nL 375.403125 239.758125 \nL 375.403125 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(#p33d530c251)\" d=\"M 48.017111 239.758125 \nL 48.017111 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=\"m2e5789d47d\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"48.017111\" xlink:href=\"#m2e5789d47d\" y=\"239.758125\"/>\n </g>\n </g>\n <g id=\"text_1\">\n <!-- 0 -->\n <g transform=\"translate(44.835861 254.356562)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(#p33d530c251)\" d=\"M 87.03809 239.758125 \nL 87.03809 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=\"87.03809\" xlink:href=\"#m2e5789d47d\" y=\"239.758125\"/>\n </g>\n </g>\n <g id=\"text_2\">\n <!-- 5 -->\n <g transform=\"translate(83.85684 254.356562)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(#p33d530c251)\" d=\"M 126.059069 239.758125 \nL 126.059069 22.318125 \n\" style=\"fill:none;stroke:#b0b0b0;stroke-linecap:square;stroke-width:0.8;\"/>\n </g>\n <g id=\
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEWCAYAAABhffzLAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAAsTAAALEwEAmpwYAABT8klEQVR4nO3dd3xUVfr48c+T3jsJoSaUgAqEJiIiHXsBERVcxYquvfBzWd11dS1r4avg2lcRKxFUwIIoHRGlFyNIBwmEFhJICOnn98e9mUwaJCGTScjzfr3mNXP7M3eS59x7zr3nijEGpZRSjYeHuwNQSilVtzTxK6VUI6OJXymlGhlN/Eop1cho4ldKqUZGE79SSjUymvgbABGJExEjIl5VmPcWEVlaF3HVZ2L5QETSRWSFu+OpayLylIh84uJttBKRLBHxrM15letp4q9lIrJLRPJEJKrM+LV28o5zU2jOsQTZ/4TfuzsWF+oLDAVaGGN6ne7KnArfLPu1S0TGV3PZUxbcTsvsEpEhNY+40vXe6PQdTohIkdNwVnXWZYz50xgTZIwprM15q0tEptj/c5n2K1lE/iMiodVYh0v2d32lid81dgKjigdEpDMQ4L5wy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yz+s4vF+oeBnT/MJqn7BsXSideYR369k3M4lsHcN9H2oml9eKdVQaeKvqqIiK8nvW2sl9+Ikn2M/k8HDG2LOhrOuAu8AWP8Zf0YNpFXaYhjyNES2teY9kWG9V/TK2F3yOffYyeMRj/IFh6PACKu4wAiIhGk3w/B3wPiUVEONnOLCHaeUqm808VekqAiObC99FJ+6viQZe/pAzDlwzjXQrCvEJkL02eD
},
"metadata": {
"needs_background": "light"
}
}
],
"source": [
"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(0)\n",
"\n",
"plt.title('Model Accuracy for Rotated Training Data')\n",
"plt.ylabel('% Accuracy')\n",
"plt.xlabel('Degrees Rotation')\n",
"\n",
"plt.legend()\n",
"plt.grid()\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": "<Figure size 432x288 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=\"277.314375pt\" version=\"1.1\" viewBox=\"0 0 464.364062 277.314375\" width=\"464.364062pt\" 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-19T23:39:59.623821</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 277.314375 \nL 464.364062 277.314375 \nL 464.364062 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 122.364063 239.758125 \nL 457.164062 239.758125 \nL 457.164062 22.318125 \nL 122.364063 22.318125 \nz\n\" style=\"fill:#ffffff;\"/>\n </g>\n <g id=\"patch_3\">\n <path clip-path=\"url(#p682b236a21)\" d=\"M 122.364063 229.874489 \nL 335.924942 229.874489 \nL 335.924942 188.259178 \nL 122.364063 188.259178 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_4\">\n <path clip-path=\"url(#p682b236a21)\" d=\"M 122.364063 177.85535 \nL 308.688308 177.85535 \nL 308.688308 136.240039 \nL 122.364063 136.240039 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_5\">\n <path clip-path=\"url(#p682b236a21)\" d=\"M 122.364063 125.836211 \nL 302.230137 125.836211 \nL 302.230137 84.2209 \nL 122.364063 84.2209 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_6\">\n <path clip-path=\"url(#p682b236a21)\" d=\"M 122.364063 73.817072 \nL 206.119719 73.817072 \nL 206.119719 32.201761 \nL 122.364063 32.201761 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_7\">\n <path clip-path=\"url(#p682b236a21)\" d=\"M 335.924942 229.874489 \nL 441.221205 229.874489 \nL 441.221205 188.259178 \nL 335.924942 188.259178 \nz\n\" style=\"fill:#ff7f0e;\"/>\n </g>\n <g id=\"patch_8\">\n <path clip-path=\"url(#p682b236a21)\" d=\"M 308.688308 177.85535 \nL 417.193601 177.85535 \nL 417.193601 136.240039 \nL 308.688308 136.240039 \nz\n\" style=\"fill:#ff7f0e;\"/>\n </g>\n <g id=\"patch_9\">\n <path clip-path=\"url(#p682b236a21)\" d=\"M 302.230137 125.836211 \nL 412.98175 125.836211 \nL 412.98175 84.2209 \nL 302.230137 84.2209 \nz\n\" style=\"fill:#ff7f0e;\"/>\n </g>\n <g id=\"patch_10\">\n <path clip-path=\"url(#p682b236a21)\" d=\"M 206.119719 73.817072 \nL 315.86851 73.817072 \nL 315.86851 32.201761 \nL 206.119719 32.201761 \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(#p682b236a21)\" d=\"M 122.364063 239.758125 \nL 122.364063 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=\"mc7617eb315\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"122.364063\" xlink:href=\"#mc7617eb315\" y=\"239.758125\"/>\n </g>\n </g>\n <g id=\"text_1\">\n <!-- 0 -->\n <g transform=\"translate(119.182812 254.356562)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 32
"image/png": "iVBORw0KGgoAAAANSUhEUg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WkrSVizcxNlaFwInS/pMjq+fpH1b2KbgdWCQpKWKyvqSasizJW3OJz8KoIXPNqlGvo6k/fN7sx+wPulz2yxJ20oamlsJ3iP90FrQwmZ1xQnU6sHflK6/fI907urgiChcBnEiqZn2wdw09y8+OU+1dn78PqmTxh8iYkxe9gvgx7mZ6/hKgshf9oUvyedJtaeLSU17kM79PZ5jPRf4ekR8lJvmzgDuz8fbsmTXe5G+3K+IiNcKN+ASUseLnUiJ4HpSL8X3SB1WeuXzeV8ifeG+RjpnuW3e75WknqjT8najW3h+T5DOPz5A+iIdSuodWVh+Q34e15B6TN5CPseYXZ63qbT5tuBIUg3tOeC+vP9LWrmP/fLrPpNUW5pB6sT0Sl7+W1InlbeAB0lN/cXOBfZRutb4PFLT4e2kDk0vkDrtlGtKPhCYGBF3lrx/55Fr5RFxF+n1n0zqiFaaQA4g9WCdAfw8rzunla8BABFxMyl5X5f/Jx4jXY5ViXtIlxi9JumtXPY94HRJs0gd6K4vOlazn+2i8/TH5ed2ArBbRLxFy1Ym/Sh7j9Sj+N+0/rPVqQo9Fs3MmqXUGeYp0uU3XaqzR72RNBp4KiJKa8rWhbgGamYtyuccjwWuc/JsPUmbSfq0pCUk7US6FOWWTg7L2qgjRycxsy4od5R6ndTUuVMnh9NVrQzcRLpsYzrw3Yh4tHNDsrZyE66ZmVkV3IRrZmZWBTfhdhP9+/ePIUOGdHYYZX3wwQf07t27s8Moq97jg/qP0fG1jeNrm2rjGz9+/FsR0eSAGU6g3cRKK63EuHHjOjuMshobGxk+fHhnh1FWvcc
},
"metadata": {
"needs_background": "light"
}
}
],
"source": [
"best_results = [standard_res, flipped_res]\n",
"best_labels = ['Unaugmented\\nExpansion Factor: 1', 'Flipped\\nExpansion Factor: 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 Rotation\\n{b_clock[0]} Degrees\\nExpansion Factor: 2')\n",
"\n",
"best_results.append(all_results[0, 1:])\n",
"best_labels.append(f'All Transforms\\n{all_results[0, 0]} Degrees\\nExpansion Factor: 6')\n",
"\n",
"best_results = best_results[::-1]\n",
"best_labels = best_labels[::-1]\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 Test Accuracy for Data Augmentations')\n",
"plt.xlabel('% Test Accuracy')\n",
"plt.ylabel('Data Augmentation Methods')\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
}