Based on the VQA challenge and paper, this is just a simple implementation of a pretrained model on a flask server.
online demo: Hasura ( can only run images below 1Mb due to server limits)
Note: This is a python 2 program
- Install dependencies:
pip install -r requirements.txt
- Download weights from here: G-Drive and add it to
resources
folder. - Download nltk punkt data (for tokenization) using
python -c "import nltk; nltk.download('punkt')"
. - VGG19 model weights are needed which will start downloading automatically once the
server.py
runs, or can be downloaded usingpython -c "from keras.applications.vgg19 import VGG19;VGG19(weights='imagenet')"
. Note that this will happen only once - Run the demo.
FLASK_APP=server.py flask run -h 0.0.0.0 -p 8000
This code and weights are based on @anantzoid's VQA code.