Guest User

Untitled

a guest
Apr 20th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.16 KB | None | 0 0
  1. tf_files/cockroaches_photos/americancockroach/images
  2.  
  3. ex:tf_files/cockroaches_photos/americoncockroach/4.jpg
  4.  
  5. IMAGE_SIZE=299
  6.  
  7. ARCHITECTURE="inception_v3"
  8.  
  9. python -m scripts.retrain --bottleneck_dir=tf_files/bottlenecks --model_dir=tf_files/models/"${ARCHITECTURE}" --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/i_cockr_photos
  10.  
  11. INFO: tensorflow:Final test accuracy = 93.2% (N=44)
  12.  
  13. input_height=299
  14. input_width=299
  15. input_layer=”Mul”
  16. output_layer=”final_result”
  17.  
  18. python -m scripts.label_image --graph=tf_files/retrained_graph.pb --image=tf_files/i_cockr_photos/germancockroach/images.jpg
  19.  
  20. python -m tensorflow.python.tools.optimize_for_inference --input=tf_files/retrained_graph.pb --output=tf_files/optimized_graph.pb --input_format=TENSORFLOW_GRAPHDEF --output_format=TENSORFLOW_GRAPHDEF --input_shape=1,299,299,3 --input_names="Mul" --output_names="final_result"
  21.  
  22. python -m scripts.label_image --graph=tf_files/optimized_graph.pb --image=tf_files/i_cockr_photos/germancockroach/images.jpg
  23.  
  24. germancockroach 0.882129
  25. brownbandedcockroach 0.0920963
  26. americancockroach 0.0245122
  27. australianspiderbeetle 0.000708876
  28. greenhousecockroach 0.000419114
  29.  
  30. toco --input_file=/home/sudheer_sure/t_working/tf_files/retrained_graph.pb --output_file=/home/sudheer_sure/t_working/tf
  31. _files/t_c_labs_retrained_graph.lite --input_format=TENSORFLOW_GRAPHDEF --output_format=TFLITE --input_shape=1,299,299,3 --input_array=Mul --output_array=final_result --inference_type=FLOAT --input_type=FLOAT
  32.  
  33. toco --input_file=/home/sudheer_sure/t_working/tf_files/optimized_graph.pb --output_file=/home/sudheer_sure/t_working/tf
  34. _files/t_c_labs_optimized_graph.lite --input_format=TENSORFLOW_GRAPHDEF --output_format=TFLITE --input_shape=1,299,299,3 --input_array=Mul --output_array=final_result --inference_type=FLOAT --input_type=FLOAT
  35.  
  36. sudo bazel-bin/tensorflow/contrib/lite/toco/toco '--input_format=TENSORFLOW_GRAPHDEF' '--input_file=/home/sudheer_sure/t_working/tf_files/retrained_graph.pb' '--output_format=TFLITE' '--output_file=/home/sudheer_sure/dummy/bazel_toco_retrain_inception_v3.lite' '--inference_type=FLOAT' '--inference_input_type=FLOAT' '--input_arrays=Mul' '--output_arrays=final_result' '--input_shapes=1,299,299,3' '--input_names=DecodeJpeg/contents' '--output_names=pool_3/_reshape'
  37.  
  38. sudo bazel-bin/tensorflow/contrib/lite/toco/toco '--input_format=TENSORFLOW_GRAPHDEF' '--input_file=/home/sudheer_sure/t_working/tf_files/optimized_graph.pb' '--output_format=TFLITE' '--output_file=/home/sudheer_sure/dummy/bazel_toco_object_inception_v3.lite' '--inference_type=FLOAT' '--inference_input_type=FLOAT' '--input_arrays=Mul' '--output_arrays=final_result' '--input_shapes=1,299,299,3' '--input_names=DecodeJpeg/contents' '--output_names=pool_3/_reshape'
  39.  
  40. americancockroach 0.814701
  41.  
  42. greenhousecockroach 0.157736
  43.  
  44. germancockroach 0.0224954
  45.  
  46. brownbandedcockroach 0.00405233
  47.  
  48. australianspiderbeetle 0.000568162
  49.  
  50. australianspiderbeetle, 0.012658036
  51.  
  52. confusedflourbeetle, 0.013540811
  53.  
  54. americancockroach, 0.033697817
Add Comment
Please, Sign In to add comment