Giter VIP home page Giter VIP logo

neural-style-transfer's Introduction

neural-style-transfer

Transfer the style of one image into another

How this works

Our inputs are one content image and one style image. We will also initialise a generated image with random values in the shape of the content image. We will train a convolutional neural network to optimize our cost function J(θ).

J(θ) = λ * J_content(C, G) + (1 - λ) * J_style(S, G)

Where:

  • λ is our parameter with a value between 0 and 1 which controls how much our generated image should look like the content image.
  • J_content(C, G) is the similarity between the content image C and the generated image G, which is defined as: J_content(C, G) = 1/2 * || a_c[l] - a_g[l] || ** 2, a_c is the activation of the last layer in the input when you feed in the content image and a_g[l] is the activation of the last layer when you feed in the generated image. We multiply by one half so the derivative is easier when doing backprop.
  • J_style(S, G) is the similarity between the style image S and the generated image G, which is defined as: J_style(S, G) = || S - G || ** 2

neural-style-transfer's People

Contributors

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