Official PyTorch implementation of our CVPR2021 paper MASA-SR: Matching Acceleration and Spatial Adaptation for Reference-Based Image Super-Resolution
CUFED
├── train
│ ├── input
│ └── ref
└── test
└── CUFED5
git clone https://github.com/Jia-Research-Lab/MASA-SR.git
cd MASA-SR
--data_root
in test.py
and train.py
according to your data path.
Download the pre-trained models and place them into the pretrained_weights/
folder
--gpu_ids -1
in the command)
sh test.sh
test_results/
folderpython train.py --use_tb_logger --data_augmentation --max_iter 250 --loss_l1 --name train_masa_rec
python train.py --use_tb_logger --max_iter 50 --loss_l1 --loss_adv --loss_perceptual --name train_masa_gan --resume ./weights/train_masa_rec/snapshot/net_best.pth --resume_optim ./weights/train_masa_rec/snapshot/optimizer_G_best.pth --resume_scheduler ./weights/train_masa_rec/snapshot/scheduler_best.pth
weights/
folder[2021/06/08] Fix a bug in evaluation. Retrain the models and update the given checkpoints, whose PSNR have a slight difference with those reported in the paper (±0.03dB).
We borrow some codes from TTSR and BasicSR. We thank the authors for their great work.
Please consider citing our paper in your publications if it is useful for your research.
@inproceedings{lu2021masasr,
title={MASA-SR: Matching Acceleration and Spatial Adaptation for Reference-Based Image Super-Resolution},
author={Liying Lu, Wenbo Li, Xin Tao, Jiangbo Lu, and Jiaya Jia},
booktitle={IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
year={2021},
}