Image recognition using TensorFlow

Philip Adzanoukpe picture Philip Adzanoukpe · Jan 9, 2016 · Viewed 23k times · Source

I'm new to TensorFlow and I am looking for help on image recognition. Is there an example that showcases how to use TensorFlow to train your own digital images for image recognition like the image-net model used in the TensorFlow image recognition tutorial

I looked at the CIFAR-10 model training but it doesn't seem to provide examples for training your own images.

Answer

Zhenyu Wu picture Zhenyu Wu · Jul 22, 2016

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)