Skip to content

Neural style transfer based on the paper "Image Style Transfer Using Convolutional Neural Networks" by Gatys et al.

License

Notifications You must be signed in to change notification settings

stante/neural-style-transfer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

neural-style-transfer

This repository contains an implementation of the work presented in the paper A Neural Algorithm of Artistic Style by Leon A. Gatys, Alexander S. Ecker, Matthias Bethge. Based on a style and content image, a new target image is created, which contains the content of the content image and the style of the style image. The content and style information are extracted from convolutional layers of a VGG-19 model trained on ImageNet.

Installation

The easiest way to get the provided code running is by creating a python environment based on the provided environment.yml file.

$ conda env create -f environment.yml

This creates a conda environment called neural-style-transfer, which shall be activated prior to use of the command line tool.

$ conda activate neural-style-transfer

If the conda environment already exists, it can be activated with the following command.

$ conda env update -f environment.yml

Usage

Usage: neural-style-transfer.py [OPTIONS] STYLE_IMAGE CONTENT_IMAGE
                                TARGET_IMAGE

Options:
  --epochs INTEGER  Number of epochs
  --alpha INTEGER   Content weight
  --beta FLOAT      Style weight
  --help            Show this message and exit

Examples

The following example was created with --epochs 5000.

Style Content Result
Style Content Style

License

neural-style-transfer is Copyright © 2019 Alexander Stante. It is free software, and may be redistributed under the terms specified in the LICENSE file.

About

Neural style transfer based on the paper "Image Style Transfer Using Convolutional Neural Networks" by Gatys et al.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages