GithubHelp home page GithubHelp logo

liuguoyou / wdsr-pytorch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yjn870/wdsr-pytorch

0.0 3.0 0.0 139 KB

PyTorch implementation of Wide Activation for Efficient and Accurate Image Super-Resolution (CVPR Workshop 2018)

Home Page: https://arxiv.org/abs/1808.08718

Python 100.00%

wdsr-pytorch's Introduction

WDSR

This repository is implementation of the "Wide Activation for Efficient and Accurate Image Super-Resolution".

Requirements

  • PyTorch 1.1.0
  • TensorBoard 1.14.0
  • Numpy 1.15.4
  • Pillow-SIMD 5.3.0.post1
  • h5py 2.8.0
  • tqdm 4.30.0

Prepare dataset

To prepare dataset used in experiments, first download dataset files from this link and organize it as shown below.

/YOUR_STORAGE_PATH/DIV2K
├── DIV2K_train_HR
├── DIV2K_train_LR_bicubic
│   └── X2
│   └── X3
│   └── X4
├── DIV2K_valid_HR
├── DIV2K_valid_LR_bicubic
│   └── X2
│   └── X3
│   └── X4
├── DIV2K_train_HR.zip
├── DIV2K_train_LR_bicubic_X2.zip
├── DIV2K_train_LR_bicubic_X3.zip
├── DIV2K_train_LR_bicubic_X4.zip
├── DIV2K_valid_HR.zip
├── DIV2K_valid_LR_bicubic_X2.zip
├── DIV2K_valid_LR_bicubic_X3.zip
└── DIV2K_valid_LR_bicubic_X4.zip

By default, we use "0001-0800.png" images to train the model and "0801-0900.png" images to validate the training. All experiments also use images with BICUBIC degradation on RGB space.

Training

WDSR Baseline (=WDSR-A) Example

python train.py --dataset-dir "/YOUR_STORAGE_PATH/DIV2K" \
                --output-dir "/YOUR_STORAGE_PATH/output" \
                --model "WDSR-A" \
                --scale 2 \
                --n-feats 32 \
                --n-res-blocks 16 \
                --expansion-ratio 4 \
                --res-scale 1.0 \
                --lr 1e-3

WDSR-B Example

python train.py --dataset-dir "/YOUR_STORAGE_PATH/DIV2K" \
                --output-dir "/YOUR_STORAGE_PATH/output" \
                --model "WDSR-B" \
                --scale 2 \
                --n-feats 32 \
                --n-res-blocks 16 \
                --expansion-ratio 6 \
                --low-rank-ratio 0.8 \
                --res-scale 1.0 \
                --lr 1e-3

If you want to modify more options, see the core/option.py file.

Evaluation

Trained model is evaluated on DIV2K validation 100 images. If you want to use self-ensemble for evaluation, add --self-ensemble option.

python eval.py --dataset-dir "/YOUR_STORAGE_PATH/DIV2K" \
               --checkpoint-file "/YOUR_STORAGE_PATH/output/WDSR-A-f32-b16-r4-x2-best.pth.tar"
Model Scale Residual Blocks Parameters PSNR Pre-trained Model
WDSR Baseline 1) x2 16 1.19M 34.67 dB Download
WDSR Baseline+ 2) x2 16 1.19M 34.77 dB -

1) filters=32, res-blocks=16, expansion-ratio=4, res-scale=1.0
2) filters=32, res-blocks=16, expansion-ratio=4, res-scale=1.0, with self-ensemble

References

  • Yu, Jiahui, et al. "Wide activation for efficient and accurate image super-resolution." arXiv preprint arXiv:1808.08718 (2018).
  • Fan, Yuchen, Jiahui Yu, and Thomas S. Huang. "Wide-activated deep residual networks based restoration for BPG-compressed images." Proc. IEEE Conf. Comput. Vis. Pattern Recognit. Workshops. 2018.
  • Lim, Bee, et al. "Enhanced deep residual networks for single image super-resolution." Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops. 2017.

wdsr-pytorch's People

Contributors

yjn870 avatar

Watchers

James Cloos avatar  avatar paper2code - bot avatar

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.