yijingru / BBAVectors-Oriented-Object-Detection

[WACV2021] Oriented Object Detection in Aerial Images with Box Boundary-Aware Vectors
MIT License
462 stars 87 forks source link

I think the function "reorder_pts" is problematic #70

Closed seekFire closed 3 years ago

seekFire commented 3 years ago

According to the definition of the function reorder_pts, It is entirely possible that, to make sure the order of the four edge center points(tt, rr, bb, ll), using np.argmax/np.argmin will make two of their indexes(l_ind, r_ind, t_ind, b_ind) have same value. In other words, one points may be both the leftmost and the uppermost at the same time. So if carrying on these operation, you may get repetitive points. I think if you draw some rectangle boxes with random orientation on one paper, you may find that there will always has two edge center points (x1, y1) & (x2, y2) that meet the condition: x1 <= x2 and y1 < y2. Thus we can determine the top point tt(x1, y1) and the bottom point bb(x2, y2), then the left point ll(x3, y3) and the right point rr(x4, y4) meet the condition: x3 < x4 and y3 >= y4.

yijingru commented 3 years ago

This operation only happens when theta in [-90.0, -0.0, 0.0].

seekFire commented 3 years ago

@yijingru Thank U, I was negligent... BTW, This line shows error in my IDE, I think it is just a spelling error.