Training your own model

You can train your model with your own style images. This can be done in three steps.

Get ready with your own style images in a directory and download the trained VGG model checkpoint from here: http://download.tensorflow.org/models/vgg_16_2016_08_28.tar.gz:

//Setting up your own images$ image_stylization_create_dataset \ --vgg_checkpoint=/path/to/vgg_16.ckpt \ --style_files=/path/to/style/images/*.jpg \ --output_file=/tmp/image_stylization/style_images.tfrecord

Then, you can start training the model:

//Training a model$ image_stylization_train \ --train_dir=/tmp/image_stylization/run1/train --style_dataset_file=/tmp/image_stylization/style_images.tfrecord \ --num_styles=<NUMBER_OF_STYLES> \ --vgg_checkpoint=/path/to/vgg_16.ckpt ...

Get Machine Learning Projects for Mobile Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.