Streaming Dense Video Captioning

Xingyi Zhou, Anurag Arnab, Shyamal Buch, Shen Yan, Austin Myers, Xuehan Xiong, Arsha Nagrani, Cordelia Schmid · DOI

Abstract

An ideal model for dense video captioning - predicting captions localized temporally in a video - should be able to handle long input videos, predict rich, detailed textual descriptions, and be able to produce outputs before processing the entire video. Current state-of-the-art models, however, process a fixed number of downsampled frames, and make a single full prediction after seeing the whole video. We propose a streaming dense video captioning model that consists of two novel components: First, we propose a new memory module, based on clustering incoming tokens, which can handle arbitrarily long videos as the memory is of a fixed size. Second, we develop a streaming decoding algorithm that enables our model to make predictions before the entire video has been processed. Our model achieves this streaming ability, and significantly improves the state-of-the-art on three dense video captioning benchmarks: ActivityNet, YouCook2 and ViTT.

Introduction

Dense video captioning involves two tasks: localizing events within a video and generating a text description for each. Traditionally, this has been a "batch" process. As illustrated in Figure 1, conventional models ingest a fixed number of downsampled frames and output all captions only after the "End of Video" signal.

Comparison between conventional global dense video captioning models and the proposed streaming approach.

This approach faces two major hurdles:

  1. Memory Constraints: Long videos generate a massive number of visual tokens. To stay within memory limits, current models either sample frames very sparsely (losing fine-grained detail) or use aggressive spatial pooling.
  2. Latency: In real-world applications like live security monitoring or video conferencing, waiting for a video to finish before describing it is impractical.

The authors aim to create a model that is causal (it only looks at the past and present) and streaming (it produces outputs as the video progresses), all while maintaining a fixed computational budget regardless of video length.

Methodology

The researchers propose two primary innovations to enable real-time, long-form video understanding.

Overview of the proposed streaming model architecture featuring the memory module and language decoder.

1. Clustering-based Memory Module

Instead of keeping a sliding window of frames or a simple running average, the model uses a K-means-like clustering algorithm to manage visual features. As new frames arrive, their visual tokens are compared to existing "cluster centers" in memory. These centers are updated to incorporate new information. This allows the model to maintain a fixed-size memory (e.g., 512 tokens) that acts as a compressed summary of the entire video seen so far. Crucially, the authors formulated this update as a linear mapping, making the module differentiable and allowing the entire system to be trained end-to-end.

2. Streaming Decoding Algorithm

To generate captions before the video ends, the authors introduce "decoding points"—intermediate timestamps where the model pauses to describe events that have concluded. To prevent the model from repeating itself or losing context, previously generated captions are fed back into the language decoder as a text prefix. During training, they use a randomized "splitting point" to teach the model how to use partial previous captions to predict the next set of events.

Key Results and Insights

The streaming model was evaluated on three major benchmarks: ActivityNet Captions, YouCook2, and ViTT. It achieved substantial gains over "global" baselines:

  • ActivityNet: Improved the CIDEr score from 30.2 to 41.2—a 33% relative improvement.
  • YouCook2: Boosted CIDEr from 25.3 to 32.9.

Surprisingly, forcing the model to work in a streaming, causal fashion actually improved performance. By breaking the long-form captioning task into smaller, sequential sub-problems, the model found the task easier to learn. Furthermore, while visual memory (the clusters) inevitably loses some detail over time due to its fixed size, the textual prefix acts as a high-level semantic memory, helping the model maintain a coherent narrative over very long sequences.

Conclusion

This streaming approach demonstrates that causality is not just a constraint for real-time applications but a beneficial feature for model learning. Future work includes addressing occasional duplicate predictions and integrating audio modalities (ASR) to further improve results on instructional content like cooking tutorials.

Summary updated

BibTeX
@misc{zhou2024streaming,
  author = {Xingyi Zhou and Anurag Arnab and Shyamal Buch and Shen Yan and Austin Myers and Xuehan Xiong and Arsha Nagrani and Cordelia Schmid},
  title = {{Streaming Dense Video Captioning}},
  year = {2024},
  eprint = {2404.01297},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.01297},
}
Figure