TensorFlow Image Classifier Demo by @Sirajology on Youtube
Python Shell
Switch branches/tags
Nothing to show
Clone or download
Latest commit b585f76 Jul 18, 2017
llSourcell committed Jul 18, 2017 Merge pull request #11 from metrafonic/patch-1
README Formatting
Permalink
Failed to load latest commit information.
src first Sep 10, 2016
Dockerfile first Sep 10, 2016
README.md README Formatting Jul 16, 2017
bash.sh first Sep 10, 2016
bashDev.sh first Sep 10, 2016
build.sh first Sep 10, 2016
guess.sh first Sep 10, 2016
guessDir.sh first Sep 10, 2016
train.sh first Sep 10, 2016

README.md

Tensorflow Image Classifier

This is the code for 'Image Classifier in TensorFlow in 5 Min on YouTube. Use this CodeLab by Google as a guide. Also this tutorial is quite helpful.

Requirements

Usage

You just need to make a "classifier" directory with a directory "data" inside it with all your images For example

 [any_path]/my_own_classifier/
 [any_path]/my_own_classifier/data
 [any_path]/my_own_classifier/data/car
 [any_path]/my_own_classifier/data/moto
 [any_path]/my_own_classifier/data/bus

and then put your image on it. This "classifier" directory will have your samples but also trained classifier after execution of "train.sh".

Train process

Just type

 ./train.sh [any_path]/my_own_classifier

And it will do anything for you !

Guess process

Just type for a single guess

 ./guess.sh [any_path]/my_own_classifier /yourfile.jpg

To guess an entire directory

./guessDir.sh [any_path]/classifier [any_path]/srcDir [any_path]/destDir

Example of result

# ./guess.sh /synced/tensor-lib/moto-classifier/ /synced/imagesToTest/moto21.jpg
moto (score = 0.88331)
car (score = 0.11669)

Use an absolute file path for classifier and images because the script dos not support relative path (volume mounting)

The Challenge

Make your own classifier for scientists, then post a clone of this repo with your retrained model in it. (you can name it retrained_graph.pb and it will be around 80 MB. If it's too big for GitHub, upload it to DropBox and post the link to it in your README)

Credits

Credit goes to Xblaster for the majority of this code. I've merely created a wrapper.