Open zengzhanhang opened 5 years ago
same arch as the ESRGAN but with the L1 loss to train the model.
May I ask what's the pretrained model for PSNR-oriented ESRGAN?
May I ask what's the pretrained model for PSNR-oriented ESRGAN?
I think I know what's the pretrained model. But how can I choose the model, because the PSNR is going down when training the model.
RRDB_PSNR_x4.pth is the PSNR-oriented model.
Did you mean how to choose the model when fine-tuning with gan loss? Just from the image visual quality of the results. It is a pity that there is no good way.
How to modify the original loss to L1 loss for training the RRDB_PSNR_x4? @xinntao Much thx.
@xiaozhi2015
Using L1 loss is simple with configuration "pixel_criterion": "l1"
.
L1 loss is in https://github.com/xinntao/BasicSR/blob/c69bf49f0185f9d02f379dffc7b3b88265010b31/codes/models/SR_model.py#L29-L30
Thx xintao. And what value should I set "pixel_criterion" when training RRDB_ESRGAN_x4? It seems that it only include "l1" and "l2". @xinntao
@xinntao In this file, "pixel_criterion" is already set to "l1". When training "RRDB_PSNR_x4", "pretrain_model_G" shoud be set to "null"; when training "RRDB_ESRGAN_x4", "pretrain_model_G" shoud point to the previous "RRDB_PSNR_x4" model. Anything else should I change, especially the "pixel_criterion" value?
pixel_criterion l1 Using the default value is OK.
@xinntao Does training RRDB_PSNR_x4 include generator only, not include discriminator? Like "python train.py -opt options/train/train_SRResNet.yml", but need set "which_model_G:RRDBNet" , "nb: 23" and so on.
Yes, training RRDB_PSNR_x4 only includes the generator.
Hi,Do you try train the pretrained model (RRDB_PSNR_x4 ) with l2 loss ? Which is better?
In practice, can we use just the following settings?
pixel_criterion: l1
pixel_weight: !!float 1e-2
feature_criterion: l1
feature_weight: 0
gan_type: ragan # gan | ragan
gan_weight: 0
Should we set the pixel_weight
as 1? @xinntao
Hi
As far as I know, you use the RRDB_PSNR_x4 as the pretrained model for your ESRGAN. May I ask how did you get this pretrained model? Is it the same architecture as the ESRGAN and the only difference is using different pretrained model?
Best Regards,