使用export_tflite_ssd_graph.py将检查点转换为冻结图

时间:2019-03-31 08:37:23

标签: python tensorflow

使用本指南-使用Cloud TPU在30分钟内培训并提供实时移动物体检测器:

https://medium.com/tensorflow/training-and-serving-a-realtime-mobile-object-detector-in-30-minutes-with-cloud-tpus-b78971cf1193]

我遵循了该指南,并使用ssd模型成功地训练了给定的宠物数据集-效果很好。

当我使用了另一个具有不同模型的数据集时-ssd_mobilenet_v1_ppn_shared_box_predictor_300x300_coco14_sync_2018_07_03

培训工作(使用Google Cloud)效果很好。但是当我尝试使用以下代码将检查点转换为冻结图时:

python object_detection/export_tflite_ssd_graph.py \
--pipeline_config_path=$CONFIG_FILE \
--trained_checkpoint_prefix=$CHECKPOINT_PATH \
--output_directory=$OUTPUT_DIR \
--add_postprocessing_op=true

我收到一个错误: map_generators.py”,在pooling_pyramid_feature_maps中的第545行     image_features = image_features [image_features.keys()[0]] TypeError:“ dict_keys”对象不支持索引

*请注意:当我使用本文中给出的模型执行此步骤时,它也可以使用另一个数据集。

0 个答案:

没有答案