Image recognition using TensorFlow

This repo gives final layer image retraining for your own images.

Add your images to the training_"dataset folder"

Add more and more images(atleast 30 images for each class required.)

First execute the bash script to download the Imagenet files.

Next, run the python script to retrain your images which outputs validation accuracy etc.,

https://github.com/shivakrishna9/tensorflow-retrain


I would recommend using Google's trained Inception model to do image recognition. Please refer to the example "How to Retrain Inception's Final Layer for New Categories" on tensorflow website. It is at https://www.tensorflow.org/versions/r0.9/how_tos/image_retraining/index.html.

Using trained model is easy and can achieve reasonable accuracy. You just simply feed the model with your own data set. The last classication layer of Google's inception will be modified and we only train the last layer. For several thousand images with in several categories, it only take several hours to finish training. Please note: in order to use the example, you have to build tensorflow from source.

I am using the transfer learning feature and achieving very good results. To illustrate the benefit of transfer learning, I am comparing "Transfer Learning on Trained GoogleNet" with "Build and train a 5-layer-Convnet from scratch". The classification task is done on 5000 images with 5 categories.

Build a 5-layer-convet and train it from scratch

Use the transfer learning on the trained GoogleNet

See this simple example: https://www.youtube.com/watch?v=QfNvhPx5Px8 (Build a TensorFlow Image Classifier in 5 Min)