pkuxmq / Invertible-Image-Rescaling

[ECCV 2020, IJCV 2022] Invertible Image Rescaling
Apache License 2.0
630 stars 86 forks source link

Why we need to crop border? #18

Closed johnnylu305 closed 3 years ago

johnnylu305 commented 3 years ago

Hello, in test.py, you use scale to determine the border. My question is why you use scale to determine border? If I have a H*W image and a super-resolution one, it will become (H-2)(W-2) after cropping with scale = 1. Why you calculate psnr on (H-2)*(W-2) one instead of H\W one? I think you are right, but I just want to know the reason.

pkuxmq commented 3 years ago

Hi, the crop operation is from SR tasks to not consider the influence of padding for convolution on the border when testing. We just use the same setting as in BasicSR. I tested to remove it and in practice it will not influence the result.