GithubHelp home page GithubHelp logo

moonqy / askaway-vqa_with_modifications Goto Github PK

View Code? Open in Web Editor NEW

This project forked from animesh20/askaway-vqa_with_modifications

0.0 0.0 0.0 8.17 MB

Developed stacked attention based VQA system with DenseNet and LSTM to study fixation on language prior for VQA 1.0 and VQA 2.0 datasets.

Python 100.00%

askaway-vqa_with_modifications's Introduction

askaway-vqa_with_modifications

This implementation is based on the paper Show, Ask, Attend, and Answer: A Strong Baseline For Visual Question Answering in PyTorch. The reference code was taken from here. Here denset was used for extracting the image features and LSTM was used for question feature extraction. We have also experimented with GRU for question feature extraction. Lastly, we have studied the fixation of the network on language prior. For architecture details and results, please refer to the project report. The VQA 1.0 and VQA 2.0 dataset can be selected by editing the paths in config.py.

Running the model as it is

Download VQA 1.0 and 2.0 datasets from here. After setting up appropriate paths in config.py, run the following commands to obtain results on validation set:

python preprocess-images.py
python preprocess-vocab.py
python train.py

The progress can be viewed using:

python view-log.py <path to .pth log>

Using Densenet and GRU in the network

The densenet-161 architecture was being used here and the changes were made in preprocess-images.py file. The result for this change can be viewed as: Graph of convergence of implementation versus paper results

The GRU network was implemented in model.py and can be changed back to LSTM by editing the same.

Studying the fixation on language prior by turning off image pipeline

The fixation on language prior was first studied by passing a tensor of all 1s. This was done by editing data.py and image can be turned on by editing the same.

Studying the fixation on language prior by removing the image and attention pipeline

The fixation on language prior was then studied by simplifying the network and reducing it to NLP question answering task. This was done by editing model.py. The execution time was reduced 3 times here.

Visualizations

v1 v2

Obtained attention from AskAway for question ’Does this flask have enough wine to fill the glass?’ a) Input image b) First attention glimpse c)Second attention (finer) glimpse v3

askaway-vqa_with_modifications's People

Contributors

animesh20 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.