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

questions about test.py #12

Closed
Liz66666 opened this issue Nov 7, 2018 · 2 comments
Closed

questions about test.py #12

Liz66666 opened this issue Nov 7, 2018 · 2 comments

Comments

@Liz66666
Copy link

Liz66666 commented Nov 7, 2018

hi, thanks for your pytorch code!
I have seen your code about test a model, but I don't know why 4x and 4y should plus 2(line 115 and 116)?
And I have also seen that tf-version plus 2 too.
Thanks!

if ln > 1e-3:
x += delta * px / ln
y += delta * py / ln
x = max(0, min(x, cfg.output_shape[1] - 1))
y = max(0, min(y, cfg.output_shape[0] - 1))
resy = float((4 * y + 2) / cfg.data_shape[0] * (details[b][3] - details[b][1]) + details[b][1])
resx = float((4 * x + 2) / cfg.data_shape[1] * (details[b][2] - details[b][0]) + details[b][0])
v_score[p] = float(r0[p, int(round(y)+1e-10), int(round(x)+1e-10)])

@GengDavid
Copy link
Owner

GengDavid commented Nov 7, 2018

Because we want to recover the precision lost costed in the generation of label maps.
Also can refer to this issue.

@Liz66666
Copy link
Author

Liz66666 commented Nov 7, 2018

thanks for your reply!

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