NYU CS 6293: Machine-Learning-Project
March 14, 2019 · View on GitHub
Prerequisites
Python 3.6
TensorFlow 1.13
OpnCV 3.4
Numpy 1.12
Pandas 0.22
Docker (latest should work)
Requests 2.1
Stpes to execute our code:
-
Install Docker
-
docker run hello-world
-
docker run -it gcr.io/tensorflow/tensorflow:latest-devel
-
Check Tensorflow:
python import tensorflow
-
Retrieve Images: cd mkdir tf_files curl -O https://goo.gl/NohU7G tar xzf DataSets.tar HOME/tf_files/DataSets/food_photos
-
Link image dataset virtually to tensorflow: ls /tf_files/DataSets food_photos
-
Retrieving the Training code: git pull
-
Training the Inception model: $ python tensorflow/examples/image_retraining/retrain.py
-- bottleneck_dir=/tf_files/ImageDataSets/bottlenecks
-- how_many_training_steps 500
-- model_dir=/tf_files/ImageDataSets/inception
-- output_graph=/tf_files/ImageDataSets/retrained_graph.pb
-- output_labels=/tf_files/ImageDataSets/retrained_labels.txt
-- image_dir /tf_files/DataSets/food_photosThe retraining script will write out a version of the Inception v3 network with a final layer retrained to your categories to /tmp/output_graph.pb and a text file containing the labels to /tmp/output_labels.txt.
-
Using trained model to predict new images: curl -L goo.gl/NyNBG5 > docker run -it -v
/DataSets/test_photos:/tf_files/ImageDataSets/test_photos gcr.io/tensorflow/tensorflow:latest-devel -
Predicting new images: python /tf_files/label_image.py /ImageDataSets/test_photos/VegBurger/notburger_cake1.jpg
Team members:
- Harshit Pareek (hp1014),
- Jubin Soni (jas1464),
- Ankur Patil (asp549) GitHubIDs:@jubins @hp1014 @ankpatil18
Please contact anyone of us if you face any difficulty in executing the code.