mjq11302010044 / RRPN

Arbitrary-Oriented Scene Text Detection via Rotation Proposals (TMM 2018)
Other
436 stars 142 forks source link

Rotated IOU greater than 1 #44

Closed shashanktyagi closed 5 years ago

shashanktyagi commented 5 years ago

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 5 years ago

@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 5 years ago

Yeah, I figured that out too. As a hack, I scaled all the boxes by a factor of 100. That fixed it.