-
Notifications
You must be signed in to change notification settings - Fork 123
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
run prepro_vqa.py error when split=2 #22
Comments
there is no 'ans' key on split 2, you should modify lines that ask it. |
@idansc Thank you, i fixed this code bug, and download the pretrained model from here(https://filebox.ece.vt.edu/~jiasenlu/codeRelease/co_atten/model/vqa_model/model_alternating_train-val_vgg.t7). But the overall accuracy in the paper is 60.1%, i really don't know where this gap is comes from? |
Did they provide the json, and h5 files as well? the model need to be aligned with the pre-processed files. |
yeah, the json is provided, and the h5 file is generated by myself: |
that's ok for the images, but what about the h5file containing the preprocessed question dataset? |
@idansc any idea about how to fix this misalignment problem? |
did you try to training the model yourself? by the way are you running on cpu or gpu? |
I have tried to use GPU(M40) to train this model, but the training process is very slow(12.5 hour / 1 epoch, 250epoch is used in the paper), and i'm trying to find out where is the bottleneck |
epoch should be a few mins with M40, check that your stored cnn features are on SSD, or use DataLoader if you have enough RAM (about 60GB) |
yes, it should be. I trained another model based on another github and the speed is very fast, while the accuracy is not good enough: here. |
@xhzhao , @idansc , sorry for offtopic, but really need some help here. I trained the model based on customized VQA, but not sure how to run the evaluation now. I read the readme, but it's not clear from there. I would highly appreciate any help and if you are open for discussion, I guess we can continue here. |
@xhzhao I met the same problem with you, but I have no idea to deal with it. How did you solve it? |
OK, I made it :) |
@lupantech @yauhen-info @xhzhao How do you solved the problem? I am using the VQA v1.9 dataset, the |
I find the error is due to the new |
@panfengli which file is the line "ques_id = torch.DoubleTensor(total_num)" in ? |
I got this error when split=2 while split=1 work very well.
the command is :
python vqa_preprocess.py --download 1 --split 2
python prepro_vqa.py --input_train_json ../data/vqa_raw_train.json --input_test_json ../data/vqa_raw_test.json --num_ans 1000
the error is :
top words and their counts:9.88% done)
(320161, '?')
(225976, 'the')
(200545, 'is')
(118203, 'what')
(76624, 'are')
(64512, 'this')
(49209, 'in')
(45681, 'a')
(41629, 'on')
(40158, 'how')
(38230, 'many')
(37322, 'color')
(37023, 'of')
(29182, 'there')
(18392, 'man')
(14668, 'does')
(13492, 'people')
(12518, 'picture')
(11779, "'s")
(11758, 'to')
total words: 2284620
number of bad words: 0/14770 = 0.00%
number of words in vocab would be 14770
number of UNKs: 0/2284620 = 0.00%
inserting the special UNK token
Traceback (most recent call last):
File "prepro_vqa.py", line 292, in
main(params)
File "prepro_vqa.py", line 217, in main
ans_test = encode_answer(imgs_test, atoi)
File "prepro_vqa.py", line 128, in encode_answer
ans_arrays[i] = atoi.get(img['ans'], -1) # -1 means wrong answer.
KeyError: 'ans'
The text was updated successfully, but these errors were encountered: