All Projects → mgoubran → MeuralPaint

mgoubran / MeuralPaint

Licence: GPL-3.0 license
TensorFlow implementation of CNN fast neural style transfer ⚡️ 🎨 🌌

Programming Languages

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

Projects that are alternatives of or similar to MeuralPaint

Tensorflow Style Transfer
A simple, concise tensorflow implementation of style transfer (neural style)
Stars: ✭ 278 (+1363.16%)
Mutual labels:  style-transfer, neural-style
Torch Models
Stars: ✭ 65 (+242.11%)
Mutual labels:  style-transfer, neural-style
Neural Style Audio Tf
TensorFlow implementation for audio neural style.
Stars: ✭ 413 (+2073.68%)
Mutual labels:  style-transfer, neural-style
neural-style-pytorch
Neural Style implementation in PyTorch! 🎨
Stars: ✭ 50 (+163.16%)
Mutual labels:  style-transfer, neural-style
Style Transfer
A Keras Implementation of "A Neural Algorithm of Artistic Style"
Stars: ✭ 115 (+505.26%)
Mutual labels:  style-transfer, neural-style
Neural-Zoom-Legacy
Infinite Zoom For Style Transfer
Stars: ✭ 14 (-26.32%)
Mutual labels:  style-transfer, neural-style
Adain Style
Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization
Stars: ✭ 1,049 (+5421.05%)
Mutual labels:  style-transfer, neural-style
Neural Style Pt
PyTorch implementation of neural style transfer algorithm
Stars: ✭ 456 (+2300%)
Mutual labels:  style-transfer, neural-style
Faststyle
Tensorflow implementation of fast neural style transfer.
Stars: ✭ 170 (+794.74%)
Mutual labels:  style-transfer, neural-style
Fast Style Transfer
TensorFlow CNN for fast style transfer ⚡🖥🎨🖼
Stars: ✭ 10,240 (+53794.74%)
Mutual labels:  style-transfer, neural-style
SANET
Arbitrary Style Transfer with Style-Attentional Networks
Stars: ✭ 105 (+452.63%)
Mutual labels:  style-transfer, fast-neural-style
Neural-Tile
A better tiling script for Neural-Style
Stars: ✭ 35 (+84.21%)
Mutual labels:  style-transfer, neural-style
Keras-Style-Transfer
An implementation of "A Neural Algorithm of Artistic Style" in Keras
Stars: ✭ 36 (+89.47%)
Mutual labels:  style-transfer, neural-style
Neural Tools
Tools made for usage alongside artistic style transfer projects
Stars: ✭ 150 (+689.47%)
Mutual labels:  style-transfer, neural-style
Neural-Zoom
Infinite Zoom For Style Transfer
Stars: ✭ 34 (+78.95%)
Mutual labels:  neural-style, fast-neural-style
Texture nets
Code for "Texture Networks: Feed-forward Synthesis of Textures and Stylized Images" paper.
Stars: ✭ 1,147 (+5936.84%)
Mutual labels:  style-transfer, neural-style
Neural Style Audio Torch
Torch implementation for audio neural style.
Stars: ✭ 130 (+584.21%)
Mutual labels:  style-transfer, neural-style
Tensorflow Fast Style Transfer
A simple, concise tensorflow implementation of fast style transfer
Stars: ✭ 224 (+1078.95%)
Mutual labels:  style-transfer, neural-style
Ai Art
PyTorch (and PyTorch Lightning) implementation of Neural Style Transfer, Pix2Pix, CycleGAN, and Deep Dream!
Stars: ✭ 153 (+705.26%)
Mutual labels:  style-transfer
Warpgan
(CVPR 2019 Oral) Style Transfer with Geometric Deformation
Stars: ✭ 215 (+1031.58%)
Mutual labels:  style-transfer

MeuralPaint

Paint images using famous artistic styles in seconds (or less!)

quickpaint using pre-trained styles (models) or trainstyle a new model on a new style

