Giter Site home page Giter Site logo

stephanxu / wdsr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ychfan/wdsr

0.0 1.0 0.0 25 KB

Wide Activation for Efficient Image and Video Super-Resolution

Home Page: https://bmvc2019.org/wp-content/uploads/papers/0288-paper.pdf

License: MIT License

Python 100.00%

wdsr's Introduction

Wide Activation for Efficient Image and Video Super-Resolution

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

Previous Implementations

Performance

Small models

Networks Parameters DIV2K (val) Set5 B100 Urban100 Pre-trained Eval cmd Train cmd
WDSR x2 1,190,100 34.76 38.08 32.23 32.34 Download
detailspython 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
detailspython trainer.py --dataset div2k --eval_datasets div2k set5 bsds100 urban100 --model wdsr --scale 2 --job_dir ./wdsr_x2
WDSR x3 1,195,605 31.03 34.45 29.14 28.33 Download
detailspython 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
detailspython trainer.py --dataset div2k --eval_datasets div2k set5 bsds100 urban100 --model wdsr --scale 3 --job_dir ./wdsr_x3
WDSR x4 1,203,312 29.04 32.22 27.61 26.21 Download
detailspython 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
detailspython trainer.py --dataset div2k --eval_datasets div2k set5 bsds100 urban100 --model wdsr --scale 4 --job_dir ./wdsr_x4

Large models

Networks Parameters DIV2K (val) Set5 B100 Urban100 Pre-trained Eval cmd Train cmd
WDSR x2 37,808,180 35.06 38.28 32.38 33.07 Download
detailspython 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
detailspython 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
WDSR x3 37,826,645 31.34 34.76 29.32 28.94 Download
detailspython 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
detailspython 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
WDSR x4 37,852,496 29.33 32.58 27.78 26.79 Download
detailspython 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
detailspython 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

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

Visual Studio 2019 might need apex commit: 2ec84ebdca59278eaf15e8ddf32476d9d6d8b904

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

Prediction

python predict.py --model wdsr --scale 4 --ckpt ./wdsr_x4/epoch_30.pth --input_dir /path/to/input_dir --outdir /path/to/output_dir

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.