This is the implementation of DIN base on Deep Interleaved Network for Image Super-Resolution With Asymmetric Co-Attention and Learning Deep Interleaved Networks with Asymmetric Co-Attention for Image Restoration. The Conference_version
is for the former paper, which we take for example to edit the following instructions, and the Enhance_version
is for the later.
The architecture of our proposed DIN.
- Python3
- pytorch
- skimage
- imageio
- tqdm
- pandas
- numpy
- opencv-python
- Matlab
- Download trainning set DIV2K and Flickr2K
- Prepare training data. Run
./scripts/Prepare_TrainData_HR_LR.py
or./scripts/Prepare_TrainDate_HR_LR.m
to generate HR/LR pairs with corresponding degradation models and scale factor. Modify./scripts/flags.py
to configuretraindata_path
andsavedata_path
. - Test data preparation is as same as train data preparation.
- Configure
./options/train/train_DIN_x4.json
for your training. - Run the command:
CUDA_VISIBLE_DEVICES=0 python train.py -opt options/train/train_DIN_x4.json
- Prepare testing data. Choose public standard benchmark datasets and run
./scripts/Prepare_TrainData_HR_LR.py
or./scripts/Prepare_TrainDate_HR_LR.m
to generate HR/LR pairs with corresponding degradation models and scale factor. Modify./scripts/flags.py
to configuretraindata_path
andsavedata_path
. - Configure
./options/test/test_DIN_x4_BI.json
for your testing. - Run the command and PSNR/SSIM values are printed and you can find the reconstructed images in
./result
.
CUDA_VISIBLE_DEVICES=0 python test.py -opt options/test/test_DIN_x4_BI.json
If you find our work useful in your research or publications, please consider citing:
@inproceedings{dinsr,
author = {Li, Feng and Cong, Runmin and Bai, Huihui and He, Yifan},
title = {Deep Interleaved Network for Single Image Super-Resolution with Asymmetric Co-Attention},
booktitle = {International Joint Conference on Artificial Intelligence(ijcai)}
year = {2020},
month = {07},
pages = {537-543},
doi = {10.24963/ijcai.2020/75}
}
@article{dinir,
author = {Li, Feng and Cong, Runmin and Bai, Huihui and He, Yifan and Zhao, Yao and Zhu, Ce},
title = {Learning Deep Interleaved Networks with Asymmetric Co-Attention for Image Restoration}
booktitle = {arXiv:2010.15689}
year = {2020},
month = {10},
}
This code is built on SRFBN(Pytorch), we thank the authors for sharing their code.