GROVE Model: Large-scale Pre-training for Grounded Video Caption Generation
This repository hosts the
artifacts (config, tokenizer, weights) for the GROVE model, as presented in the paper
Large-scale Pre-training for Grounded Video Caption Generation.
Project Website:
https://ekazakos.github.io/grounded_video_caption_generation/
Codebase: The inference code is provided in the
grove-transformers package — a
slimmer version of the full codebase at
https://github.com/ekazakos/grove/, designed specifically for
quick inference with GROVE.
Abstract
We propose a novel approach for captioning and object grounding in video, where the objects in the caption are grounded in the video via temporally dense bounding boxes. We introduce the following contributions. First, we present a large-scale automatic annotation method that aggregates frame-level captions grounded with bounding boxes into temporally dense and consistent annotations. We apply this approach on the HowTo100M dataset to construct a large-scale pre-training dataset, named HowToGround1M. We also introduce a Grounded Video Caption Generation model, dubbed GROVE, and pre-train the model on HowToGround1M. Second, we introduce iGround--a dataset of 3513 videos with manually annotated captions and dense spatio-temporally grounded bounding boxes. This allows us to measure progress on this challenging problem, as well as to fine-tune our model on this small-scale but high-quality data. Third, we demonstrate that our approach achieves state-of-the-art results on the proposed iGround dataset, as well as on the VidSTG, ActivityNet-Entities, GroundingYouTube, and YouCook-Interactions datasets. Our ablations demonstrate the importance of pre-training on our automatically annotated HowToGround1M dataset followed by fine-tuning on the manually annotated iGround dataset and validate the key technical contributions of our model. The dataset and code are available at this https URL .
News
- 09/11/2025: The HowToGround1M and iGround datasets are now available on 🤗 Hugging Face: HowToGround1M | iGround. They can be loaded directly with
load_dataset() from the 🤗 Datasets library.
- 02/09/2025: We release grove-transformers — a lightweight, inference-only interface for GROVE, implemented with 🤗 Transformers.
- 21/08/2025: Code, checkpoints, and datasets released!
- 25/06/2025: Paper accepted to ICCV 2025 🎉
Installation
Install the inference package:
If you've already cloned the main repo from
https://github.com/ekazakos/grove/, then run:
1cd grove/grove_transformers
2pip install -e .[torch] --extra-index-url https://download.pytorch.org/whl/cu124
3pip install flash-attn==2.7.3 --no-build-isolation
Alternatively, run:
1pip install -e "git+https://github.com/ekazakos/grove.git#subdirectory=grove_transformers[torch]" \
2 --extra-index-url https://download.pytorch.org/whl/cu124
3pip install flash-attn==2.7.3 --no-build-isolation
Also, install
mmcv,
mmdetection and
SAM2 as shown
here.
Notes
- This model requires Python ≥3.11.
- Auto* classes (e.g.
AutoTokenizer) are not supported; use the custom Grove* classes.
Example Usage 1: Minimal (automatic metadata)
If you don’t have precomputed token embeddings for GROVE's vocabulary or video metadata, just pass the video path.
GROVE will compute everything internally.
1from grove_transformers import GroveTokenizer, GroveForCausalLM, GroveProcessor
2
3tokenizer = GroveTokenizer.from_pretrained("ekazakos/grove")
4model = GroveForCausalLM.from_pretrained(
5 "ekazakos/grove",
6 torch_dtype=torch.bfloat16,
7 attn_implementation="flash_attention_2",
8 low_cpu_mem_usage=True,
9)
10processor = GroveProcessor.from_pretrained("ekazakos/grove")
11
12outputs = processor.generate(
13 model,
14 video_path,
15 token_embeddings=None,
16 device="cuda",
17 start_frame=None,
18 end_frame=None,
19 video_width=None,
20 video_height=None,
21 video_fps=None
22)
Example Usage 2: With precomputed inputs
If you have precomputed token embeddings for GROVE's vocabulary and video metadata (e.g. from datasets like HowToGround1M or iGround), you can pass them directly for faster inference and precise trimming.
1outputs = processor.generate(
2 model,
3 video_path,
4 token_embeddings=precomputed_embeddings,
5 device="cuda",
6 start_frame=dataset_meta["start_frame"],
7 end_frame=dataset_meta["end_frame"],
8 video_width=dataset_meta["width"],
9 video_height=dataset_meta["height"],
10 video_fps=dataset_meta["fps"]
11)
Notes
token_embeddings: pass precomputed token embeddings for speed, or None to compute on the fly.
For precomputing token embeddings for GROVE's vocabulary, see embed_tokens.sh.
- Video metadata (
start_frame, end_frame, video_width, video_height, video_fps): pass if available, otherwise None → GROVE computes automatically.
- Trimming:
start_frame/end_frame let you process only part of a video.
1@inproceedings{kazakos2025grove,
2 title = {Large-scale Pre-training for Grounded Video Caption Generation},
3 author = {Evangelos Kazakos and Cordelia Schmid and Josef Sivic},
4 booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
5 year = {2025}
6}