Tensorflow对象检测Exporter Faster RCNN类不可知模型

时间:2018-06-29 12:22:10

标签: python tensorflow export object-detection

我已经使用类不可知的配置(配置文件中的number_of_stages:1)从tensorflow检测模型zoo中训练了Faster RCNN ResNet50 Low Proposals模型。尝试使用脚本“ export_inference_graph.py”导出训练有素的模型时,出现以下错误,并且无法导出模型。似乎脚本不是为支持类不可知模型而编写的,并且无法尝试计算类的数量。还有其他建议的方法可以导出类不可知模型吗?

(tensorflow1) C:\tensorflow1\models\research\object_detection>python export_inference_graph.py --input_type image_tensor --pipeline_config_path training/faster_rcnn_resnet50_lowproposals_coco_2018_01_28_SynthText25000/faster_rcnn_resnet50_coco.config --trained_checkpoint_prefix training/faster_rcnn_resnet50_lowproposals_coco_2018_01_28_SynthText25000/model.ckpt-3028 --output_directory inference_graph/faster_rcnn_resnet50_lowproposals_coco_2018_01_28_SynthText25000
Traceback (most recent call last):
  File "export_inference_graph.py", line 147, in <module>
    tf.app.run()
  File "C:\Users\AlgoDev\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\platform\app.py", line 126, in run
    _sys.exit(main(argv))
  File "export_inference_graph.py", line 143, in main
    FLAGS.output_directory, input_shape)
  File "C:\tensorflow1\models\research\object_detection\exporter.py", line 460, in export_inference_graph
    graph_hook_fn=None)
  File "C:\tensorflow1\models\research\object_detection\exporter.py", line 386, in _export_inference_graph
    graph_hook_fn=graph_hook_fn)
  File "C:\tensorflow1\models\research\object_detection\exporter.py", line 355, in _build_detection_graph
    output_collection_name=output_collection_name)
  File "C:\tensorflow1\models\research\object_detection\exporter.py", line 336, in _get_outputs_from_inputs
    output_collection_name)
  File "C:\tensorflow1\models\research\object_detection\exporter.py", line 225, in _add_output_tensor_nodes
    detection_fields.detection_classes) + label_id_offset
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'

0 个答案:

没有答案