Tensorflow 对象检测 API 中预测数量的限制

Kon*_*rad 3 python object-detection tensorflow object-detection-api

我用 Tensorflow 对象检测 API 训练了一个 Faster R-CNN 模型,但遇到了一个奇怪的问题。尽管图像中有更多的对象,但模型的输出最多有 100 个预测。这是我测试过的每个图像的情况。

我在 10 个 GitHub 上发现了类似的问题,但据我所知,他们在这些方面做得并不多。 https://github.com/tensorflow/tensorflow/issues/30464

也许您过去遇到过类似的问题?知道如何解决这个问题吗?

示例图像

GPh*_*ilo 5

每个类的限制为 100,那么您的最大总检测数为 300。

这是在pipeline.config文件中设置的网络配置参数second_stage_post_processing。例如,电流faster_rcnn_inception_v2_coco.config有:

second_stage_post_processing {
      batch_non_max_suppression {
        score_threshold: 0.0
        iou_threshold: 0.6
        max_detections_per_class: 100
        max_total_detections: 300
      }
      score_converter: SOFTMAX
    }
Run Code Online (Sandbox Code Playgroud)

在训练网络之前更改这些值(虽然我不知道更改它们如何影响网络大小和/或在使用预训练检查点进行微调时是否会导致问题)