Closed iqbal-chowdhury closed 8 years ago
It seems the model is not being loaded. Did you download the VGG weights file (see this) ?
VGG weights file is downloaded and the image features are also extracted. My theano version is 0.8.2. Keras version is 1.0.2. image_features dimenstion = (1, 4096) question_features dimension = (1, 7, 300)
Now this error appears for
THEANO_FLAGS='exception_verbosity=high' python demo.py -image_file_name test.jpg -question "Is there a man in the picture?":
`Using Theano backend.
Loading image features ...
Loading question features ...
Traceback (most recent call last):
File "demo.py", line 114, in
I tried to put spacy.set_lang_class('en_glove_cc_300_1m_vectors', 'vectors')
but that didn't work [it worked for the jupyter demo; when the same error was over there]
You might need to update your spacy or change the model, see here https://github.com/iamaaditya/VQA_Demo/issues/6
Try this two commands to get your glove vectors running
sputnik --name spacy --repository-url http://index.spacy.io install en==1.1.0 sputnik --name spacy en_glove_cc_300_1m_vectors
Thank you :) issue is solved. I added this line in the demo.py after importing spacy.
spacy.set_lang_class('en_glove_cc_300_1m_vectors', None)
Thanks @anujshah1003 and @iqbal-chowdhury Close #7
Hi,
Thank you for this interactive demo of VQA. Anyway while running the prediction cell:
`y_output = model_vqa.predict([question_features, image_features])
labelencoder = joblib.load(label_encoder_file_name) for label in reversed(np.argsort(y_output)[0,-5:]): print str(round(y_output[0,label]*100,2)).zfill(5), "% ", labelencoder.inverse_transform(label)`
Then it showing some error just as below:
`ValueError Traceback (most recent call last)