对象检测:导出/导入推理时出错



我是机器学习的初学者,目前正在努力学习以下链接中的教程https://github.com/tensorflow/models/blob/master/object_detection/g3doc/exporting_models.md

我已经完成了一个模型的训练,它给了我模型.ckpt文件。下面是我在窗口命令提示符中键入的命令

{Your path}tensorflowmodelsresearch>
python object_detectionexport_inference_graph.py
--input_type=image_tensor 
--pipeline_config_path="{Your path}modelssd_mobilenet_v1_pets.config" 
--trained_checkpoint_prefix="{Your path}modelstrain" 
--output_directory=output_inference_graph.pb 
1>mloutput.txt 2>mlerror.txt

所以当我检查错误文件时,我发现了以下内容:

Traceback (most recent call last):
File "object_detectionexport_inference_graph.py", line 106, in <module>
tf.app.run()
File "C:UsersericsenAppDataLocalProgramsPythonPython35libsite-packagestensorflowpythonplatformapp.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "object_detectionexport_inference_graph.py", line 95, in main
assert FLAGS.output_directory, '`output_directory` is missing'
AssertionError: `output_directory` is missing

我真的不明白为什么输出目录不见了。这纯粹是我的错误还是一个错误。我们将非常感谢您的反馈和帮助。谢谢

我尝试打印所有参数,并查看:

trained_checkpoint_prefix="{Your path}\models\train\"\--output_directory=output_production_graph.pb\

在"{Your path}\models\train\"中似乎缺少"\">

尝试在"train\"-->"train\\"后添加更多"\">

{Your path}tensorflowmodelsresearch>
python object_detectionexport_inference_graph.py
--input_type=image_tensor 
--pipeline_config_path="{Your path}modelssd_mobilenet_v1_pets.config" 
--trained_checkpoint_prefix="{Your path}modelstrain\"  
--output_directory=output_inference_graph.pb 

最新更新