eirikeve / esrdgan

GAN implementation for single image super resolution. Based on recent research.
Apache License 2.0
7 stars 0 forks source link

[Feature Request] Let us choose the LR paths #1

Closed alsa64 closed 5 years ago

alsa64 commented 5 years ago

Hello Eirikeve,

We the Game Upscale Community, have been using ESRGAN for a long time to upscale games and have trained a lot of custom models for that. Not just for upscaling (we created many models for x1, x2, x4 and even x8) but also for deblurring, mpeg, jpeg and BC1 artifact removal, de-banding, de-dithering the list goes on. In ESRGAN it was possible to create a model completely to your liking because you were able to manipulate the LR images used for training in whatever way you want.

So, you can probably understand that we are watching projects like your with great interest.

While looking through the repo, I noticed that in your config there are only paths for HR directories, so we hope that in the future it will be possible to also specify LR directories, to train our own models and to actually use them.

Another thing that would be useful, would be if the training settings could be saved together with the model (either in the model or in a separate file). This information would then be read when using the model. That way users wouldn't have to edit their config or test.py script just to use a model with a different scale factor for example.

Thank you for reading this.

eirikeve commented 5 years ago

Hi!

Didn't know about that community - sounds interesting, I'll check it out!

Also, thanks for the input,

I added saving configs to the same folder as the .pth files are saved. :)

Regarding the other suggestion: I'll do it when I have the time. Note that this is just a project for a uni course that I have. So the scope of the project is limited, and the network architecture is borrowed from ESRGAN.

alsa64 commented 5 years ago

Thank you for responding,

ESRGAN has always produced high quality results, so any improvements are interesting, there is no need to reinvent the wheel after all.

You said in your Readme

Base this on the very recent SRDGAN paper. It highlights some possibly large issues in the standard procedure for generating LR images: Bicubic interpolation encodes a lot of information in the resulting image - more than one can expect in a normal phone photography etc., which means that most SR-implementations are good at SR on LR images generated by bicubic interpolation - but not as good on normal photos. Depending on the application, this can be good/bad.

Consider using box/fant filtering it would represent a real-world photo much better than Nearest Neighbor downscaling, we tried Nearest Neighbor for training ESRGAN but it provided worse results for both training and later using in on textures for upscaling:

The 'Box' filter setting is exactly the same as 'point' with one slight variation. When shrinking images it will average, and merge the pixels together. The smaller the resulting image the more pixels will be averaged together. (https://www.imagemagick.org/Usage/filter/)

If you have a Discord account, we also have a server there: https://discord.gg/wngeZkY There is also a Subreddit: https://www.reddit.com/r/GameUpscale/

Thanks again

eirikeve commented 5 years ago

Hi again!

Consider using box/fant filtering it would represent a real-world photo much better than Nearest Neighbor downscaling, we tried Nearest Neighbor for training ESRGAN but it provided worse results for both training and later using in on textures for upscaling

Thanks for the tip, I will check that out soon :) Been having some issues with the discriminator so I've mostly focused on that part, but it seems to be OK now.

Subscribed to the subreddit.

eirikeve commented 5 years ago

Supports specifying LR paths ( set mode = hrlr for a dataset in the config file, and specify dataroot_lr = /path/to/lr )