Skip to content
forked from dvisockas/retrain

Python scripts to retrain and infer inception v3 network with your own data

License

Notifications You must be signed in to change notification settings

mmejeras/retrain

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

inception-retrain

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

Steps

0. Install python/anaconda

You can download it by clicking here

1. Install tensorflow

$ conda install tensorflow

2. Retrain Inception

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.

3. Predict the label of an image using Inception

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)

About

Python scripts to retrain and infer inception v3 network with your own data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.4%
  • Shell 0.6%