GithubHelp home page GithubHelp logo

muhammedbuyukkinaci / neural-style-transfer-with-tensorflow Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 3.0 14.82 MB

Implementation of Neural Style Transfer algorithm with pre-trained VGG-16 Network & TensorFlow in Python 3.

Python 100.00%
neural-style-transfer neural-style-transfer-tensorflow tensorflow artistic-style-transfer vgg-16

neural-style-transfer-with-tensorflow's Introduction

Neural Style Transfer with TensorFlow

Implementation of Neural Style Transfer algorithm with pretrained VGG-16 Network & TensorFlow in Python 3.

Dependencies

pip install -r requirements.txt

or

pip3 install -r requirements.txt

Pre-trained VGG-16 Network ( Warning : 491 MB)

Download VGG-16 named as imagenet-vgg-verydeep-16 from here. Put it in Neural-Style-Transfer-with-TensorFlow folder.

alt text

Cloning and Training

git clone https://github.com/MuhammedBuyukkinaci/Neural-Style-Transfer-with-TensorFlow.git

cd ./Neural-Style-Transfer-with-TensorFlow

python neural_style_transfer.py

To train with your parameters, run a command alike below command: (Details in Arguments for Terminal section)

python neural_style_transfer.py -c_i changed_content.jpg -s_i changed_style.jpg -c_w 25 -s_w 25 -n_i 1000

Arguments for Terminal

  • c_i: Name of Content image. It must be string. Example: changed_content.jpg, default_content.jpg , content_image.png .

  • s_i: Name of Style image. It must be string. Example: changed_style.jpg , default_style.jpg , style_image.png .

  • c_w: Weight of Content image in loss function. It must be integer. Example: 5 , 20 , 50 .

  • s_w: Weight of Style image in loss function. It must be integer. Example: 10 , 20 , 40 .

  • s_w: How many iterations to train. It must be integer. Example: 500 , 1000 , 2000 .

Notebook

Download .ipynb file from here and run:

jupyter lab or jupyter notebook

Outputs

Content Image Style Image Generated Image After 2000 iterations GIF during 2000 iterations
Content Image Style Image Generated Image After 2000 iterations GIF during 2000 iterations
Content Image Style Image Generated Image After 2000 iterations GIF during 2000 iterations
Content Image Style Image Generated Image After 2000 iterations GIF during 2000 iterations

The last content image belongs to one of my friends, Umut Başdemir. He is a Business Development Specialist at Samsung.

References

neural-style-transfer-with-tensorflow's People

Contributors

muhammedbuyukkinaci avatar

Stargazers

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