Skip to content
Switch branches/tags
Go to file


Failed to load latest commit information.
Latest commit message
Commit time
Jul 8, 2016
Jul 8, 2016
Jul 8, 2016
Jul 8, 2016

Multimodal Compact Bilinear Pooling for VQA

This is the code that we wrote to train the state-of-the-art VQA models described in our paper. Our ensemble of 7 models obtained 66.67% on real open-ended test-dev and 70.24% on real multiple-choice test-dev.

Live Demo

You can upload your own images and ask the model your own questions. Try the live demo!

Pretrained Model

We are releasing the “MCB + Genome + Att. + GloVe” model from the paper, which achieves 65.38% on real open-ended test-dev. This is our best individual model.


You can easily use this model with our evaluation code or with our demo server code.


In order to use our pretrained model:

If you want to train from scratch, do the above plus:

  • Download the VQA tools.
  • Download the VQA real-image dataset.
  • Optional: Install spaCy and download GloVe vectors. The latest stable release of spaCy has a bug that prevents GloVe vectors from working, so you need to install the HEAD version. See train/
  • Optional: Download Visual Genome data.

Data Preprocessing

See preprocess/


See train/


To generate an answers JSON file in the format expected by the VQA evaluation code and VQA test server, you can use eval/ This code can also ensemble multiple models. Running python will print out a help message telling you what arguments to use.

Demo Server

The code that powers our live demo is in server/. To run this, you’ll need to install Flask and change the constants at the top of Then, just do python, and the server will bind to

License and Citation

This code and the pretrained model is released under the BSD 2-Clause license. See LICENSE for more information.

Please cite our paper if it helps your research:

  title={Multimodal Compact Bilinear Pooling for Visual Question Answering and Visual Grounding},
  author={Fukui, Akira and Park, Dong Huk and Yang, Daylen and Rohrbach, Anna and Darrell, Trevor and Rohrbach, Marcus},


No description, website, or topics provided.




No releases published


No packages published