Giter Site home page Giter Site logo

drn's Introduction

Closed-loop Matters: Dual Regression Networks for Single Image Super-Resolution [arXiv]

Pytorch implementation for "Closed-loop Matters: Dual Regression Networks for Single Image Super-Resolution".

Dual Regression Scheme

Important Update

Dependencies

Python>=3.7, PyTorch>=1.1, numpy, skimage, imageio, matplotlib, tqdm

Quickstart (Model Testing)

Results of our pretrained models:

Model Scale #Params (M) PSNR on Set5 (dB)
DRN-S 4 4.8 32.68
8 5.4 27.41
DRN-L 4 9.8 32.74
8 10.0 27.43

You can evaluate our models on several widely used benchmark datasets, including Set5, Set14, B100, Urban100, Manga109. Note that using an old PyTorch version (earlier than 1.1) would yield wrong results.

Please organize the benchmark datasets using the following hierarchy.

- srdata
    - benchmark
         - Set5
            - LR_bicubic
                - X4
                    - babyx4.png

Dual Regression Scheme

You can use the following script to obtain the testing results:

python main.py --data_dir $DATA_DIR$ \
--save $SAVE_DIR$ --data_test $DATA_TEST$ \
--scale $SCALE$ --model $MODEL$ \
--pre_train $PRETRAINED_MODEL$ \
--test_only --save_results
  • DATA_DIR: path to save data
  • SAVE_DIR: path to save experiment results
  • DATA_TEST: the data to be tested, such as Set5, Set14, B100, Urban100, and Manga109
  • SCALE: super resolution scale, such as 4 and 8
  • MODEL: model type, such as DRN-S and DRN-L
  • PRETRAINED_MODEL: path of the pretrained model

For example, you can use the following command to test our DRN-S model for 4x SR.

python main.py --data_dir ~/srdata \
--save ../experiments --data_test Set5 \
--scale 4 --model DRN-S \
--pre_train ../pretrained_models/DRNS4x.pt \
--test_only --save_results

You will obtain the output like this.

An example of model testing.

If you want to load the pretrained dual model, you can add the following option into the command.

--pre_train_dual ../pretrained_models/DRNS4x_dual_model.pt

Training Method

We use DF2K dataset (the combination of DIV2K and Flickr2K datasets) to train DRN-S and DRN-L.

python main.py --data_dir $DATA_DIR$ \
--scale $SCALE$ --model $MODEL$ \
--save $SAVE_DIR$
  • DATA_DIR: path to save data
  • SCALE: super resolution scale, such as 4 and 8
  • MODEL: model type, such as DRN-S and DRN-L
  • SAVE_DIR: path to save experiment results

For example, you can use the following command to train the DRN-S model for 4x SR.

python main.py --data_dir ~/srdata \
--scale 4 --model DRN-S \
--save ../experiments 

Citation

If you use any part of this code in your research, please cite our paper:

@inproceedings{guo2020closed,
  title={Closed-loop Matters: Dual Regression Networks for Single Image Super-Resolution},
  author={Guo, Yong and Chen, Jian and Wang, Jingdong and Chen, Qi and Cao, Jiezhang and Deng, Zeshuai and Xu, Yanwu and Tan, Mingkui},
  booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
  year={2020}
}

drn's People

Contributors

guoyongcs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.