potterhsu / easy-faster-rcnn.pytorch

An easy implementation of Faster R-CNN (https://arxiv.org/pdf/1506.01497.pdf) in PyTorch.
MIT License
165 stars 57 forks source link

parameterization of the coordinates of the BBox #11

Closed sandylaker closed 5 years ago

sandylaker commented 5 years ago

Thank you for your clean and effective implementation.

In the source code of calc_transformer in bbox.py, I found that the implementation for computing the center offset of the bounding boxes is slightly different from the formula given in the original paper of the Fast R-CNN. In the paper, t_x = (x - x_a)/w_a, where x, x_a, w_a are the x coordinate of the center of the predicted box, anchor box and the width of the anchor box, respectively. But in the code, it is divided by the center_based_dst_bboxes[..., 2], which seems to be the width of the predicted boxes. This also contradicts the implementation in the apply_transformer function.

Could you please explain it a little bit?

potterhsu commented 5 years ago

Thanks for reporting this bug. I'll fix it in the next release. I think it has little effect on performance, but I can only rerun the experiments when I am available.