FSRCNN-pytorch icon indicating copy to clipboard operation
FSRCNN-pytorch copied to clipboard

The size of image

Open Komorebi-zxy opened this issue 5 years ago • 1 comments

When testing, why are the input and output image sizes the same regardless of the scale? And why is the test input a GT image?

Komorebi-zxy avatar Dec 24 '20 15:12 Komorebi-zxy

quick hack: in test.py you need to replace

    image_width = (image.width // args.scale) * args.scale
    image_height = (image.height // args.scale) * args.scale

by

    image_width = (image.width ) * args.scale
    image_height = (image.height) * args.scale

@Komorebi-zxy , this repo is re-implementing a paper (with some tweaks), so the code is downscaling the input images and simulating the scale up from there. This way it knows the GT by design. You will find that in real world image scenarios the results are less impressive than on the test images but this is how those model works. Hope that helps. Consider closing the issue if so.

Tetsujinfr avatar Jun 03 '21 01:06 Tetsujinfr