Giter Site home page Giter Site logo

style-transfer's Introduction

Image style transfer

Overview

The rendering of semantic content in an image is deemed to be an arduous task in the field of image processing. A major roadblock in this technique was the lack of dataets which clearly distinguished an image from its content and style.
The algorithm used here allows us to synthesise new images which conglomerates an arbitrary photograph with famous art pieces.

Model architecture

As described by the paper, I make use of the VGG-19 architecture. A neat visual representation of the different layers is illustrated below
./results/vgg-19.png

The only difference in my implementation is the use of Average Pooling layers as opposed to Max Pooling ones (since it yields slightly more appealing results).

Results

The CNN was trained for a total of 500 epochs, which takes about a minute to generate the images when the code is accelerated by the GPU.

  • Starry night
    The image placed above is the style image (the one whose semantic features are to be transferred), and the one below is the content image (on which we wish to perform the style transfer)

    ./results/test1.png

    After performing style transfer on the image, we have the following result ./results/res1.png

  • Golden gate
    Similar to the above example, we have our initial images like so: ./results/test2.png

    And the image synthesised after performing style transfer on it: ./results/res2.png

Reference

The main reference that I used for implementing the code was the paper “Image Style Transfer Using Convolutional Neural Networks” (L. A. Gatys et. al.).
Apart from this, there were some portions of the mathematical description that came along (particularly Gram matrices) for which this was particularly useful for me.

style-transfer's People

Contributors

ckapoor7 avatar

Watchers

 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.