peiranW nielsr HF Staff commited on
Commit
b1057ac
·
verified ·
1 Parent(s): 669b7bc

Improve model card: Add metadata tags, abstract, links, usage, and benchmarks (#1)

Browse files

- Improve model card: Add metadata tags, abstract, links, usage, and benchmarks (10781e8b80e66cca3b5eee91733e5ae242bab516)


Co-authored-by: Niels Rogge <[email protected]>

Files changed (1) hide show
  1. README.md +166 -4
README.md CHANGED
@@ -1,12 +1,174 @@
1
  ---
2
- license: mit
 
3
  datasets:
4
  - openinterx/UGC-VideoCap
 
5
  metrics:
6
  - bleu
7
  - accuracy
8
- base_model:
9
- - Qwen/Qwen2.5-Omni-3B
 
 
 
 
 
10
  ---
11
 
12
- paper: https://arxiv.org/abs/2507.11336
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ base_model:
3
+ - Qwen/Qwen2.5-Omni-3B
4
  datasets:
5
  - openinterx/UGC-VideoCap
6
+ license: mit
7
  metrics:
8
  - bleu
9
  - accuracy
10
+ pipeline_tag: video-text-to-text
11
+ library_name: transformers
12
+ tags:
13
+ - multimodal
14
+ - video-captioning
15
+ - audio-visual
16
+ - ugc
17
  ---
18
 
19
+ # UGC-VideoCaptioner: An Omni UGC Video Detail Caption Model and New Benchmarks
20
+
21
+ **UGC-VideoCaptioner** is a 3B-parameter captioning model distilled from Gemini-2.5 Flash, specifically designed for detailed, omnimodal captioning of short-form, user-generated videos (UGC). It addresses the crucial role of audio in conjunction with visual content, which is often overlooked in existing video captioning models.
22
+
23
+ <p align="left">
24
+ <a href="https://huggingface.co/papers/2507.11336" target="_blank">
25
+ <img src="https://img.shields.io/badge/HuggingFace_Paper-2507.11336%F0%9F%93%96-blue">
26
+ </a>
27
+ <a href="http://arxiv.org/abs/2507.11336" target="_blank">
28
+ <img src="https://img.shields.io/badge/arXiv-2507.11336%F0%9F%93%96-bron">
29
+ </a>
30
+ <a href="https://memories.ai/" target="_blank">
31
+ <img src="https://img.shields.io/badge/Project_Page-%F0%9F%8C%90-green">
32
+ </a>
33
+ <a href="https://github.com/openinterx/UGC-VideoCaptioner" target="_blank">
34
+ <img src="https://img.shields.io/badge/GitHub-Code-black?logo=github">
35
+ </a>
36
+ </p>
37
+
38
+ ## Abstract
39
+
40
+ Real-world user-generated videos, especially on platforms like TikTok, often feature rich and intertwined audio visual content. However, existing video captioning benchmarks and models remain predominantly visual centric, overlooking the crucial role of audio in conveying scene dynamics, speaker intent, and narrative context. This lack of omni datasets and lightweight, capable models hampers progress in fine grained, multimodal video understanding. To address these challenges, we introduce UGC-VideoCap, a new benchmark and model framework specifically designed for detailed omnimodal captioning of short form user-generated videos. Unlike prior datasets, UGC-VideoCap emphasizes balanced integration of audio and visual modalities, featuring 1000 TikTok videos annotated through a structured three stage human-in-the-loop pipeline covering audio only, visual only, and joint audio visual semantics. The benchmark also includes 4000 carefully crafted QA pairs probing both unimodal and cross modal understanding. Alongside the dataset, we propose UGC-VideoCaptioner(3B), a 3B parameter captioning model distilled from Gemini 2.5 Flash. Using a novel two-stage training strategy supervised fine tuning followed by Group Relative Policy Optimization (GRPO), our approach enables efficient adaptation from limited data while maintaining competitive performance. Together, our benchmark and model offer a high-quality foundation and a data-efficient solution for advancing omnimodal video captioning in unconstrained real-world UGC settings.
41
+
42
+ <p align="center">
43
+ <img src="https://github.com/openinterx/UGC-VideoCaptioner/blob/main/tiktok_qa_sample.png?raw=true" alt="UGC-VideoCap">
44
+ </p>
45
+
46
+ ## Benchmark Results
47
+
48
+ <p align="center">
49
+ <img src="https://github.com/openinterx/UGC-VideoCaptioner/blob/main/benchmark.png?raw=true" alt="UGC-VideoCap">
50
+ </p>
51
+
52
+ ### Model Zoom
53
+
54
+ | Model | visual | audio | details | average | Link |
55
+ |:------------------------------|:------:|:-----:|:-------:|:-------:|:----:|
56
+ | Gemini-2.5-pro | 75.8 | 70.8 | 74.8 | 73.78 | N/A |
57
+ | Gemini-2.5-flash | **78.8** | **74.2** | **77.2** | **76.73** | N/A |
58
+ | Qwen2.5-Omni-3B | 55.6 | 48.2 | 52.6 | 52.18 | N/A |
59
+ | UGC-VideoCaptioner-3B-zero(1k RL) | 57.8 | 53.0 | 55.4 | 55.40(**+3.22**) | [google-drive](https://drive.google.com/drive/folders/1R-L4kz4R7UxYpcU4El1ctgvVDQbsMsG6?usp=sharing) |
60
+ | Qwen2.5-Omni-3B 1k sft | 58.4 | 61.4 | 57.0 | 58.96(+6.78) | [google-drive](https://drive.google.com/drive/folders/1itJ1u4XEJNVfmgbxuKL-fGWCbaW3EAza?usp=sharing) |
61
+ | Qwen2.5-Omni-3B 10k sft | 58.4 | 63.2 | 58.0 | 59.87(+7.69) | [google-drive](https://drive.google.com/drive/folders/1auQ4mx9CcxIzAIF4SyH034xufzrqe29w?usp=sharing) |
62
+ | Qwen2.5-Omni-3B 20k sft | 59.2 | 64 | 58.4 | 60.50(+8.32) | [google-drive](https://drive.google.com/drive/folders/11WJZkq8I_807zJUmBCCvwNjSj18F2im9?usp=sharing) |
63
+ | UGC-VideoCaptioner-3B (1k SFT + 1k RL) | 59.4 | 62.4 | 58.2 | 60.01(**+7.83**) | [google-drive](https://drive.google.com/drive/folders/1LGmIU60cdacErNgUk86D8I5_kiU_ljFz?usp=sharing) |
64
+
65
+ ## Quick Start
66
+
67
+ You can use this model with the `transformers` library. Below is a quick example demonstrating how to perform inference.
68
+ Please note that for full video processing capabilities, you might need to install `decord` and refer to the [official GitHub repository](https://github.com/openinterx/UGC-VideoCaptioner) for detailed video handling steps, especially if `AutoProcessor` doesn't directly handle video file paths for complex scenarios.
69
+
70
+ ### Environment Setup
71
+
72
+ ```bash
73
+ pip install transformers torch decord soundfile qwen_omni_utils
74
+ ```
75
+
76
+ ### Inference
77
+
78
+ ```python
79
+ from transformers import AutoProcessor, AutoModelForConditionalGeneration
80
+ import torch
81
+
82
+ # Load model and processor
83
+ model = AutoModelForConditionalGeneration.from_pretrained(
84
+ "openinterx/UGC-VideoCaptioner-3B",
85
+ torch_dtype="auto",
86
+ device_map="auto",
87
+ trust_remote_code=True, # Required for custom architectures/processors
88
+ )
89
+ processor = AutoProcessor.from_pretrained(
90
+ "openinterx/UGC-VideoCaptioner-3B",
91
+ trust_remote_code=True, # Required for custom architectures/processors
92
+ )
93
+
94
+ # Example video path (replace with your actual video file path)
95
+ video_path = "path/to/your/video.mp4"
96
+
97
+ # Define the detailed captioning prompt
98
+ prompt_text = (
99
+ "You are given a short video with both audio and visual content. Write a detailed and coherent paragraph "
100
+ "that naturally integrates all modalities. Your description should include: (1) the primary scene and "
101
+ "background setting; (2) key characters or objects and their actions or interactions; (3) significant "
102
+ "audio cues such as voices, background music, sound effects, and their emotional tone; (4) any on-screen "
103
+ "text (OCR) and its role in the video context; and (5) the overall theme or purpose of the video. "
104
+ "Ensure the output is a fluent and objective paragraph, not a bullet-point list, and captures the video's "
105
+ "content in a human-like, narrative style."
106
+ )
107
+
108
+ # Prepare messages in the chat template format
109
+ messages = [
110
+ {
111
+ "role": "user",
112
+ "content": [
113
+ {"type": "video", "video": video_path}, # Pass video path
114
+ {"type": "text", "text": prompt_text},
115
+ ],
116
+ }
117
+ ]
118
+
119
+ # Apply chat template and process inputs
120
+ text = processor.apply_chat_template(
121
+ messages, tokenize=False, add_generation_prompt=True
122
+ )
123
+
124
+ inputs = processor(
125
+ text=[text],
126
+ videos=[video_path], # Pass video path directly to the processor
127
+ return_tensors="pt",
128
+ ).to(model.device)
129
+
130
+ # Generate output
131
+ generated_ids = model.generate(**inputs, max_new_tokens=512)
132
+
133
+ # Decode generated text
134
+ output_text = processor.batch_decode(
135
+ generated_ids[:, inputs["input_ids"].shape[1]:], # Exclude prompt from output
136
+ skip_special_tokens=True,
137
+ clean_up_tokenization_spaces=False
138
+ )[0]
139
+
140
+ print(output_text)
141
+ ```
142
+
143
+ ## Evaluation
144
+
145
+ ### Final Caption prompt (for inference)
146
+
147
+ ```python
148
+ prompt = "You are given a short video with both audio and visual content. Write a detailed and coherent paragraph that naturally integrates all modalities. "
149
+ "Your description should include: (1) the primary scene and background setting; (2) key characters or objects and their actions or interactions; "
150
+ "(3) significant audio cues such as voices, background music, sound effects, and their emotional tone; "
151
+ "(4) any on-screen text (OCR) and its role in the video context; and (5) the overall theme or purpose of the video. "
152
+ "Ensure the output is a fluent and objective paragraph, not a bullet-point list, and captures the video's content in a human-like, narrative style.
153
+ ```
154
+
155
+ ### Score
156
+
157
+ Scores are judged by GPT-4o-2024-08-06.
158
+
159
+ ```bash
160
+ python eval_caption.py
161
+ ```
162
+
163
+ ## Citation
164
+
165
+ If you find this repository helpful, feel free to cite our paper:
166
+
167
+ ```bibtex
168
+ @article{wu2024ugc,
169
+ title={UGC-VideoCaptioner: An Omni UGC Video Detail Caption Model and New Benchmarks},
170
+ author={Wu, Zhenyu and Sun, Qiushi and Zhang, Jiabo and Zhu, Yuyin and Ma, Guojun and Cheng, Kanzhi and Jia, Chengyou and Tan, Jian and Yang, Qing and Wu, Zhiyong},
171
+ journal={arXiv preprint arXiv:2507.11336},
172
+ year={2024}
173
+ }
174
+ ```