Code out , still cleaning the readme and the wiki
semantic-style-transfer
Tensorflow implementation of our paper Improving Semantic Style Transfer Using Guided Gram Matrices. Our model is based on the image optimisation problem defined in Controlling Perceptual Factors in Neural Style Transfer. We proposed 2 simple solutions to improve the quality of the generated images:
- Gradient capping
- Auto-tuning
Contents
Examples
Full style transfer



Semantic style transfer













Implementation Details
Installation
Let’s get started! Installation will be pretty easy. First, clone a copy of this repository:
git clone https://github.com/nicolastah/semantic-style-transfer
The next step will be to create a new project using your favorite python IDE. I’m personnally using Pycharm. I find its integrated debugger just awesome! Last step is to install all the depedencies and you will be ready to go !
Dependencies
- Python 2.7
- TensorFlow
- SciPy
- NumPy
- Pillow
- pyexcel – To save loss curves
- CUDA (GPU) – Recommended
- CUDNN (GPU) – Recommended
I recommend creating isolated Python environments using Virtualenv. Vital to avoid dependencies conflicts when working on different projects. For those who are not familiar with Virtualenv, here are 2 tutorials that should help you get started, tuto1 and tuto2. The code was tested on Ubuntu16.04.
Model Weigths: VGG19
- Download the weights here.
- Recall that style transfer is based on perceptual losses. Those losses allow to separate style and content. They are computed from high level features. As in the orignal work A Neural Algorithm of Artistic Style, we extract those features using a VGG19 pretrained on image classification.
Usage
Check our wiki for code usage.
Acknowledgements
- Guided Gram Matrices is based on Gatys’ paper Controlling Perceptual Factors in Neural Style Transfer
- Our implementation borrows heavily from anishathalye/neural-style
- Greats tips to obtain good results from titu1994/Neural-Style-Transfer
- Some formatting was borrowed from jcjohnson/fast-neural-style
Citation
@misc{nchung2018_semantic_style,
author = {Chung Nicolas},
title = {Semantic Style Transfer},
year = {2018},
howpublished = {\url{https://github.com/nicolastah/semantic-style-transfer}},
note = {commit xxxxxxx}
}
License
Copyright (c) 2018 Chung Nicolas. Released under GPLv3. See LICENSE.txt for details.