Open yefanhust opened 8 years ago
I am not sure, I need to check the code again but I think this was addressed by clipping boxes to image boundaries later on.
There's simply an inconsistency in transforming the bounding box between (width, height, center_x, center_y) and (x1,y1,x2,y2). Clipping boxes to image boundaries may not fix this issue. But this hardly has any negative effect on the final results. So hard to be sensed.
In py-faster-rcnn/lib/fast-rcnn/bbox_transform.py, there's a function called "bbox_transform_inv". It first converts the shifted anchor coordinates to width, height, center_x, and center_y. The "ctr_x" is computed as follows: ctr_x = boxes[:,0] + 0.5*widths
However, shouldn't ctr_x be computed as boxes[:,0] + 0.5* (widths-1)? This is how it defines in py-faster-rcnn/lib/rpn/generate_anchors.py. Please advise on this, thanks.