- To download GoPro training and testing data, run
python download_data.py --data train-test
- Generate image patches from full-resolution training images of GoPro dataset
python generate_patches_gopro.py
- Prepare you QR code and generate motion blur dataset, run
python motionblur/generate_dataset.py
- Generate image patches from full-resolution training images of QR code dataset
python generate_patches_qrcode.py
- To train EGRestormer Training(pretaining) on GoPro dataset, run
cd ADNet
torchrun --nproc_per_node=6 --nnodes=1 --node_rank=0 --master_port=4321 basicsr/train.py -opt options/train/train_egrestormer.yml --launcher pytorch
Note: The above training script uses 6 GPUs by default. To use any other number of GPUs, modify options/train/train_egrestormer.yml
- Training (finetuning) on QRData dataset, run
torchrun --nproc_per_node=6 --nnodes=1 --node_rank=0 --master_port=4321 basicsr/train.py -opt options/train/train_egrestormer_qrdataset.yml --launcher pytorch
Note: The training iteration start from the iteration pretained on GoPro, you can modify i options/train/train_egrestormer_qrdataset.yml
- To train LENet on Gopro, run
cd ADNet
torchrun --nproc_per_node=6 --nnodes=1 --node_rank=0 --master_port=4321 basicsr/train.py -opt options/train/train_lenet.yml --launcher pytorch
- Training (finetuning) on QRData dataset, run
torchrun --nproc_per_node=6 --nnodes=1 --node_rank=0 --master_port=4321 basicsr/train.py -opt options/train/train_lenet.yml --launcher pytorch
Note: change the dataset in the training script.
Download the pre-trained EG-Restormer gopro_pretrain_model and place it in ./experiment/egrestormer/models/
Download the pre-trained EG-Restormer QRData_model and place it in ./experiment/egrestormer/models/
Download the pre-trained EG-Restormer QRData_model and place it in ./experiment/LENet/models/
-
Download QR code test set QR code and place it in
./datasets/test/ -
Testing EG-Restormer, run,
python test_egrestormer.py
- Testing LENet, run,
python test_lenet.py
- Testing ADNet, run,
python ADNet.py
If you have any question, please contact ljphit@163.com
Acknowledgment: This code is based on the Restormer and NAFNet