【发布时间】:2020-08-20 05:05:25
【问题描述】:
我正在 Tensorflow 版本上训练 maskrcnn inception v2 模型,以便进一步使用 OpenVino。训练模型后,我使用 object_detection_API 目录中的脚本冻结模型:
python exporter_main_v2.py \
--trained_checkpoint_dir 培训
--output_directory inference_graph
--pipeline_config_path training/mask_rcnn_inception_resnet_v2_1024x1024_coco17_gpu-8.config
在这个脚本之后,我得到了保存的模型和管道文件,将来应该在 OpenVInO 中使用 将接收到的文件上传到模型优化器时出现如下错误:
模型优化器版本: 2020-08-20 11:37:05.425293: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] 成功打开动态库 cudart64_100.dll [ FRAMEWORK ERROR ] 无法加载输入模型:TensorFlow 无法读取模型文件:“C:\Users\Anna\Downloads\inference_graph\inference_graph\saved_model\saved_model.pb”是不正确的 TensorFlow 模型文件。 该文件应包含以下 TensorFlow 图之一:
- 以文本或二进制格式冻结图形
- 使用文本或二进制格式的检查点 (--input_checkpoint) 冻结的推理图
- 元图
确保以文本格式为模型提供 --input_model_is_text。默认情况下,模型以二进制格式解释。框架错误详细信息:解析消息时出错。 有关更多信息,请参阅模型优化器常见问题解答 (https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html),问题 #43。
我按照链接文章中的示例教授模型,使用我自己的数据集:https://gilberttanner.com/blog/train-a-mask-r-cnn-model-with-the-tensorflow-object-detection-api
在 gpu 上,模型启动并工作,但我需要为 OpenVINO 获取转换后的模型
【问题讨论】:
标签: tensorflow openvino