mile-zhang / DeFiAN-Pytorch-1.7.0

Sucess use pre-train model in Test (change from YuanfeiHuang / DeFiAN)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

TIP

arXiv

Contents

  1. Architecture
  2. Requirement
  3. Train
  4. Test
  5. Results
  6. Citation

Architecture

Framework of DeFiAN

Requirement:

  1. Python==3.8.6

  2. PyTorch==1.7.0

  3. torchvision==0.8.0

  4. numpy==1.19.4

  5. scikit-image==0.18.1

  6. imageio==2.9.0

  7. matplotlib==3.3.3

  8. tqdm==4.54.1

Train

🎯Add common.py

  1. Replace the train dataset path '/mnt/Datasets/Train/' and validation dataset 'mnt/Datasets/Test/' with your training and validation datasets, respectively.

  2. Set the configuration '--train' in 'option.py' as 'True', and other configurations as you want.

  3. If you want to use GPU, Set the configuration '--cuda' in 'option.py' as 'True'

  4. run 'main.py'.

Test

🎯Add common.py

  1. Download models from OneDrive, Google Drive or BaiduYun(password: 3vj9).

  2. Replace the test dataset path '/mnt/Datasets/Test/' with your datasets.

  3. Set the configuration '--train' in 'option.py' as 'False'

  4. If you want to use GPU, Set the configuration '--cuda' in 'option.py' as 'True'

  5. If you want to test in other dataset, modify --data_test in 'option.py' as you want
    (ex --data_test', type=str, default=['Set14'])

  6. 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})

  7. run 'main.py'.

Example

# 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/  

Results

Quantitative Results (PSNR/SSIM)

Quantitative Results

Qualitative Results

Fig.6 Fig.7 Fig.8 Fig.9

Citation

@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}
}

About

Sucess use pre-train model in Test (change from YuanfeiHuang / DeFiAN)


Languages

Language:Python 100.0%