cswry / SeeSR

[CVPR2024] SeeSR: Towards Semantics-Aware Real-World Image Super-Resolution
Apache License 2.0
373 stars 19 forks source link

The PSNR and SSIM results #60

Open Renzhihan opened 1 month ago

Renzhihan commented 1 month ago

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')
liyuantsao commented 1 month ago

+1

cswry commented 1 month ago

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 commented 1 month ago

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.