在Tensorboard中显示每个类别指标

问题描述 投票:2回答:3

我正在使用张量流对象检测api训练对象检测模型。 eval配置如下:

eval_config: {
  num_examples: 8000
  max_evals: 10
  num_visualizations: 20
  include_metrics_per_category: true
}

但是,tensorboard不会显示任何类别指标。还有什么我需要做的吗?

tensorflow tensorboard
3个回答
1
投票

正如@zhichau Lu已经说过,由于某种原因,这个功能在谷歌之外并不存在。通过this Github提出的代码更改,我能够让它工作。

这是我在Tensorboard中的结果图:

enter image description here


0
投票

啊我觉得github的pycocotools不支持这个功能。我们在Google内部实现了这一功能,但在外部无法使用。


0
投票

以下步骤帮助我成功显示每个类别的指标(在faster_rccn和mobilenet上测试):

1.从我的git repo安装更新的pycocotools:

点击安装“git + https://github.com/philippschw/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI

2.在tensorflow api中编辑此文件:

“tensorflow / models / research / object_detetcion / metrics / coco_tools.py”:从第240行到第244行

添加以下代码行:

# add for metrics per catergory from here
if include_metrics_per_category is True:
    self.summarize_per_category()
# add for metrics per category end here

3.编辑Tensorflow API的配置文件,包括:

{metrics_set:“coco_detection_metrics”include_metrics_per_category:true}

例如:

eval_config: {
  num_examples: 8000
  # Note: The below line limits the evaluation process to 10 evaluations.
  # Remove the below line to evaluate indefinitely.
  max_evals: 10
  num_visualizations: 20
  metrics_set: "coco_detection_metrics" 
  include_metrics_per_category: true   
}

请注意,这个问题已经在tensorflow上打开了,我现在的解决方案来自there

© www.soinside.com 2019 - 2024. All rights reserved.