Git Product home page Git Product logo

neural-style-transfer's Introduction

Neural Style Transfer

Issues Forks Stars Ajay Dabas

Example Image

Example Image

Intro

In this repo, I implemented Neural Style Transfer Algorithm. This algorithm was created by Gatys et al. (2015) (Link to paper). This Deep Learning technique takes two images, namely, the content image(C) and a style image(S) and generates a new image(G) which combines the content of image C with style of image S.

I used a pre-trained VGG-19 model which is a very deep convolutional neural network because these deep pre-trained models can detect low-level features such as edges and vertex at earlier layers and high-level features at deep layers, pretty accurately.

Try Yourself

  1. Download and put VGG-19 weights (Link ~ 510MB) in vgg_model folder so path looks like vgg_model/VGG-19.mat
  2. Put style and content image in images folder.
    Example: images/mystyleimage.jpeg & images/mycontentimage.jpeg
    NOTE: Images must be of dimensions 400x300
  3. Review config.py for paths and other configurations (explained below)
  4. Run nst_script.py

Requirements

Recommended System Requirements to run model.

  • A good CPU and a GPU with atleast 8GB memory
  • Atleast 8GB of RAM

Required Libraries for Python along with their version numbers used while making & testing of this project

  • Python - 3.6.7
  • Numpy - 1.16.2
  • Tensorflow - 1.13.1
  • imageio - 2.4.1
  • scipy - 1.2.1
  • Matplotlib - 3.0.3

Pre-trained model license

Here, we are using a pretrained model that can be downloaded at the following link: http://www.vlfeat.org/matconvnet/pretrained/. The pretrained model's parameters are due to the MatConvNet Team. Their software comes with the license replicated below. Copyright (c) 2014-16 The MatConvNet Team. All rights reserved. Redistribution and use in source and binary forms are permittedprovided that the above copyright notice and this paragraph are duplicated in all such forms and that any documentation, advertising materials, and other materials related to such distribution and use acknowledge that the software was developed by the MatConvNet Team. The name of the MatConvNet Team may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

neural-style-transfer's People

Contributors

dabasajay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

neural-style-transfer's Issues

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.