Skip to content

janivanecky/Artistic-Style

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Artistic-Style

Very simple implementation of Neural Algorithm of the Artistic Style (Gatys et al. - http://arxiv.org/abs/1508.06576) in Tensorflow. I used VGG implementation from Chris and modified it slightly, stripping away unnecessary layers.

In the examples below I used content image as an initialization, it seems to provide more consistent image, but in the code, you can switch easily to noise initialization on line 109 in style.py. I used Adam for optimizer and let it run for 500 iterations.

To run it, you're going to need:

Usage

  python style.py content_image_path style_image_path [output_image] [{top,center,bottom,left,right}] [content_scale] [style_weight]

  • paths are pretty self-explanatory
  • {top,center,bottom,left,right} specify how to crop the style image to obtain an image of the same size as the content image
  • content_scale specifies scale factor that is applied to the input content image. Smaller the image, faster the stylization.
  • style_weight is a number between 0-1 that specifies emphasis on the style. 0 means no styling, 1 means only styling.

Examples

First thing I had to do - stylize my very handsome profile picture:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages