| In this thesis,we investigate the methods for mask-wearing detection and crowd counting,which aim at realizing the automatic detection of pedestrians in public places.The research work can achieve the automation and modernization of pedestrian detection technology in public places,which has specific application value and practical significance for the intelligent development of public safety in China.⑴ Research on lightweight pedestrian target detection method based on YOLOv4.In the task of mask-wearing detection in public places,we propose a lightweight mask-wearing detection method of LM-YOLOv4 to address the problems of huge model complexity and poor real-time performance.Firstly,we construct the feature extraction network of YOLOv4-Mobile Netv2 based on the Inverted Residual Module(IRM)to reduce the complexity of the YOLOv4 feature extraction network.Secondly,we improve the convolutional block of YOLOv4 feature fusion network based on the Depthwise Separable Convolution(DSC)to further reduce the parameters and calculation of the model.Finally,we optimize the confidence loss function of YOLOv4 based on Focal Loss to improve the detection accuracy of the model without increasing the inference cost.Through experimental verification,the proposed algorithm of LM-YOLOv4 gets 93.84% m AP on the self-built dataset for mask-wearing detection.Compared to the YOLOv4 algorithm,the m AP is only reduced by 0.91%,while the detection speed reaches 51.19 FPS.The algorithm has the advantages of high accuracy,solid real-time performance,and lightweight,which can meet the high real-time requirements of mask-wearing detection in public places.⑵ Research on crowd counting detection method based on multi-scale information aggregation.we propose an efficient crowd counting algorithm of MCANet based on multiscale information aggregation to address the problem of small target size,uneven scale distribution,and complex background interference in public places.Firstly,we construct a feature extraction network with appropriate depth based on the first ten convolutional layers of VGG16 to extract primary crowd features.Secondly,we design a multi-scale information aggregation method of MSCModule inspired by the dilated convolution,which improves global semantic information of the output feature layer without reducing resolution.Finally,we apply a lightweight attention perception module based on channel and spatial to suppress complex background interference information and improve the counting accuracy of the detection result.Through experimental verification,the MAE and RMSE of the proposed algorithm MCANet on datasets of Shanghai Tech Part_A,Part_B,and UCF_CC_50 get 66.2and 103.8,8.6and11.1,and 236.2 and 310.8,respectively.The result shows that the proposed algorithm has good accuracy and robustness,which meet the high accuracy requirements for crowd counting in public places. |