Crowd Counting with Density Adaption Networks

Li Wang, Weiyuan Shao, Yao Lu, Hao Ye, Jian Pu, Yingbin ZhengarXiv 2018

Abstract

Crowd counting in images is challenged by extreme scale variations and non-uniform distributions. This paper presents Density Adaption Networks (DAN), a lightweight framework designed to address these issues through a spatial gating mechanism. By adaptively switching between specialized low-density and high-density counter networks based on local image characteristics, DAN achieves state-of-the-art accuracy on major benchmarks. Furthermore, the architecture maintains high efficiency, achieving real-time processing speeds of 20 FPS.

Introduction

Accurate crowd counting is essential for surveillance and urban planning but remains difficult due to significant scale variation and uneven density. In a single frame, foreground subjects may appear as large, distinct heads, while background subjects are represented by only a few pixels. Traditional models often employ a "universal" regressor that struggles with these extremes, frequently overestimating sparse regions or underestimating dense ones. While multi-column networks have been proposed to handle multiple scales, they are often computationally expensive and difficult to optimize. This work introduces a system that dynamically adapts its counting strategy based on local density.

Methodology

The proposed framework utilizes a three-stream architecture built upon a shared feature extraction backbone.

Architecture Components

  1. Basic Architecture: Employs dilated convolutions to expand the receptive field without sacrificing spatial resolution or increasing parameter count.
  2. LCN & HCN: The Low-density Counter Network (LCN) and High-density Counter Network (HCN) are specialized modules trained on distinct density domains.
  3. Density Adaption Network (DAN): Acts as a classifier to generate a Density Class Map, identifying local patches as either low or high density.
  4. Spatial Gating Unit: Integrates the DAN output to select the appropriate counter (LCN or HCN) for each image region, producing a final integrated count map.
The overall architecture shows how the DAN guides the selection between LCN and HCN.

Training Strategy

The model is trained using a "step learning" approach. The backbone is initially trained on density maps, followed by fine-tuning the entire system with a multi-part loss function. This loss combines density map accuracy, discrete head counts, and classification accuracy.

Experimental Results

The DAN framework was evaluated on two rigorous benchmarks: UCF_CC_50 (50 images with counts up to 4,500) and ShanghaiTech (nearly 1,200 images across diverse street and internet views).

Quantitative Performance

DAN demonstrated significant improvements over existing methods such as MCNN and CP-CNN:

  • UCF_CC_50: Achieved a Mean Absolute Error (MAE) of 234.5, a substantial reduction from the previous best of 270.3.
  • ShanghaiTech Part B: Achieved an MAE of 17.6, outperforming the complex CP-CNN (20.1).

Qualitative Analysis

The model effectively handles both sparse and highly cluttered scenes. By separating the problem into density domains, the specialized experts avoid the "confusion" typical of generalist models when faced with massive crowds versus sparse foregrounds.

Qualitative results across different datasets show the model's ability to accurately predict counts in diverse scenarios.

Discussion and Conclusion

A key insight of this work is that training specialized experts is more effective than training a single generalist for wide density ranges. Additionally, the use of discrete count maps alongside continuous density maps helps preserve local details that are often lost during smoothing. Despite its multi-stream nature, the model is highly efficient, running at 20 FPS on an Nvidia Titan X (Maxwell).

Future work will address current limitations, such as sensitivity to grid size for classification and the manual setting of density thresholds ($th$). Expanding the system to handle more than two density domains could further enhance robustness in complex environments.

Summary updated

BibTeX
@misc{wang2018crowd,
  author = {Li Wang and Weiyuan Shao and Yao Lu and Hao Ye and Jian Pu and Yingbin Zheng},
  title = {{Crowd Counting with Density Adaption Networks}},
  year = {2018},
  eprint = {1806.10040},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1806.10040},
}
Figure