Official implementation of Paper "Rethinking Video Deblurring with Wavelet-Aware Dynamic Transformer and Diffusion Model" (ECCV 2024)
You can create a new environment named VD-Diff by running
conda create -n VD-Diff python==3.10
conda activate VD-Diff
pip install -r requirements.txt
First, download GoPro dataset and put it in "dataset" folder
as the form below:
- dataset
- GoPro
- test
- blur
- GOPR0384_11_00
- GOPR0384_11_05
- ......
- GOPR0385_11_01
- sharp
- ......
- blur
- train
- blur
- ......
- sharp
- ......
- blur
- test
- GoPro
Then, use the command below to process the GoPro dataset.
"--dir" is your GoPro dataset path such as "dataset/GoPro", "--save_dir" is the path to save the processed GoPro dataset such as "dataset/GoPro_new"
python scripts/refine.py --dir [Your GoPro dataset path] --save_dir [path to save] --deep 3
To train your own S1 model on the GoPro dataset, simply use the following command:
python basicsr/train.py -opt options/train/train_GoPro_S1.yml
Your S1 model weights will be saved in the directory: "experiments/GOPRO_S1/models/".
In this stage, update the "pretrain_network_S1" entry in "options/train/train_GoPro_S2.yml" with the path to your S1 model weights. Then, execute the following command:
python basicsr/train.py -opt options/train/train_GoPro_S2.yml
For Stage Three, modify the "pretrain_network_S2" entry in "options/train/train_GoPro_S3.yml" to point to your S2 model weights. Next, run:
python basicsr/train.py -opt options/train/train_GoPro_S3.yml
First, modify the "pretrain_network_g" entry in "options/test/test_GoPro_S3.yml" to your S3 model weights. Then run:
python basicsr/test.py -opt options/test/test_GoPro_S3.yml
You can also test your S1 and S2 model by changing the ".yml" option file path accordingly.