tensorflow对象检测eval错误

时间:2017-10-19 01:23:29

标签: tensorflow object-detection object-detection-api

当我使用模型检查测试数据集上的mAP时,我收到以下错误:

INFO:tensorflow:Restoring parameters from /home/aurora/workspaces/PycharmProjects/tensorflow/tensorflow_object_detection/outputs/model.ckpt-278075
INFO:tensorflow:Restoring parameters from /home/aurora/workspaces/PycharmProjects/tensorflow/tensorflow_object_detection/outputs/model.ckpt-278075
WARNING:root:The following classes have no ground truth examples: 0
/home/aurora/workspaces/PycharmProjects/tensorflow/tensorflow_object_detection/object_detection/utils/metrics.py:145:                RuntimeWarning: invalid value encountered in true_divide
num_images_correctly_detected_per_class / num_gt_imgs_per_class)

我检查了test.tfrecords,每张图片都有地面真相边框。 我怎么能解决这个问题?感谢。

1 个答案:

答案 0 :(得分:0)

我遇到了类似的错误,我在这个错误上被困了很多天。 我可以通过编辑label.pbtxt文件来解决该错误。你能展示你的标签(.pbtxt)文件吗? 我的标签文件是:(包含3个标签)

item {
  id: 1
  name: 'tree'

  id: 2
  name: 'water body'

  id: 3
  name: 'building'
}

然后我改为:

item {
  id: 1
  name: 'tree'
     }

item {
  id: 2
  name: 'water body'
     }

item {
  id: 3
  name: 'building'
     }

这适用于我的情况。查看您在模型的配置文件中引用的.pbtxt文件。