Abstract
In this paper, we aim at tackling the problem of crowd counting in extremely high-density scenes, which contain hundreds, or even thousands of people. We begin by a comprehensive analysis of the most widely used density map-based methods, and demonstrate how easily existing methods are affected by the inhomogeneous density distribution problem, e.g., causing them to be sensitive to outliers, or be hard to optimized. We then present an extremely simple solution to the inhomogeneous density distribution problem, which can be intuitively summarized as extending the density map from 2D to 3D, with the extra dimension implicitly indicating the density level. Such solution can be implemented by a single Density-Aware Network, which is not only easy to train, but also can achieve the state-of-art performance on various challenging datasets.
Introduction
Crowd counting in "wild" images is notoriously difficult because of inhomogeneous density distribution. In a single image, one might encounter a sparse group of people in the foreground and a massive, blurry sea of thousands in the background. Traditional methods typically regress a 2D density map where the sum of all pixels equals the total count. However, this approach faces three major roadblocks: sensitivity to outliers due to fixed-scale Gaussian kernels, optimization hurdles like "dying ReLUs" or exploding gradients when using standard $\ell_2$ loss, and a reliance on shallow architectures because deeper networks often fail to converge on this specific task.
This paper introduces the Density-Aware Network (DAN), which addresses these challenges by transforming traditional 2D density maps into 3D "structured" density maps. By predicting multiple density levels simultaneously and utilizing a robust, cost-sensitive Huber loss, the DAN achieves state-of-the-art performance with a single-stream architecture that is significantly easier to train than complex multi-column models.
Methodology
1. From 2D to 3D Structured Learning
Instead of a single 2D map, the network predicts a 3D volume where the third dimension represents $D$ discrete density levels (ranging from "very sparse" to "extremely crowded").
- Label Generation: For every person in the training data, the distance to their nearest neighbors is calculated. This distance determines which "level" in the 3D map that person belongs to.
- Soft Mapping: To facilitate learning, a "soft" heuristic is used—a person's influence is spread across adjacent levels using a Gaussian distribution rather than being confined to a single discrete level.
2. The Density-Aware Network (DAN)
The DAN architecture utilizes a pre-trained VGG-16 backbone as a shared feature extractor. This "trunk" then splits into $D$ parallel branches, each responsible for predicting one slice of the 3D density map. This design allows the network to share low-level visual features while specializing higher-level filters for different crowd scales.
3. Cost-Sensitive Huber Loss
To mitigate the outlier problem, the standard $\ell_2$ loss is replaced with a Huber loss, which is quadratic for small errors but linear for large ones. This is further enhanced with a weighting term ($\lambda_n$) that prioritizes "hard" examples where prediction error is high, ensuring the model remains robust during training.
Experiments and Results
The model was evaluated on four major benchmarks: ShanghaiTech (Part A & B), UCF_CC_50, and WorldExpo '10.
- ShanghaiTech Part B: The DAN achieved a Mean Absolute Error (MAE) of 13.2, significantly outperforming the previous state-of-the-art (CP-CNN at 20.1).
- ShanghaiTech Part A: It achieved an MAE of 81.8, placing it among the top-performing models while being much simpler to implement.
- Efficiency: Unlike architectures like Switch-CNN or CP-CNN, which require training multiple sub-networks or separate classifiers, DAN is trained end-to-end in a single pass.
Conclusion
The authors demonstrate that deeper networks like VGG-16 are highly effective for crowd counting when optimization issues—such as gradient explosion—are addressed via robust loss functions and structured learning. By implicitly performing density-level classification and count regression simultaneously, the DAN acts as a natural regularizer. While the model still faces challenges in ultra-dense areas where targets are smaller than 10 pixels, it sets a new standard for performance and simplicity in the field.
Summary updated