GithubHelp home page GithubHelp logo

theanonsr's Introduction

theanonSR

Super Resolution using Deep Convolutional Neural Network(SRCNN) using theano

Introduction

theanonSR upscales photo image to x2 size.

Original image

slide

Upscaled image using python OpenCV library

slide

Upscaled image using theanonSR

slide

Description

It is developed on python using theano library.

This project is to understand/study how deep convolutional neural network works to learn super resolution of the image.

[TODO] Currently GPU support is not implemented yet.

References

Originally, I was inspired this project from waifu2x project, which uses Torch7 to implement SRCNN.

SRCNN, super resolution using deep convolutional neural network, is introduced in this paper.

It is the popular project for image super resolution for Anime-Style art. It also has a good performance.

Machine learning library which can be written in python. It also provides nice Deep Learning Tutorials to study how to implement deep neural network.

How to use

Basic usage

Just specify image file path which you want to upscale.

Ex. Upscaling input.jpg

python code/srcnn.py input.jpg

Specify output file name and path

Ex. Upscaling /path/to/input.jpg to /path/to/output.jpg

python code/srcnn.py /path/to/input.jpg /path/to/output.jpg

Specify model to use:

You can specify directory name in the /model directory, as the model.

Ex. use model 32x3x3_32x3x3_32x3x3_1x3x3,

python code/srcnn.py -m 32x3x3_32x3x3_32x3x3_1x3x3 input.jpg

Training

You can construct your own convolutional neural network, and train it easily!

1. Data preparation

Put training images[1] inside data/training_images directory. (I used 2000 photo images during the training.)

[1]: Currently, image must be more than or equal to the size 232 x 232.

2. Construct your model (convolutional neural network)

Open code/tools/generate_model.py, and modify this code to construct your own model. Then execute it.

python code/tools/generate_model.py

It will generate train.json file for your own model at model/your_model directory.

3. Training the model

Once prepared your own model to be trained, you can train your model by

python code/train_srcnn.py -m your_own_model

train_srcnn.py refers model/your_own_model/train.json to construct CNN (Convolutional Neural Network) for training.

Contribution is welcome

The performance of SR for this project is not matured. You are welcome to improve & contribute this project. If you could get any model which performs better performance, feel free to send me a pull request!

theanonsr's People

Contributors

corochann avatar

Stargazers

Ved Nig avatar Duke13 avatar Leo Ertuna avatar Pierre Nagorny avatar Wayne Dahlberg avatar  avatar t m avatar Kevin P avatar Rui Liu avatar  avatar Saurabh Gawande avatar Mark B avatar Stanley Young avatar Kush Minarawala avatar Volodymyr Kuleshov avatar

Watchers

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