Standalone version of Tensorflow Inception Retrain. Google Codelabs can be found here.
This example downloads a pre-trained version of the inception model and re-trains the last layers to recognize custom categories of images.
In particular we will use pictures of Ramūnas Karbauskis and Aurelijus Veryga
You can download it by clicking here
$ conda install tensorflow
Run the following command (edit paths and training steps as you please)
python ./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/zali
read more about their content here.
Let's test the re-training on a Veryga image:
python ./label_image.py ./tf_files/ar_tikrai_veryga.jpg
you should get something like:
veryga (score = 0.99771)
karbakrauskis (score = 0.00229)