lixin4ever
commited on
Commit
β’
4004e51
1
Parent(s):
9466f28
Update the results of VideoLLaMA2.1
Browse files
README.md
CHANGED
@@ -1,116 +1,117 @@
|
|
1 |
-
---
|
2 |
-
license: apache-2.0
|
3 |
-
datasets:
|
4 |
-
- OpenGVLab/VideoChat2-IT
|
5 |
-
- Lin-Chen/ShareGPT4V
|
6 |
-
- liuhaotian/LLaVA-Instruct-150K
|
7 |
-
language:
|
8 |
-
- en
|
9 |
-
metrics:
|
10 |
-
- accuracy
|
11 |
-
library_name: transformers
|
12 |
-
pipeline_tag: visual-question-answering
|
13 |
-
tags:
|
14 |
-
- multimodal large language model
|
15 |
-
- large video-language model
|
16 |
-
---
|
17 |
-
|
18 |
-
<p align="center">
|
19 |
-
<img src="https://cdn-uploads.huggingface.co/production/uploads/63913b120cf6b11c487ca31d/ROs4bHIp4zJ7g7vzgUycu.png" width="150" style="margin-bottom: 0.2;"/>
|
20 |
-
<p>
|
21 |
-
|
22 |
-
|
23 |
-
<h3 align="center"><a href="https://arxiv.org/abs/2406.07476">VideoLLaMA 2: Advancing Spatial-Temporal Modeling and Audio Understanding in Video-LLMs</a></h3>
|
24 |
-
<h5 align="center"> If you like our project, please give us a star β on <a href="https://github.com/DAMO-NLP-SG/VideoLLaMA2">Github</a> for the latest update. </h2>
|
25 |
-
|
26 |
-
<p align="center"><video src="https://cdn-uploads.huggingface.co/production/uploads/63913b120cf6b11c487ca31d/Wj7GuqQ0CB9JRoPo6_GoH.webm" width="800"></p>
|
27 |
-
|
28 |
-
## π° News
|
29 |
-
* **[2024.
|
30 |
-
* **[2024.
|
31 |
-
* **[2024.
|
32 |
-
* **[2024.06.
|
33 |
-
* **[2024.06.
|
34 |
-
* **[2024.06.
|
35 |
-
* **[2024.06.
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
| [VideoLLaMA2-7B](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-7B) |
|
43 |
-
| [VideoLLaMA2-7B
|
44 |
-
| [VideoLLaMA2-7B-16F](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-7B-16F) |
|
45 |
-
| [VideoLLaMA2-
|
46 |
-
| [VideoLLaMA2-8x7B](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-8x7B) |
|
47 |
-
| [VideoLLaMA2-
|
48 |
-
| [VideoLLaMA2-72B](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-72B) |
|
49 |
-
| [VideoLLaMA2
|
50 |
-
| [VideoLLaMA2.1-7B-16F](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2.1-7B-16F)
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
sys
|
69 |
-
|
70 |
-
from videollama2
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
}
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
}
|
116 |
-
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
datasets:
|
4 |
+
- OpenGVLab/VideoChat2-IT
|
5 |
+
- Lin-Chen/ShareGPT4V
|
6 |
+
- liuhaotian/LLaVA-Instruct-150K
|
7 |
+
language:
|
8 |
+
- en
|
9 |
+
metrics:
|
10 |
+
- accuracy
|
11 |
+
library_name: transformers
|
12 |
+
pipeline_tag: visual-question-answering
|
13 |
+
tags:
|
14 |
+
- multimodal large language model
|
15 |
+
- large video-language model
|
16 |
+
---
|
17 |
+
|
18 |
+
<p align="center">
|
19 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/63913b120cf6b11c487ca31d/ROs4bHIp4zJ7g7vzgUycu.png" width="150" style="margin-bottom: 0.2;"/>
|
20 |
+
<p>
|
21 |
+
|
22 |
+
|
23 |
+
<h3 align="center"><a href="https://arxiv.org/abs/2406.07476">VideoLLaMA 2: Advancing Spatial-Temporal Modeling and Audio Understanding in Video-LLMs</a></h3>
|
24 |
+
<h5 align="center"> If you like our project, please give us a star β on <a href="https://github.com/DAMO-NLP-SG/VideoLLaMA2">Github</a> for the latest update. </h2>
|
25 |
+
|
26 |
+
<p align="center"><video src="https://cdn-uploads.huggingface.co/production/uploads/63913b120cf6b11c487ca31d/Wj7GuqQ0CB9JRoPo6_GoH.webm" width="800"></p>
|
27 |
+
|
28 |
+
## π° News
|
29 |
+
* **[2024.10.15]** Release checkpoints of [VideoLLaMA2.1-7B-16F-Base](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2.1-7B-16F-Base) and [VideoLLaMA2.1-7B-16F](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2.1-7B-16F)
|
30 |
+
* **[2024.08.14]** Release checkpoints of [VideoLLaMA2-72B-Base](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-72B-Base) and [VideoLLaMA2-72B](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-72B)
|
31 |
+
* **[2024.07.30]** Release checkpoints of [VideoLLaMA2-8x7B-Base](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-8x7B-Base) and [VideoLLaMA2-8x7B](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-8x7B).
|
32 |
+
* **[2024.06.25]** π₯π₯ As of Jun 25, our [VideoLLaMA2-7B-16F](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-7B-16F) is the **Top-1** ~7B-sized VideoLLM on the [MLVU Leaderboard](https://github.com/JUNJIE99/MLVU?tab=readme-ov-file#trophy-mini-leaderboard).
|
33 |
+
* **[2024.06.18]** π₯π₯ As of Jun 18, our [VideoLLaMA2-7B-16F](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-7B-16F) is the **Top-1** ~7B-sized VideoLLM on the [VideoMME Leaderboard](https://video-mme.github.io/home_page.html#leaderboard).
|
34 |
+
* **[2024.06.17]** ππ Update technical report with the latest results and the missing references. If you have works closely related to VideoLLaMA 2 but not mentioned in the paper, feel free to let us know.
|
35 |
+
* **[2024.06.14]** π₯π₯ [Online Demo](https://huggingface.co/spaces/lixin4ever/VideoLLaMA2) is available.
|
36 |
+
* **[2024.06.03]** Release training, evaluation, and serving codes of VideoLLaMA 2.
|
37 |
+
|
38 |
+
|
39 |
+
## π Model Zoo
|
40 |
+
| Model Name | Type | Visual Encoder | Language Decoder | # Training Frames |
|
41 |
+
|:-------------------|:--------------:|:----------------|:------------------|:----------------------:|
|
42 |
+
| [VideoLLaMA2-7B-Base](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-7B-Base) | Base | [clip-vit-large-patch14-336](https://huggingface.co/openai/clip-vit-large-patch14-336) | [Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) | 8 |
|
43 |
+
| [VideoLLaMA2-7B](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-7B) | Chat | [clip-vit-large-patch14-336](https://huggingface.co/openai/clip-vit-large-patch14-336) | [Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) | 8 |
|
44 |
+
| [VideoLLaMA2-7B-16F-Base](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-7B-16F-Base) | Base | [clip-vit-large-patch14-336](https://huggingface.co/openai/clip-vit-large-patch14-336) | [Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) | 16 |
|
45 |
+
| [VideoLLaMA2-7B-16F](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-7B-16F) | Chat | [clip-vit-large-patch14-336](https://huggingface.co/openai/clip-vit-large-patch14-336) | [Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) | 16 |
|
46 |
+
| [VideoLLaMA2-8x7B-Base](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-8x7B-Base) | Base | [clip-vit-large-patch14-336](https://huggingface.co/openai/clip-vit-large-patch14-336) | [Mixtral-8x7B-Instruct-v0.1](https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1) | 8 |
|
47 |
+
| [VideoLLaMA2-8x7B](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-8x7B) | Chat | [clip-vit-large-patch14-336](https://huggingface.co/openai/clip-vit-large-patch14-336) | [Mixtral-8x7B-Instruct-v0.1](https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1) | 8 |
|
48 |
+
| [VideoLLaMA2-72B-Base](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-72B-Base) | Base | [clip-vit-large-patch14-336](https://huggingface.co/openai/clip-vit-large-patch14-336) | [Qwen2-72B-Instruct](https://huggingface.co/Qwen/Qwen2-72B-Instruct) | 8 |
|
49 |
+
| [VideoLLaMA2-72B](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2-72B) | Chat | [clip-vit-large-patch14-336](https://huggingface.co/openai/clip-vit-large-patch14-336) | [Qwen2-72B-Instruct](https://huggingface.co/Qwen/Qwen2-72B-Instruct) | 8 |
|
50 |
+
| [VideoLLaMA2.1-7B-16F-Base](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2.1-7B-16F-Base) | Base | [siglip-so400m-patch14-384](https://huggingface.co/google/siglip-so400m-patch14-384) | [Qwen2-7B-Instruct](https://huggingface.co/Qwen/Qwen2-7B-Instruct) | 16 |
|
51 |
+
| [VideoLLaMA2.1-7B-16F](https://huggingface.co/DAMO-NLP-SG/VideoLLaMA2.1-7B-16F) (**This Checkpoint**) | Chat | [siglip-so400m-patch14-384](https://huggingface.co/google/siglip-so400m-patch14-384) | [Qwen2-7B-Instruct](https://huggingface.co/Qwen/Qwen2-7B-Instruct) | 16 |
|
52 |
+
|
53 |
+
|
54 |
+
## π Main Results
|
55 |
+
|
56 |
+
### Multi-Choice Video QA & Video Captioning
|
57 |
+
<p><img src="https://private-user-images.githubusercontent.com/58427300/376494651-e87fe4cf-07ea-4fde-998b-a0c63671c3b4.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjkzNTAzMTEsIm5iZiI6MTcyOTM1MDAxMSwicGF0aCI6Ii81ODQyNzMwMC8zNzY0OTQ2NTEtZTg3ZmU0Y2YtMDdlYS00ZmRlLTk5OGItYTBjNjM2NzFjM2I0LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDEwMTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQxMDE5VDE1MDAxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUxMTFkM2M4ODJlMzc2YmEwYjkxY2FmMTgxODk3Mjg3NGY2OGJhNDBiODFhMGU3NzNhNDUyZTIzNWI2MDE0NTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.DfW_zKYcqTKSjP9JleBPEx2UV3PPFY45hHiEwqa7wr8" width="800" "/></p>
|
58 |
+
|
59 |
+
|
60 |
+
### Open-Ended Video QA
|
61 |
+
<p><img src="https://private-user-images.githubusercontent.com/58427300/376494981-80b16c04-75ac-43b8-bc22-6952fdf994bb.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjkzNTAzMTEsIm5iZiI6MTcyOTM1MDAxMSwicGF0aCI6Ii81ODQyNzMwMC8zNzY0OTQ5ODEtODBiMTZjMDQtNzVhYy00M2I4LWJjMjItNjk1MmZkZjk5NGJiLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDEwMTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQxMDE5VDE1MDAxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU3MzdjNmU1Y2MzYWVjNjg3ZGQ2ZDNjNTA1NzAzMTNhMDgxOWQ4MTI3YTY2ODUzYzUyZjdhNGExNzI5YWMyNGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.EtZR97k8kXC-DtH55z2549ZEkmKL-V8Z5GZdIQG5khw" width="800" "/></p>
|
62 |
+
|
63 |
+
|
64 |
+
|
65 |
+
|
66 |
+
## π€ Inference with VideoLLaMA2
|
67 |
+
```python
|
68 |
+
import sys
|
69 |
+
sys.path.append('./')
|
70 |
+
from videollama2 import model_init, mm_infer
|
71 |
+
from videollama2.utils import disable_torch_init
|
72 |
+
|
73 |
+
|
74 |
+
def inference():
|
75 |
+
disable_torch_init()
|
76 |
+
|
77 |
+
# Video Inference
|
78 |
+
modal = 'video'
|
79 |
+
modal_path = 'assets/cat_and_chicken.mp4'
|
80 |
+
instruct = 'What animals are in the video, what are they doing, and how does the video feel?'
|
81 |
+
|
82 |
+
# Image Inference
|
83 |
+
modal = 'image'
|
84 |
+
modal_path = 'assets/sora.png'
|
85 |
+
instruct = 'What is the woman wearing, what is she doing, and how does the image feel?'
|
86 |
+
|
87 |
+
model_path = 'DAMO-NLP-SG/VideoLLaMA2-7B-16F'
|
88 |
+
model, processor, tokenizer = model_init(model_path)
|
89 |
+
output = mm_infer(processor[modal](modal_path), instruct, model=model, tokenizer=tokenizer, do_sample=False, modal=modal)
|
90 |
+
|
91 |
+
print(output)
|
92 |
+
|
93 |
+
if __name__ == "__main__":
|
94 |
+
inference()
|
95 |
+
```
|
96 |
+
|
97 |
+
|
98 |
+
## Citation
|
99 |
+
|
100 |
+
If you find VideoLLaMA useful for your research and applications, please cite using this BibTeX:
|
101 |
+
```bibtex
|
102 |
+
@article{damonlpsg2024videollama2,
|
103 |
+
title={VideoLLaMA 2: Advancing Spatial-Temporal Modeling and Audio Understanding in Video-LLMs},
|
104 |
+
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},
|
105 |
+
journal={arXiv preprint arXiv:2406.07476},
|
106 |
+
year={2024},
|
107 |
+
url = {https://arxiv.org/abs/2406.07476}
|
108 |
+
}
|
109 |
+
|
110 |
+
@article{damonlpsg2023videollama,
|
111 |
+
title = {Video-LLaMA: An Instruction-tuned Audio-Visual Language Model for Video Understanding},
|
112 |
+
author = {Zhang, Hang and Li, Xin and Bing, Lidong},
|
113 |
+
journal = {arXiv preprint arXiv:2306.02858},
|
114 |
+
year = {2023},
|
115 |
+
url = {https://arxiv.org/abs/2306.02858}
|
116 |
+
}
|
117 |
+
```
|