D-X-Y / landmark-detection

Four landmark detection algorithms, implemented in PyTorch.
https://xuanyidong.com/assets/projects/TPAMI-2020-SRT.html
MIT License
925 stars 180 forks source link

[SAN/SBR] Problems in point_meta about apply_rotate . #74

Closed Dian-Yi closed 4 years ago

Dian-Yi commented 4 years ago

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

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.