【问题标题】:Couldn't display YOLO result via OpenCV dnn module无法通过 OpenCV dnn 模块显示 YOLO 结果
【发布时间】:2019-08-03 10:42:53
【问题描述】:

我正在尝试通过暗网(AlexeyABpjreddie)训练 YOLO 对象检测,它非常适合通过显示对象

./darknet detector test cfg/obj.data cfg/yolo-obj.cfg yolo.weights data/test.jpg

我使用 160*30 的图像进行训练和测试。我也是通过 Tiny-YOLOv2 和另一个模型完成的,它可以检测到图像中的所有数字。

但是,当我想显示训练重量的结果和特定图像(如下所示)并使用 Opencv dnn 模块时,我无法正确显示所有对象(数字)。

YOLO Object Detection with OpenCV and Python

Deep Learning based Object Detection using YOLOv3 with OpenCV ( Python / C++)

YOLO object detection with OpenCV

YOLO object detection using OpenCV and Python

Exploring OpenCV’s Deep Learning Object Detection Library

但是当我检查它以获得更大的图像(1280 * 760)时,它可以显示结果。

印版检测的正确输出:

【问题讨论】:

    标签: python opencv object-detection yolo dotnetnuke


    【解决方案1】:

    我解决了。当我们想要使用 OpenCV 和 DNN 模块显示结果时,我们必须考虑原始图像的缩放比例。例如,当我有一个160*30 输入图像时,首先我将其转换为416*78(将宽度或高度之一调整为 416)。现在为了显示结果,我将高度乘以416/78

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-10-06
      • 2021-03-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-11-16
      • 1970-01-01
      相关资源
      最近更新 更多