Data-driven crowd analysis in videos

Mikel Rodriguez, Josef Sivic, Ivan Laptev, Jean-Yves AudibertICCV 2011

Abstract

In this work we present a new crowd analysis algorithm powered by behavior priors that are learned on a large database of crowd videos gathered from the Internet. The algorithm works by first learning a set of crowd behavior priors off-line. During testing, crowd patches are matched to the database and behavior priors are transferred. We adhere to the insight that despite the fact that the entire space of possible crowd behaviors is infinite, the space of distinguishable crowd motion patterns may not be all that large. For many individuals in a crowd, we are able to find analogous crowd patches in our database which contain similar patterns of behavior that can effectively act as priors to constrain the difficult task of tracking an individual in a crowd. Our algorithm is data-driven and, unlike some crowd characterization methods, does not require us to have seen the test video beforehand. It performs like state-of-the-art methods for tracking people having common crowd behaviors and outperforms the methods when the tracked individual behaves in an unusual way.

Introduction

Tracking a single person in a dense crowd is a significant challenge in computer vision. Constant occlusions, physical constraints, and complex social dynamics—such as mass panics or marathon starts—often cause standard tracking algorithms to fail.

Existing state-of-the-art methods typically attempt to solve this by learning the "typical" motion of a specific scene (e.g., "everyone in this video usually moves left"). However, this approach suffers from two major flaws. First, it requires observing the entire video beforehand to learn patterns, making it unsuitable for real-time applications. Second, it struggles with "outliers"—individuals who perform unusual actions, like walking against the flow of traffic. In these cases, scene-specific models often treat the movement as an error or force it into the average behavior, leading to tracker drift.

This paper introduces a data-driven framework for tracking individuals in dense crowds by "borrowing" behavior patterns from a massive database of other crowd videos. By matching local patches of a new video to similar scenes in the database, the system can predict how a person is likely to move, even during rare events.

Methodology

The proposed system utilizes a three-step data-driven pipeline:

1. The Database

The authors compiled a library of over 500 crowd videos, totaling more than 10 hours of footage. Each video is analyzed offline to learn its motion patterns using a Correlated Topic Model (CTM), which represents crowd behavior as a distribution of quantized movements (up, down, left, right, or static).

Diverse crowd scenarios from the 520-video database including marathons, festivals, and rallies.

2. Two-Stage Matching

When a new "query" video is processed, the system performs matching in two stages:

  • Global Match: It uses GIST descriptors to find the top 40 videos with similar global layouts (e.g., matching an overhead view of a rally to other overhead rallies).
  • Local Match: It then examines the specific area around the person being tracked and uses HOG3D descriptors—which capture shape and motion over time—to find the most similar "crowd patches" within those 40 videos.
Local patch matching and prior transfer for tracking an individual within a dense crowd.

3. Prior Transfer

The motion patterns from these matching database patches are transferred to the current video. These act as "priors" integrated into a standard Kalman Filter. The tracker's next move is a weighted balance between the person's previous trajectory and the "borrowed" crowd behavior.

Key Insights

  • Finite Behavior Space: While every crowd is unique, the types of distinguishable motion patterns are limited. For example, people crossing a street in New York exhibit motion patterns remarkably similar to those in Tokyo.
  • Rarity is Relative: A "rare" event in one video is likely a "common" event in another video within a sufficiently large database. This allows the system to find priors for unusual behavior that scene-specific models would ignore.
  • Contextual Relevance: By matching the global scene first, the algorithm ensures it doesn't use inappropriate motion priors (e.g., using ground-level marathon data for an overhead protest view).

Results

In typical crowd scenes, the data-driven approach achieved a mean tracking error of 47.47 pixels, nearly matching the 46.93-pixel error of "batch mode" models that have the advantage of seeing the entire test video first.

The method's true strength lies in tracking rare or abrupt behaviors. For these events, the data-driven tracker significantly outperformed the scene-specific batch model (46.88 vs. 58.82 pixel error). Because the batch model only sees a rare event once, it cannot form a strong prior, whereas the database provides a ready-made template for that specific movement.

Conclusion

The data-driven "prior transfer" approach offers a robust solution for real-time crowd tracking, particularly in unpredictable scenarios. While the system's performance depends on the diversity of its database and faces computational challenges in real-time patch searching, it opens new avenues for automated event detection and crowd density estimation.

Summary updated

BibTeX
@inproceedings{rodriguez2011data,
  author = {Mikel Rodriguez and Josef Sivic and Ivan Laptev and Jean-Yves Audibert},
  title = {{Data-driven crowd analysis in videos}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2011},
  url = {https://openreview.net/forum?id=B1W_BWMO-B},
}
Figure