pip install --upgrade "tensorflow==1.7.*"
git clone https://github.com/Navan0/build-your-first-imageClassifier.git
cd build-your-first-imageClassifier
download your datasets
ls tf_files/data
yourclass1/
yourclass2/
yourclass3/
yourclass4/
yourclass5/
LICENSE.txt
In this exercise, we will retrain a MobileNet. MobileNet is a a small efficient convolutional neural network. "Convolutional" just means that the same calculations are performed at each location in the image.
Set those variables in your shell
IMAGE_SIZE=224
ARCHITECTURE="mobilenet_0.50_${IMAGE_SIZE}"
python -m scripts.retrain -h
python -m scripts.retrain \
--bottleneck_dir=tf_files/bottlenecks \
--how_many_training_steps=4000\
--model_dir=tf_files/models/ \
--summaries_dir=tf_files/training_summaries/"${ARCHITECTURE}" \
--output_graph=tf_files/retrained_graph.pb \
--output_labels=tf_files/retrained_labels.txt \
--architecture="${ARCHITECTURE}" \
--image_dir=tf_files/flower_photos
python -m scripts.label_image \
--graph=tf_files/retrained_graph.pb \
--image=tf_files/test/test_m.jpg