-Train datasets: GoPro
-Test datasets: GoPro, RealBlur_R, RealBlur_J
-Val dataset: To accelerate the training speed, we selected the first image from the GoPro test set as the validation set.
- The above dataset path is as follows
Deblurring/Datasets
├──train
├──input
└──target
├──val
├──input
└──gt
└──test
├──GoPro
├──input
└──target
├──RealBlur_J
├──input
└──target
└──RealBlur_R
├──input
└──target
First, modify the path where the project is located in the second line of the /basicsr/train.py file.
-
To train C2F-DFT in the coarse training pipeline, modify the comments on lines 129-134 and 195-237 in the /basicsr/models/image_restoration_model.py file, then run
cd C2F-DFT-main python -m torch.distributed.launch --nproc_per_node=2 --master_port=4321 basicsr/train.py -opt Deblurring/Options/Deblurring_C2F-DFT_Coarse.yml --launcher pytorch
-
To train C2F-DFT in the fine training pipeline, modify the comments on lines 137-145 and 240-286 in the /basicsr/models/image_restoration_model.py file, then run
cd C2F-DFT-main python -m torch.distributed.launch --nproc_per_node=2 --master_port=4321 basicsr/train.py -opt Deblurring/Options/Deblurring_C2F-DFT_Fine.yml --launcher pytorch
-
Download the pre-trained model and place it in
./pretrained_models/
-
Testing
Modify the path where the project is located in the second line of the Deblurring/test.py file
cd Deblurring python test.py
cd Deblurring python test_real.py
-
Calculating PSNR/SSIM scores
python calculate_psnr_ssim.py
python evaluate_realblur.py