Crowd counting aims to estimate the number, density, and distribution of crowds in an image. The current mainstream approach, based on CNN, has been highly successful. However, CNN is not without its flaws. Its limited receptive field hampers the modeling of global contextual information, and it struggles to effectively handle scale variation and background complexity. In this paper, we propose a Multi-scale Hybrid Attention Network called MHANet to solve crowd counting challenges more effectively. To address the issue of scale variation, we have developed a Multi-scale Aware Module (MAM) that incorporates multiple sets of dilated convolutions with varying dilation rates. The MAM significantly improves the network’s ability to extract information at multiple scales. To tackle the problem of background complexity, we have introduced a Hybrid Attention Module (HAM) that combines spatial attention and channel attention. The HAM effectively directs attention to the crowd region while suppressing background interference, resulting in more accurate counting. MHANet has been extensively experimented on four benchmark datasets and compared against state-of-the-art algorithms. It consistently achieves superior performance in terms of the MAE evaluation metric. MHANet outperforms the current state-of-the-art methods by margins of 1.9%, 5.4%, 0.4%, and 0.8% on the ShanghaiTech Part_A, ShanghaiTech Part_B, UCF-QNRF, and UCF_CC_50 datasets, respectively. Furthermore, a series of ablation experiments targeting MAM and HAM were conducted in this paper, and the experimental results fully demonstrate that MAM and HAM can effectively address the challenges of scale variation and background complexity, ultimately enhancing the accuracy and robustness of the network.
Read full abstract