All Projects → China-UK-ZSL → ZS-F-VQA

China-UK-ZSL / ZS-F-VQA

Licence: MIT license
Code and Data for paper: Zero-shot Visual Question Answering using Knowledge Graph [ ISWC 2021 ]

Programming Languages

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

Projects that are alternatives of or similar to ZS-F-VQA

Multihopkg
Multi-hop knowledge graph reasoning learned via policy gradient with reward shaping and action dropout
Stars: ✭ 202 (+296.08%)
Mutual labels:  knowledge-graph
Learn
A social network of lifelong learners built around humanity's universal learning map.
Stars: ✭ 224 (+339.22%)
Mutual labels:  knowledge-graph
Zincbase
A batteries-included kit for knowledge graphs
Stars: ✭ 249 (+388.24%)
Mutual labels:  knowledge-graph
Degdb
degdb: distributed economic graph database
Stars: ✭ 207 (+305.88%)
Mutual labels:  knowledge-graph
Bert Attributeextraction
USING BERT FOR Attribute Extraction in KnowledgeGraph. fine-tuning and feature extraction. 使用基于bert的微调和特征提取方法来进行知识图谱百度百科人物词条属性抽取。
Stars: ✭ 224 (+339.22%)
Mutual labels:  knowledge-graph
Recommender System
A developing recommender system in tensorflow2. Algorithm: UserCF, ItemCF, LFM, SLIM, GMF, MLP, NeuMF, FM, DeepFM, MKR, RippleNet, KGCN and so on.
Stars: ✭ 227 (+345.1%)
Mutual labels:  knowledge-graph
Agriculture Knowledgegraph Data
对知识库Wikidata的爬虫以及数据处理脚本 将三元组关系对齐到语料库的脚本 获取知识图谱数据的脚本
Stars: ✭ 198 (+288.24%)
Mutual labels:  knowledge-graph
neuro-symbolic-ai-soc
Neuro-Symbolic Visual Question Answering on Sort-of-CLEVR using PyTorch
Stars: ✭ 41 (-19.61%)
Mutual labels:  vqa
Knowledge Graph Embeddings
Implementations of Embedding-based methods for Knowledge Base Completion tasks
Stars: ✭ 225 (+341.18%)
Mutual labels:  knowledge-graph
Agriculture knowledgegraph
农业知识图谱(AgriKG):农业领域的信息检索,命名实体识别,关系抽取,智能问答,辅助决策
Stars: ✭ 2,957 (+5698.04%)
Mutual labels:  knowledge-graph
Knowledge Graph Analysis Programming Exercises
Exercises for the Analysis of Knowledge Graphs
Stars: ✭ 208 (+307.84%)
Mutual labels:  knowledge-graph
Kprn
Reasoning Over Knowledge Graph Paths for Recommendation
Stars: ✭ 220 (+331.37%)
Mutual labels:  knowledge-graph
Drkg
A knowledge graph and a set of tools for drug repurposing
Stars: ✭ 231 (+352.94%)
Mutual labels:  knowledge-graph
Minerva
Meandering In Networks of Entities to Reach Verisimilar Answers
Stars: ✭ 205 (+301.96%)
Mutual labels:  knowledge-graph
self critical vqa
Code for NeurIPS 2019 paper ``Self-Critical Reasoning for Robust Visual Question Answering''
Stars: ✭ 39 (-23.53%)
Mutual labels:  vqa
Awesome Network Embedding
A curated list of network embedding techniques.
Stars: ✭ 2,379 (+4564.71%)
Mutual labels:  knowledge-graph
Re Net
Recurrent Event Network: Autoregressive Structure Inference over Temporal Knowledge Graphs (EMNLP 2020)
Stars: ✭ 224 (+339.22%)
Mutual labels:  knowledge-graph
VideoNavQA
An alternative EQA paradigm and informative benchmark + models (BMVC 2019, ViGIL 2019 spotlight)
Stars: ✭ 22 (-56.86%)
Mutual labels:  vqa
Cool-NLPCV
Some Cool NLP and CV Repositories and Solutions (收集NLP中常见任务的开源解决方案、数据集、工具、学习资料等)
Stars: ✭ 143 (+180.39%)
Mutual labels:  knowledge-graph
Grakn
TypeDB: a strongly-typed database
Stars: ✭ 2,947 (+5678.43%)
Mutual labels:  knowledge-graph