a TensorFlow implementation for feed forward CNN fast neural style transfer, based on [1-3].

works with different versions of pre-trained TF models, many pre-trained models included (more to come)

Examples

input

alt text

styles outputs outputs styles
rain princess alt text alt text alt text the shipwreck of the minotaur alt text
wave alt text alt text alt text mosaic alt text
the scream alt text alt text alt text composition vii alt text
la muse alt text alt text alt text cubist alt text
udnie alt text alt text alt text feathers alt text

Usage

QuickPaint

GUI:

alt text

Command line:

python quickpaint.py -i [ input (content) ] -o [ output (stylized content) ] -m [ model (style) ] -ma [ mask ] -bl [ blend ]

Example: python quickpaint.py -i inputs/stanford.jpg -o outputs/stanford_cubist.jpg -m pre-trained_models/cubist.model -ma 1 -bl 0.05

required arguments:
-i, --input dir or file to transform (content)
-o, --output destination (dir or file) of transformed input (stylized content)
-m, --model path to load model (.ckpt or .model/.meta) from

optional arguments:
-h, --help show this help message and exit
-d, --device device to perform compute on (default: /gpu:0)
-b, --batch-size batch size for feed-forwarding (default: 4)
-a, --model-arch model architecture if models in form (.model) are used, (default: pre-trained_models/model.meta)
-ma, --mask create binary mask from input (@ 1% of max) and mask output (default: 0 -> no masking)
-bl, --blend multiply the original image with the output using a weighting (factor) -- to preserve original colors / contrast (default: 0 -> no blending)

TrainStyle

Command line:

python trainstyle.py -s [ style ] -c [ checkpoint dir ] -o [ output test image ] -i [ checkpoint iterations ] -t [ training set path ] -od [ output test dir ] -cw [ content weight ] -tv [ tv weight ] -sw [ style weight ] - b [ batch size ] -l [ learning rate ] -n [ network path ]

Example: python trainstyle.py -s styles/the_scream.jpg -c checkpoint -o stanford.jpg -od test -cw 1.5e1 -i 1000 -b 20

required arguments:
-c, --checkpoint-dir dir to save checkpoint in
-s, --style desired style image path

optional arguments:
-h, --help show this help message and exit
-t, --train-path path to training images folder
-o, --output output test image at every checkpoint path
-od, --output-dir output test images dir
-e, --epochs # of epochs
-b, --batch-size batch size
-i, --checkpoint-iterations checkpoint frequency
-n, --net-path path to VGG19 network (default data/imagenet-vgg-verydeep-19.mat) -cw, --content-weight content weight (default 7.5)
-sw, --style-weight style weight (default 100.0)
-tw, --tv-weight total variation regularization weight (default 200.0)
-l, --learning-rate learning rate (default 0.001)

Dependencies

  • Python 2.7.9
  • TensorFlow 0.11.0 >=
  • scipy 0.18.1
  • numpy 1.11.2

To train:

  1. COCO dataset (training data) http://msvocds.blob.core.windows.net/coco2014/train2014.zip

  2. VGG19 imagenet weights http://www.vlfeat.org/matconvnet/models/beta16/imagenet-vgg-verydeep-19.mat

Acknowledgements

References

[1] Johnson, Justin, Alexandre Alahi, and Li Fei-Fei. "Perceptual losses for real-time style transfer and super-resolution." arXiv preprint arXiv:1603.08155. https://arxiv.org/abs/1603.08155

check out Justin's repo for a theano/Lua implementation: https://github.com/jcjohnson/fast-neural-style

[2] Ulyanov, Dmitry, Andrea Vedaldi, and Victor Lempitsky. "Instance Normalization: The Missing Ingredient for Fast Stylization." arXiv preprint arXiv:1607.08022. https://arxiv.org/abs/1607.08022

[3] Gatys, Leon A., Alexander S. Ecker, and Matthias Bethge. "A neural algorithm of artistic style." arXiv preprint arXiv:1508.06576. https://arxiv.org/abs/1508.06576

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].