neural_style_synthesizer
neural_style_synthesizer copied to clipboard
Caffemodel path?
I have error message: No Module named 'utility'.
Ok, I understand, needing Python 2.7 and all good until...
IOError: [Errno 2] No such file or directory: 'VGG_ILSVRC_16_layers.caffemodel'
I downloaded the caffemodel, around 500 MB, but where about should I put the path into? Thanks.
Sorry for poor instruction.
You need to put it into python execution directory. For example..
cd /your/downloaded/path/neural_style_synthesizer
wget http://www.robots.ox.ac.uk/%7Evgg/software/very_deep/caffe/VGG_ILSVRC_16_layers.caffemodel .
python bin/convert_image_multi.py \
--iteration=10 \
--gpu=-1 \
input.png \
style.png \
--output_image=./converted.png
Ok got it to working. Great. Arigatou~
Maybe needs path redirection for model inside the utility.py that can be changed from terminal command? Just a suggestion.
Is it possible to output "progress frame" during the procession? I tried 300 pixel == 1 hour, 600 pixel == 12 hours. Would be nice to have output image every n-iterations to see the progress.
And one more question: can I just specify a different caffemodel? Will it work right away?
Your suggestion is reasonable. I will try to add an parameters about modelpath later.
Here's my answer to your questions;
- progress frames can be stored with few options:
--debug (debug flag)
,--debug-span N
(store progress frames per N iterations),--out_dir your_output_path
(where to store the frames) - If you want to use other caffemodels, you need to write model defintions in the chainer manner (e.g.
https://github.com/dwango/neural_style_synthesizer/blob/master/neural_art/models/vgg.py
) and fix load script (https://github.com/dwango/neural_style_synthesizer/blob/master/neural_art/utility.py#L37
).