This resposity is the official implementation of our ECCV2020 paper.
Our implementation is based on EDSR(PyTorch).
- Python 3.6
- PyTorch == 1.1.0
- coloredlogs >= 14.0
- scikit-image
Please download DIV2K datasets from here for training and benchmark datasets for testing. Then, organise the dataset directory as follows:
datasets
benchmark
DIV2K
- train
python main.py --scale 4 --k_bits 8 \
--pre_train ../pretrained/edsr_baseline_x4.pt \
--data_test Set14 --save edsr_x4/8bit/ \
--dir_data ./datasets --model EDSR
- test
python main.py --scale 4 --k_bits 8 \
--pre_train ../pretrained/edsr_x4 --save_results \
--data_test Set5+Set14+B100+Urban100 \
--save edsr_x4/8bit/ --dir_data ./datasets
--test_only --refine [REFINE] --model EDSR
set
--refine
to the saved model path for testing model.
More runnig scripts can be found in run.sh
.
- PSNR/SSIM
After saving the images, modify path inmetrics/calculate_PSNR_SSIM.m
to generate results.
matlab -nodesktop -nosplash -r "calculate_PSNR_SSIM('$dataset',$scale,$bit);quit"
refer to metrics/run.sh
for more details.
We also provide our baseline models below. Enjoy your training and testing! Google Drive.
If our paper helps your research, please cite it in your publications:
@article{li2020pams,
title={PAMS: Quantized Super-Resolution via Parameterized Max Scale},
author={Li, Huixia and Yan, Chenqian and Lin, Shaohui and Zheng, Xiawu and Li, Yuchao and Zhang, Baochang and Yang, Fan and Ji, Rongrong},
journal={arXiv preprint arXiv:2011.04212},
year={2020},
publisher={Springer}
}