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
5.86k stars 1.04k forks source link

Issue regarding LR image dimensions. #92

Open shazib-summar opened 4 years ago

shazib-summar commented 4 years ago

Hi, first of all, I really like your work. Currently I am trying to recreate it, however, I faced a problem. The Set14 dataset has various images whose x or y dimensions are not exactly divisible by 4. These images are more than one, but lets take the image comic.png for instance.

The GT dimensions are: 250x361 Divide that by 4, you get the ideal LR dimensions which are: 62.5x90.25 Now obviously, these dimensions are not possible for a image. Whether you ceil or floor these dimensions, it is not possible to achieve the exact dimensions of the GT.

Due to this mismatch of dimensions I am unable to compute metrics such as PSNR.

How did you cater such cases? Did you just ignore the metrics for these images or is there a workaround that I am unaware of.

Thanks in advance.

shazib-summar commented 4 years ago

Anyone? @xinntao?

JingyunLiang commented 4 years ago

You could crop HR during the generation of LR, even it's testing set.

octus-study commented 4 years ago

I tested it with 1920x1080 images directly, without any cropping. The results are amazing

shazib-summar commented 4 years ago

Good for you @TAN-ZIXUAN

shazib-summar commented 4 years ago

You could crop HR during the generation of LR, even it's testing set.

@JingyunLiang could you please elaborate?