Skip to content

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

License

Notifications You must be signed in to change notification settings

dvisockas/retrain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 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, Aurelijus Veryga, Agne Sirinskiene, Ingrida Simonyte and Algirdas Butkevicius

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 1000 \
--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 (77.84% sure)
butkevicius (17.72% sure)
karbauskis (3.24% sure)
sirinskiene (0.83% sure)
simonyte (0.36% sure)

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