VQA v1, open-ended: the question and the image are attended jointly by the
attention layer of
Factor Graph Attention
(CVPR 2019), and the answer is chosen from a 3000-answer vocabulary.
Trained on COCO train2014, evaluated on val2014, with 36 bottom-up region
features. Scored with the official metric — answer normalization, and the average
over the ten leave-one-annotator-out subsets.
VQA is graded rather than single-label: ten annotators answer each question and an
answer earns
min(matches/3, 1). Supervising those scores rather than one
"correct" id is worth about a point. The sigmoid-and-binary-cross-entropy form
recommended by the
2017 challenge writeup also
helps, but is 0.8 behind the softmax form here — with a 3000-way vocabulary read
out by an argmax, keeping the answers competing suits the evaluation better than
scoring them independently.
1from fga.tasks.vqa import OpenEndedVQAModel
2
3model = OpenEndedVQAModel.from_pretrained("Idan/fga-vqa")
4out = model(question_input_ids=q, image_features=v)
5answer_id = out.logits.argmax(-1)
The repository also contains
HighOrderAttentionForVQA, the port of
High-Order Attention Models for VQA
(NeurIPS 2017), which adds the candidate answers as a third modality and a ternary
factor over (region, word, answer) triples. It is kept for that factor and is not
published here: it scores 61.4, below this model, despite being handed eighteen
candidates to choose between. Something in it is wrong and has not been found.
1@inproceedings{schwartz2019factor,
2 title={Factor graph attention},
3 author={Schwartz, Idan and Yu, Seunghak and Hazan, Tamir and Schwing, Alexander G},
4 booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
5 pages={2039--2048},
6 year={2019}
7}