xinntao / ESRGAN

ECCV18 Workshops - Enhanced SRGAN. Champion PIRM Challenge on Perceptual Super-Resolution. The training codes are in BasicSR.
https://github.com/xinntao/BasicSR
Apache License 2.0
6.04k stars 1.07k forks source link

Questions about downsampling #101

Closed wl082013 closed 4 years ago

wl082013 commented 4 years ago

Hi, I have a question regarding downsampling of HR images. I am wondering how do we usually deal with the situation where the size of an HR is Images are odd numbers or other numbers that can be divided by the scale factors? For instance, the HR image has the size of (134,134), and after downscaling of 4 times, it becomes (33, 33). If we upscale it again, it becomes (132, 132) which is different from (134, 134). Could you give some help on how to deal with this issue except the resizing of images? Thanks for your help.

Cloud-Paris commented 3 years ago

Hi, i have the same problem. First,for example ,in the BasicSr repo, XinTao provided set5 、set14 and so om ,but i found that in the path of set5/LRbicx2 ,the pictures' size are (126,126).When they through the upscale model,they become (504,504).So when we train a network,Is the image in GTmod12 the HR image corresponding to the LR image? Second,what method do you use to solve the problem of image size mismatch after zooming in? Is it to adjust the image size directly?