Closed eugene123tw closed 5 years ago
If I remember correctly, it compensates better for distorted rectangles. As an example, you have an image with size 800x600 and oriented bounding boxes defined as polygons. After resizing the image to 512x512, the aspect ratio changes and you end up with distorted rectangles.
I am wondering why the average height is compute as
h = (norm(np.cross(dt, tl-br)) + norm(np.cross(dt, tr-bl))) / (2*(norm(dt)+eps))
inpolygon_to_rbox3
function? Why didn't just compute like this(norm(tr - br) + norm(tl - bl))/2
?Original code reference: https://github.com/mvoelk/ssd_detectors/blob/master/utils/bboxes.py#L60