models icon indicating copy to clipboard operation
models copied to clipboard

Error in ReadMe for exporting_models.md

Open ykhedar opened this issue 9 years ago • 4 comments

In the example command in the readme file at https://github.com/tensorflow/models/blob/master/object_detection/g3doc/exporting_models.md python object_detection/export_inference_graph \ --input_type image_tensor \ --pipeline_config_path ${PIPELINE_CONFIG_PATH} \ --checkpoint_path model.ckpt-${CHECKPOINT_NUMBER} \ --inference_graph_path output_inference_graph.pb

export_inference_graph should be export_inference_graph.py checkpoint_path should be trained_checkpoint_prefix inference_graph_path should be output_directory

ykhedar avatar Aug 27 '17 00:08 ykhedar

It works for me, with TensorFlow 1.3. The original command would raise error like: AssertionError: `trained_checkpoint_prefix` is missing

yinguobing avatar Aug 28 '17 01:08 yinguobing

It also works for me:

  • original cmd from README

$ python object_detection/export_inference_graph.py
--input_type image_tensor
--pipeline_config_path object_detection/samples/configs/faster_rcnn_resnet101_pets.config
--checkpoint_path model.ckpt-${CHECKPOINT_NUMBER}
--inference_graph_path output_inference_graph.pb Traceback (most recent call last): File "object_detection/export_inference_graph.py", line 106, in tf.app.run() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 48, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "object_detection/export_inference_graph.py", line 94, in main 'trained_checkpoint_prefix is missing') AssertionError: trained_checkpoint_prefix is missing

  • the revised cmd

$ python object_detection/export_inference_graph.py
--input_type image_tensor
--pipeline_config_path object_detection/samples/configs/faster_rcnn_resnet101_pets.config
--trained_checkpoint_prefix model.ckpt-${CHECKPOINT_NUMBER}
--output_directory output_inference_graph.pb Converted 530 variables to const ops.

  • output folder

$ ll output_inference_graph.pb/ checkpoint model.ckpt.data-00000-of-00001 model.ckpt.meta
frozen_inference_graph.pb model.ckpt.index saved_model/

  • tensorflow version

$ python -c 'import tensorflow as tf; print(tf.version)' 1.3.0

ChongWeiSu avatar Aug 29 '17 06:08 ChongWeiSu

Closing since the issue does not seem to be occurring. Please reopen if it is still occuring.

reedwm avatar Sep 11 '17 18:09 reedwm

it's works thanks ykhedar ~~

ActionMichael avatar Sep 24 '17 06:09 ActionMichael