/Real-Time-Arbitrary-Style-Transfer-AdaIN-TensorFlow

This code mainly implement the paper ' Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization ' by TensorFlow

Primary LanguagePythonMIT LicenseMIT

Introduction

This code mainly implement the paper Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization which address the problem of arbitrary style transfer in real-time. The main contribution of this paper is 'Adaptive Instance Normalization(AdaIN)' proposed by Xun Huang etc.

Procedure of this method is as shown in follow figure.

How to train the network

Python packages you need:

  1. python 3.x
  2. tensorflow 1.4.0
  3. numpy
  4. scipy
  5. pillow

Data sets you need:

  1. Content images data sets (MSCOCO) Firstly, Unzip the MSCOCO dataset, and then put all images into the folder 'content'
  2. Style images data sets (wikiart) Firstly, Unzip the wikiart dataset, and then put all images into the folder 'style'

Pretrained model vgg19:

  1. Please click BaiduYun to download when you have downloaded the file 'vgg.mat', put it into the folder 'vgg_para'.

Results of our code

Style