dwango / neural_style_synthesizer

GNU General Public License v3.0
15 stars 1 forks source link

Caffemodel path? #1

Open enzyme69 opened 8 years ago

enzyme69 commented 8 years ago

I have error message: No Module named 'utility'.

enzyme69 commented 8 years ago

Ok, I understand, needing Python 2.7 and all good until...

IOError: [Errno 2] No such file or directory: 'VGG_ILSVRC_16_layers.caffemodel'

enzyme69 commented 8 years ago

I downloaded the caffemodel, around 500 MB, but where about should I put the path into? Thanks.

kogaki commented 8 years ago

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
enzyme69 commented 8 years ago

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.

enzyme69 commented 8 years ago

And one more question: can I just specify a different caffemodel? Will it work right away?

kogaki commented 8 years ago

Your suggestion is reasonable. I will try to add an parameters about modelpath later.

Here's my answer to your questions;

  1. 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)
  2. 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).