abhshkdz/neural-vqa

Error ---- predict.lua -checkpoint_file vqa_epoch15.00_0.4576.t7 -input_image_path data/train2014/COCO_train2014_000000405541.jpg -question 'What is the cat on?'

anthonyyuan opened this issue · 7 comments

DaviddeMacBook-Pro:neural-vqa-master lihong$ th predict.lua -checkpoint_file vqa_epoch15.00_0.4576.t7 -input_image_path data/train2014/COCO_train2014_000000405541.jpg -question 'What is the cat on?'
/Users/lihong/torch/install/bin/luajit: ./utils/DataLoader.lua:35: attempt to index local 'train_questions_attr' (a nil value)
stack traceback:
./utils/DataLoader.lua:35: in function 'create'
predict.lua:59: in main chunk
[C]: in function 'dofile'
...hong/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x010ad1fbd0

It seems some files are missing in your data folder. Do you have the generated question and answer vocab files (data/questions_vocab.t7 and data/answers_vocab.t7)? If not, you can either download them from links given in the readme, or if you want to generate your own vocab files, make sure you've downloaded the VQA dataset.

yes, I have have the generated question and answer vocab files (data/questions_vocab.t7 and data/answers_vocab.t7). can u give a demo
DaviddeMacBook-Pro:neural-vqa-master lihong$ cd data
DaviddeMacBook-Pro:data lihong$ ls
Annotations_Train_mscoco.zip frcnn_alexnet.t7
Annotations_Val_mscoco.zip mscoco_train2014_annotations.json
Questions_Train_mscoco mscoco_val2014_annotations.json
Questions_Train_mscoco.zip questions_vocab.t7
Questions_Val_mscoco train2014
Questions_Val_mscoco.zip train2014.zip
answers_vocab.t7 val2014
data.t7 wget-log
download_data.sh
DaviddeMacBook-Pro:data lihong$

can u giv me a demo

DaviddeMacBook-Pro:neural-vqa-master lihong$ ls
README.md models
data predict.lua
evaluate.lua train.lua
extract_fc7.lua utils
loadcaffe_wrapper.lua vqa_epoch15.00_0.4576.t7
lstm.lua
DaviddeMacBook-Pro:neural-vqa-master lihong$

DaviddeMacBook-Pro:neural-vqa-master lihong$ th predict.lua -checkpoint_file vqa_epoch15.00_0.4576.t7 -input_image_path data/train2014/COCO_train2014_000000405541.jpg -question 'What is the cat on?' is right? can u help me

You've to extract all the zipped JSON files into the data folder as well. For example, MultipleChoice_mscoco_train2014_questions.json.

@anthonyyuan were you able to get this to work?