Rotated IOU greater than 1
shashanktyagi opened this issue · 2 comments
shashanktyagi commented
The following example produces IOU greater than 1.
b1 = np.array([[46.83, 44.03, 3.9, 1.63, 0]], dtype=np.float32)
b2 = np.array([[46.83, 44.03, 1.63, 3.9, 1.45]], dtype=np.float32)
rbbox_overlaps(b1, b2) = 1.35
The expected iou should be near 1. Is there something I'm missing here?
Note that I changed the code to use angle in radians.
mjq11302010044 commented
@shashanktyagi Hi, the size of height and width maybe too small, and may be rounded to an unpredictable number when computing IoU, it's better to ensure height and width of both boxes are larger than a reasonable number (8 or 16 etc.
shashanktyagi commented
Yeah, I figured that out too. As a hack, I scaled all the boxes by a factor of 100. That fixed it.