百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

SeViLA

> AI 编程
开源

[NeurIPS 2023] 用于视频定位和问题解答的自链接图像-语言模型

197 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

[NeurIPS 2023] 用于视频定位和问题解答的自链接图像-语言模型

[NeurIPS 2023] Self-Chained Image-Language Model for Video Localization and Question Answering

  • Authors: Shoubin Yu, Jaemin Cho, Prateek Yadav, Mohit Bansal
  • Paper: arXiv
  • Online Demo: Try our Gradio demo on Hugging Face

Code structure

bash

# data & data preprocessing
./sevila_data

# pretrained checkpoints
./sevila_checkpoints

# SeViLA code
./lavis/

# running scripts for SeViLA localizer/answerer training/inference
./run_scripts

Setup

Install Dependencies

  1. (Optional) Creating conda environment
bash
conda create -n sevila python=3.8
conda activate sevila
  1. build from source
bash
pip install -e .

Download Pretrained Models

We pre-train SeViLA localizer on QVHighlights and hold checkpoints via Hugging Face. Download checkpoints and put it under /sevila_checkpoints. The checkpoints (814.55M) contains pre-trained localizer and zero-shot answerer.

If you want to pre-train your own localizer, you can download qformer_loc.pth, which is a copy of the original BLIP-2 Q-former to initialize the localizer (with changed model keys).

Run Gradio Demo Locally

We also provide a UI for testing our SeViLA locally that is built with gradio. Running demo locally requires about 12GB of memory.

  • Installing Gradio:
bash
pip install gradio==3.30.0
  • Running the following command in a terminal will launch the demo:
bash
python app.py

Dataset Preparation

We test our model on:

  • NExT-QA

  • STAR

  • How2QA

  • TVQA

  • VLEP

  • QVHighlights

Please download original QA data and preprocess them via our scripts.

Training and Inference

We provide SeViLA training and inference script examples as follows.

And please refer to dataset page to custom your data path.

1) Localizer Pre-training

bash
sh run_scripts/sevila/pre-train/pretrain_qvh.sh

2) Answerer Fine-tuning

bash
sh run_scripts/sevila/finetune/nextqa_ft.sh

3) Localizer Self-refinement

bash
sh run_scripts/sevila/refinement/nextqa_sr.sh

4) Inference

bash
sh run_scripts/sevila/inference/nextqa_infer.sh

Acknowledgments

We thank the developers of LAVIS, BLIP-2, CLIP, All-in-One, for their public code release.

Reference

Please cite our paper if you use our models in your works:

bibtex
@inproceedings{yu2023self,
  title   = {Self-Chained Image-Language Model for Video Localization and Question Answering},
  author  = {Yu, Shoubin and Cho, Jaemin and Yadav, Prateek and Bansal, Mohit},
  booktitle = {NeurIPS},
  year    = {2023}
}

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Pythonmllmvideo-localizationvideo-question-answering

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类AI 编程
定价开源

> 相关工具

G
GitHub Copilot
GitHub 官方 AI 编程助手,覆盖补全、Chat 与 Agent 模式。
C
Cursor
AI 原生代码编辑器,对话改代码、多文件 Agent 与规则体系是其核心。
S
skills
Skills for Real Engineers. Straight from my .agents directory.