kunalBhashkar / Image_classification_API

Image classification API using Deep Learning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

image_classifier_model

Image Classification with CIFAR-10 dataset

In this notebook, I am going to classify images from the CIFAR-10 dataset. The dataset consists of airplanes, dogs, cats, and other objects. You'll preprocess the images, then train a convolutional neural network on all the samples.

Model Architecture

Drawing

The entire model consists of 14 layers in total. In addition to layers below lists what techniques are applied to build the model.

  1. Convolution with 64 different filters in size of (3x3)
  2. Max Pooling by 2
  • ReLU activation function
  • Batch Normalization
  1. Convolution with 128 different filters in size of (3x3)
  2. Max Pooling by 2
  • ReLU activation function
  • Batch Normalization
  1. Convolution with 256 different filters in size of (3x3)
  2. Max Pooling by 2
  • ReLU activation function
  • Batch Normalization
  1. Convolution with 512 different filters in size of (3x3)
  2. Max Pooling by 2
  • ReLU activation function
  • Batch Normalization
  1. Flattening the 3-D output of the last convolutional operations.
  2. Fully Connected Layer with 128 units
  • Dropout
  • Batch Normalization
  1. Fully Connected Layer with 256 units
  • Dropout
  • Batch Normalization
  1. Fully Connected Layer with 512 units
  • Dropout
  • Batch Normalization
  1. Fully Connected Layer with 1024 units
  • Dropout
  • Batch Normalization
  1. Fully Connected Layer with 10 units (number of image classes)

the image below decribes how the conceptual convolving operation differs from the tensorflow implementation when you use [Channel x Width x Height] tensor format.

Drawing

Training the model

achieving over 75% accuracy in 10 epochs through 5 batches.

Drawing

Prediction

Drawing

flask_image_classifier_api

Download link of Inception

Model_link

Steps to run this project

Step01: Firstly, Download the model and put into ./web folder.

Step02: Install the docker docker_install

Step03: Install MongoDB Mongo_install (on Ubuntu)

Step04: Create the virtual environment by command: virtualenv venv (on Ubuntu)

step05: Activate the virtual environment: source bin/activate (For Ubuntu)

step06: Run sudo docker-compose up

About

Image classification API using Deep Learning


Languages

Language:Jupyter Notebook 87.2%Language:Python 12.7%Language:Dockerfile 0.1%