Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caffemodel path? #1

Open
enzyme69 opened this issue Mar 29, 2016 · 6 comments
Open

Caffemodel path? #1

enzyme69 opened this issue Mar 29, 2016 · 6 comments

Comments

@enzyme69
Copy link

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

@enzyme69
Copy link
Author

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
Copy link
Author

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

@enzyme69 enzyme69 changed the title Utility Module Caffemodel path? Mar 29, 2016
@kogaki
Copy link
Contributor

kogaki commented Mar 29, 2016

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
Copy link
Author

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
Copy link
Author

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

@kogaki
Copy link
Contributor

kogaki commented Mar 30, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants