DHZS / image-style-transfer-tensorflow

Image Style Transfer in TensorFlow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Image Style Transfer in TensorFlow

A tensorflow implementation of image style transfer described in the paper:

The code runs in Eager Execution.

Usage

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 is 10.
  • --alpha: Content weight. Default value is 0.0005.
  • --beta: Style weight. Default value is 1.
  • --learning_rate: Learning rate. Default value is 5.
  • --optimizer: Optimizer to use, only choose in adam, sgd, momentum. Default value is adam.

Sample result

Content image

Output image

About

Image Style Transfer in TensorFlow

License:MIT License


Languages

Language:Python 100.0%