찬찬히 잘 따라 하면 된다.
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
댓글 없음:
댓글 쓰기