我有两个边界框的坐标,一个是groundtruth,另一个是我的工作结果。我想根据真实情况评估我的准确性。所以我想问问有没有人有什么建议
边界框详细信息以这种格式保存 [x,y,width,height]
最佳答案
编辑:我已更正其他用户指出的错误。
我假设您正在检测某个对象并且正在围绕它绘制一个边界框。这属于广泛研究/研究的对象检测领域。评估准确性的最佳方法是计算并集的交集。这取自 PASCAL VOC 挑战,来自 here .参见 here用于视觉效果。
如果你有一个bounding box detection和一个ground truth bounding box,那么它们之间的重叠面积应该大于等于50%。假设ground truth bounding box是gt=[x_g,y_g,width_g,height_g]
,预测bounding box是pr=[x_p,y_p,width_p,height_p]
那么重叠面积可以使用以下公式计算:
intersectionArea = rectint(gt,pr); %If you don't have this function then write a simple one for yourself which calculates area of intersection of two rectangles.
unionArea = (width_g*height_g)+(width_p*height_p)-intersectionArea;
overlapArea = intersectionArea/unionArea; %This should be greater than 0.5 to consider it as a valid detection.
我希望你现在清楚了。
关于matlab - 比较两个边界框 Matlab,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22314949/