Coder Social home page Coder Social logo

creating_art_by_neural_style_transfer_in_deep_learning's Introduction

Creating Art by Neural Style Transfer in Deep Learning

This project is applying the style of drawing from one art piece to another by a deep learning algorithm in Python.

Motivation

In 2019, I was in the final year of university and wanted to write a program to have a visually taste of the power of deep leanring.

Features

  • Generating an image by blending two different images

Build status

Project is completed

Code style

Google Python Style

Screenshots

Input
Content Image
Content Image
Style Image
Style Image
Output
output

Tech/framework used

Built with

  • TensorFlow

How to use it?

  1. Clone or download this repo.
  2. Choose two .jpg as input, one as a content image, and the other one as a style image.
    Style image is the image whose style would be transferred to the content image.
  3. Open main.ipynb in the folder
  4. Write the following code in main.ipynb.
content_path = '{path of content image}'
style_path = '{path of style image}'
target_path = '{path of output image}'
best_{output image name}, best_loss = run_style_transfer(content_path, style_path, num_iterations = 300)
Image.fromarray(best_{output image name}).save(target_path)
Image.fromarray(best_{output image name})
show_results(best_{output image name}, '{path of content image}', '{path of style image}')

Remarks: It is a Jupyter Notebook. You can also read the code I wrote in blocks 76 to 78 as a demonstration.

Credits

Thanks for providing art pieces, Tsz Wai, my friend in Hong Kong.

License

License: GPL v3

creating_art_by_neural_style_transfer_in_deep_learning's People

Contributors

tommy-khc 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.