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

The PSNR and SSIM results #60

Open
Renzhihan opened this issue Jul 10, 2024 · 4 comments
Open

The PSNR and SSIM results #60

Renzhihan opened this issue Jul 10, 2024 · 4 comments

Comments

@Renzhihan
Copy link

Renzhihan commented Jul 10, 2024

I use the pre-trained model to predict the SR image of the DReal dataset.
Some metrics are different but very close to the data in the paper (error about 0.01-0.1), but the PSNR and SSIM metrics are quite different (26.8475/28.17, 0.7413/0.7691).
Here is my metrics calculation method by the pyiqa, can you provide some suggestions?

lpips_metric = pyiqa.create_metric('lpips')
fid_metric = pyiqa.create_metric('fid')
psnr_metric = pyiqa.create_metric('psnr', test_y_channel=True, crop_border=4)
ssim_metric = pyiqa.create_metric('ssim', test_y_channel=True, crop_border=4)
dists_metric = pyiqa.create_metric('dists', crop_border=4)

niqe_metric = pyiqa.create_metric('niqe', crop_border=4)
clipiqa_metric = pyiqa.create_metric('clipiqa')
musiq_metric = pyiqa.create_metric('musiq')
maniqa_metric = pyiqa.create_metric('maniqa-pipal')
@Renzhihan Renzhihan changed the title The metrics results The PSNR and SSIM results Jul 10, 2024
@liyuantsao
Copy link

+1

@cswry
Copy link
Owner

cswry commented Jul 14, 2024

The test code appears to be fine, but the PSNR and SSIM values are indeed strange.

The SeeSR results (PSNR/SSIM, 28.09/0.7664) reported in AddSR are close to those in our paper (PSNR/SSIM, 28.17/0.7691). Can you share your test results?

@Renzhihan
Copy link
Author

I found the PSNR/SSIM calculated by the scripts in BasicSR (28.17/0.7674) is correct. But the same images can't get the same results by pyiqa. So, I refer that the PSNR/SSIM in the paper is calculated by BasicSR, and other metrics are calculated by pyiqa.

@jiaqixuac
Copy link

if the color space be color_space='ycbcr' for pyiqa PSNR and SSIM, metrics are similar to basicsr

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

4 participants