首页 > 解决方案 > 如何在 coco 数据集上获得预训练模型(Faster RCNN inception v2)的准确性

问题描述

将 tf1 修补到utils.ops

utils_ops.tf = tf.compat.v1

修补gfile的位置

tf.gfile = tf.io.gfile

用于为每个框添加正确标签的字符串列表。

PATH_TO_LABELS ='/content/models/research/object_detection/data/mscoco_label_map.pbtxt' category_index = label_map_util.create_category_index_from_labelmap(PATH_TO_LABELS, use_display_name=True)

model_name = 'faster_rcnn_inception_v2_coco_2018_01_28' detection_model = load_model(model_name)

标签: tensorflowpre-trained-modelfaster-rcnn

解决方案


推荐阅读