2017년 8월 15일 화요일

fine-tuning with tensorflow

https://www.tensorflow.org/tutorials/image_retraining

찬찬히 잘 따라 하면 된다.

1. 꽃이미지 받고
    curl -O http://download.tensorflow.org/example_images/flower_photos.tgz
    tar xzf flower_photos.tgz
2. bazel build tensorflow/examples/image_retraining:retrain
  q: python -> c++ build & run ?
3. bazel-bin/tensorflow/examples/image_retraining/retrain --image_dir=flower_photos
 ... time is money
 ... 완료 & 테스트
4. bazel-bin/tensorflow/examples/label_image:label_image --graph=/tmp/output_graph.pb \
--labels=/tmp/output_labels.txt \
--output__layer=final_result \
--input_layer=Mul \
--image=$HOME/flower_photo/daisy/xxx.jpg


./bazel-bin/tensorflow/examples/label_image/label_image --graph=/tmp/output_graph.pb --labels=/tmp/output_labels.txt --output_layer=final_result --input_layer=Mul --image=/Users/bcc/flower_photos/daisy/21652746_cc379e0eea_m.jpg

댓글 없음: