在对象检测中导出推理图时出错

时间:2018-03-31 10:55:21

标签: python tensorflow models object-detection attributeerror

我是机器学习的初学者,目前正在尝试按照@sentdex的教程来跟踪自定义对象。

我已经完成了一个模型的训练,该模型给了我model.ckpt文件。 (https://pythonprogramming.net/training-custom-objects-tensorflow-object-detection-api-tutorial/

现在,为了测试模型,我们需要导出推理图。 (https://pythonprogramming.net/testing-custom-object-detector-tensorflow-object-detection-api-tutorial/

我在命令提示符下的models / research / object-detection文件夹(https://github.com/tensorflow/models/)中运行以下命令:

export_inference_graph.py --input_type image_tensor --pipeline_config_path training\ssd_mobilenet_v1_pets.config --trained_checkpoint_prefix training\model.ckpt-292  --output_directory mac_n_cheese_inference_graph

并获得以下错误:(连接了cmd屏幕

跟踪(最近一次呼叫最后一次):

  File "C:\Users\user\AppData\Local\Programs\Python\Python36\models\research\object_detection\export_inference_graph.py", line 149, in <module>
    tf.app.run()
  File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\platform\app.py", line 126, in run
    _sys.exit(main(argv))
  File "C:\Users\user\AppData\Local\Programs\Python\Python36\models\research\object_detection\export_inference_graph.py", line 145, in main
    FLAGS.output_directory, input_shape)
  File "C:/Users/user/AppData/Local/Programs/Python/Python36/models/research/object_detection\exporter.py", line 452, in export_inference_graph
    is_training=False)
  File "C:/Users/user/AppData/Local/Programs/Python/Python36/models/research/object_detection/builders\model_builder.py", line 91, in build
    return _build_ssd_model(model_config.ssd, is_training, add_summaries)
  File "C:/Users/user/AppData/Local/Programs/Python/Python36/models/research/object_detection/builders\model_builder.py", line 152, in _build_ssd_model
    is_training)
  File "C:/Users/user/AppData/Local/Programs/Python/Python36/models/research/object_detection/builders\model_builder.py", line 118, in _build_ssd_feature_extractor
    use_explicit_padding = feature_extractor_config._use_explicit_padding
AttributeError: 'SsdFeatureExtractor' object has no attribute '_use_explicit_padding'

请帮助纠正问题

0 个答案:

没有答案