GithubHelp home page GithubHelp logo

stojakovic312636841 / drrn-pytorch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jt827859032/drrn-pytorch

0.0 1.0 0.0 683.52 MB

An implementation of Deep Recursive Residual Network for Super Resolution (DRRN), CVPR 2017

License: MIT License

MATLAB 43.41% Python 56.59%

drrn-pytorch's Introduction

DRRN-pytorch

This is an unofficial implementation of "Deep Recursive Residual Network for Super Resolution (DRRN)", CVPR 2017 in Pytorch. [Paper]

You can get the official Caffe implementation here.

This implementation is modified from the implementation of VDSR by @Jiu XU.

Usage

Training

usage: main.py [-h] [--batchSize BATCHSIZE] [--nEpochs NEPOCHS] [--lr LR]
               [--step STEP] [--cuda] [--resume RESUME]
               [--start-epoch START_EPOCH] [--clip CLIP] [--threads THREADS]
               [--momentum MOMENTUM] [--weight-decay WEIGHT_DECAY]
               [--pretrained PRETRAINED]
               
optional arguments:
  -h, --help            Show this help message and exit
  --batchSize           Training batch size
  --nEpochs             Number of epochs to train for
  --lr                  Learning rate. Default=0.1
  --step                Learning rate decay, Default: n=5 epochs
  --cuda                Use cuda?
  --resume              Path to checkpoint
  --clip                Clipping Gradients. Default=0.01
  --threads             Number of threads for data loader to use Default=1
  --momentum            Momentum, Default: 0.9
  --weight-decay        Weight decay, Default: 1e-4
  --pretrained          Path to the pretrained model, used for weight initialization (default: none)

Evaluation

usage: eval.py [-h] [--cuda] [--model MODEL] [--dataset DATASET]
               [--scale SCALE]

PyTorch DRRN Evaluation

optional arguments:
  -h, --help         show this help message and exit
  --cuda             use cuda?
  --model MODEL      model path
  --dataset DATASET  dataset name, Default: Set5

An example of training usage is shown as follows:

python eval.py --cuda

Prepare Training dataset

  • the training data is generated with Matlab Bicubic Interpolation, please refer Code for Data Generation for creating training files.

Performance

  • We provide a rough pre-trained DRRN_B1U25 model trained on 291 images with data augmentation. The model can achieve a better performance with a smart optimization strategy. For the DRRN_B1U9 implementation, you can manually modify the number of recursive blocks here.
  • The same adjustable gradient clipping's implementation as original paper.
  • No bias is used in this implementation.
  • No batch normalization is used in this implementation.
  • Performance in PSNR on Set5
Scale DRRN_B1U25 Paper DRRN_B1U25 PyTorch
x2 37.74 37.69
x3 34.03 34.02
x4 31.68 31.70

drrn-pytorch's People

Contributors

jt827859032 avatar

Watchers

James Cloos 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.