# Learning Spatial Awareness to Improve Crowd Counting

arXiv: https://arxiv.org/abs/1909.07057 · HTML: https://mlsanity.com/paper/1909.07057/

## Key facts

- Cited by 36 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 16 Sep 2019.

## Built on by (most cited first, 30 of 36)

- [Rethinking Counting and Localization in Crowds:A Purely Point-Based Framework](https://mlsanity.com/paper/2107.12746/) (2021)
- [Rethinking Spatial Invariance of Convolutional Networks for Object Counting](https://mlsanity.com/paper/2206.05253/) (2022)
- [STEERER: Resolving Scale Variations for Counting and Localization via Selective Inheritance Learning](https://mlsanity.com/paper/2308.10468/) (2023)
- [Focal Inverse Distance Transform Maps for Crowd Localization](https://mlsanity.com/paper/2102.07925/) (2021)
- [Training-free Object Counting with Prompts](https://mlsanity.com/paper/2307.00038/) (2023)
- [Leveraging Self-Supervision for Cross-Domain Crowd Counting](https://mlsanity.com/paper/2103.16291/) (2021)
- [Uniformity in Heterogeneity:Diving Deep into Count Interval Partition for Crowd Counting](https://mlsanity.com/paper/2107.12619/) (2021)
- [Redesigning Multi-Scale Neural Network for Crowd Counting](https://mlsanity.com/paper/2208.02894/) (2022)
- [OmniCount: Multi-label Object Counting with Semantic-Geometric Priors](https://mlsanity.com/paper/2403.05435/) (2024)
- [Crowd Counting via Perspective-Guided Fractional-Dilation Convolution](https://mlsanity.com/paper/2107.03665/) (2021)
- [ProContEXT: Exploring Progressive Context Transformer for Tracking](https://mlsanity.com/paper/2210.15511/) (2022)
- [Boosting Detection in Crowd Analysis via Underutilized Output Features](https://mlsanity.com/paper/2308.16187/) (2023)
- [DAMO-StreamNet: Optimizing Streaming Perception in Autonomous Driving](https://mlsanity.com/paper/2303.17144/) (2023)
- [LongShortNet: Exploring Temporal and Semantic Features Fusion in Streaming Perception](https://mlsanity.com/paper/2210.15518/) (2022)
- [PoSynDA: Multi-Hypothesis Pose Synthesis Domain Adaptation for Robust 3D Human Pose Estimation](https://mlsanity.com/paper/2308.09678/) (2023)
- [Self-supervised Domain Adaptation in Crowd Counting](https://mlsanity.com/paper/2206.03431/) (2022)
- [Spatiotemporal Dilated Convolution with Uncertain Matching for Video-based Crowd Estimation](https://mlsanity.com/paper/2101.12439/) (2021)
- [Deep learning with self-supervision and uncertainty regularization to count fish in underwater images](https://mlsanity.com/paper/2104.14964/) (2021)
- [Focus for Free in Density-Based Counting](https://mlsanity.com/paper/2306.05129/) (2023)
- [Counting Stacked Objects](https://mlsanity.com/paper/2411.19149/) (2024)
- [Cross-head Supervision for Crowd Counting with Noisy Annotations](https://mlsanity.com/paper/2303.09245/) (2023)
- [Towards Adversarial Patch Analysis and Certified Defense against Crowd Counting](https://mlsanity.com/paper/2104.10868/) (2021)
- [Improving Anomaly Segmentation with Multi-Granularity Cross-Domain Alignment](https://mlsanity.com/paper/2308.08696/) (2023)
- [Multi-View People Detection in Large Scenes via Supervised View-Wise Contribution Weighting](https://mlsanity.com/paper/2405.19943/) (2024)
- [Robust Zero-Shot Crowd Counting and Localization With Adaptive Resolution SAM](https://mlsanity.com/paper/2402.17514/) (2024)
- [Rethinking Cell Counting Methods: Decoupling Counting and Localization](https://mlsanity.com/paper/2503.13989/) (2025)
- [LDC-Net: A Unified Framework for Localization, Detection and Counting in Dense Crowds](https://mlsanity.com/paper/2110.04727/) (2021)
- [KeyPosS: Plug-and-Play Facial Landmark Detection through GPS-Inspired True-Range Multilateration](https://mlsanity.com/paper/2305.16437/) (2023)
- [M"obius Transform for Mitigating Perspective Distortions in Representation Learning](https://mlsanity.com/paper/2405.02296/) (2024)
- [POPoS: Improving Efficient and Robust Facial Landmark Detection with Parallel Optimal Position Search](https://mlsanity.com/paper/2410.09583/) (2024)

## Abstract (arXiv)

The aim of crowd counting is to estimate the number of people in images by leveraging the annotation of center positions for pedestrians' heads. Promising progresses have been made with the prevalence of deep Convolutional Neural Networks. Existing methods widely employ the Euclidean distance (i.e., L2 loss) to optimize the model, which, however, has two main drawbacks: (1) the loss has difficulty in learning the spatial awareness (i.e., the position of head) since it struggles to retain the high-frequency variation in the density map, and (2) the loss is highly sensitive to various noises in crowd counting, such as the zero-mean noise, head size changes, and occlusions. Although the Maximum Excess over SubArrays (MESA) loss has been previously proposed to address the above issues by finding the rectangular subregion whose predicted density map has the maximum difference from the ground truth, it cannot be solved by gradient descent, thus can hardly be integrated into the deep learning framework. In this paper, we present a novel architecture called SPatial Awareness Network (SPANet) to incorporate spatial context for crowd counting. The Maximum Excess over Pixels (MEP) loss is proposed to achieve this by finding the pixel-level subregion with high discrepancy to the ground truth. To this end, we devise a weakly supervised learning scheme to generate such region with a multi-branch architecture. The proposed framework can be integrated into existing deep crowd counting methods and is end-to-end trainable. Extensive experiments on four challenging benchmarks show that our method can significantly improve the performance of baselines. More remarkably, our approach outperforms the state-of-the-art methods on all benchmark datasets.
