Git Product home page Git Product logo

multivent's Introduction

MultiVENT: Multilingual Videos of Events and Aligned Natural Text

This repository contains code and data for MultiVENT (Multilingual Videos of Events and aligned Natural Text), a collection of 2,396 multilingual internet news videos with natural language descriptions spanning five target languages. All videos are annotated with ground truth labels and corresponding video text descriptions and current event articles. The repository additionally includes setup code for our MultiCLIP video retrieval approach.

Overview

multiVENT
|   dataset.csv                # MultiVENT dataset in CSV format
|   multivent_datasheet.pdf    # Datasheet PDF providing detailed dataset documentation
|   README.md                  # Repository documentation
|   
└───multiCLIP
    |    setup.cfg    # Additional setup file
    |    setup.py     # Setup information for pip install
    |
    └───scripts
    |   |   
    |   └───openclip_xlm
    |   |   |    openclip_featpool_msrvtt_infer.py       # Python code for inference on MSRVTT
    |   |   |    openclip_featpool_msrvtt_infer.sh       # Bash script for inference on MSRVTT
    |   |   |    openclip_featpool_multivent_infer.py    # Python code for inference on MultiVENT
    |   |   |    openclip_featpool_multivent_infer.sh    # Bash script for inference on MultiVENT
    |   |   |    openclip.yaml                           # Config file for model inference
    |   |  
    |   └───utils
    |       |    load_multivent_json.py                  # Generate MultiVENT dataset for inference
    |       |    build_event_ids.py                      # Generate MultiVENT dataset for inference
    |
    └───src
        |   
        └───video_retrieval
            |    __init__.py    
            |    __main__.py    
            |
            └───cli
            |    |    __init__.py                             
            |    |    retrieval_score.py                      # Script to compute evaluation metrics
            |
            └───data
                 |    __init__.py                             
                 |    dataloader_msrvtt_retrieval_laion.py    # Code for MSRVTT data loader
                 |    multivent_retrieval_csv.py              # Code for MultiVENT data loader

Installation

The code in this repository was run on a Python 3.8.6 virtual environment.

Installation steps:

pyenv virtualenv 3.8.6 multiCLIP
pyenv activate multiCLIP
cd multiCLIP
pip install -e .

We use the following model weights:

Tokenizer: XLMRobertaTokenizerFast

OpenCLIP: CLIP-ViT-H-14-frozen-xlm-roberta-large-laion5B-s13B-b90k

Data preparation

First, download the videos linked in the dataset.csv file. Then, after converting the CSV file into a JSON file of the format

{video_path: {
    language: ...,
    category: ...,
    event: ...,
    description: ...},    # either the video description or event description
...
}

the JSON can be converted into the files necessary to run MultiCLIP by running the load_multivent_json.py and build_event_ids.py files.

Sources

We draw from the following external repositories:

multivent's People

Contributors

katesanders9 avatar dongjigao 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.