/tensorflow-for-poets-2

neural network for flower recognition

Primary LanguagePythonApache License 2.0Apache-2.0

Overview

This repo contains code for the "TensorFlow for poets 2" series of codelabs.

There are multiple versions of this codelab depending on which version of the tensorflow libraries you plan on using:

This repo contains simplified and trimmed down version of tensorflow's example image classification apps.

The scripts directory contains helpers for the codelab. Some of these come from the main TensorFlow repository, and are included here so you can use them without also downloading the main TensorFlow repo (they are not part of the TensorFlow pip installation).


wget "http://download.tensorflow.org/example_images/flower_photos.tgz"
tar xzvf flower_photos.tgz && mv flower_photos tf_files/
python3 scripts/retrain.py --output_graph=tf_files/retrained_graph.pb --output_labels=tf_files/retrained_labels.txt --image_dir=tf_files/flower_photos
python3 scripts/label_image.py --input_height=299 --input_width=299 --input_layer="Mul" --image "tf_files/flower_photos/daisy/3475870145_685a19116d.jpg"