Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upscaling a LR 512px image to 1k or 2k resolution (Factor of 2x or 4x) #59

Open
sanchit-ahuja opened this issue Jun 7, 2020 · 3 comments

Comments

@sanchit-ahuja
Copy link

This is with respect to Issue #19 . In there you have answered that to evaluate an image other than one from Div2K validation set, we need to downscale. So is it not at all possible to work with varied Low-res images like upscaling a 1080p to 2k or 512p to 1k etc?

@krasserm
Copy link
Owner

krasserm commented Jun 8, 2020

In there you have answered that to evaluate an image other than one from Div2K validation set, we need to downscale.

In #19 the discussion was mainly about how to reproduce downgrading as done in the DIV2K dataset. Technically, you can feed the pre-trained models with whatever LR image you like but the quality of the SR image generated with the pre-trained models will depend on how the LR image was obtained.

So is it not at all possible to work with varied Low-res images like upscaling a 1080p to 2k or 512p to 1k etc?

If your LR images have been obtained with a bicubic downgrading function you'll likely get useful results with the pre-trained models. If your LR images have been obtained with a significantly different downgrading function (for example, by taking images with a low-quality mobile phone plus applying strong JPEG compression) you probably want to re-train the models with a different downgrading function. The DIV2K data provider supports several pre-defined downgrading functions (see downgrade parameter in the constructor). If you want to specify your own downgrading function you need to write your own LR/HR data provider.

@sanchit-ahuja
Copy link
Author

Thanks a lot for a quick reply.

@sanchit-ahuja
Copy link
Author

sanchit-ahuja commented Jun 12, 2020

So I tried upscaling a 512X512 to 2048X2048 image. There were couple of problems.

  1. The inference time is around 10 seconds to get the output image.
  2. The PSNR for upscaling these images is quite low.
    Is it possible to increase the PSNR? Will retraining the model on 512*512 images be helpful?

@sanchit-ahuja sanchit-ahuja reopened this Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants