All Projects → jayleicn → Tvqa

jayleicn / Tvqa

Licence: mit
[EMNLP 2018] PyTorch code for TVQA: Localized, Compositional Video Question Answering

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Tvqa

Adresse.data.gouv.fr
Le site officiel de l'Adresse
Stars: ✭ 117 (-10%)
Mutual labels:  dataset
Awesome Hungarian Nlp
A curated list of NLP resources for Hungarian
Stars: ✭ 121 (-6.92%)
Mutual labels:  dataset
Githubrankingsspain
⬆️ Rankings with the most active GitHub users in Spain (sorted by public contributions) 🇪🇸
Stars: ✭ 127 (-2.31%)
Mutual labels:  dataset
Networkdata
R package containing several network datasets
Stars: ✭ 119 (-8.46%)
Mutual labels:  dataset
Gis Dataset Brasil
Geographic Information Systems (GIS) Dataset Brasil - Coleção de shapefiles, GeoJSON e TopoJSON prontas para uso
Stars: ✭ 121 (-6.92%)
Mutual labels:  dataset
Dbg Pds
Deutsche Boerse's Financial Trading Public Data Set
Stars: ✭ 124 (-4.62%)
Mutual labels:  dataset
Datasets knowledge embedding
Datasets for Knowledge Graph Completion with textual information about the entities
Stars: ✭ 116 (-10.77%)
Mutual labels:  dataset
Python Pytest Cases
Separate test code from test cases in pytest.
Stars: ✭ 127 (-2.31%)
Mutual labels:  dataset
Onepiece Kg
a knowledge graph project for ONEPIECE /《海贼王》知识图谱
Stars: ✭ 123 (-5.38%)
Mutual labels:  dataset
Sunrgbd Meta Data
train test labels for sunrgbd
Stars: ✭ 127 (-2.31%)
Mutual labels:  dataset
Awesome Robotics Datasets
A collection of useful datasets for robotics and computer vision
Stars: ✭ 119 (-8.46%)
Mutual labels:  dataset
Openvehiclevision
An opensource lib. for vehicle vision applications (written by MATLAB), lane marking detection, road segmentation
Stars: ✭ 120 (-7.69%)
Mutual labels:  dataset
Deepecg
ECG classification programs based on ML/DL methods
Stars: ✭ 124 (-4.62%)
Mutual labels:  dataset
Scrna.seq.datasets
Collection of public scRNA-Seq datasets used by our group
Stars: ✭ 118 (-9.23%)
Mutual labels:  dataset
Contactpose
Large dataset of hand-object contact, hand- and object-pose, and 2.9 M RGB-D grasp images.
Stars: ✭ 129 (-0.77%)
Mutual labels:  dataset
Text Segmentation
Implementation of the paper: Text Segmentation as a Supervised Learning Task
Stars: ✭ 115 (-11.54%)
Mutual labels:  dataset
Ember Impagination
An Ember Addon that puts the fun back in asynchronous, paginated datasets
Stars: ✭ 123 (-5.38%)
Mutual labels:  dataset
Hpatches Benchmark
Python & Matlab code for local feature descriptor evaluation with the HPatches dataset.
Stars: ✭ 129 (-0.77%)
Mutual labels:  dataset
Learnpaddle2
PaddlePaddle Fluid 版本系列教程,CSDN博客专栏:
Stars: ✭ 129 (-0.77%)
Mutual labels:  dataset
Dialog corpus
用于训练中英文对话系统的语料库 Datasets for Training Chatbot System
Stars: ✭ 1,662 (+1178.46%)
Mutual labels:  dataset

TVQA

PyTorch code accompanies our EMNLP 2018 paper:

TVQA: Localized, Compositional Video Question Answering

Jie Lei, Licheng Yu, Mohit Bansal, Tamara L. Berg

Resources

Dataset

TVQA is a large-scale video QA dataset based on 6 popular TV shows (Friends, The Big Bang Theory, How I Met Your Mother, House M.D., Grey's Anatomy, Castle). It consists of 152.5K QA pairs from 21.8K video clips, spanning over 460 hours of video. The questions are designed to be compositional, requiring systems to jointly localize relevant moments within a clip, comprehend subtitles-based dialogue, and recognize relevant visual concepts.

  • QA example

    qa example

    See examples in video: click here

  • Statistics

    TV Show Genre #Season #Episode #Clip #QA
    The Big Bang Theory sitcom 10 220 4,198 29,384
    Friends sitcom 10 226 5,337 37,357
    How I Met Your Mother sitcom 5 72 1,512 10,584
    Grey's Anatomy medical 3 58 1,472 9,989
    House M.D. medical 8 176 4,621 32,345
    Castle crime 8 173 4,698 32,886
    Total - 44 925 21,793 152,545

Model Overview

A multi-stream model, each stream process different contextual inputs. model figure

Requirements:

  • Python 2.7
  • PyTorch 0.4.0
  • tensorboardX
  • pysrt
  • tqdm
  • h5py
  • numpy

Video Features

  • ImageNet feature: Extracted from ResNet101, Google Drive link
  • Regional Visual Feature: object-level encodings from object detector (too large to share ...)
  • Visual Concepts Feature: object labels and attributes from object detector download link. This file is included in download.sh.

For object detector, we used Faster R-CNN trained on Visual Genome, please refer to this repo.

Usage

  1. Clone this repo

    git clone https://github.com/jayleicn/TVQA.git
    
  2. Download data

    Questions, answers and subtitles, etc. can be directly downloaded by executing the following command:

    bash download.sh
    

    For video frames and video features, please visit TVQA Dwonload Page.

  3. Preprocess data

    python preprocessing.py
    

    This step will process subtitle files and tokenize all textual sentence.

  4. Build word vocabulary, extract relevant GloVe vectors

    For words that do not exist in GloVe, random vectors np.random.randn(self.embedding_dim) * 0.4 are used. 0.4 is the standard deviation of the GloVe vectors

    mkdir cache
    python tvqa_dataset.py
    
  5. Training

    python main.py --input_streams sub
    
  6. Inference

    python test.py --model_dir [results_dir] --mode valid
    

Results

Please note this is a better version of the original implementation we used for EMNLP paper. Bascially, I rewrote some of the data preprocessing code and updated the model to the latest version of PyTorch, etc. By using this code, you should be able to get slightly higher accuracy (~1%) than our paper.

Citation

@inproceedings{lei2018tvqa,
  title={TVQA: Localized, Compositional Video Question Answering},
  author={Lei, Jie and Yu, Licheng and Bansal, Mohit and Berg, Tamara L},
  booktitle={EMNLP},
  year={2018}
}

TODO

  1. [x] Add data preprocessing scripts
  2. [ ] Add baseline scripts
  3. [x] Add model and training scripts
  4. [x] Add test scripts

Contact

  • Dataset: faq-tvqa-unc [at] googlegroups.com
  • Model: Jie Lei, jielei [at] cs.unc.edu
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].