thangvubk / PESR

Official code (Pytorch) for paper Perception-Enhanced Single Image Super-Resolution via Relativistic Generative Networks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

could not reproduce paper results (resolved. thanks)

rptxk01 opened this issue · comments

Thank you for sharing your outstanding work.
I followed the training order in the README file.
After pre-training with L1 loss using DIV2K dataset (200 epochs), I fine-tuned on the pre-trained model with GAN (200 epochs).
All arguments were set to the default values of your code.

The losses of my train are here.

< Pretrain > 
Model check_point/my_model. Epoch [200/200]. Learning rate: 5e-05
Finish train [200/200]. Loss: 6.02
Validating...
Finish valid [200/200]. Best PSNR: 27.5275dB. Cur PSNR: 27.4693dB

< Train > 
Model check_point/my_model/train. Epoch [200/200]. Learning rate: 2.5e-05
Finish train [200/200]. L1: 0.00. VGG: 101.57. G: 10.80. TV: 5.45. Total G: 117.82. D: 0.05
Validating...
Finish valid [200/200]. PSNR: 24.6043dB

The test results of newly trained model is much blurred compared to your paper results and well not preserving edge component.
How should I train to reproduce your paper results?


PS. Followings are my command.

< Pretrain >
python train.py --phase pretrain --learning_rate 1e-4

YOUR SETTINGS
scale: 4
train_dataset: DIV2K
valid_dataset: PIRM
num_valids: 10
num_channels: 256
num_blocks: 32
res_scale: 0.1
phase: pretrain
pretrained_model:
batch_size: 16
learning_rate: 0.0001
lr_step: 120
num_epochs: 200
num_repeats: 20
patch_size: 24
check_point: check_point/my_model
snapshot_every: 10
gan_type: RSGAN
GP: False
spectral_norm: False
focal_loss: True
fl_gamma: 1
alpha_vgg: 50
alpha_gan: 1
alpha_tv: 1e-06
alpha_l1: 0

< Train >
python train.py --pretrained_model check_point/my_model/pretrain/best_model.pt

YOUR SETTINGS
scale: 4
train_dataset: DIV2K
valid_dataset: PIRM
num_valids: 10
num_channels: 256
num_blocks: 32
res_scale: 0.1
phase: train
pretrained_model: check_point/my_model/pretrain/best_model.pt
batch_size: 16
learning_rate: 5e-05
lr_step: 120
num_epochs: 200
num_repeats: 20
patch_size: 24
check_point: check_point/my_model
snapshot_every: 10
gan_type: RSGAN
GP: False
spectral_norm: False
focal_loss: True
fl_gamma: 1
alpha_vgg: 50
alpha_gan: 1
alpha_tv: 1e-06
alpha_l1: 0

Hi. Can you share the image comparison shown on tensorboard

Thank you for the reply :)

Following is your paper result. (DIV2K 0804.png)
0804

I was very impressed to see that the line detail of the third man's shirt from the left is well preserved.
Despite using the GAN-based method, the lines of the shirt are clearly restored as if they were reconstructed using PSNR-based methods.

However, when I applied my newly trained model using your code, I got the following results.
0804
The details of the sand are satisfactory, but the line of the shirt was blurred.
I think there was a mistake in my training process.
Could you give me some advice to reproduce the paper results?

Hi. We didnot simply get the final epoch to report results. Instead, we perform validation on PIRM_val dataset based on perceptual quality. You can refer to here for details.