Arbitrary-Style-Per-Model Fast Neural Style Transfer Method
Using an Encoder-AdaIN-Decoder architecture Deep Convolutional Neural Network as the Style Transfer Network which can take two arbitrary images as input (one as content, the orther one as style) and output a generated image that holds the content and structure from the former and the style from the latter without re-training the network. The network is trained over Microsoft COCO dataset and WikiArt dataset.
This code is based on Huang et al. Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization (ICCV 2017)
- Pre-trained VGG19 network (MD5
8ee3263992981a1d26e73b3ca028a123
)
I have provided a convertor in thetool
folder. It can convert the matlab file into a npz file which is much smaller and easier to process via NumPy.
Or simply download my pre-processed Pre-trained VGG19 network npz format (MD5c7ddd13b12e40033b5031ff43e467065
) The npz format is about 80MB while the mat format is about 550MB. - Microsoft COCO dataset
- WikiArt dataset
Hardware
- CPU: Intel® Core™ i9-7900X (3.30GHz x 10 cores, 20 threads)
- GPU: NVIDIA® Titan Xp (Architecture: Pascal, Frame buffer: 12GB)
- Memory: 32GB DDR4
Operating System
- ubuntu 16.04.03 LTS
Software
- Python 3.6.2
- NumPy 1.13.1
- TensorFlow 1.3.0
- SciPy 0.19.1
- CUDA 8.0.61
- cuDNN 6.0.21
- The Encoder which is implemented with first few layers(up to relu4_1) of a pre-trained VGG-19 is based on Anish Athalye's vgg.py
@misc{ye2017arbitrarystyletransfer,
author = {Wengao Ye},
title = {Arbitrary Style Transfer},
year = {2017},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/elleryqueenhomels/arbitrary_style_transfer}}
}