GithubHelp home page GithubHelp logo

wangxihao / sr-restore Goto Github PK

View Code? Open in Web Editor NEW

This project forked from twairball/sr-restore

0.0 0.0 0.0 33 KB

Image Restoration using Efficient Super Resolution. Keras, Tensorflow.

Python 100.00%

sr-restore's Introduction

SR-Restore

Super resolution and Image restoration.

Install

Requires tensorflow==1.1.0 and keras==2.0.2

$ pip install -r ./requirements.txt

Super Resolution example

    # Resize low-res and high-res images for Super Resolution
    $ python -m sr.images data/images/raw/ \
        --lr data/images/lr \
        --hr data/images/hr \
        --lr_size 72x72 \
        --hr_size 288x288

    # Train Super Resolution model.
    # Expects images in /path/images/lr/ and /path/images/hr/
    $ python -m sr.train data/images \
        --results results/ \
        --network espcnn \
        --scale 4 \
        --epochs 100 \
        --batch_size 32

    # Predict high-res images using trained model weights.
    # (Optional) use `--limit` option to limit num of images to perform on.
    $ python -m sr.predict data/images/lr/ \
        --output results/output/ \
        --weights results/espcnn_20170701_190534/weights.h5 \
        --network espcnn \
        --scale 4 \
        --batch_size 32 \
        --limit 20

Image Restore example

    # Resize a directory of images to single size
    # We need /image_path/original/ and /image_path/enhanced/
    $ python -m restore.images data/images/raw_original \
        --output data/images/original \
        --size 288x288

    $ python -m restore.images data/images/raw_enhanced \
        --output data/images/enhanced \
        --size 288x288


    # Train Restore model.
    # Expects images in /path/images/original/ and /path/images/enhanced/
    # Saves model weights, checkpoints, and tensorboard logs to path specified in results.
    $ python -m sr.train data/images \
        --results results/ \
        --network cnn \
        --epochs 100 \
        --batch_size 32


    # Predict original images using trained model weights.
    # (Optional) use `--limit` option to limit num of images to perform on.
    $ python -m sr.predict data/images/enhanced/ \
        --output results/output/ \
        --weights results/cnn_20170701_190534/weights.h5 \
        --network cnn \
        --batch_size 32 \
        --limit 20

Dataset

celebA: (link)

References

  • Image Super Resolution (link)
  • Perceptual loss (link)
  • Efficient Real time convolution (link)

sr-restore's People

Contributors

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