-
Notifications
You must be signed in to change notification settings - Fork 112
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
the code for computing PSNR is wrong #86
Comments
Please update your results in the paper. |
Could you please check the formal implementatoin here: https://github.com/bonlime/pytorch-tools/blob/master/pytorch_tools/metrics/psnr.py#L11 |
The author claims in the issues that they have not used and even tested PSNR and SSIM. |
https://github.com/bonlime/pytorch-tools/blob/01f40fe75c2a11683c247d8fcf3d3645a5783441/tests/metrics/test_metric.py#L105 |
Your code computing PSNR as follows is wrong:
DisCo/tool/metrics/ssim_l1_lpips_psnr.py
Line 13 in 8538889
The accurate code is mse = np.mean((original/1.0 - compressed/1.0) ** 2), because original and compressed images are uint8 in your code, and (original - compressed) * * 2 will cause numerical overflow.
The text was updated successfully, but these errors were encountered: