🚀 VideoLLaMA 2:推進視頻大語言模型中的時空建模與音頻理解
VideoLLaMA 2是一款多模態大語言模型,專注於視頻領域,在時空建模和音頻理解方面取得了顯著進展,能有效處理視頻問答、視頻字幕生成等任務。
🚀 快速開始
本項目為視頻大語言模型VideoLLaMA 2,如果你喜歡我們的項目,請在 Github 上給我們點個星 ⭐ 以獲取最新更新。
📰 新聞動態
🌎 模型庫
🚀 主要成果
多項選擇視頻問答與視頻字幕生成

開放式視頻問答

💻 使用示例
基礎用法
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'
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()
📄 許可證
本項目採用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}
}