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的psnr计算 #19

Open
Liiiiaictx opened this issue Nov 19, 2023 · 1 comment
Open

关于test.py的psnr计算 #19

Liiiiaictx opened this issue Nov 19, 2023 · 1 comment

Comments

@Liiiiaictx
Copy link

with torch.no_grad():
preds = model(y).clamp(0.0, 1.0)

psnr = calc_psnr(y, preds)
print('PSNR: {:.2f}'.format(psnr))

在test中的计算原图与生成的图的psnr也有问题吧?psnr = calc_psnr(y, preds) 这里的y是低分辨率图像的y通道,不是应当计算原图与preds的psnr吗?
有大佬知道吗?

@urlhearts
Copy link

这里是错的 ,应该是 缩放前的图片

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

3 participants
@urlhearts @Liiiiaictx and others