Code Monkey home page Code Monkey logo

stb-image-srcnn's Introduction

stb-image-srcnn

Image Super-Resolution using Convolutional Neural Network.

Introduction

SRCNN is a Implementation of Image Super-Resolution using SRCNN which is proposed by Chao Dong in 2014.

  • If you want to find the details of SRCNN algorithm, please read the paper:

    Chao Dong, Chen Change Loy, Kaiming He, Xiaoou Tang. Learning a Deep Convolutional Network for Image Super-Resolution, in Proceedings of European Conference on Computer Vision (ECCV), 2014

  • If you want to download the training code(caffe) or test code(Matlab) for SRCNN, please open your browse and visit for more details.

  • And thank you very much for Chao's work in SRCNN.

This implementation uses a block algorithm. This is due to memory consumption in CNN. For complete processing, memory is required for 175 original images. With block processing, this size is reduced to 170 block size + 5 size of the original image. That allows you to process even large images. At the same time, block processing gives minor block artifacts, which I could only detect using dssim.

build

load submodules

submodules:

$ git submodule init
$ git submodule update

install dependencies

build dependencies:

  • build-essential
  • cmake
$ sudo apt-get install build-essential cmake

compilation

$ mkdir build
$ cd build
$ cmake ..
$ make

use

The first and second parameters specify the paths to the image and the result {PNG}. The -b option specifies the block size in block division (default 256). The -o option specifies the block overlap (default 16 [~ blok size / 16]). The -p option specifies the part of the CNN in the resulting image (default 0.707107, full 1.0).

./stbsrcnn ${IMAGE_PATH} ${IMAGE_PATH}.out.png

structure

  • bicubic.h - bicubic image scaling
  • convdata.h - CNN weight data
  • dependencies.c - API stb
  • srcnn.h - CNN apply
  • stb/ - stb
  • stbsrcnn.c - CLI program.

Convolutional Neural Network

Example

Origin (256x256:3):
Example
Bicubic interplation (x2, 512x512:3):
Example
SRCNN (only x2, 512x512:3):
Example

Demo

You can run the following command to test the demo program.

stbsrcnn -p 1 ../images/butterfly.png butterfly.x2.png

stb-image-srcnn's People

Contributors

zvezdochiot avatar

Stargazers

 avatar  avatar

Watchers

 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.