This implementation based on BasicSR which is a open source toolbox for image/video restoration tasks.
python 3.6.9
pytorch 1.5.1
cuda 10.1
cd SharpFormer
pip install -r requirements.txt
python setup.py develop --no_cuda_ext
-
prepare data
-
mkdir ./datasets/GoPro
-
download the train set in ./datasets/GoPro/train and test set in ./datasets/GoPro/test (refer to MPRNet)
-
it should be like:
./datasets/ ./datasets/GoPro/ ./datasets/GoPro/train/ ./datasets/GoPro/train/input/ ./datasets/GoPro/train/target/ ./datasets/GoPro/test/ ./datasets/GoPro/test/input/ ./datasets/GoPro/test/target/
-
python scripts/data_preparation/gopro.py
- crop the train image pairs to 512x512 patches.
-
-
eval
python basicsr/test.py -opt options/test/GoPro/SharpFormer-GoPro.yml
-
train
python -m torch.distributed.launch --nproc_per_node=8 --master_port=4321 basicsr/train.py -opt options/train/GoPro/SharpFormer.yml --launcher pytorch