{"cells": [{"metadata": {"_uuid": "09aaf98369c5937e121ae82b3a6d1f3be149c0be", "_cell_guid": "70bb3db7-52e8-407f-8e2c-b4b26d82f3cd"}, "cell_type": "markdown", "source": ["# Ten class images classification - CIFAR-10 - Acc 87%\n", "### **Yassine Ghouzam, PhD**\n", "#### 22/07/2017\n", "\n", "# Du to web access restriction on kaggle kernels , i can't run this notebook on kaggle but you can view it \n", "# Please check my ipython notebook at <a href=\"http://nbviewer.jupyter.org/gist/YassineGhouzam/e4536eae104a770c715045ae1b9f3894\"> http://nbviewer.jupyter.org/gist/YassineGhouzam/e4536eae104a770c715045ae1b9f3894</a>\n", "\n", "* **1. Introduction**\n", "* **2. Data preparation**\n", "    * 2.1 Load data\n", "    * 2.2 Normalization\n", "    * 2.3 Reshape\n", "    * 2.4 Label encoding\n", "    * 2.5 Split training and valdiation set\n", "* **3. CNN**\n", "    * 3.1 Define the model\n", "    * 3.2 Set the optimizer and annealer\n", "    * 3.3 Data augmentation\n", "* **4. Evaluate the model**\n", "    * 4.1 Training and validation curves\n", "    * 4.2 Confusion matrix\n", "* **5. Prediction and submition**\n", "    * 5.1 Predict and Submit results"]}, {"metadata": {"_uuid": "46375099ac391b3cec9039177a8728ca9d5adbd8", "_cell_guid": "87d5b5ab-5c70-4722-a604-d759175f9421"}, "cell_type": "markdown", "source": ["# 1. Introduction\n", "\n", "This is a sequential Convolutional Neural Network for image classification trained on CIFAR-10 dataset.\n", "\n", "CIFAR-10  is an established computer-vision dataset used for object recognition. It is a subset of the 80 million tiny images dataset and consists of 60,000 32x32 color images containing one of 10 object classes, with 6000 images per class. It was collected by Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton.\n", "\n", "I choosed to build a CNN with keras API (Tensorflow backend) which is very intuitive. Firstly, I will prepare the data (Images belonging to 10 categories of object) then ill focus on the CNN modeling and evaluation.\n", "\n", "I achieved 87% of accuracy with this CNN trained in 5h on a single CPU (I5 2500k). For those who have a >= 3.0 GPU capabilites (GTX 650 - Recent GPUs), you can use tensorflow-gpu with keras. Computation will be much much faster !!!\n", "\n", "**For computational reasons i set the number of steps (epochs) to 2, if you want to achieve 87+% of accuracy set it to 80.**\n", "\n", "This Notebook follows three main parts:\n", "\n", "* The data preparation\n", "* The CNN modeling and evaluation\n", "* The results prediction and submission\n", "\n", "\n", "\n", "\n", "<img src=\"https://kaggle2.blob.core.windows.net/competitions/kaggle/3649/media/cifar-10.png\"></img>"]}], "metadata": {"kernelspec": {"language": "python", "display_name": "Python 3", "name": "python3"}, "language_info": {"mimetype": "text/x-python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "name": "python", "version": "3.6.1", "file_extension": ".py", "codemirror_mode": {"version": 3, "name": "ipython"}}}, "nbformat": 4, "nbformat_minor": 2}