Skip to content

Image recognition and classification using Convolutional Neural Networks with TensorFlow

Notifications You must be signed in to change notification settings

narenmanoharan/ImageNet-Classifier-Tensorflow

Repository files navigation

ImageNet Classifier with TensorFlow

  • Deep CNN with AlexNet for Classifying/Recognizing objects
  • Built using Python, TensorFlow, TFlearn and AWS EC2
  • Used g2.8x GPU instances to speed up the classification process
  • Built a model with an error rate of 6.2%
  • Used factional max pooling with sparse CNN to improve accuracy

Technical Specifications

  • Python 2.7
  • TensorFlow 0.10.0
  • TFLearn 0.2.1
  • CUDA 8
  • CuDnn v5

Convolutional Neural Network

Cover

AlexNet Classifier

alexnet2

Dataset Links

CIFAR 10 dataset

102 Category Flower Dataset

Executing the model

Initiate EC2 instance on AWS with the following specification

  • g2.8x
  • 80GB SSD
  • 32 vCPU

Installing initial dependencies

sudo apt-get update
sudo apt-get -y dist-upgrade
sudo apt-get install python
sudo apt install python3-pip
sudo apt-get install -y libglu1-mesa libxi-dev libxmu-dev libglu1-mesa-dev gcc g++ gfortran build-essential git wget linux-image-generic libopenblas-dev python-dev liblapack-dev libblas-dev build-essential cmake git unzip pkg-config linux-image-generic linux-image-extra-virtual linux-source linux-headers-generic 

Installing compression libraries

sudo apt-get install zlib1g-dev python-imaging

Exporting TensorFlow 0.10.0 for Python 2.7

export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0rc0-cp27-none-linux_x86_64.whl

Installing TensorFlow

sudo pip install --upgrade $TF_BINARY_URL

Installing and upgrading Python and Pip

sudo apt-get install python
sudo apt install python-pip
sudo pip install --upgrade pip

Downloading and installing

wget -qO- https://github.com/tflearn/tflearn/tarball/0.2.1 | tar xvz
cd tflearn-tflearn-a55c1fd/
sudo python setup.py install

Installing scipy stack dependencies

sudo pip install pillow numpy scipy h5py

Install CUDA

https://developer.nvidia.com/cuda-downloads

Installing CuDNN

https://developer.nvidia.com/cudnn

SCP the code into the remote server and run the code using python 2.7

python alex_net.py

About

Image recognition and classification using Convolutional Neural Networks with TensorFlow

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages