All Projects → pfnet-research → Chainer Gogh

pfnet-research / Chainer Gogh

Licence: mit

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Chainer Gogh

lda2vec
Mixing Dirichlet Topic Models and Word Embeddings to Make lda2vec from this paper https://arxiv.org/abs/1605.02019
Stars: ✭ 27 (-91.09%)
Mutual labels:  chainer
chainer-DenseNet
Densely Connected Convolutional Network implementation by Chainer
Stars: ✭ 39 (-87.13%)
Mutual labels:  chainer
inv rl
Inverse Reinforcement Learning Argorithms
Stars: ✭ 34 (-88.78%)
Mutual labels:  chainer
efficient softmax
BlackOut and Adaptive Softmax for language models by Chainer
Stars: ✭ 12 (-96.04%)
Mutual labels:  chainer
neural style synthesizer
No description or website provided.
Stars: ✭ 15 (-95.05%)
Mutual labels:  chainer
book-ml
書籍「今すぐ試したい!機械学習・深層学習(ディープラーニング)画像認識プログラミングレシピ」のソースコードを配布するレポジトリです。
Stars: ✭ 29 (-90.43%)
Mutual labels:  chainer
chainer-Fast-WaveNet
A Chainer implementation of Fast WaveNet(mel-spectrogram vocoder).
Stars: ✭ 33 (-89.11%)
Mutual labels:  chainer
Chainer Faster Rcnn
Object Detection with Faster R-CNN in Chainer
Stars: ✭ 286 (-5.61%)
Mutual labels:  chainer
chainer-dense-fusion
Chainer implementation of Dense Fusion
Stars: ✭ 21 (-93.07%)
Mutual labels:  chainer
voxelnet chainer
VoxelNet implementation in Chainer
Stars: ✭ 26 (-91.42%)
Mutual labels:  chainer
DSTC6-End-to-End-Conversation-Modeling
DSTC6: End-to-End Conversation Modeling Track
Stars: ✭ 56 (-81.52%)
Mutual labels:  chainer
graph-nvp
GraphNVP: An Invertible Flow Model for Generating Molecular Graphs
Stars: ✭ 69 (-77.23%)
Mutual labels:  chainer
chainer-wasserstein-gan
Chainer implementation of the Wesserstein GAN
Stars: ✭ 20 (-93.4%)
Mutual labels:  chainer
kaggle-champs-scalar-coupling
19th place solution in "Predicting Molecular Properties"
Stars: ✭ 26 (-91.42%)
Mutual labels:  chainer
captioning chainer
A fast implementation of Neural Image Caption by Chainer
Stars: ✭ 17 (-94.39%)
Mutual labels:  chainer
chainer-notebooks
Jupyter notebooks for Chainer hands-on
Stars: ✭ 23 (-92.41%)
Mutual labels:  chainer
deep-INFOMAX
Chainer implementation of deep-INFOMAX
Stars: ✭ 32 (-89.44%)
Mutual labels:  chainer
Attention is all you need
Transformer of "Attention Is All You Need" (Vaswani et al. 2017) by Chainer.
Stars: ✭ 303 (+0%)
Mutual labels:  chainer
Portrait matting
Implementation of "Automatic Portrait Segmentation" and "Deep Automatic Portrait Matting" with Chainer.
Stars: ✭ 267 (-11.88%)
Mutual labels:  chainer
waifu2x-chainer
Chainer implementation of waifu2x
Stars: ✭ 137 (-54.79%)
Mutual labels:  chainer

chainer-gogh

Implementation of "A neural algorithm of Artistic style" (http://arxiv.org/abs/1508.06576) in Chainer. The Japanese readme can be found here.

Accompanying article: https://research.preferred.jp/2015/09/chainer-gogh/

(VGG, lam=0.0075, after 5000 iterations)

Usage:

Install Chainer

pip install chainer

See https://github.com/pfnet/chainer for details.

Download the model(s)

There are multiple models to chose from:

Simply specify: (-m nin)

With VGG, it takes a long time to make good looking images. (-m vgg, -m vgg_chainer)

After downloading and using the vgg_chainer model for the first time, all subsequent uses will load the model very fast.(functionality available in chainer 1.19 and above).

About the same as NIN, but there should be potential for good images. The optimum parameters are unknown. (-m googlenet)

Lightweight compared to VGG, should be good for illustrations/anime drawings. Optimal parameters are unknown. (-m i2v)

Run on CPU

python chainer-gogh.py -m nin -i input.png -s style.png -o output_dir -g -1

Run on GPU

python chainer-gogh.py -m nin -i input.png -s style.png -o output_dir -g <GPU number>

Stylize an image with VGG

python chainer-gogh.py -m vgg_chainer -i input.png -s style.png -o output_dir -g 0 --width 256

How to specify the model

-m nin

It is possible to change from nin to vgg, vgg_chainer, googlenet or i2v. To do this, put the model file in the working directory, keeping the default file name.

Generate multiple images simultaneously

  • First, create a file called input.txt and list the input and output file names:
input0.png style0.png
input1.png style1.png
...

then, run chainer-gogh-multi.py:

python chainer-gogh-multi.py -i input.txt

The VGG model uses a lot of GPU memory, be careful!

About the parameters

  • --lr: learning rate. Increase this when the generation progress is slow.
  • --lam: increase to make the output image similar to the input, decrease to add more style.
  • alpha, beta: coefficients relating to the error propagated from each layer. They are hard coded for each model.

Advice

  • At the moment, using square images (e.g. 256x256) is best.
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].