Giter Club home page Giter Club logo

fsrcnn-pytorch's Introduction

FSRCNN

This repository is implementation of the "Accelerating the Super-Resolution Convolutional Neural Network".

Differences from the original

  • Added the zero-padding
  • Used the Adam instead of the SGD

Requirements

  • PyTorch 1.0.0
  • Numpy 1.15.4
  • Pillow 5.4.1
  • h5py 2.8.0
  • tqdm 4.30.0

Train

The 91-image, Set5 dataset converted to HDF5 can be downloaded from the links below.

Dataset Scale Type Link
91-image 2 Train Download
91-image 3 Train Download
91-image 4 Train Download
Set5 2 Eval Download
Set5 3 Eval Download
Set5 4 Eval Download

Otherwise, you can use prepare.py to create custom dataset.

python train.py --train-file "BLAH_BLAH/91-image_x3.h5" \
                --eval-file "BLAH_BLAH/Set5_x3.h5" \
                --outputs-dir "BLAH_BLAH/outputs" \
                --scale 3 \
                --lr 1e-3 \
                --batch-size 16 \
                --num-epochs 20 \
                --num-workers 8 \
                --seed 123                

Test

Pre-trained weights can be downloaded from the links below.

Model Scale Link
FSRCNN(56,12,4) 2 Download
FSRCNN(56,12,4) 3 Download
FSRCNN(56,12,4) 4 Download

The results are stored in the same path as the query image.

python test.py --weights-file "BLAH_BLAH/fsrcnn_x3.pth" \
               --image-file "data/butterfly_GT.bmp" \
               --scale 3

Results

PSNR was calculated on the Y channel.

Set5

Eval. Mat Scale Paper Ours (91-image)
PSNR 2 36.94 37.12
PSNR 3 33.06 33.22
PSNR 4 30.55 30.50
Original BICUBIC x3 FSRCNN x3 (34.66 dB)
Original BICUBIC x3 FSRCNN x3 (28.55 dB)

fsrcnn-pytorch's People

Contributors

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