🚀 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 |
任務類型 |
視覺問答 |