yjn870 / FSRCNN-pytorch

PyTorch implementation of Accelerating the Super-Resolution Convolutional Neural Network (ECCV 2016)
https://arxiv.org/abs/1608.00367
215 stars 59 forks source link

The size of image #4

Open Komorebi-zxy opened 3 years ago

Komorebi-zxy commented 3 years ago

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?

Tetsujinfr commented 3 years ago

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.