-
Notifications
You must be signed in to change notification settings - Fork 0
Automatic classifier using tensorflow
License
donno2048/Classifier
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Classifier\n", "Automatic image classifier using tensorflow\n", "\n", "To use it just import the Classifier (`from Classify import Classifier`)\n", "\n", "(You need the _Classify.py_ file from this repo in the same directory in order to do so)\n", "\n", "The Classifier has several inputs:\n", "\n", "- The first argument is `images` and those are the images for the training (required)\n", " \n", "- The second argument is `labels` and those are the labels for the training (required)\n", " \n", "- The third argument is `number_of_neurons` and this is the number of neurons in the second layer [default: 100]\n", " \n", "- The forth argument is `method` and this is the activation method of the second layer [default: relu]\n", " \n", "- The fifth argument is `optimizer` and this is the optimizer used for the training [default: Adam]\n", " \n", "- The last argument is `runs` and this is the number of times the model will be trained [default: 1]\n", "\n", "See the example below for more details:" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "scrolled": true }, "outputs": [], "source": [ "!python -m pip install tensorflow matplotlib --user --quiet" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "%matplotlib inline\n", "from Classify import Classifier\n", "from tensorflow.keras.datasets import fashion_mnist\n", "from matplotlib import pyplot" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "(train_images, train_labels), (test_images, test_labels) = fashion_mnist.load_data()\n", "labels = [\"Top\", \"Trouser\", \"Pullover\", \"Dress\", \"Coat\", \"Sandals\", \"Shirt\", \"Sneaker\", \"Bag\", \"Boot\"]" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Epoch 1/3\n", "1875/1875 [==============================] - 3s 1ms/step - loss: 3.7569 - accuracy: 0.7216\n", "Epoch 2/3\n", "1875/1875 [==============================] - 3s 1ms/step - loss: 0.6332 - accuracy: 0.7821\n", "Epoch 3/3\n", "1875/1875 [==============================] - 3s 1ms/step - loss: 0.5584 - accuracy: 0.8066\n" ] } ], "source": [ "classify = Classifier(train_images, train_labels, runs = 3)" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAPsAAAEICAYAAACZA4KlAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8rg+JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAATW0lEQVR4nO3dfbCcZX3G8e9lAgSSKHk5ZkISOEpDLaM0cU5jVbRUrYWIAraD0hkLHTUwhaHOMCOMVqWjtoxTdXRQaSwZ0NoA1VgzlTa8tI4EMOZIIS9kIFRPIO8niXkFgYRf/9gnzhLP3vdhd8/uyn19Zs5kz/722ed3nnOu7Mu993MrIjCzl79XdLsBM+sMh92sEA67WSEcdrNCOOxmhXDYzQrhsP+Wk3SLpM9Vl98m6bEm7+cmSZ9qb3fWSxz2DpA0JOkZSQcl7agCOqnd+4mI+yLid0fRz2WSVh6z7RUR8dl29zTCvq+X9Hx1LA5K2iDpz9p03z+S9JF23NfLkcPeOe+NiEnAG4EB4G+PvYGk8R3vqjtuj4hJ1fH4GPAvkmZ0uaeXPYe9wyJiC/CfwOsBJIWkKyVtBDZW150v6WFJeyU9IOmso9tLmi/pIUkHJN0OTKirnSNpc933cyQtkzQsabekGyX9HnAT8ObqkXVvddtfvxyovv+opCck7ZG0XNIpdbWQdIWkjVWPX5OkJo/HCuAAcPoo9/0WSasl7av+fUt1/eeBtwE3Vj/Xjc3083LmsHeYpDnAQuB/666+EHgTcKak+cAS4HJgGvBPwHJJJ0g6Hvh34NvAVODfgBGfAksaB/wHsAnoB2YBt0XEBuAK4MHq0fXkEbZ9B/APwMXAzOo+bjvmZucDfwCcVd3uT6ttT63+Azh1FMdCkt4DHA88mtu3pKnAD4GvVsfmS8APJU2LiE8C9wFXVT/XVbn9Fyci/DXGX8AQcBDY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Y/b5XfoPtNZ0fEG4HzgCurp6s9KWqvwXpp7HRUy3h3ygjLjP9aN49ds8uft6obYd8CzKn7fnZ1XU+IiC3VvzuB79N7S1HvOLqCbvXvzi7382u9tIz3SMuM0wPHrpvLn3cj7KuBuZJeI+l44IPA8i708RskTazeOEHSRODd9N5S1MuBS6vLlwI/6GIvL9Iry3g3WmacLh+7ri9/HhEd/wIWUntH/v+AT3ajhwZ9vRZ4pPpa3+3egKXUntY9T+29jQ8D04B7gY3APcDUHurt28BaYA21YM3sUm9nU3uKvgZ4uPpa2O1jl+irI8fNH5c1K4TfoDMrhMNuVgiH3awQDrtZIRx2s0I47GaFcNjNCvH/k0XLOpzvsycAAAAASUVORK5CYII=", "text/plain": [ "<Figure size 432x288 with 1 Axes>" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "pyplot.imshow(test_images[0], cmap = pyplot.cm.binary)\n", "pyplot.title(f\"Prediction: {labels[classify(test_images[0])]}\")\n", "pyplot.show()" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAPsAAAEICAYAAACZA4KlAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8rg+JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAWm0lEQVR4nO3df5BdZZ3n8feHkN+JSSBNAgmSEcSSshDYnjAUDmZlVhChQHYKZGYRtlyClu6s5dQWLrs4uD8GypoZpWpGZ+JIGWecREWUuMoOwjICDoptJig/DYYOJCQhIQlJyO/ku3/cE7YJfZ+nc8+9fS88n1dVV9++3/Oc872n+9vn3vOc5zyKCMzsze+obidgZqPDxW5WCBe7WSFc7GaFcLGbFcLFblYIF3uPkvQ1Sf+zevy7kp5ucT1/Lemm9mbXXpJC0inV41dft7WXi70GSYOSdknaIWlD9Yc6pd3biYgHI+IdI8jnWkkPHdb2Yx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Y9v5vo1rsr9u4NBAR/V1LIKFXc+vVvMC5tWq0cvPbeLNCuNjNCtHtYl/U5e2n9GpuvZoXOLdWjUpuXf3Mbmajp9tHdjMbJS52s0J0pdglXSjpaUnPSPpMN3JoRtKgpF9JWiFpoMu53C7pRUmPDXnuGEk/krSy+j7sHHtdyu1mSWurfbdC0kVdyu1ESfdLekLS45L+U/V8V/ddIq9R2W+j/pld0hjg18C/AdYAPweuiognRjWRJiQNAv0R0fULMCSdB+wAvh4R76qe+zywOSJurf5RzoiIG3okt5uBHd2exruarej4odOMA5cB19LFfZfI6wpGYb9148g+H3gmIlZFxF5gKXBpF/LoeRHxALD5sKcvBRZXjxfT+GMZdU1y6wkRsS4illePtwOHphnv6r5L5DUqulHsc4Dnh/y8ht6a7z2AeyT9QtLCbiczjFkRsa56vB6Y1c1khpGdxns0HTbNeM/su1amP6/LJ+he7z0RcRbwAeAT1dvVnhSNz2C91Hc6omm8R8sw04y/qpv7rtXpz+vqRrGvBU4c8vPc6rmeEBFrq+8vAt+l96ai3nBoBt3q+4tdzudVvTSN93DTjNMD+66b0593o9h/Drxd0m9JGgd8GFjWhTxeR9Lk6sQJkiYD76f3pqJeBlxTPb4GuKuLubxGr0zj3Wyacbq877o+/XlEjPoXcBGNM/K/Af5rN3JoktfbgEerr8e7nRuwhMbbun00zm18FDgWuA9YCdwLHNNDuf0d8CvglzQK6/gu5fYeGm/RfwmsqL4u6va+S+Q1KvvNl8uaFcIn6MwK4WI3K4SL3awQLnazQrjYzQrhYjcrhIvdrBD/DxuhmmvDfeRvAAAAAElFTkSuQmCC", "text/plain": [ "<Figure size 432x288 with 1 Axes>" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "pyplot.imshow(test_images[1], cmap = pyplot.cm.binary)\n", "pyplot.title(f\"Prediction: {labels[classify(test_images[1])]}\")\n", "pyplot.show()" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAAN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0TEScWy64EtEXFd8UQ5ISI+2iW9LQS2dXoa72K2oqnV04wDFwDvp4PbLtHXxbRhu3Vizz4XWB0RT0fEbuBWYF4H+uh6EfETYMtBi+cBi4vLi6n8Z2m7Gr11hYhYHxEPF5e3AgemGe/otkv01RadCPsxwNqq68/RXfO9B/BDST+TtKDTzQxiSkSsLy5vAKZ0splBlE7j3U4HTTPeNduununPG+UP6F7pbRFxKnAucGXxcrUrReU9WDeNnQ5pGu92GWSa8d/p5Lard/rzRnUi7OuA6VXXjy2WdYWIWFf83gTcQfdNRb3xwAy6xe9NHe7nd7ppGu/BphmnC7ZdJ6c/70TYlwMnSHqdpFHAJcCSDvTxCpLGFR+cIGkc8C66byrqJcBlxeXLgO91sJcBumUa71rTjNPhbdfx6c8jou0/wHlUPpH/FfC3neihRl+zgEeLnyc63RtwC5WXdXuofLbxAWASsBR4CrgXmNhFvX0TeBx4jEqwpnaot7dReYn+GLCi+Dmv09su0Vdbtpu/LmuWCX9AZ5YJh90sEw67WSYcdrNMOOxmmXDYzTLhsJtl4v8BZlCNqVEtplkAAAAASUVORK5CYII=", "text/plain": [ "<Figure size 432x288 with 1 Axes>" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "pyplot.imshow(test_images[2], cmap = pyplot.cm.binary)\n", "pyplot.title(f\"Prediction: {labels[classify(test_images[2])]}\")\n", "pyplot.show()" ] } ], "metadata": { "interpreter": { "hash": "81794d4967e6c3204c66dcd87b604927b115b27c00565d3d43f05ba2f3a2cb0d" }, "kernelspec": { "display_name": "Python 3.9.8 64-bit", "language": "python", "name": "python3" }, "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.8" } }, "nbformat": 4, "nbformat_minor": 2 }
About
Automatic classifier using tensorflow