/NotAHotDog

Image classification using TensorFlow (Inception v3).

Primary LanguagePythonMIT LicenseMIT

Pied Piper NotAHotDog StyleCI Scrutinizer Code Quality License

Image classification using TensorFlow (Inception v3) that labels any JPEG image as "hot dog" or "not a hot dog".

Inspired by Jian Yang's "Shazaam for food" from Silicon Valley: Season 4 Episode 4.

Not a hot dog

Instructions

  1. Clone repository.

git clone https://github.com/TheDoctor0/NotAHotDog.git

  1. Install requirements.

python -m pip install -r requirements.txt

  1. Get Tensorflow Inception v3.

curl -LO https://github.com/tensorflow/hub/raw/master/examples/image_retraining/retrain.py

  1. Retrain model.

python retrain.py --bottleneck_dir=bottlenecks --model_dir=inception --summaries_dir=training_summaries/long --output_graph=retrained_graph.pb --output_labels=retrained_labels.txt --image_dir=images

  1. Use classifier on any JPEG image.

python checker.py image_path.jpg

Example

$ python checker.py dog.jpg
not a hot dog (98.92%)