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

您的test.py代码中,我发现个问题,还请您解答一下 #26

Open
npuprince opened this issue Nov 1, 2024 · 1 comment
Open

Comments

@npuprince
Copy link

这部分代码片段中,sigmoid()连续使用了2次,似乎存在容易,其他二值图像分割模型的测试代码大多只使用一次sigmoid(),这里您使用两次是特意使用的一个trick还是属于疏忽的错误?
res, _, _ = model(image) res = torch.sigmoid(res) res = F.upsample(res, size=gt.shape, mode='bilinear', align_corners=False) res = res.sigmoid().data.cpu() res = res.numpy().squeeze() res = (res - res.min()) / (res.max() - res.min() + 1e-8) res = (res * 255).astype(np.uint8)

@xiongxyowo
Copy link
Collaborator

Hi, thank you for the correction. This is a mistake, but its impact on the quantitative result is very small. We have updated the correct code.

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