🚀 VideoLLaMA 2:视频大语言模型中的时空建模与音频理解进阶
VideoLLaMA 2是一款多模态大语言模型,专注于视频领域的视觉问答任务。它在时空建模和音频理解方面取得了显著进展,为视频理解提供了更强大的支持。
🚀 快速开始
如果您喜欢我们的项目,请在 Github 上给我们一个 ⭐ 以获取最新更新。
📰 新闻动态
- [2024.06.12] 发布 VideoLLaMA 2 的模型权重和第一版技术报告。
- [2024.06.03] 发布 VideoLLaMA 2 的训练、评估和服务代码。
🌎 模型库
🚀 主要成果
多项选择视频问答与视频字幕生成

开放式视频问答

💻 使用示例
基础用法
import sys
sys.path.append('./')
from videollama2 import model_init, mm_infer
from videollama2.utils import disable_torch_init
def inference():
disable_torch_init()
modal = 'video'
modal_path = 'assets/cat_and_chicken.mp4'
instruct = '视频中有哪些动物,它们在做什么,视频给人的感觉如何?'
modal = 'image'
modal_path = 'assets/sora.png'
instruct = '图中的女人穿着什么,她在做什么,图像给人的感觉如何?'
model_path = 'DAMO-NLP-SG/VideoLLaMA2-8x7B-Base'
model, processor, tokenizer = model_init(model_path)
output = mm_infer(processor[modal](modal_path), instruct, model=model, tokenizer=tokenizer, do_sample=False, modal=modal)
print(output)
if __name__ == "__main__":
inference()
引用
如果您发现 VideoLLaMA 对您的研究和应用有帮助,请使用以下 BibTeX 进行引用:
@article{damonlpsg2024videollama2,
title={VideoLLaMA 2: Advancing Spatial-Temporal Modeling and Audio Understanding in Video-LLMs},
author={Cheng, Zesen and Leng, Sicong and Zhang, Hang and Xin, Yifei and Li, Xin and Chen, Guanzheng and Zhu, Yongxin and Zhang, Wenqi and Luo, Ziyang and Zhao, Deli and Bing, Lidong},
journal={arXiv preprint arXiv:2406.07476},
year={2024},
url = {https://arxiv.org/abs/2406.07476}
}
@article{damonlpsg2023videollama,
title = {Video-LLaMA: An Instruction-tuned Audio-Visual Language Model for Video Understanding},
author = {Zhang, Hang and Li, Xin and Bing, Lidong},
journal = {arXiv preprint arXiv:2306.02858},
year = {2023},
url = {https://arxiv.org/abs/2306.02858}
}
信息表格
属性 |
详情 |
模型类型 |
多模态大语言模型、大型视频语言模型 |
训练数据 |
OpenGVLab/VideoChat2-IT、Lin-Chen/ShareGPT4V、liuhaotian/LLaVA-Instruct-150K |
评估指标 |
准确率 |
库名称 |
transformers |
任务类型 |
视觉问答 |