manuelfritsche / real-world-sr

[ICCVW 2019] PyTorch implementation of DSGAN and ESRGAN-FS from the paper "Frequency Separation for Real-World Super-Resolution". This code was the winning solution of the AIM challenge on Real-World Super-Resolution at ICCV 2019
MIT License
162 stars 37 forks source link

Loss Curves for Training #5

Closed TouqeerAhmad closed 4 years ago

TouqeerAhmad commented 4 years ago

Hi Manuel,

Would it be possible for you to provide sample loss curves that one can load in Tensorboard and use as guidance?

I am trying to train DSGAN on my own data in the SDSR context where I do not add any additional degradation to the original frames and wan to have the LR frames same characteristics as the source. My understanding is that the LR frames generated through DSGAN once trained, should be crispier than the LR frames generated through bicubic downsampling. Am I correct in my understanding?

Currently I see the texture and perceptual losses go up and the color loss go down and overall loss going down -- I am unclear if this is an expected behavior. That is why requesting for the sample loss curves from your trainings.

Thanks, Touqeer

TouqeerAhmad commented 4 years ago

Further to my concern above, I trained DSGAN on Flickr2K dataset in unsupervised setting without adding any degradation. Used 2600 images for training and 50 for testing, the loss curves for training and validation are available on the following link:

https://drive.google.com/open?id=1tqIYxIAFSK87kdRPIyk_g-dlSL3314NH

We can see the generator's texture and perceptual losses are moving in the wrong direction, is it an expected behavior in DSGAN? Also, after training, generating the LR frames for the training data results into images which are blurrier than bicubic -- some samples are available on the link above. Looking forward to hear back from you. Touqeer

manuelfritsche commented 4 years ago

Hi Touqueer

Due to the GAN based training, the loss functions are expected to behave like this. The best way to check if training works is to look at the results.

Regarding the results, I would expect them to be blurrier than bicubic. This is because, counterintuitively, bicubic downscaling makes the images look "sharper" than images of the same size that were not bicubicly downscaled. Consider for example an image where the lines typically have a width of n pixels. If you downscale this image, then the width of these lines will decrease. Therefore, the image appears sharper in comparison to a cropped version of the original image.

In order to see if the model works, you would have to compare the output with a cropped input image and see if it looks more "similar" than the bicubic image. In your case this similarity might be hard to determine, because the output and bicubic images are quite similar already.

Finally, you could of course just train a super-resolution model with the generated training pairs and see if the model works better for upsampling. Of course the test images should not be bicubicly downscaled images, but images from the same source as the HR training images.