Tensorflow implementation of the fast feed-forward neural style transfer network by Johnson et al.
Here is an example of styling a photo of San Francisco with Van Gogh's Starry Night
The code is based off this paper by Johnson et al which in turn builds off of A Neural Algorithm of Artistic Style by Gatys et al.
This implementation uses Instance Norm described by Ulyanov et al and Resize-Convolution from Odena et al.
Takes a few hours to train on a P2 instance on AWS and image generation takes a few seconds on a Macbook Pro. Training image dataset was from MS COCO validation set and uses the VGG19 network for texture and style loss
- Tensorflow 0.10
- pip install:
- scikit-image
- numpy 1.11
- Go to the project root (there is a pretrained model in the /data directory)
- Run:
$ python style.py --input=path_to_image.jpg --output=your_output_file.jpg
- Download VGG19 weights as vgg19.npy
- Download MS COCO dataset - the training script defaults to look for images in a directory named input_images
- Run:
$ python train.py --data_dir=/path/to/ms_coco --texture=path/to/source_image.jpg