Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于regs译码会导致标签偏移的问题 #43

Open
ZouZhuoliang opened this issue Mar 8, 2023 · 1 comment
Open

关于regs译码会导致标签偏移的问题 #43

ZouZhuoliang opened this issue Mar 8, 2023 · 1 comment

Comments

@ZouZhuoliang
Copy link

请问下regs译码的时候,为何要给regs_origin+0.5再int32呢,我验证了一张图片,其编码时对于48*48而言,最后一个关键点的标签是H W =42 16,但译码以后变成了42 17,原因就在于cx cy是24 24,原regsx本来是-8,但+0.5再int32导致其出现偏移,即对于x<cx和y<cy的都会因此导致偏移, 请问这是有原因的还是错误

@fire717
Copy link
Owner

fire717 commented Jul 31, 2023

+0.5是考虑像素点的值对于网格化int化的数据应该是居中的,即0.5的位置。
主要还是像素点网格化的偏差。
比如图片尺寸为2x2,那么就是有四个像素值,左上角的像素值为1,应该对应的是左上网格的中心,而不是左上网格的左上角点。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants