All Projects → iamaaditya → Vqa_demo

iamaaditya / Vqa_demo

Licence: mit
Visual Question Answering Demo on pretrained model

Projects that are alternatives of or similar to Vqa demo

Spark Fm Parallelsgd
Implementation of Factorization Machines on Spark using parallel stochastic gradient descent (python and scala)
Stars: ✭ 220 (-0.9%)
Mutual labels:  jupyter-notebook
Dl For Chatbot
Deep Learning / NLP tutorial for Chatbot Developers
Stars: ✭ 221 (-0.45%)
Mutual labels:  jupyter-notebook
Team Learning Rs
主要存储Datawhale组队学习中“推荐系统”方向的资料。
Stars: ✭ 216 (-2.7%)
Mutual labels:  jupyter-notebook
Fauxtograph
Tools for using a variational auto-encoder for latent image encoding and generation.
Stars: ✭ 220 (-0.9%)
Mutual labels:  jupyter-notebook
Pythondemo
虾神的Python示例代码库
Stars: ✭ 221 (-0.45%)
Mutual labels:  jupyter-notebook
Neural Style Painting
Implementing of the "A Neural Algorithm of Artistic Style"
Stars: ✭ 219 (-1.35%)
Mutual labels:  jupyter-notebook
Practical 1
Oxford Deep NLP 2017 course - Practical 1: word2vec
Stars: ✭ 220 (-0.9%)
Mutual labels:  jupyter-notebook
Data Augmentation For Wearable Sensor Data
A sample code of data augmentation methods for wearable sensor data (time-series data)
Stars: ✭ 222 (+0%)
Mutual labels:  jupyter-notebook
Paperboy
A web frontend for scheduling Jupyter notebook reports
Stars: ✭ 221 (-0.45%)
Mutual labels:  jupyter-notebook
Sklearn pycon2014
Repository containing files for my PyCon 2014 scikit-learn tutorial.
Stars: ✭ 221 (-0.45%)
Mutual labels:  jupyter-notebook
Interview Prepartion Data Science
Stars: ✭ 220 (-0.9%)
Mutual labels:  jupyter-notebook
Interpret Text
A library that incorporates state-of-the-art explainers for text-based machine learning models and visualizes the result with a built-in dashboard.
Stars: ✭ 220 (-0.9%)
Mutual labels:  jupyter-notebook
Scikit Geometry
Scientific Python Geometric Algorithms Library
Stars: ✭ 220 (-0.9%)
Mutual labels:  jupyter-notebook
Materials
Bonus materials, exercises, and example projects for our Python tutorials
Stars: ✭ 3,211 (+1346.4%)
Mutual labels:  jupyter-notebook
Melusine
Melusine is a high-level library for emails classification and feature extraction "dédiée aux courriels français".
Stars: ✭ 222 (+0%)
Mutual labels:  jupyter-notebook
Vae Clustering
Unsupervised clustering with (Gaussian mixture) VAEs
Stars: ✭ 220 (-0.9%)
Mutual labels:  jupyter-notebook
Tensorflow Tutorial
A tutorial on TensorFlow
Stars: ✭ 221 (-0.45%)
Mutual labels:  jupyter-notebook
Sec
Seed, Expand, Constrain: Three Principles for Weakly-Supervised Image Segmentation
Stars: ✭ 221 (-0.45%)
Mutual labels:  jupyter-notebook
Natural Language Processing With Tensorflow
Natural Language Processing with TensorFlow, published by Packt
Stars: ✭ 222 (+0%)
Mutual labels:  jupyter-notebook
Htmresearch
Experimental algorithms. Unsupported.
Stars: ✭ 221 (-0.45%)
Mutual labels:  jupyter-notebook

VQA Demo

Updated to work with Keras 2.0 and TF 1.2 and Spacy 2.0 This code is meant for education thus focus is on simplicity and not speed.

This is a simple Demo of Visual Question answering which uses pretrained models (see models/CNN and models/VQA) to answer a given question about the given image.

Dependency

  1. Keras version 2.0+

    • Modular deep learning library based on python
  2. Tensorflow 1.2+ (Might also work with Theano. I have not tested Theano after the recent commit, use commit 0f89007 for Theano)

  3. scikit-learn

    • Quintessential machine library for python
  4. Spacy version 2.0+

    • Used to load Glove vectors (word2vec)
    • To upgrade & install Glove Vectors
      • python -m spacy download en_vectors_web_lg
  5. OpenCV

    • OpenCV is used only to resize the image and change the color channels,
    • You may use other libraries as long as you can pass a 224x224 BGR Image (NOTE: BGR and not RGB)
  6. VGG 16 Pretrained Weights

Usage

python demo.py -image_file_name path_to_file -question "Question to be asked"

e.g

python demo.py -image_file_name test.jpg -question "Is there a man in the picture?"

if you have prefer to use Theano backend and if you have GPU you may want to run like this

THEANO_FLAGS='floatX=float32,device=gpu0,lib.cnmem=1,mode=FAST_RUN' python demo.py -image_file_name test.jpg -question "What vechile is in the picture?"

Expected Output : 095.2 % train 00.67 % subway 00.54 % mcdonald's 00.38 % bus 00.33 % train station

Runtime

  • GPU (Titan X) Theano optimizer=fast_run : 51.3 seconds
  • GPU (Titan X) Theano optimizer=fast_compile : 47.5 seconds
  • CPU (i7-5820K CPU @ 3.30GHz : 35.9 seconds (Is this strange or not ?)

iPython Notebook

Jupyter/iPython Notebook has been provided with more examples and interactive tutorial. https://github.com/iamaaditya/VQA_Demo/blob/master/Visual_Question_Answering_Demo_in_python_notebook.ipynb

NOTE: See the comments on demo.py for more information on the model and methods

VQA Training

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].