Coder Social home page Coder Social logo

stylenet's Introduction

Stylenet

This is a Tensorflow project of neural network with the style synthesis algorithm modified from 2 major methods Gram Matrix and Markov Random Fields. By given a content and style image, the style and pattern can be synthesised into the content. This project also support region mapping. We have added several modifications in the Markov Random Fields cost functions. See belows for the detail.

The visual network is make use of the Tensorflow VGG19 network (Original Caffe implementation is in here and here).

Here are some sample result generated by this algorithm.

Basic synthesis

Content Style Result
>See the intermediate results in [this video](https://youtu.be/4ssJyLivbBM)
Synthesis with region mapping
Content Style
Content Region Map Style Region Map Result


##Modification of Algorithm There are 2 modifications of the algorithm from the original Markov Random Field in the paper.

  • We added the blur filtering in the convariant matrix before calculate the max argument in order to reduce the different of the convariant score in a local neighbouthood. This can make the result image look more natural. (Yellow part in the diagram)

  • The second modification is to replace the cost function of the piecwise square difference between all patches and the slices of the image. We replaced the function to a single averaged patch tensor in order greatly improve the training process. (Red part in the diagram)



##Requirement



##Basic Usage

stylenet_patch.render_gen( <content image path> , <style image path>, height=<output height>)

See the smaple main function in stylenet_patch for more detail.

stylenet's People

Contributors

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