The-Learning-And-Vision-Atelier-LAVA / SMSR

[CVPR 2021] Exploring Sparsity in Image Super-Resolution for Efficient Inference
238 stars 30 forks source link

The model uses image patch as input, how to calculate the PSNR value of the whole image #4

Closed GZ-T closed 3 years ago

GZ-T commented 3 years ago

Hi, I'm a beginner of image super resolution, thank you for your great job, which has taught me a lot. I have a problem with calculating the PSNR value of the whole image, I have a question about calculating the PSNR value of the whole image. Do you calculate the PSNR value of each patch in an image first and then average it to get the PSNR value of the whole image,and how to deal with the problem that the image size can't divide the crop size?

LongguangWang commented 3 years ago

Hi @GZ-T, thanks for your interest in our work. We crop patches to train our SR network but feed the whole image to the network for evaluation during test phase. Consequently, the PSNR value is calculated directly over the whole image.

GZ-T commented 3 years ago

Thank you for your answer, it's very helpful to me.