🚀 VideoLLaMA 2:推进视频大语言模型中的时空建模和音频理解
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-7B-16F-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()
✨ 主要特性
- 多模态处理:支持视频和图像等多模态输入。
- 时空建模与音频理解:在视频的时空建模和音频理解方面有出色表现。
📚 详细文档
📰 新闻动态
- [2024.06.12] 发布 VideoLLaMA 2 的模型权重和第一版技术报告。
- [2024.06.03] 发布 VideoLLaMA 2 的训练、评估和服务代码。
🌎 模型库
🚀 主要结果
多项选择视频问答与视频字幕

开放式视频问答

📄 许可证
本项目采用 Apache-2.0 许可证。
引用说明
如果您发现 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}
}
如果您喜欢我们的项目,请在 Github 上给我们一个星 ⭐ 以获取最新更新。
属性 |
详情 |
模型类型 |
多模态大语言模型、大型视频语言模型 |
训练数据 |
OpenGVLab/VideoChat2-IT、Lin-Chen/ShareGPT4V、liuhaotian/LLaVA-Instruct-150K |
评估指标 |
准确率 |
库名称 |
transformers |
任务类型 |
视觉问答 |