Multiscale Fusion Crowd Counting Algorithm Based on Attention Mechanism
A multiscale fusion crowd counting algorithm based on attention mechanism is proposed to addresses the issues of large head scale changes and high background noise in crowd counting images,fully aggregating multiscale information to effectively distinguish background noise.Atrous spatial pyramid pooling based on residual connection method is constructed to capture multiscale head target features while incorporating spatial details from shallow feature maps through residual structures and multiple dilated convolutions with different expansion rates,thereby improving the quality of feature maps.A cross-layer multiscale feature fusion module is built to integrate edge details and contextual semantic information of different sizes of shallow and deep branches.In addition,a feature fusion module based on multi-branch is designed to integrate multiscale information of different receptive field sizes,thereby alleviating the problem of large-scale head scale changes.A channel and spatial attention mechanism module is further constructed based on the matrix similarity operation to extract pixel level feature weights,enhance the network's discriminative ability for background and head targets,and adaptively correct position information.The experimental results show that compared to the optimal values of the 11 comparison algorithms,the proposed algorithm reduces the Mean Absolute Error(MAE)and Root Mean Square Error(RMSE)indicators by 1.4%and 4.2%on the SHA dataset,and reduced by 4.9%and 1.8%on the UCF_CC_50 dataset,the proposed algorithm can accurately predict the distribution status,estimate the number of people,and generate high-quality population density maps.