Skip to content

Latest commit

 

History

History
84 lines (70 loc) · 2.71 KB

File metadata and controls

84 lines (70 loc) · 2.71 KB

Meta Transferring for Deblurring (BMVC 2022)

Pytorch implementation of "Meta Transferring for Deblurring" (BMVC 2022).
The implementation use part of the code from MPRNet, MTRNN, Restormer, and CDVD-TSP.

Environment

  • Nvidia A5000 GPU
  • cuda 11.3
  • pytorch == 1.10.1+cu113
  • numpy == 1.22.0

Installation

pip3 install -r requirements.txt

Meta training

  1. Download "GOPRO" dataset or any dataset that you want to use.
  2. Move pre-trained weights into ./weights.
  3. Modify the arguments in meta training script and run the script.
sh meta_train.sh

Meta testing

  1. Download "DVD", "REDS",or "RealBlur" dataset or any dataset that you want to test.
  2. Modify the arguments in meta testing script and run the script.
sh meta_test_script.sh

Important args

  • 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

Train/Test reblurring model

We train our reblurring model for 1000 epochs.

# Training
sh train.sh

# Testing
sh test.sh

Model/Dataset extension

  • 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

Citation

@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}
}