ZS-F-VQA

license arxiv badge

Zero-shot Visual Question Answering using Knowledge Graph [ ISWC 2021 ]

In this work, we propose a Zero-shot VQA algorithm using knowledge graphs and a mask-based learning mechanism for better incorporating external knowledge, and present new answer-based Zero-shot VQA splits for the F-VQA dataset.

Model Architecture

Model_architecture


Usage

Requirements

  • python >= 3.5
  • PyTorch >= 1.6.0

For more detail of requirements:

 pip install -r requirements.txt

Data

Location of 5 F-VQA train / test data split:

  • data/KG_VQA/fvqa/exp_data/train_data
  • data/KG_VQA/fvqa/exp_data/test_data

Location of 5 ZS-F-VQA train / test data split:

  • data/KG_VQA/fvqa/exp_data/train_seen_data
  • data/KG_VQA/fvqa/exp_data/test_unseen_data

Answers are available at data/KG_VQA/data/FVQA/new_dataset_release/.

Image:

  • Image folder (put all your .JPEG/.jpg file here): data/KG_VQA/fvqa/exp_data/images/images
  • Image feature: fvqa-resnet-14x14.h5 pretrained: GoogleDrive or BaiduCloud (password:16vd)
  • Origin images are available at FVQA with download_link.
  • Other vqa dataset: you could generate a pretrained image feature via this way (Guidance / code)
  • The generated .h file should be placed in : data/KG_VQA/fvqa/exp_data/common_data/.

Answer / Qusetion vocab:


Pretrained Model (url)

Download it and overwrite data/KG_VQA/fvqa/model_save

Parameter

[--KGE {TransE,ComplEx,TransR,DistMult}] [--KGE_init KGE_INIT] [--GAE_init GAE_INIT] [--ZSL ZSL] [--entity_num {all,4302}] [--data_choice {0,1,2,3,4}]
               [--name NAME] [--no-tensorboard] --exp_name EXP_NAME [--dump_path DUMP_PATH] [--exp_id EXP_ID] [--random_seed RANDOM_SEED] [--freeze_w2v {0,1}]
               [--ans_net_lay {0,1,2}] [--fact_map {0,1}] [--relation_map {0,1}] [--now_test {0,1}] [--save_model {0,1}] [--joint_test_way {0,1}] [--top_rel TOP_REL]
               [--top_fact TOP_FACT] [--soft_score SOFT_SCORE] [--mrr MRR]

Available model for training: Up-Down, BAN, SAN, MLP

You can try your own model via adding it (.py) to : main/code/model/.

For more details: code/config.py


Running

cd code

For data check:

  • python deal_data.py --exp_name data_check

General VQA:

  • train: bash run_FVQA_train.sh
  • test: bash run_FVQA.sh

ZSL/GZSL VQA:

  • train: bash run_ZSL_train.sh
  • test: bash run_ZSL.sh

Note:

  • you can open the .sh file for parameter modification.

Result:

  • Log file will be saved to: code/dump
  • model will be saved to: data/KG_VQA/fvqa/model_save

Explainable

explainable


Acknowledgements

Thanks for the following released works:

SciencePlots, ramen, GAE, vqa-winner-cvprw-2017, faster-rcnn, VQA, BAN, commonsense-kg-completion, bottom-up-attention-vqa, FVQA, answer_embedding, torchlight

Cite:

Please condiser citing this paper if you use the code

@inproceedings{chen2021zero,
  title={Zero-Shot Visual Question Answering Using Knowledge Graph},
  author={Chen, Zhuo and Chen, Jiaoyan and Geng, Yuxia and Pan, Jeff Z and Yuan, Zonggang and Chen, Huajun},
  booktitle={International Semantic Web Conference},
  pages={146--162},
  year={2021},
  organization={Springer}
}

For more details, please submit a issue or contact Zhuo Chen.

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