Giter Club home page Giter Club logo

Comments (8)

iamaaditya avatar iamaaditya commented on July 26, 2024

It seems the model is not being loaded. Did you download the VGG weights file (see this) ?

from vqa_demo.

iqbal-chowdhury avatar iqbal-chowdhury commented on July 26, 2024

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)

from vqa_demo.

iamaaditya avatar iamaaditya commented on July 26, 2024
  1. First make sure you are running the code of this repo, which was updated to make changes to work with Keras 1+ (do a git pull origin master ) if you need to get the latest.
  2. Run the command using following theano flag
     THEANO_FLAGS='exception_verbosity=high' python demo.py
    and then paste the error here. It seems some variable size mis-match but I do not get the same error.

from vqa_demo.

iqbal-chowdhury avatar iqbal-chowdhury commented on July 26, 2024

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
main()
File "demo.py", line 95, in main
question_features = get_question_features(unicode(args.question, 'utf-8'))
File "demo.py", line 72, in get_question_features
word_embeddings = spacy.load('en', vectors='en_glove_cc_300_1m_vectors')
File "/home/iqbal/.local/lib/python2.7/site-packages/spacy/init.py", line 16, in load
vectors_package = get_package_by_name(vectors, via=via)
File "/home/iqbal/.local/lib/python2.7/site-packages/spacy/util.py", line 41, in get_package_by_name
lang = get_lang_class(name)
File "/home/iqbal/.local/lib/python2.7/site-packages/spacy/util.py", line 28, in get_lang_class
raise RuntimeError('Language not supported: %s' % lang)
RuntimeError: Language not supported: en_glove_cc_300_1m_vectors
`

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]

from vqa_demo.

iamaaditya avatar iamaaditya commented on July 26, 2024

You might need to update your spacy or change the model, see here #6

from vqa_demo.

anujshah1003 avatar anujshah1003 commented on July 26, 2024

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

from vqa_demo.

iqbal-chowdhury avatar iqbal-chowdhury commented on July 26, 2024

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)

from vqa_demo.

iamaaditya avatar iamaaditya commented on July 26, 2024

Thanks @anujshah1003 and @iqbal-chowdhury
Close #7

from vqa_demo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.