Janspiry / Image-Super-Resolution-via-Iterative-Refinement

Unofficial implementation of Image Super-Resolution via Iterative Refinement by Pytorch
Apache License 2.0
3.59k stars 466 forks source link

The result is too noisy #78

Open timerobin opened 2 years ago

timerobin commented 2 years ago

Thank you for the code. I have trained the sr3 model on the images of different resolution, like 16->128, 64->512, 256->1024 on ffhq and celebahq. The iters are 50k, and the learning rate is 3e-6. But I found the val result are with too much noise, with n_timestep=2000. This is the result of 512*512 50000_3_sr And the loss function is not stable convergence

Janspiry commented 2 years ago

image Yes, something similar happened to me at the time when I was training, and I guess the model's learning ability was limited. But I didn't have a better GPU resources, so I didn't bother to optimize it.

timerobin commented 2 years ago

Thank you very much for your reply. I have ran more experiments and I find image noise disappears when more resblocks are used. But the phenomenon of hue deviation still exists. Could you please give some advice on how to tune hyperparameters to remove color bias

Janspiry commented 2 years ago

I have two guesses for now, but not sure about the specifics:

  1. the set up of group convolution that interact between channels.
  2. the setting of clip noise in https://github.com/Janspiry/Image-Super-Resolution-via-Iterative-Refinement/blob/ ef9b943b573328d7a5ddb1a0c2abd168b91610dc/model/sr3_modules/diffusion.py#L162
KANGXI123456 commented 2 years ago

Excuse me, can you tell me where to add the resblocks? Thanks you very much

ElliotQi commented 2 years ago

Excuse me, can you tell me where to add the resblocks? Thanks you very much

An easy way is to modify the number of model.unet.resblock in the config file. But I still get noisy image :<

294coder commented 1 year ago

@KANGXI123456 why x_recon is clipped in (-1, 1), it can help remove color bias?

YangMei66 commented 1 year ago

Thank you very much for your reply. I have ran more experiments and I find image noise disappears when more resblocks are used. But the phenomenon of hue deviation still exists. Could you please give some advice on how to tune hyperparameters to remove color bias

Hello, I confront the same issue about hue deviation. How did you solve the issue? image

294coder commented 1 year ago

@YangMei66 hi, you may find some solutions here: #69

YangMei66 commented 1 year ago

@YangMei66 hi, you may find some solutions here: #69

thank you