Realistic Blur Synthesis for Learning Image Deblurring
Jaesung Rim, Geonung Kim, Jungeon Kim, Junyong Lee, Seungyong Lee, Sunghyun Cho.
POSTECH
IEEE European Conference on Computer Vision (ECCV) 2022
Models | Train set | Realistic Pipeline | PSNR / SSIM |
---|---|---|---|
Uformer-B | GoPro | ✓ | 30.98 / 0.9067 |
Uformer-B | GoPro | 29.08 / 0.8754 | |
Uformer-B | GoPro_U | ✓ | 31.19 / 0.9143 |
Uformer-B | GoPro_U | 28.93 / 0.8673 |
We recommend a virtual environment using conda or docker.
- Pytorch 1.9.0
- cuda11.1
Pre-trained models [Google Drive]
Descriptions (click)
- Uformer_B_RealisticGoProABMEDeblur.pth : Trained on GoPro_INTER_ABME with our synthesis pipeline.
- Uformer_B_NaiveGoProABMEDeblur.pth : Trained on GoPro_INTER_ABME in the Naive way.
- Uformer_B_RealisticGoProUDeblur.pth : Trained on GoPro_U with our synthesis pipeline.
- Uformer_B_NaiveGoProUDeblur.pth : Trained on GoPro_U in the Naive way.
We provide simple Dataset modules for adopting our pipeline. This is slightly different from the tensorflow implementation. Please check the below codes.
# ./Uformer-RSBlur/dataset/dataset_RealisticDeblur.py
class RealisticGoProABMEDataset(Dataset):
def __init__(self, image_dir, patch_size=256, image_aug=True, realistic_pipeline=True):
...
def __len__(self):
return len(self.image_list)
def __getitem__(self, idx):
...
class RealisticGoProUDataset(Dataset):
def __init__(self, image_dir, patch_size=256, image_aug=True, realistic_pipeline=True):
...
def __len__(self):
return len(self.image_list)
def __getitem__(self, idx):
...
# ./Uformer-RSBlur
# All datasets should be located in Uformer-RSBlur/datasets
# require two of 3090, 4~5 days
# GoPro_INTER_ABME with our pipeline
python3 train/train_RealisticGoProABMEDeblur.py --arch Uformer_B --batch_size 8 --gpu '0,1' \
--train_ps 256 --train_dir datasets/GOPRO_INTER_ABME \
--val_ps 256 --val_dir datasets/RealBlurJ_test --env _RealisticGoProABMEDeblur \
--mode deblur --nepoch 1500 --checkpoint 100 --dataset GoPro --warmup --train_workers 12
# GoPro_U with our pipeline
python3 train/train_RealisticGoProUDeblur.py --arch Uformer_B --batch_size 8 --gpu '0,1' \
--train_ps 256 --train_dir datasets/GOPRO_INTER_ABME \
--val_ps 256 --val_dir datasets/RealBlurJ_test --env _RealisticGoProUDeblur \
--mode deblur --nepoch 1500 --checkpoint 100 --dataset GoPro --warmup --train_workers 12
# ./Uformer-RSBlur
# All datasets should be located in Uformer-RSBlur/datasets
# Test on the RealBlur
python3 test/test_realblur_reflect.py --input_dir ./datasets/ --result_dir ./results/Uformer_B_RealisticGoProUDeblur/ --weights ./logs/Uformer_B_RealisticGoProUDeblur.pth;
# Test on the RealBlur
python3 test/test_realblur_reflect.py --input_dir ./datasets/ --result_dir ./results/Uformer_B_RealisticGoProABMEDeblur_mark9/ --weights ./logs/Uformer_B_RealisticGoProABMEDeblur.pth;