[Paper Review] Crowd Counting Using Scale-Aware Attention Networks
This paper proposes a scale-aware attention network for crowd counting that uses soft attention mechanisms to dynamically weigh features at multiple scales, improving density map estimation. By integrating global and local scale attention modules with auxiliary losses, the model achieves state-of-the-art performance on benchmark datasets, reducing MAE by up to 16.86 on ShanghaiTech PartB.
In this paper, we consider the problem of crowd counting in images. Given an image of a crowded scene, our goal is to estimate the density map of this image, where each pixel value in the density map corresponds to the crowd density at the corresponding location in the image. Given the estimated density map, the final crowd count can be obtained by summing over all values in the density map. One challenge of crowd counting is the scale variation in images. In this work, we propose a novel scale-aware attention network to address this challenge. Using the attention mechanism popular in recent deep learning architectures, our model can automatically focus on certain global and local scales appropriate for the image. By combining these global and local scale attention, our model outperforms other state-of-the-art methods for crowd counting on several benchmark datasets.
Motivation & Objective
- Address the challenge of scale variation in crowd counting, where objects (e.g., people) appear in vastly different sizes due to perspective and density.
- Overcome limitations of hard-switching methods like Switch-CNN, which rely on discrete scale selection and risk selecting incorrect scales.
- Introduce a soft attention mechanism that adaptively reweights features across multiple scales, enabling more robust and accurate density map prediction.
- Demonstrate the effectiveness of both global and local scale attention modules in capturing diverse crowd densities across scenes.
- Improve performance through auxiliary supervision on attention heads, enhancing feature learning and generalization.
Proposed method
- Propose a multi-scale feature extractor that generates features at different receptive field sizes to capture diverse crowd scales.
- Introduce a global scale attention (GSA) module that computes attention weights over scale dimensions to focus on the most relevant global scale.
- Design a local scale attention (LSA) module that computes scale-aware attention per spatial location, enabling localized scale adaptation.
- Combine multi-scale features with GSA and LSA outputs using learnable fusion layers to produce the final density map.
- Train the model with a main loss $L_{DM}$ on the density map and auxiliary losses $L_{GSA}$ and $L_{LSA}$ to supervise the attention heads.
- Use a soft attention mechanism that assigns continuous weights to scales, allowing the model to attend to multiple scales simultaneously rather than selecting one.
Experimental results
Research questions
- RQ1Can attention mechanisms be effectively adapted to focus on relevant scales in crowd counting, rather than spatial locations?
- RQ2Does soft scale selection via attention outperform hard switching mechanisms used in prior methods like Switch-CNN?
- RQ3How do global and local scale attention modules individually and jointly contribute to improved crowd density estimation?
- RQ4Can auxiliary supervision on attention heads improve the model’s ability to learn meaningful scale representations?
- RQ5Does the proposed method generalize across diverse crowd counting benchmarks with varying scale distributions?
Key findings
- The proposed model achieves a mean absolute error (MAE) of 16.86 on the ShanghaiTech PartB dataset, outperforming all prior state-of-the-art methods.
- The ablation study confirms that both global (GSA) and local (LSA) attention modules contribute significantly, with the best performance achieved when both are used.
- Using auxiliary losses $L_{GSA}$ and $L_{LSA}$ during training further improves performance, reducing MAE from 19.15 to 16.86 on ShanghaiTech PartB.
- On the Mall dataset, the model achieves an MAE of 1.28 and MSE of 1.68, surpassing existing methods including DecideNet and Count-Forest.
- Qualitative results in Figure 6 show that the model generates more accurate and detailed density maps, especially in high-density and occluded regions.
- The model outperforms existing methods across all three benchmark datasets: ShanghaiTech PartB, Mall, and UCF_CC_50, demonstrating consistent generalization.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.