All Projects → ftokarev → tf-adain

ftokarev / tf-adain

Licence: MIT License
TensorFlow implementation of the paper "Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization" by Xun Huang and Serge Belongie

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to tf-adain

StyleGAN demo
The re-implementation of style-based generator idea
Stars: ✭ 22 (-63.93%)
Mutual labels:  style-transfer, adain
Text-to-Speech-Landscape
No description or website provided.
Stars: ✭ 31 (-49.18%)
Mutual labels:  style-transfer
zero-shot-style-transfer
TensorFlow Implementation of Several Zero-Shot Image Style Transfer Methods
Stars: ✭ 14 (-77.05%)
Mutual labels:  style-transfer
SANET
Arbitrary Style Transfer with Style-Attentional Networks
Stars: ✭ 105 (+72.13%)
Mutual labels:  style-transfer
deep dream
DeepDream psychodelic image generator.
Stars: ✭ 39 (-36.07%)
Mutual labels:  style-transfer
dreamsnap
Real life through the eyes of an artist
Stars: ✭ 16 (-73.77%)
Mutual labels:  style-transfer
Shakespearizing-Modern-English
Code for "Jhamtani H.*, Gangal V.*, Hovy E. and Nyberg E. Shakespearizing Modern Language Using Copy-Enriched Sequence to Sequence Models" Workshop on Stylistic Variation, EMNLP 2017
Stars: ✭ 64 (+4.92%)
Mutual labels:  style-transfer
CoMoGAN
CoMoGAN: continuous model-guided image-to-image translation. CVPR 2021 oral.
Stars: ✭ 139 (+127.87%)
Mutual labels:  style-transfer
CS231n
PyTorch/Tensorflow solutions for Stanford's CS231n: "CNNs for Visual Recognition"
Stars: ✭ 47 (-22.95%)
Mutual labels:  style-transfer
rudetoxifier
Code and data of "Methods for Detoxification of Texts for the Russian Language" paper
Stars: ✭ 30 (-50.82%)
Mutual labels:  style-transfer
CartoonGAN-tensorflow
Simple code implement the paper of CartoonGAN(CVPR2018)
Stars: ✭ 14 (-77.05%)
Mutual labels:  style-transfer
Houdini-Plugin-for-Tensorflow-Smoke-Stylization
Tensorflow implementation of Style Transfer for Smoke Simulations. Created as part of ETH Zurich Student Summer Research Fellowship
Stars: ✭ 33 (-45.9%)
Mutual labels:  style-transfer
sRender
Facial Sketch Render, ICASSP 2021
Stars: ✭ 20 (-67.21%)
Mutual labels:  style-transfer
One-Shot-Voice-Cloning
☺️ One Shot Voice Cloning base on Unet-TTS
Stars: ✭ 118 (+93.44%)
Mutual labels:  style-transfer
awesome style transfer
The style transfer paper collection in International CV conference
Stars: ✭ 42 (-31.15%)
Mutual labels:  style-transfer
Android-Tensorflow-Style-Transfer
Based on tensorflow's style transfer Android project.
Stars: ✭ 18 (-70.49%)
Mutual labels:  style-transfer
CycleGAN-Music-Style-Transfer-Refactorization
Symbolic Music Genre Transfer with CycleGAN - Refactorization
Stars: ✭ 28 (-54.1%)
Mutual labels:  style-transfer
NLP Toolkit
Library of state-of-the-art models (PyTorch) for NLP tasks
Stars: ✭ 92 (+50.82%)
Mutual labels:  style-transfer
neural style synthesizer
No description or website provided.
Stars: ✭ 15 (-75.41%)
Mutual labels:  style-transfer
ada-conv-pytorch
No description or website provided.
Stars: ✭ 46 (-24.59%)
Mutual labels:  style-transfer

Overview

Implementation of Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization in Tensorflow

Paper

https://arxiv.org/abs/1703.06868

Setup

git clone https://github.com/ftokarev/tf-adain
cd tf-adain
virtualenv venv --python /usr/bin/python3
source venv/bin/activate
pip install -r requirements.txt
bash models/get_vgg.sh

Usage

Basic

Use --content and --style to provide the respective path to the content and style image, for example:

./test.py --content input/content/cornell.jpg --style input/style/woman_with_hat_matisse.jpg --content_size 0 --style_size 0

To run the code on directories of content and style images use --content_dir and --style_dir options. It will save every possible combination of content and styles to the output directory.

./test.py --content_dir input/content --style_dir input/style

Other options:

  • --crop: Center crop both content and style images beforehand.
  • --content_size: Scale the content image to this size, keeping proportions. Set to zero to keep the original size.
  • --style_size: Scale the style image to this size, keeping proportions. Set to zero to keep the original size.

To see all available options, type:

./test.py -h

Content-Style tradeoff

Use --alpha to adjust the degree of stylization. It should be a value between 0 and 1 (default).

Preserve color

Add --preserve_color to preserve the color of the content image. Example usage:

./test.py --content input/content/newyork.jpg --style input/style/brushstrokes.jpg --content_size 0 --style_size 0 --preserve_color

Style Interpolation

To interpolate between several style images, provide them as a comma-separated list. You can control the relative weight of each style by using the --style_interp_weights option. Example usage:

./test.py --content input/content/avril.jpg --style input/style/picasso_self_portrait.jpg,input/style/impronte_d_artista.jpg --style_interp_weights 1,1 --crop --style_size 400

Spatial Control

Use --mask to provide the path to a binary foreground mask. You can transfer the foreground and background of the content image to different styles. Note that you also to need to provide two style images separated be comma, in which the first one is applied to foreground and the second one is applied to background. Example usage:

./test.py --content input/content/blonde_girl.jpg --style input/style/woman_in_peasant_dress_cropped.jpg,input/style/mondrian_cropped.jpg --mask input/mask/mask.png --content_size 0 --style_size 0

Training

./datasets/get_coco_train.sh
  • Prepare datasets for training
./prepare_dataset.py datasets/coco/train2014/ datasets/coco/
./prepare_dataset.py datasets/wikiart/train/ datasets/wikiart/
  • Launch the training script
./train.py

To see all available options, type:

./train.py -h

Acknowledgement

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].