D-X-Y/landmark-detection

[SAN/SBR] Problems in point_meta about apply_rotate .

Dian-Yi opened this issue · 1 comments

i thanks for your works very much.
In SBR/lib/datasets/point_meta.py :
about rotate the box
line 102:corners[:, 1] = (corners[:, 0] - center[0]) * np.sin(degree) - (corners[:, 1] - center[1]) * np.cos(degree) + center[1]

According to the points rotate formula, maybe change to this?:
corners[:, 1] = (corners[:, 0] - center[0]) * np.sin(degree) + (corners[:, 1] - center[1]) * np.cos(degree) + center[1]

Although "self.box" almost useless in after tranforms, i want to know is it wrong in this line?

D-X-Y commented

You are correct! Thanks a lot for pointing out this issue. I just fixed it in my last commit.

Having said that, the "box" is only used to pre-crop (the first transformation) the images in SAN/SBR repo, and that will not affect our final performance. In our new SRT repo, I use affine parameters to represent all transformation functions, which do not have this potential issue.