🚀 視頻在線大語言模型(VideoLLM-online)
VideoLLM-online 是一款用於流式視頻的在線視頻大語言模型,支持多模態交互,能有效處理視頻流理解等任務,在視頻文本生成等方面具有顯著價值。
🚀 快速開始
首先,克隆 GitHub 倉庫並按照安裝說明進行操作:
git clone https://github.com/showlab/videollm-online
確保你已經安裝了 Miniconda 且 Python 版本 >= 3.10,然後運行以下命令:
conda install -y pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
pip install transformers accelerate deepspeed peft editdistance Levenshtein tensorboard gradio moviepy submitit
pip install flash-attn --no-build-isolation
PyTorch 源會安裝 ffmpeg,但版本較舊,通常會導致預處理質量很低。請按照以下步驟安裝最新版本的 ffmpeg:
wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz
tar xvf ffmpeg-release-amd64-static.tar.xz
rm ffmpeg-release-amd64-static.tar.xz
mv ffmpeg-7.0.1-amd64-static ffmpeg
如果你想在即時流中使用音頻來嘗試我們的模型,請同時克隆 ChatTTS:
pip install omegaconf vocos vector_quantize_pytorch cython
git clone git+https://github.com/2noise/ChatTTS
mv ChatTTS demo/rendering/
python -m demo.app --resume_from_checkpoint chenjoya/videollm-online-8b-v1plus
python -m demo.cli --resume_from_checkpoint chenjoya/videollm-online-8b-v1plus
✨ 主要特性
- 多模態支持:結合了大語言模型(LLM)和視覺策略,實現視頻文本的多模態處理。
- 靈活的幀率設置:訓練時幀率為 2,推理時幀率在 2 - 10 之間。
- 長視頻處理:能夠處理長達 10 分鐘的視頻。
📦 安裝指南
克隆倉庫
git clone https://github.com/showlab/videollm-online
安裝依賴
conda install -y pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
pip install transformers accelerate deepspeed peft editdistance Levenshtein tensorboard gradio moviepy submitit
pip install flash-attn --no-build-isolation
安裝最新版 ffmpeg
wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz
tar xvf ffmpeg-release-amd64-static.tar.xz
rm ffmpeg-release-amd64-static.tar.xz
mv ffmpeg-7.0.1-amd64-static ffmpeg
克隆 ChatTTS(可選)
pip install omegaconf vocos vector_quantize_pytorch cython
git clone git+https://github.com/2noise/ChatTTS
mv ChatTTS demo/rendering/
📚 詳細文檔
模型詳情
屬性 |
詳情 |
大語言模型(LLM) |
meta-llama/Meta-Llama-3-8B-Instruct |
視覺策略 - 幀編碼器 |
google/siglip-large-patch16-384 |
視覺策略 - 幀令牌 |
CLS 令牌 + 平均池化 3x3 令牌 |
視覺策略 - 幀幀率 |
訓練時為 2,推理時為 2~10 |
視覺策略 - 幀分辨率 |
最大分辨率 384,零填充以保持寬高比 |
視覺策略 - 視頻長度 |
10 分鐘 |
訓練數據 |
Ego4D 敘述流 113K + Ego4D 目標步驟流 21K |
模型來源
- 倉庫地址:https://github.com/showlab/videollm-online
- 論文地址:https://arxiv.org/abs/2406.11816
📄 許可證
本模型採用 MIT 許可證。
📚 引用信息
@inproceedings{videollm-online,
author = {Joya Chen and Zhaoyang Lv and Shiwei Wu and Kevin Qinghong Lin and Chenan Song and Difei Gao and Jia-Wei Liu and Ziteng Gao and Dongxing Mao and Mike Zheng Shou},
title = {VideoLLM-online: Online Video Large Language Model for Streaming Video},
booktitle = {CVPR},
year = {2024},
}