keras-vgg-buddy
keras-vgg-buddy copied to clipboard
importing VGG16 from keras_vgg_buddy
I have installed successfully keras-vgg-buddy, I have keras installed too (keras was installed via anaconda), but when running the example in keras-vgg-buddy-master/examples (e.g. conv_features.py) I'm being told that VGG16 can't be found. ImportError: cannot import name 'vgg16' I have downloaded vgg16_weights.h5, it's in the keras-vgg-buddy-master/keras_vgg_buddy. What should I pay attention to so that I can run the examples?
Thanks for reporting this. It should work now if you pull/install the latest version from pypi. Let me know if it doesn't, though!
Adam, thank you for the prompt reply and update. The error is gone and I can run conv_features all right but get an error for classify.py:
python classify.py --weights ../../vgg16_weights.h5 ../TestImages/tigerCat.jpeg gives me:
Traceback (most recent call last): File "classify.py", line 19, in
Ludovic
Are you using the reduced-size weights from the readme? That file only contains the convolutional layers which would explain why argmax is returning a number greater than 1000. The weight file here: https://drive.google.com/file/d/0Bz7KyqmuGsilT0J5dmRCM0ROVHc/view?usp=sharing contains the entire model with the final fully-connected layers. The full set of weights is 500+MB vs ~50MB for just the conv layers, which is why the option exists.
I'll update the readme since I see it really doesn't explain this.
Yes indeed, I was using the reduced weight files, I'll try with the full set.
Le Mercredi 18 mai 2016 23h15, Adam Wentz <[email protected]> a écrit :
Are you using the reduced-size weights from the readme? That file only contains the convolutional layers which would explain why argmax is returning a number greater than 1000. The weight file here: https://drive.google.com/file/d/0Bz7KyqmuGsilT0J5dmRCM0ROVHc/view?usp=sharing contains the entire model with the final fully-connected layers. The full set of weights is 500+MB vs ~50MB for just the conv layers, which is why the option exists.I'll update the readme since I see it really doesn't explain this.— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub