Focal Inverse Distance Transform Maps for Crowd Localization

Dingkang Liang, Wei Xu, Yingying Zhu, Yu Zhou

Abstract

Crowd analysis has traditionally focused on counting via density map regression. However, density maps often fail in precise localization due to overlapping Gaussian blobs in congested scenes. This paper introduces Focal Inverse Distance Transform (FIDT) maps, a new ground-truth representation that provides sharp, distinct peaks for individual heads. By integrating FIDT with a Local-Maxima-Detection-Strategy (LMDS) and a specialized Independent SSIM (I-SSIM) loss, the proposed framework achieves state-of-the-art precision in pinpointing individuals in extremely dense crowds.

Introduction: The Localization Challenge

Most existing crowd analysis methods prioritize counting by regressing a "density map," where each person is represented by a blurry Gaussian blob. While effective for global counts, these maps are ill-suited for localization—identifying the exact coordinates of each person. In dense crowds, Gaussian blobs merge into a continuous "cloud," making it impossible to distinguish individual heads. Furthermore, standard object detectors like Faster R-CNN are often impractical due to the high labor cost of bounding box annotations for thousands of individuals.

Methodology: The FIDT Framework

To overcome the limitations of density maps, the authors propose a three-component approach:

  1. Focal Inverse Distance Transform (FIDT) Map: Instead of density, the map represents the distance to the nearest head. A standard Inverse Distance Transform (IDT) often decays too slowly in the background. The "Focal" version introduces parameters $\alpha$ and $\beta$ to ensure high response at the head center and a rapid drop-off in the background, effectively suppressing false positives.
  2. Local-Maxima-Detection-Strategy (LMDS): To extract coordinates from the predicted FIDT map, a $3 \times 3$ max-pooling layer is used to find local peaks. An adaptive threshold, based on the maximum value in the predicted map, allows the model to dynamically adjust to varying image conditions.
  3. Independent SSIM (I-SSIM) Loss: Global Structural Similarity (SSIM) loss can be skewed by the large amount of zero-value background in FIDT maps. I-SSIM addresses this by calculating loss only within $30 \times 30$ windows centered on each person, forcing the model to learn the precise local structure of individual heads.
The overall framework: Training involves regressor optimization with MSE and I-SSIM losses; Testing utilizes LMDS for point localization and size estimation for bounding boxes.

Key Insights and Results

The core innovation lies in the shift from density to distance. Distance-based maps do not "accumulate" or overlap in dense regions, ensuring that a local maximum almost always corresponds to a single head.

Performance on Benchmarks

The model was evaluated on seven major datasets, including NWPU-Crowd, UCF-QNRF, and ShanghaiTech. Key results include:

  • State-of-the-Art Localization: The method ranked first on the NWPU-Crowd localization benchmark, achieving an F-measure of 75.5%.
  • Robustness in Congestion: In scenes with over 5,000 people (NWPU "S4" level), the method significantly outperformed previous leaders like SCALNet, reducing Mean Absolute Error (MAE) from 1775.3 to 1645.4.
  • Negative Sample Handling: The method is exceptionally robust against "negative samples" (images without people that resemble crowds). On the NWPU "S0" level, it achieved an MAE of 21.6, a massive improvement over methods like NoisyCC (MAE 218.7).

Conclusion

The FIDT framework represents a significant step forward for crowd localization. By replacing blurry density maps with sharp distance-based representations and focusing on local structural similarity, the model achieves unprecedented accuracy in congested environments. While inference speed remains a target for future optimization (currently ~7.1 FPS on an RTX 3090), the method's robustness and precision set a new standard for point-level crowd analysis.

Summary updated

BibTeX
@article{liang2023focal,
  author = {Dingkang Liang and Wei Xu and Yingying Zhu and Yu Zhou},
  title = {{Focal Inverse Distance Transform Maps for Crowd Localization}},
  journal = {IEEE Trans. Multimedia},
  year = {2023},
  doi = {10.1109/tmm.2022.3203870},
}
Figure