Skip to content

Neural style transfer built on TensorFlow with a CNN, learning input content and style images. Recombines input images to produce an output resembling content image painted in style of style image.

License

Notifications You must be signed in to change notification settings

RaymondLZhou/artistic-learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Artistic Learning

Neural style transfer built on TensorFlow and Keras in Python with a deep convolutional neural network (CNN), learning shape of input content and style images. Recombines input images to produce an output resembling content image painted in style of style image.

Description

The technique of neural style transfer is described in the original paper, A Neural Algorithm of Artistic Style by Gatys, Ecker, and Bethge. The goal is to take a content image and a style image, then combine them so that the output image looks like the content image in the style of the style image.

We define two loss functions, the content loss and the style loss. We attempt to transform the output image to minimize both loss functions. Both content and style images are fed into the VGG19 model, and values from the intermediate layers are used to compute the losses.

Examples

output1

output2

output3

output

Getting Started

How to run the application

  1. Clone the repository.
  2. Open hyperparameters.py and adjust the hyperparameters as desired.
  3. Run main.py with python main.py. The output image is saved in data/output.

Built With

License

This project is licensed under the MIT License - see LICENSE file for details.

About

Neural style transfer built on TensorFlow with a CNN, learning input content and style images. Recombines input images to produce an output resembling content image painted in style of style image.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages