| Crowd counting plays a crucial role in crowd estimation,video surveillance,and crowd management.Especially after the outbreak of coronavirus disease(COVID19),real-time population detection and counting have received increasing attention.Therefore,the study of population counting is crucial.The rise of deep learning has promoted the development of computer vision.CNN based population counting research has achieved significant performance in obtaining population counts and density estimates.Although the counting task is important and useful,practical use is still limited due to the challenging nature of dense object counting.However,due to the existence of thorny issues such as crowd scale differences and mutual occlusion between people in real scenes,existing algorithms still face serious challenges in dealing with these issues.This article conducts research and proposes targeted solutions to solve the above problems from aspects such as algorithm structure,loss function,and attention mechanism.The main research work and innovation points of this article are as follows:1.A crowd counting algorithm based on multi-scale attention mechanism is proposed to address the issue of significant scale differences in crowd images in complex scenes.In practice,due to the diverse factors of application scenarios,there are significant differences in the scale of images captured by monitoring,which requires a single model to effectively handle multi-scale input images.Due to the current inability of convolutional neural networks and global attention mechanisms to effectively address scale differences,this paper proposes a new crowd cardinality algorithm based on multi-scale attention mechanisms.This algorithm focuses on the range that each feature learning should pay attention to,capturing multi-scale contextual information in the local attention module,providing a method for extracting scale changes,effectively improving the accuracy of crowd counting,and generating high-quality density estimation maps.2.A kernel based adaptive density map generation algorithm is proposed to address the issues of crowd occlusion and background occlusion in crowd images in complex scenes.In dense scenes,occlusion between people and complex backgrounds can lead to a decrease in crowd counting performance.The domain gap between scenes in the dataset and real-world scenes also limits the use of counting algorithms.To solve this problem,this article combines the predicted population density map with the real population density map and proposes an adaptive density map generation framework.The input point map is convolved with different Gaussian kernels to generate a set of fuzzy density maps.Use a self attention module to adaptively mask the blurred density map,and then use a feature fusion module to generate the final density map.3.A local perception based crowd counting algorithm is proposed to address the issue of uneven distribution of crowds in complex scenes.Firstly,this method groups the training data into different warehouses through position sensitive hashing,constructing a more balanced data batch.Reduce training bias to alleviate the problem of uneven population distribution.In addition,an amplification/reduction strategy was adopted on each individual training patch for data augmentation.Further alleviated the problem of uneven population distribution.Finally,experimental data on multiple classic public population counting datasets showed that this method can effectively alleviate the problem of uneven population distribution.4.In order to verify the effectiveness of the above two algorithms,this article evaluated them on mainstream population counting datasets(Shanghai Tech A,Shanghai Tech B,UCF-QNRF,JHU-CROWD++,NWPU Crowd).The experimental results show that the proposed algorithm has achieved good performance improvement,reducing the interference of occlusion,background,and scale differences on crowd counting accuracy.Compared with other state-of-the-art methods,counting accuracy and robustness have been greatly improved. |