DeFiAN-PyTorch-1.7.0 (change from YuanfeiHuang/DeFiAN )
This repository is for DeFiAN introduced in the following paper
Yuanfei Huang, Jie Li, Xinbo Gao*, Yanting Hu and Wen Lu, "Interpretable Detail-Fidelity Attention Network for Single Image Super-Resolution", IEEE Transactions on Image Processing (TIP), vol.30, pp.2325-2339, 2021.
-
Python==3.8.6
-
PyTorch==1.7.0
-
torchvision==0.8.0
-
numpy==1.19.4
-
scikit-image==0.18.1
-
imageio==2.9.0
-
matplotlib==3.3.3
-
tqdm==4.54.1
🎯Add common.py
-
Replace the train dataset path '/mnt/Datasets/Train/' and validation dataset 'mnt/Datasets/Test/' with your training and validation datasets, respectively.
-
Set the configuration '--train' in 'option.py' as 'True', and other configurations as you want.
-
If you want to use GPU, Set the configuration '--cuda' in 'option.py' as 'True'
-
run 'main.py'.
🎯Add common.py
-
Download models from OneDrive, Google Drive or BaiduYun(password: 3vj9).
-
Replace the test dataset path '/mnt/Datasets/Test/' with your datasets.
-
Set the configuration '--train' in 'option.py' as 'False'
-
If you want to use GPU, Set the configuration '--cuda' in 'option.py' as 'True'
-
If you want to test in other dataset, modify --data_test in 'option.py' as you want
(ex --data_test', type=str, default=['Set14']) -
If you want to test in other scale, modify --degrad in 'option.py' as you want
(ex --degrad', type=str, default={'SR_scale': 4, 'B_kernel': False, 'B_sigma': 0, 'N_noise': False, 'N_sigma': 0}) -
run 'main.py'.
# DeFiAN_s x2
python main.py --cuda --dir_data /home/mile/dataset/
# DeFiAN_L x2
python main.py --cuda --n_modules 10 --n_blocks 20 --n_channels 64 --dir_data /home/mile/dataset/
@article{huang2021interpretable,
title={Interpretable Detail-Fidelity Attention Network for Single Image Super-Resolution},
author={Huang, Yuanfei and Li, Jie and Gao, Xinbo and Hu, Yanting and Lu, Wen},
journal={IEEE Transactions on Image Processing},
volume={30},
pages={2325--2339},
year={2021},
publisher={IEEE}
}