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

Problems with vg_preprocessing.py #7

Open
zhuchen03 opened this issue Oct 20, 2016 · 1 comment
Open

Problems with vg_preprocessing.py #7

zhuchen03 opened this issue Oct 20, 2016 · 1 comment

Comments

@zhuchen03
Copy link

I have downloaded visual_genome_python_driver from the link you provided, and https://visualgenome.org/static/data/dataset/question_answers.json.zip from https://visualgenome.org/static/data/dataset/question_answers.json.zip. The only thing I have modified is DATA_PATH in vg_preprocessing.py.

When running vg_preprocessing.py, it throws following error:

Traceback (most recent call last):
File "vg_preprocessing.py", line 20, in
QAs = GetAllQAs(DATA_PATH)
File "/home/zhuchen/sources/vqa-mcb/preprocess/visual_genome_python_driver/src/local.py", line 50, in GetAllQAs
output.append(utils.ParseQA(image['qas'], imageMap))
File "/home/zhuchen/sources/vqa-mcb/preprocess/visual_genome_python_driver/src/utils.py", line 100, in ParseQA
qas.append(QA(d['id'], image_map[d['image']], d['question'], d['answer'], qos, aos))
KeyError: 'id'

I guess it is because the json file has been modified since Visual Genome v1.2 was released, because the 'Download question answers' links of both versions lead to the same url....

Is there anything wrong with what I have done? Or do I need the old version of question answer pairs? If so, could you kindly provide the original json file? Thanks!

@csnemes2
Copy link

Simply use the 1.2 version which is available
Do
visual_genome_python_driver$ git checkout 64b79cfccac2b5fc4d3972eba6e1bf522b832736
As this was the time when they observed it:
ranjaykrishna/visual_genome_python_driver@64b79cf

((Or you may speculate on https://visualgenome.org/static/data/dataset/
but i did not find which version to checkout which goes with https://visualgenome.org/static/data/dataset/quetion_answers.json.zip
actually its name is not very promising, so just go with 1.2))

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