Skip to content

Commit a412439

Browse files
committed
readme
1 parent 72c69cd commit a412439

1 file changed

Lines changed: 122 additions & 9 deletions

File tree

README.md

Lines changed: 122 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,29 @@
1818
<a href="https://scholar.google.com/citations?user=5bInRDEAAAAJ&hl=zh-CN"><strong>Feng Wu</strong></a> ·
1919
<a href="http://dahua.site/"><strong>Dahua Lin</strong></a>
2020

21+
<h2 align="center">CapRL++: Unified Reinforcement Learning with Verifiable Rewards for Dense Image and Video Captioning</h2>
22+
<p align="center">
23+
<a href="https://yph22.github.io/"><strong>Penghui Yang*</strong></a>
24+
·
25+
<a href="https://github.com/Cooperx521"><strong>Long Xing*</strong></a>
26+
·
27+
<a href="https://lightdxy.github.io/"><strong>Xiaoyi Dong</strong></a>
28+
·
29+
<a href="https://yuhangzang.github.io/"><strong>Yuhang Zang</strong></a>
30+
·
31+
<a href="https://scholar.google.com/citations?user=sJkqsqkAAAAJ"><strong>Yuhang Cao</strong></a>
32+
·
33+
<a href="https://scholar.google.com/citations?user=P4yNnSkAAAAJ&hl=zh-TW"><strong>Jianze Liang</strong></a>
34+
·
35+
<a href="https://github.com/shikiw"><strong>Qidong Huang</strong></a>
36+
·
37+
<a href="https://myownskyw7.github.io/"><strong>Jiaqi Wang</strong></a>
38+
·
39+
<a href="http://dahua.site/"><strong>Dahua Lin</strong></a>
40+
</p>
41+
42+
📖<a href="https://arxiv.org/abs/2509.22647">Paper</a> | 🏠<a href="https://github.com/InternLM/CapRL">Github</a> | 🤗<a href="https://huggingface.co/collections/long-xing1/caprl-68d64ac32ded31596c36e189">CapRL Collection</a> | 🤗<a href="https://huggingface.co/papers/2509.22647">Daily Paper</a>
2143

22-
📖<a href="https://arxiv.org/abs/2509.22647">Paper</a> | 🏠<a href="https://github.com/InternLM/CapRL">Github</a> | 🤗<a href="https://huggingface.co/collections/long-xing1/caprl-68d64ac32ded31596c36e189">CapRL Collection</a> | 🤗<a href="https://huggingface.co/papers/2509.22647">Daily Paper</a>
2344

