Home

Awesome

Wide Activation for Efficient Image and Video Super-Resolution

Reloaded PyTorch implementation of WDSR, BMVC 2019 [pdf].

Previous Implementations

Performance

Small models

NetworksParametersDIV2K (val)Set5B100Urban100Pre-trainedEval cmdTrain cmd
WDSR x21,190,10034.7638.0832.2332.34Download<details><summary>details</summary>python trainer.py --dataset div2k --eval_datasets div2k set5 bsds100 urban100 --model wdsr --scale 2 --job_dir X --ckpt ./wdsr_x2/epoch_30.pth --eval_only</details><details><summary>details</summary>python trainer.py --dataset div2k --eval_datasets div2k set5 bsds100 urban100 --model wdsr --scale 2 --job_dir ./wdsr_x2</details>
WDSR x31,195,60531.0334.4529.1428.33Download<details><summary>details</summary>python trainer.py --dataset div2k --eval_datasets div2k set5 bsds100 urban100 --model wdsr --scale 3 --job_dir X --ckpt ./wdsr_x3/epoch_30.pth --eval_only</details><details><summary>details</summary>python trainer.py --dataset div2k --eval_datasets div2k set5 bsds100 urban100 --model wdsr --scale 3 --job_dir ./wdsr_x3</details>
WDSR x41,203,31229.0432.2227.6126.21Download<details><summary>details</summary>python trainer.py --dataset div2k --eval_datasets div2k set5 bsds100 urban100 --model wdsr --scale 4 --job_dir X --ckpt ./wdsr_x4/epoch_30.pth --eval_only</details><details><summary>details</summary>python trainer.py --dataset div2k --eval_datasets div2k set5 bsds100 urban100 --model wdsr --scale 4 --job_dir ./wdsr_x4</details>

Large models

NetworksParametersDIV2K (val)Set5B100Urban100Pre-trainedEval cmdTrain cmd
WDSR x237,808,18035.0638.2832.3833.07Download<details><summary>details</summary>python trainer.py --dataset div2k --eval_datasets div2k set5 bsds100 urban100 --model wdsr --num_blocks 32 --num_residual_units 128 --scale 2 --job_dir X --ckpt ./wdsr_x2/epoch_30.pth --eval_only</details><details><summary>details</summary>python trainer.py --dataset div2k --eval_datasets div2k set5 bsds100 urban100 --model wdsr --num_blocks 32 --num_residual_units 128 --scale 2 --job_dir ./wdsr_x2</details>
WDSR x337,826,64531.3434.7629.3228.94Download<details><summary>details</summary>python trainer.py --dataset div2k --eval_datasets div2k set5 bsds100 urban100 --model wdsr --num_blocks 32 --num_residual_units 128 --scale 3 --job_dir X --ckpt ./wdsr_x3/epoch_30.pth --eval_only</details><details><summary>details</summary>python trainer.py --dataset div2k --eval_datasets div2k set5 bsds100 urban100 --model wdsr --num_blocks 32 --num_residual_units 128 --scale 3 --job_dir ./wdsr_x3</details>
WDSR x437,852,49629.3332.5827.7826.79Download<details><summary>details</summary>python trainer.py --dataset div2k --eval_datasets div2k set5 bsds100 urban100 --model wdsr --num_blocks 32 --num_residual_units 128 --scale 4 --job_dir X --ckpt ./wdsr_x4/epoch_30.pth --eval_only</details><details><summary>details</summary>python trainer.py --dataset div2k --eval_datasets div2k set5 bsds100 urban100 --model wdsr --num_blocks 32 --num_residual_units 128 --scale 4 --job_dir ./wdsr_x4</details>

Usage

Dependencies

conda install pytorch torchvision -c pytorch
conda install tensorboard h5py scikit-image
pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" git+https://github.com/NVIDIA/apex.git

Evaluation

python trainer.py --dataset div2k --eval_datasets div2k set5 bsds100 urban100 --model wdsr --scale 2 --job_dir ./wdsr_x2 --eval_only
# or
python trainer.py --dataset div2k --eval_datasets div2k set5 bsds100 urban100 --model wdsr --scale 2 --job_dir ./wdsr_x2 --ckpt ./latest.pth --eval_only

Datasets

DIV2K dataset: DIVerse 2K resolution high quality images as used for the NTIRE challenge on super-resolution @ CVPR 2017

Benchmarks (Set5, BSDS100, Urban100)

Download and organize data like:

wdsr/data/DIV2K/
├── DIV2K_train_HR
├── DIV2K_train_LR_bicubic
│   └── X2
│   └── X3
│   └── X4
├── DIV2K_valid_HR
└── DIV2K_valid_LR_bicubic
    └── X2
    └── X3
    └── X4
wdsr/data/Set5/*.png
wdsr/data/BSDS100/*.png
wdsr/data/Urban100/*.png