This repository is an official PyTorch implementation of the paper Lightweight Image Super-Resolution with Multi-Scale Feature Interaction Network.
- Python 3.6
- PyTorch 0.4.0
- numpy
- skimage
- imageio
- matplotlib
- tqdm
For more informaiton, please refer to EDSR and RCAN.
Train/ : all train files
Test/ : all test files
-
Download DIV2K training data (800 training + 100 validtion images) from DIV2K dataset or SNU_CVLab.
-
Specify '--dir_data' based on the HR and LR images path. In option.py, '--ext' is set as 'sep_reset', which first convert .png to .npy. If all the training images (.png) are converted to .npy files, then set '--ext sep' to skip converting files.
cd Train/
# MSFIN x4 LR: 48 * 48 HR: 192 * 192
python main.py --template MSFIN --save MSFIN --scale 4 --reset --save_results --patch_size 192 --ext sep_reset
-
Using pre-trained model for training, all test datasets must be pretreatment by ''Test/Prepare_TestData_HR_LR.m" and all pre-trained model should be put into "Test/model/".
-
Cd to '/Test/code', run the following scripts.
#MSFIN x4
python main.py --data_test MyImage --scale 4 --model MSFIN --pre_train ../model/MSFIN/MSFIN_X4.pt --test_only --save_results --chop --save "MSFIN" --testpath ../LR/LRBI --testset Set5
#MSFIN+ x4
python main.py --data_test MyImage --scale 4 --model MSFIN --pre_train ../model/MSFIN/MSFIN-S_X4.pt --test_only --save_results --chop --self_ensemble --save "MSFIN_Plus" --testpath ../LR/LRBI --testset Set5
If you find the code helpful in your resarch or work, please cite the following papers.
@inproceedings{wang2021lightweight,
title={Lightweight Image Super-Resolution with Multi-scale Feature Interaction Network},
author={Wang, Zhengxue and Gao, Guangwei and Li, Juncheng and Yu, Yi and Lu, Huimin},
booktitle={2021 IEEE International Conference on Multimedia and Expo (ICME)},
pages={1--6},
year={2021},
organization={IEEE}
}
This code is built on EDSR (PyTorch). We thank the authors for sharing their codes of EDSR Torch version and PyTorch version.