Learn to Scale: Generating Multipolar Normalized Density Maps for Crowd Counting

Chenfeng Xu, Kai Qiu, Jianlong Fu, Song Bai, Yongchao Xu, Xiang Bai

Introduction

Crowd counting is a fundamental computer vision task typically approached through density map estimation. A neural network predicts a map where each pixel represents local density, and the total count is derived by integrating this map. However, as illustrated in Figure 1, the primary obstacle is extreme density variance. Within a single image, sparse foreground subjects may coexist with a background "sea of people" where individuals are only a few pixels wide. Standard CNNs, constrained by fixed receptive fields, struggle to accurately model features across these vastly different scales.

Crowd density variations and MRE performance overview.

Methodology: The "Zoom and Count" Framework

To overcome scale limitations, this paper introduces the Learning to Scale (L2S) framework. This module mimics rational human behavior: when faced with a dense, blurry crowd, a human observer naturally "zooms in" to resolve individuals. The proposed pipeline implements this intuition through a two-stage process:

  1. Scale Preserving Network (SPN): A VGG-16 based backbone generates an initial, coarse density map using a feature pyramid.
  2. Learning to Scale Module (L2SM): The image is divided into $K \times K$ patches. For regions identified as dense by the SPN, the L2SM calculates an optimal local scaling factor ($r$).
  3. Multipolar Center Loss (MPCL): This novel loss function forces the density of scaled patches to converge toward specific "centers" or clusters. This "condenses" the feature distribution, making it easier for the model to learn dense patterns.
  4. Re-prediction: The dense patches are scaled by $r$ and re-processed. Crucially, the ground truth for these patches is re-generated to maintain standard Gaussian "blob" sizes, effectively eliminating the "pattern shift" that usually plagues resized images.
The L2S architecture overview, showing the SPN and L2SM modules.

Experimental Results

The L2S method was evaluated on four major benchmarks: ShanghaiTech (Part A & B), UCF_CC_50, and UCF-QNRF. The model achieved significant improvements in Mean Absolute Error (MAE) over previous state-of-the-art methods:

  • ShanghaiTech Part A: 64.2 MAE (4.2% improvement)
  • ShanghaiTech Part B: 7.2 MAE (14.3% improvement)
  • UCF_CC_50: 188.4 MAE (27.1% improvement)
  • UCF-QNRF: 104.7 MAE (20.1% improvement)

Beyond raw accuracy, the model demonstrated exceptional cross-dataset transferability. When trained on ShanghaiTech and tested on the significantly denser UCF_CC_50, it outperformed models specifically tuned for that dataset, proving that the "learning to scale" logic generalizes well to unseen environments.

Discussion and Limitations

While L2S achieves superior accuracy, it introduces a slight computational overhead due to its two-pass nature (initial prediction followed by re-prediction of dense patches), adding approximately 0.068s per image. Additionally, performance can be sensitive to hyperparameters such as the number of density groups and centers. However, the core logic of automated scaling offers a promising direction for other tasks plagued by scale variance, such as detecting small objects in high-resolution aerial imagery.

Summary updated

BibTeX
@inproceedings{xu2019learn,
  author = {Chenfeng Xu and Kai Qiu and Jianlong Fu and Song Bai and Yongchao Xu and Xiang Bai},
  title = {{Learn to Scale: Generating Multipolar Normalized Density Maps for Crowd Counting}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2019},
  doi = {10.1109/iccv.2019.00847},
}
Figure