Calculating percentage of Bounding box overlap, for image detector evaluation

后端 未结 7 2013
遥遥无期
遥遥无期 2020-12-05 01:17

In testing an object detection algorithm in large images, we check our detected bounding boxes against the coordinates given for the ground truth rectangles.

Accordi

7条回答
  •  离开以前
    2020-12-05 01:33

    For the intersection distance, shouldn't we add a +1 so as to have

    intersection_area = (x_right - x_left + 1) * (y_bottom - y_top + 1)   
    

    (same for the AABB)
    Like on this pyimage search post

    I agree (x_right - x_left) x (y_bottom - y_top) works in mathematics with point coordinates but since we deal with pixels it is I think different.

    Consider a 1D example :
    - 2 points : x1 = 1 and x2 = 3, the distance is indeed x2-x1 = 2
    - 2 pixels of index : i1 = 1 and i2 = 3, the segment from pixel i1 to i2 contains 3 pixels ie l = i2 - i1 + 1

提交回复
热议问题