A tensorflow implementation of image style transfer described in the paper:
The code runs in Eager Execution.
Download the VGG19 npy file from: tensorflow-vgg and put the npy file vgg19.npy
in the model
folder.
python train.py --content_path=<content_image_path> --style_path=<style_image_path> --output_path=<output_path>
Optional arguments:
--vgg19_npy_path
: VGG19 model path. Default value is./model/vgg19.npy
.--save_interval
: Save image interval. Default value is10
.--alpha
: Content weight. Default value is0.0005
.--beta
: Style weight. Default value is1
.--learning_rate
: Learning rate. Default value is5
.--optimizer
: Optimizer to use, only choose inadam
,sgd
,momentum
. Default value isadam
.