NeuralStyle Plugin (日本語)
This plugin effect transfers style of style image
to content image
using neural network.
The model files of neural networks are not contained in this repository. You can get them from nin_imagenet.caffemodel and VGG_ILSVRC_16_layers.caffemodel.
TBD
- install
Visual Studio 2013
- install
CUDA Toolkit 7.5
(Windows x86_64)
- install
cuDNN v4 Library for Windows
- link3
- copy
bin
,include
, andlib
directories toC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5
.
- install
Python 2.7 WIndows 64-bit
- install
openopt
- exec
pip install openopt
on command prompt
- install
cvxopt
- download
cvxopt-1.1.7+openblas-cp27-none-win_amd64.whl
from link5 - exec
pip install cvxopt-1.1.7+openblas-cp27-none-win_amd64.whl
on command prompt
- install
chainer
- exec
set VS100COMNTOOLS=%VS120COMNTOOLS%` ; set PATH=%VS120COMNTOOLS%\..\..\VC\bin;%PATH%` ; pip install chainer
on command prompt
- copy
neural_style_synthesizer
directory andDWANGO_NeuralStyle.plugin
to${path-to-stuff}/plugins
- copy
nin_imagenet.caffemodel
andVGG_ILSVRC_16_layers.caffemodel
to${path-to-stuff}/plugins/neural_style_synthesizer
- install
Python 2.7 WIndows 64-bit
- install
openopt
- exec
pip install openopt
on command prompt
- install
cvxopt
- download
cvxopt-1.1.7+openblas-cp27-none-win_amd64.whl
from link5 - exec
pip install cvxopt-1.1.7+openblas-cp27-none-win_amd64.whl
on command prompt
- install
chainer
- exec
pip install chainer
on command prompt
- copy
neural_style_synthesizer
directory andDWANGO_NeuralStyle.plugin
to${path-to-stuff}/plugins
- copy
nin_imagenet.caffemodel
andVGG_ILSVRC_16_layers.caffemodel
to${path-to-stuff}/plugins/neural_style_synthesizer
port name | |
---|---|
Content |
content image |
Style |
style image |
param name | default value | min value | max value | |
---|---|---|---|---|
xsplit |
1.000 | 1 | 16.0 | the number of horizontal style image splits |
ysplit |
1.000 | 1 | 16.0 | the number of vertical style image splits |
resize |
1.000 | 0 | 1.0 | resize factor: 1 (original size), 0.5 (half size), 0.1 (1/10 size), and so on. |
iteration |
10.000 | 0 | 1000.0 | the number of iterations for style optimization |
method |
1.000 | 0 | 1.0 | method flag for neural network: {0: max_pooling, 1: average_pooling} . The default value is recommended. |
model |
0.000 | 0 | 1.0 | model of neural network: {0: nin, 1: vgg} , nin is a small and vgg is a large model (*) |
smooth |
0.000 | 0 | 1.0 | sequential processing flag: {0: off, 1: on} (*) |
optimize |
1.000 | 0 | 1.0 | whether to optimize the mixture ratio of style image parts: {0: off, 1: on} . The default value is recommended. |
gpu |
-1.000 | -1 | 3.0 | GPU id (CPUs are used when gpu euqals to -1 ) |
content_weight |
0.005 | 0 | 0.1 | content image weight for style optimization |
pause |
0.000 | 0 | 1.0 | do-not-automatically-close-consoles flag for debugging: {0: off, 1: on} (only for Windows) |
(*) You have to set Dedicated CPUs
to Single
at Preview Settings
and Output Settings
, when you use the vgg
model or enable the smooth
flag.
The first execution is time-consuming, because the plugin generates a cache of the neural network models.