Sam*_*s23 21 computer-vision matlab-cvst
我正在阅读论文: 法拉利等人.在"亲和力措施"部分.我明白法拉利等人.试图获得亲和力:
但是,我有两个主要问题:
对上述问题的任何建议或解决方案?谢谢你,非常感谢你的帮助.
Goi*_*Way 37
尝试在Union上交叉
Union on Union是一种评估指标,用于衡量特定数据集上对象检测器的准确性.
更正式地说,为了应用Intersection over Union来评估(任意)对象检测器,我们需要:
下面我已经包含了一个地面真实边界框与预测边界框的视觉示例:
预测的边界框用红色绘制,而地面实况(即手工标记)边界框用绿色绘制.
在上图中,我们可以看到我们的物体探测器已经检测到图像中存在停止符号.
因此,可以通过以下方式确定计算联盟的交叉点:
只要我们有这两组边界框,我们就可以在Union上应用Intersection.
这是Python代码
# import the necessary packages
from collections import namedtuple
import numpy as np
import cv2
# define the `Detection` object
Detection = namedtuple("Detection", ["image_path", "gt", "pred"])
def bb_intersection_over_union(boxA, boxB):
# determine the (x, y)-coordinates of the intersection rectangle
xA = max(boxA[0], boxB[0])
yA = max(boxA[1], boxB[1])
xB = min(boxA[2], boxB[2])
yB = min(boxA[3], boxB[3])
# compute the area of intersection rectangle
interArea = (xB - xA) * (yB - yA)
# compute the area of both the prediction and ground-truth
# rectangles
boxAArea = (boxA[2] - boxA[0]) * (boxA[3] - boxA[1])
boxBArea = (boxB[2] - boxB[0]) * (boxB[3] - boxB[1])
# compute the intersection over union by taking the intersection
# area and dividing it by the sum of prediction + ground-truth
# areas - the interesection area
iou = interArea / float(boxAArea + boxBArea - interArea)
# return the intersection over union value
return iou
Run Code Online (Sandbox Code Playgroud)
的gt和pred是
gt :真实的边界框.pred :我们模型中预测的边界框.有关详细信息,请单击此帖子
Dim*_*ima 25
1)您有两个重叠的边界框.您计算框的交集,这是重叠的区域.您计算重叠框的并集,即整个框的面积减去重叠面积的总和.然后用联合划分交叉点.计算机视觉系统工具箱中有一个名为bboxOverlapRatio的功能.
2)通常,您不希望连接颜色通道.您想要的是3D直方图,其中尺寸为H,S和V.
| 归档时间: |
|
| 查看次数: |
31173 次 |
| 最近记录: |