All Projects → jialinwu17 → self_critical_vqa

jialinwu17 / self_critical_vqa

Licence: other
Code for NeurIPS 2019 paper ``Self-Critical Reasoning for Robust Visual Question Answering''

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to self critical vqa

Interpret
Fit interpretable models. Explain blackbox machine learning.
Stars: ✭ 4,352 (+11058.97%)
Mutual labels:  interpretable-ai, explainable-ai
path explain
A repository for explaining feature attributions and feature interactions in deep neural networks.
Stars: ✭ 151 (+287.18%)
Mutual labels:  interpretable-deep-learning, explainable-ai
deep-explanation-penalization
Code for using CDEP from the paper "Interpretations are useful: penalizing explanations to align neural networks with prior knowledge" https://arxiv.org/abs/1909.13584
Stars: ✭ 110 (+182.05%)
Mutual labels:  interpretable-deep-learning, explainable-ai
mllp
The code of AAAI 2020 paper "Transparent Classification with Multilayer Logical Perceptrons and Random Binarization".
Stars: ✭ 15 (-61.54%)
Mutual labels:  interpretable-ai, explainable-ai
AoA-pytorch
A Pytorch implementation of Attention on Attention module (both self and guided variants), for Visual Question Answering
Stars: ✭ 33 (-15.38%)
Mutual labels:  vqa, visual-question-answering
WhiteBox-Part1
In this part, I've introduced and experimented with ways to interpret and evaluate models in the field of image. (Pytorch)
Stars: ✭ 34 (-12.82%)
Mutual labels:  interpretable-ai, explainable-ai
ProtoTree
ProtoTrees: Neural Prototype Trees for Interpretable Fine-grained Image Recognition, published at CVPR2021
Stars: ✭ 47 (+20.51%)
Mutual labels:  interpretable-deep-learning, explainable-ai
zennit
Zennit is a high-level framework in Python using PyTorch for explaining/exploring neural networks using attribution methods like LRP.
Stars: ✭ 57 (+46.15%)
Mutual labels:  interpretable-ai, explainable-ai
Transformer-MM-Explainability
[ICCV 2021- Oral] Official PyTorch implementation for Generic Attention-model Explainability for Interpreting Bi-Modal and Encoder-Decoder Transformers, a novel method to visualize any Transformer-based network. Including examples for DETR, VQA.
Stars: ✭ 484 (+1141.03%)
Mutual labels:  vqa, explainable-ai
Awesome Machine Learning Interpretability
A curated list of awesome machine learning interpretability resources.
Stars: ✭ 2,404 (+6064.1%)
Mutual labels:  interpretable-deep-learning, interpretable-ai
ShapleyExplanationNetworks
Implementation of the paper "Shapley Explanation Networks"
Stars: ✭ 62 (+58.97%)
Mutual labels:  interpretable-deep-learning, explainable-ai
FigureQA-baseline
TensorFlow implementation of the CNN-LSTM, Relation Network and text-only baselines for the paper "FigureQA: An Annotated Figure Dataset for Visual Reasoning"
Stars: ✭ 28 (-28.21%)
Mutual labels:  vqa, visual-question-answering
Pytorch Grad Cam
Many Class Activation Map methods implemented in Pytorch for CNNs and Vision Transformers. Including Grad-CAM, Grad-CAM++, Score-CAM, Ablation-CAM and XGrad-CAM
Stars: ✭ 3,814 (+9679.49%)
Mutual labels:  interpretable-deep-learning, interpretable-ai
just-ask
[TPAMI Special Issue on ICCV 2021 Best Papers, Oral] Just Ask: Learning to Answer Questions from Millions of Narrated Videos
Stars: ✭ 57 (+46.15%)
Mutual labels:  vqa, visual-question-answering
bottom-up-features
Bottom-up features extractor implemented in PyTorch.
Stars: ✭ 62 (+58.97%)
Mutual labels:  vqa, visual-question-answering
Mmf
A modular framework for vision & language multimodal research from Facebook AI Research (FAIR)
Stars: ✭ 4,713 (+11984.62%)
Mutual labels:  vqa
Mullowbivqa
Hadamard Product for Low-rank Bilinear Pooling
Stars: ✭ 57 (+46.15%)
Mutual labels:  vqa
Mac Network
Implementation for the paper "Compositional Attention Networks for Machine Reasoning" (Hudson and Manning, ICLR 2018)
Stars: ✭ 444 (+1038.46%)
Mutual labels:  vqa
Awesome Vqa
Visual Q&A reading list
Stars: ✭ 403 (+933.33%)
Mutual labels:  vqa
Vqa Mfb
Stars: ✭ 153 (+292.31%)
Mutual labels:  vqa

Code for Self-Critical Reasoning for Robust Visual Question Answering (NeurIPS 2019 Spotlight)

This repo contains codes for ''Self-Critical Reasoning for Robust Visual Question Answering'' with VQA-X human textual explanations This repo contains code modified from here, many thanks!

Prerequisites

Python 3.7.1
PyTorch 1.1.0
spaCy (we use en_core_web_lg spaCy model)
h5py, pickle, json, cv2

Preprocessing

Please download the detection features from this google drive and put it to 'data' folder
Please run bash tools/download.sh to download other useful data files including VQA QA pairs and Glove embeddings
Please run bash tools/preprocess.sh to preprocess the data
mkdir saved_models

Training

The training propocess is split to three stage or two stage:

Three stage version (pretrain on CP, fine-tune using influential strengthening loss and fine-tune with both.)

(1) Pretrain on VQA-CP train dataset by runnning
CUDA_VISIBLE_DEVICES=0 python main.py --load_hint -1 --use_all 1 --learning_rate 0.001 --split v2cp_train --split_test v2cp_test --max_epochs 40
After the pretraining you will have a saved model in saved_models named by the start training time.
Alternatively, you can directly download a model from here.

(2) Pretrain using the influential strengthening loss
Here, please replace the 86-th line in the train.py with your VQA-CP pretrained models.
Then, please run the following line to strengthen the most influential object.
CUDA_VISIBLE_DEVICES=0 python main.py --load_hint 0 --use_all 0 --learning_rate 0.00001 --split v2cp_train_vqx --split_test v2cp_test --max_epochs 12 --hint_loss_weight 20
After the pretraining you will have anthor saved model in saved_models named by the start training time.
Alternatively, you can directly download a model from here.

(3) Training with the self-critical objectives.
Here, please replace the 82-th line in the train.py with your influence strengthened pretrained models.
Then, please run the following line for training.
CUDA_VISIBLE_DEVICES=0 python main.py --load_hint 1 --use_all 0 --learning_rate 0.00001 --split v2cp_train_vqx --split_test v2cp_test --max_epochs 5 --hint_loss_weight 20 --compare_loss_weight 1500
Alternatively, you can directly download a model from here.

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].