fanner01 / semantic-style-transfer

Tensorflow implementation of semantic style transfer based on guided Gram Matrices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

  1. Examples
  2. Implementation Details
  3. Installation
  4. Usage
  5. Acknowledgements
  6. Citation
  7. License

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

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

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.

About

Tensorflow implementation of semantic style transfer based on guided Gram Matrices

License:GNU Lesser General Public License v3.0


Languages

Language:Jupyter Notebook 95.7%Language:Python 4.3%