2445
#### CapRL Series Model & Dataset
2546
| Series | Models & Resources |
@@ -28,7 +49,7 @@
2849
| **CapRL 2.0 Series** | [🤗 CapRL-Qwen3VL-2B](https://huggingface.co/internlm/CapRL-Qwen3VL-2B) \| [🤗 CapRL-Qwen3VL-4B](https://huggingface.co/internlm/CapRL-Qwen3VL-4B) \| [📦 CapRL-Qwen3VL-2B-GGUF](https://huggingface.co/internlm/CapRL-Qwen3VL-2B-GGUF) \| [📦 CapRL-Qwen3VL-4B-GGUF](https://huggingface.co/internlm/CapRL-Qwen3VL-4B-GGUF) \| [🌈CapRL-Qwen3VL-4B Space](https://huggingface.co/spaces/yuhangzang/CapRL-Qwen3VL-4B)
2950
| **CapRL 1.0 Series** | [🤗 CapRL-Qwen2.5VL-3B](https://huggingface.co/internlm/CapRL-3B) \| [🤗 CapRL-InternVL3.5-8B](https://huggingface.co/yuhangzang/CapRL-InternVL3.5-8B) \| [📊 CapRL-2M Dataset](https://huggingface.co/datasets/internlm/CapRL-2M) \| [📦 CapRL-3B-GGUF](https://huggingface.co/mradermacher/CapRL-3B-GGUF) \| [📦 CapRL-3B-i1-GGUF](https://huggingface.co/mradermacher/CapRL-3B-i1-GGUF) \| [🌈CapRL-Qwen2.5VL-3B Space](https://huggingface.co/spaces/yuhangzang/caprl)
3051

31-
**CapRL 3.0 series (CapRL++)**: **CapRL-Video-4B** has been released!
52+
**CapRL 3.0 series (CapRL++)**: **CapRL-Video-4B** has been released! CapRL++ extends the original image-caption RL framework to a unified image and video captioning paradigm with verifiable rewards.
3253

3354
We are excited to release the **CapRL 2.0 series**: **CapRL-Qwen3VL-2B** and **CapRL-Qwen3VL-4B**. These models feature fewer parameters while delivering even more powerful captioning performance.
3455
Notably, **CapRL-Qwen3VL-2B outperforms both CapRL-Qwen2.5VL-3B and Qwen2.5VL-72B in captioning tasks, while CapRL-Qwen3VL-4B further demonstrates a significant performance leap over the 2B version.**
@@ -41,16 +62,17 @@ This guide will help you choose the most suitable model for your specific needs:
4162
|-|-|-|
4263
|🤗[CapRL-Qwen3VL-2B](https://huggingface.co/internlm/CapRL-Qwen3VL-2B)|2B|Speed, Efficiency|
4364
|🤗[CapRL-Qwen3VL-4B](https://huggingface.co/internlm/CapRL-Qwen3VL-4B)|4B|High Performance, Advanced Captioning Ability|
65+
|🤗[CapRL-Video-4B](https://huggingface.co/internlm/CapRL-Video-4B)|4B|Dense Video Captioning, Temporal Grounding|
4466

4567
Now you can try out CapRL with your own images🎨!&nbsp;&nbsp;&nbsp;&nbsp;➡️&nbsp;&nbsp;&nbsp;&nbsp;[🌈CapRL-Qwen2.5VL-3B Space](https://huggingface.co/spaces/yuhangzang/caprl) and [🌈CapRL-Qwen3VL-4B Space](https://huggingface.co/spaces/yuhangzang/CapRL-Qwen3VL-4B).
4668

4769

4870
## 📢 News
4971
We are working on even stronger base models and upgrading our training recipe — stay tuned!
50-
- 🔥 [05/25/2026] We have released the training and evaluation code for CapRL++. See mroe in `CapRL++` folder.
72+
- 🔥 [05/25/2026] We have released the training and evaluation code for CapRL++. See more in `CapRL++` folder.
5173
- 🔥 [05/22/2026] We have released the **[CapRL-Video-QA-20K](https://huggingface.co/datasets/internlm/CapRL-Video-QA-20K)** dataset for CapRL++ training and
5274
the **[CapRL-Video-178K](https://huggingface.co/datasets/internlm/CapRL-Video-178K)** dataset (recaptioned by **[CapRL-Video-4B](https://huggingface.co/internlm/CapRL-Video-4B)** from LLaVA-Video-178K)!
53-
- 🔥 [05/22/2026] **CapRL++** is coming! We have released the **[CapRL-Video-4B](https://huggingface.co/internlm/CapRL-Video-4B)** model designed for video captioning! Demo is [here](https://internlm.github.io/CapRL/demo/)
75+
- 🔥 [05/22/2026] **CapRL++** is coming! We have released the **[CapRL-Video-4B](https://huggingface.co/internlm/CapRL-Video-4B)** model (trained on Qwen3-VL-4B) designed for video captioning! Demo is [here](https://internlm.github.io/CapRL/demo/).
5476
- 🔥 [04/16/2026] We have released the **[CapRL-QA-75K](https://huggingface.co/datasets/internlm/CapRL-QA-75K)** training dataset!
5577
- 🔥 [2/9/2026] We release the CapRL training code.
5678
- 🔥 [1/27/2026] CapRL is accepted by ICLR2026! We are working on cleaning training code, and will release everything as soon as possible!
@@ -64,8 +86,11 @@ the **[CapRL-Video-178K](https://huggingface.co/datasets/internlm/CapRL-Video-17
6486

6587

6688
## Introduction
67-
🌈We are excited to introduce <strong>CapRL-3B</strong>, a lightweight 3B image captioner that achieves perception capabilities comparable to Qwen2.5-VL-72B.
68-
By employing CapRL training framework, initializing with the Qwen2.5-VL-3B model, and using a carefully filtered 75K QA dataset as the training set, we obtained a highly capable captioner, CapRL-3B.
89+
🌈 We are excited to introduce the **CapRL series**, a family of dense captioning models trained with reinforcement learning rather than conventional supervised caption imitation.
90+
91+
The original **CapRL** framework focuses on dense image captioning. It optimizes an LVLM captioner with QA-derived rewards: a caption is considered high quality when a text-only model can answer visual questions using only that caption. With this recipe, the lightweight **CapRL-3B** achieves perception capabilities comparable to Qwen2.5-VL-72B.
92+
93+
**CapRL++** further generalizes this idea from static images to dynamic videos. It trains a Qwen3-VL-based captioner with a unified RLVR pipeline, where generated captions are evaluated by their downstream utility for multiple-choice visual question answering. For videos, CapRL++ adds timestamp-format rewards and length-aware regularization so the model learns dense, temporally grounded, and non-redundant descriptions.
6994

7095

7196

@@ -82,23 +107,88 @@ By employing CapRL training framework, initializing with the Qwen2.5-VL-3B model
82107

83108

84109
## 💡 Highlights
85-
- 🔥 **Remarkable visual understanding for Chart, Infographics and Document**: CapRL-3B achieves perception accuracy and visual information coverage comparable to Qwen2.5-VL-72B.
86-
- 🔥 **Well-organized output**: The outputs of CapRL-3B are relatively well-structured, making them clear and easy to understand.
87-
- 🔥 **Detailed description for natural images**: The outputs of CapRL-3B can perfectly cover all valid visual information while containing fewer hallucinations.
110+
- 🔥 **Unified dense caption RL for images and videos**: CapRL++ applies the same QA-utility reward philosophy to both image and video captioning, avoiding dependence on a single reference caption.
111+
- 🔥 **Verifiable reward design**: CapRL++ combines visual utility reward, timestamp-format reward, and length-aware penalty to optimize accuracy, temporal structure, and information efficiency.
112+
- 🔥 **Strong temporal grounding**: CapRL-Video-4B generates explicit timestamped video descriptions and improves downstream video understanding when used as caption data.
113+
- 🔥 **Remarkable visual understanding for charts, infographics, and documents**: CapRL-3B achieves perception accuracy and visual information coverage comparable to Qwen2.5-VL-72B.
114+
- 🔥 **Well-organized dense output**: CapRL models generate structured captions that cover fine-grained objects, attributes, OCR content, relations, and events.
88115

89116
## Model Card
90117
- Based on the same recipe as CapRL-3B, we used InternVL3.5-8B as the policy model and obtained CapRL-InternVL3.5-8B through CapRL.
91118
- CapRL-3B-GGUF is static quants version, and CapRL-3B-i1-GGUF is weighted/imatrix quants version. Thanks for their contribution!
119+
- CapRL-Video-4B is trained from Qwen3-VL-4B with CapRL++ for dense video captioning. It is designed to describe both spatial details and temporal event changes with timestamped structure.
92120

93121

94122
## 👨‍💻 Todo
95123

96124
- ✅ Release 75k QA dataset.
97125

126+
## CapRL++: Unified Image and Video Caption RL
127+
128+
CapRL++ is the video-oriented extension of CapRL. It keeps the central principle of CapRL: **a caption should be rewarded by how useful it is for downstream visual question answering**. Instead of comparing a generated caption with a fixed reference, CapRL++ lets the policy model generate captions, then asks a separate vision-free LLM to answer curated multiple-choice questions using only those captions. The answer accuracy becomes a verifiable reward for RL training.
129+
130+
### Reward Design
131+
132+
For a sampled caption `c`, CapRL++ uses a multidimensional reward:
133+
134+
```text
135+
R_total(c) = R_acc(c) + alpha * R_format(c) + beta * R_len(c)
136+
```
137+
138+
- **Visual utility reward (`R_acc`)**: measures whether a text-only LLM can answer image/video MCQs from the generated caption alone. Options are shuffled and sampled multiple times to reduce answer-position bias.
139+
- **Temporal format reward (`R_format`)**: used for video captions. It encourages valid timestamp brackets and chronological ordering, helping the model produce temporally grounded narratives.
140+
- **Length-aware reward (`R_len`)**: discourages reward hacking through overly long or repetitive captions, pushing the model toward high information density.
141+
142+
### Static-to-Dynamic Bootstrapping
143+
144+
CapRL++ uses **S2D-Boot**, a two-stage image-to-video training recipe:
145+
146+
1. **Image stage**: train on static images with visual utility and length rewards to strengthen fine-grained spatial perception, OCR, attributes, and relation extraction.
147+
2. **Video stage**: initialize from the image-stage checkpoint and train on video data with the full reward space, including timestamp-format reward, so optimization can focus on event ordering and temporal localization.
148+
149+
This progressive strategy preserves strong image captioning ability while improving video understanding.
150+
151+
### CapRL++ Datasets
152+
153+
- **[CapRL-Video-QA-20K](https://huggingface.co/datasets/internlm/CapRL-Video-QA-20K)**: multiple-choice video QA data for CapRL++ reward training.
154+
- **[CapRL-Video-178K](https://huggingface.co/datasets/internlm/CapRL-Video-178K)**: LLaVA-Video-178K videos recaptioned by **[CapRL-Video-4B](https://huggingface.co/internlm/CapRL-Video-4B)** with dense, timestamped descriptions.
155+
- **CapRL-Image-5M**: the CapRL++ paper also studies large-scale image recaptioning by combining ShareGPT4V-1M, DenseFusion-1M, and filtered web images, then annotating them with a CapRL++ image captioner.
156+
157+
### Key Results from CapRL++
158+
159+
- In image Prism evaluation, CapRL++ trained from Qwen2.5-VL-3B reaches an average score of **48.3**, matching Qwen2.5-VL-72B while substantially outperforming LVLM-as-a-judge reward variants.
160+
- On HAT image captioning evaluation, CapRL++ improves coverage and reaches an average score comparable to Qwen2.5-VL-72B.
161+
- In video Prism evaluation, CapRL++ trained from Qwen3-VL-4B achieves the best average score among compared general and specialized video models, surpassing Qwen3-VL-32B and Qwen3-VL-235B-A22B in the reported setting.
162+
- As video pretraining data, CapRL-Video-178K improves Molmo2 downstream video understanding more than GPT-4o, ShareGPT4Video-8B, and Tarsier2-7B caption sources in the paper's continual-pretraining experiments.
163+
- S2D-Boot gives the best balance between image and video performance, retaining strong spatial captioning while improving temporal reasoning.
164+
165+
### Code Entry Points
166+
167+
The CapRL++ implementation is in [`CapRL++`](CapRL++):
168+
169+
```text
170+
CapRL++/
171+
├── train/
172+
│ ├── scripts/ # reward service and verl training launch scripts
173+
│ └── verl/ # bundled verl backend with video caption RL recipe
174+
└── eval/
175+
├── scripts/ # Prism video evaluation scripts
176+
├── tools/ # benchmark judge helpers
177+
└── README.md
178+
```
179+
180+
For details, see:
181+
182+
- [`CapRL++/README.md`](CapRL++/README.md)
183+
- [`CapRL++/train/scripts/README.md`](CapRL++/train/scripts/README.md)
184+
- [`CapRL++/eval/README.md`](CapRL++/eval/README.md)
185+
98186
## 🛠️ Setup
99187

100188
### Installation
101189

190+
For CapRL image training and evaluation:
191+
102192
```bash
103193
git clone https://github.com/InternLM/CapRL.git
104194
cd CapRL/CapRL_Training
@@ -111,13 +201,36 @@ The `setup.sh` will sequentially:
111201
1. Install key dependencies with pinned versions (torch, transformers, vllm, deepspeed, flash-attn, ray, etc.)
112202
2. Install the OpenRLHF-based training framework and remaining dependencies via `pip install -e .`
113203

204+
For CapRL++ video training and evaluation:
205+
206+
```bash
207+
cd CapRL/CapRL++/train
208+
conda create -n caprl python=3.10 -y
209+
conda activate caprl
210+
pip install -r scripts/requirements.txt
211+
pip install -e ./verl
212+
```
213+
214+
Video Prism evaluation dependencies are installed separately:
215+
216+
```bash
217+
cd CapRL/CapRL++/eval
218+
pip install -r requirements.txt
219+
```
220+
114221
## ⭐️ Quick Start
115222
If you want to use **CapRL-3B** for captioning, you can directly follow the exact same inference approach as in [Qwen2.5-VL-series](https://github.com/QwenLM/Qwen3-VL/tree/d2240f11656bfe404b9ba56db4e51cd09f522ff1).
116223

117224
The prompt we use for training and evaluation is `Please describe this image in detail.`
118225

119226
We recommend using **vLLM** to speed up inference.
120227

228+
For **CapRL-Video-4B**, use the Qwen3-VL video inference interface or the Prism evaluation scripts under `CapRL++/eval`. A typical video caption prompt is:
229+
230+
```text
231+
Please describe this video in detail with timestamps.
232+
```
233+
121234

122235

123236
### Start an OpenAI API Service

0 commit comments

Comments
 (0)