Skip to content

Latest commit

 

History

History
55 lines (33 loc) · 1.69 KB

README.md

File metadata and controls

55 lines (33 loc) · 1.69 KB

Training

1. Dataset Preparation

Please prepare the training dataset following the instructions in BasicSR.

2. Pretrain DiffIR_S1

sh trainS1.sh

3. Train DiffIR_S2

#set the 'pretrain_network_g' and 'pretrain_network_S1' in ./options/train_DiffIRS2_x4.yml to be the path of DiffIR_S1's pre-trained model

sh trainS2.sh

4. Train DiffIR_S2_GAN

#set the 'pretrain_network_g' and 'pretrain_network_S1' in ./options/train_DiffIRS2_GAN_x4.yml to be the path of DiffIR_S2 and DiffIR_S1's trained model, respectively.

sh trainS2.sh

Note: The above training script uses 8 GPUs by default.

Evaluation

Download the pre-trained model and place it in ./experiments/

Testing on datasets

Please download the testing datasets from GoogleDrive (or Baidu Disk or OneDrive).

  • Testing
# modify the dataset path in ./options/test_DiffIRS2_GAN_x4.yml 

sh test.sh 

To reproduce PSNR/LPIPS/DISTS scores of the paper

python3  Metric/PSNR.py --folder_gt PathtoGT  --folder_restored PathtoSR

python3  Metric/LPIPS.py --folder_gt PathtoGT  --folder_restored PathtoSR

python3  Metric/dists.py --folder_gt PathtoGT  --folder_restored PathtoSR