Computer Vision using CNN
Algorithm used : Convolution Nueral Network -- "Inception v3".
Task: Image recognition of “Dogs vs. Cats” using Convolutional Neural Network in python on Docker over a training dataset of 25000 images and test dataset of 12500 images.
-
Install Docker (installing Tensorflow using Docker)
-
Download Train Data (Folder_name: task). Folder 'task' contains subfolders 'cats' and 'dogs'
-
Start Docker with local files available (linking Tensorflow Image) $ sudo docker run -it -v $HOME/tf_files:/tf_files gcr.io/tensorflow/tensorflow:latest-devel
-
Retrieve the training code $ cd /tensorflow $ git pull
-
Retrain the Inception v3 model $ python tensorflow/examples/image_retraining/retrain.py
--bottleneck_dir=/tf_files/bottlenecks
--how_many_training_steps 500
--model_dir=/tf_files/inception
--output_graph=/tf_files/retrained_graph.pb
--output_labels=/tf_files/retrained_labels.txt
--image_dir /tf_files/task -
Inside Docker run the labelling script $ python /tf_files/label_image.py /tf_files/test/
-
Classifciation: A new csv file is generated "/tf_files/sample_submission.csv" having all the 'test' images with labels (1: Dog, 0: cat)
-
Start Docker with local files available (linking Tensorflow Image) $ sudo docker run -it -v $HOME/tf_files:/tf_files gcr.io/tensorflow/tensorflow:latest-devel
-
Put all the images to be tested and labelled in the folder 'test'
-
Inside Docker run the labelling script $ python /tf_files/label_image.py /tf_files/test/
-
Classification: A new csv file is generated "/tf_files/sample_submission.csv" having all the 'test' images with labels (1: Dog, 0: cat)
-
Sort the "/tf_files/sample_submission.csv" by column 'id'
https://drive.google.com/open?id=0B--hIR1DX43XY0tidm1BZnE5ODA