Pytorch implementation of "Meta Transferring for Deblurring" (BMVC 2022).
The implementation use part of the code from MPRNet, MTRNN, Restormer, and CDVD-TSP.
- Nvidia A5000 GPU
- cuda 11.3
- pytorch == 1.10.1+cu113
- numpy == 1.22.0
pip3 install -r requirements.txt
- Download "GOPRO" dataset or any dataset that you want to use.
- Move pre-trained weights into ./weights.
- Modify the arguments in meta training script and run the script.
sh meta_train.sh
- Download "DVD", "REDS",or "RealBlur" dataset or any dataset that you want to test.
- Modify the arguments in meta testing script and run the script.
sh meta_test_script.sh
- save_dir: The saved path of current experiment directory
- dataset: The dataset name (GOPRO/DVD/REDS/RealBlur)
- dataset_dir: The path to dataset
- deblur(reblur)_lr: Learning rate for deblurring(reblurring) model
- deblur_model: The deblurring model name (mprnet/mtrnn/restormer/cdvd_tsp)
- gan: Using adversarial loss during inner update or not
- cycle_update: Using cycle consistency loss during inner update or not
- n_updates: # of support patches during inner update
- deblur(reblur/gan)_model_path: The path of pre-trained model weight
We train our reblurring model for 1000 epochs.
# Training
sh train.sh
# Testing
sh test.sh
-
Model
- Modify ./model/setting.yaml
- Modify ./model/basicModule.py
- Modify ./loss/loss.py
-
Dataset
- Create ./dataset/meta_(modelName).py
- Copy ./dataset/meta_gopro.py to ./dataset/meta_(modelName).py
- Modify dataset hierachy in the file
@inproceedings{liu2022meta,
title={Meta Transferring for Deblurring},
author={Liu, Po-Sheng and Tsai, Fu-Jen and Peng, Yan-Tsung and Tsai, Chung-Chi and Lin, Chia-Wen and Lin, Yen-Yu},
booktitle={BMVC},
year={2022}
}