Count2Density: Crowd Density Estimation without Location-level Annotations

Mattia Litrico, Feng Chen, Michael P. Pound, Sotirios A. Tsaftaris, Sebastiano Battiato, Mario Valerio GiuffridaarXiv 2025 · DOI

Introduction

Crowd density estimation is a critical component of modern urban planning and public safety systems. However, developing high-performing models typically incurs a significant "data tax." Most state-of-the-art methods rely on location-level annotations, requiring human annotators to manually click on every individual head in an image. For large-scale datasets like UCF-QNRF, which contain hundreds of thousands of people, this process is prohibitively expensive and prone to error.

Existing alternatives, such as regression-based methods or cross-domain adaptation, attempt to mitigate this cost but come with trade-offs. Regression models often lose spatial information, making subregion counting impossible, while cross-domain methods frequently struggle with the "reality gap" between synthetic and real-world data.

Comparison of crowd counting approaches across annotation cost, prediction type, and subregion counting capabilities.

The Count2Density framework addresses this by asking: Can we achieve the spatial richness of a density map using only the "cheap" labels of total counts?

Methodology: The Count2Density Pipeline

The core innovation of Count2Density lies in its ability to "hallucinate" spatial information from a single integer (the total count). The pipeline utilizes four primary components to iteratively refine its predictions:

  1. Historical Map Bank (HMB): To prevent the model from reinforcing its own errors (confirmation bias), the authors maintain a bank of past predictions for every image. This bank is updated via an Exponential Moving Average (EMA), acting as a stable "memory" that smooths out predictions over time.
  2. Pseudo-Density Map Generation: This is the central mechanism for supervision. The model uses the current HMB state as a probability prior and samples a number of points equal to the ground-truth count using a hypergeometric distribution. These points are then blurred to create a "pseudo-density map."
  3. Unsupervised Saliency Initialization: To provide a useful starting point before training begins, the HMB is initialized using BAS-Net, an unsupervised saliency estimator. This helps the model identify potential regions of interest (people) from the first epoch.
  4. Contrastive Spatial Regularizer: A self-supervised loss is added to sharpen spatial awareness. It encourages the model to learn similar feature representations for different "crowded" patches while maximizing the contrast between crowd regions and background elements like sky or architecture.
The Count2Density training framework, illustrating the interaction between the backbone, saliency map, and Historical Map Bank.

Experimental Setup and Datasets

The framework was evaluated on four major crowd counting benchmarks:

  • ShanghaiTech (Parts A & B): Standard benchmarks for varying densities.
  • UCF-QNRF: A large-scale, high-resolution dataset with extreme congestion.
  • JHU-CROWD++: A massive dataset featuring diverse weather and lighting conditions.
  • NWPU-Crowd: The largest and most challenging benchmark currently available.

Key Insights

  • Counts are Spatially Informative: The research demonstrates that with a decent spatial prior (from saliency or historical guesses), a simple count is sufficient to iteratively refine a highly accurate density map.
  • The "Memory" Effect: The Historical Map Bank is crucial for stability. Without it, the model risks collapsing into poor local minima. The EMA update ensures that pseudo-labels improve gradually.
  • Bridging the Weak-to-Semi-Supervised Gap: Remarkably, Count2Density—which uses zero point labels—often outperforms semi-supervised methods that utilize point labels for 5-10% of the training data. This suggests that a consistent global weak signal can be more effective than sparse strong signals.

Results

  • Performance Gains: On the UCF-QNRF dataset, Count2Density reduced the Mean Absolute Error (MAE) from 198.3 (the previous best cross-domain method) to 149.2.
  • Subregion Accuracy: Unlike regression models, Count2Density maintains spatial awareness. It achieved an MAE of 9.3 for subregion counting on UCF-QNRF, significantly outperforming other weakly supervised competitors.
  • Architecture Agnostic: The framework showed consistent improvements across various backbones (e.g., VGG, CSRNet), proving its utility as a "plug-and-play" solution.

Limitations and Future Work

While effective, Count2Density faces two primary challenges:

  • Memory Overhead: Storing density maps for every image in massive datasets like NWPU requires substantial GPU and system RAM.
  • Training Complexity: Maintaining the HMB and performing sampling steps adds computational overhead, leading to slower training times compared to simple regression.

Future research may explore compressed representations for the Map Bank and extend this "count-to-density" logic to other domains, such as medical cell counting or environmental monitoring.

Summary updated

BibTeX
@misc{litrico2025count,
  author = {Mattia Litrico and Feng Chen and Michael P. Pound and Sotirios A. Tsaftaris and Sebastiano Battiato and Mario Valerio Giuffrida},
  title = {{Count2Density: Crowd Density Estimation without Location-level Annotations}},
  year = {2025},
  eprint = {2509.03170},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.03170},
}
Figure