Font Size: a A A

Mask Wearing Detection Algorithm In Public Scenarios Based On Improved YOLOv5

Posted on:2024-01-01Degree:MasterType:Thesis
Country:ChinaCandidate:Y ChenFull Text:PDF
GTID:2530307124485174Subject:Electronic information
Abstract/Summary:
Since the end of 2019,a sudden outbreak of new coronary pneumonia has spread around the world,which has had a huge impact on people’s lives.Studies have shown that wearing masks correctly can effectively prevent the spread of the new coronavirus.If staff are completely relied on to check whether people wear masks in public places,it will not only consume a lot of human resources,but also be inefficient.Therefore,using computer vision technology to detect whether people wear masks has positive social significance.The existing mask wearing detection algorithm is mainly aimed at pedestrians passing through the detection points in sequence,which belongs to a single background scene.This paper mainly focuses on public scenes such as occlusion and dense crowds,and designs a mask wearing detection algorithm in public scenes based on YOLOv5.The main work of this paper includes the following three aspects:(1)In view of the lack of data samples in complex public scenes in the current open source face mask wearing dataset,this paper creates a new face mask wearing dataset.The data set contains 9558 pictures in complex public scenes such as dim faces and small objects.Among them,8696 pictures were screened from the open source face mask wearing data according to contrast and area ratio,and 862 pictures were manually annotated.(2)In view of the low detection accuracy of the face mask wearing detection model in public scenes,this paper proposes an improved YOLOv5 face mask wearing detection algorithm.First,in order to enhance the feature extraction ability of the backbone network,a CCBS structure based on the attention mechanism is proposed to perform weighted fusion on the original YOLOv5 network.Secondly,in view of the problem that small targets are easily missed,it is proposed to add an additional small-size detection head on the basis of the three-scale detection heads of YOLOv5.Finally,it is proposed to use the Alpha-IOU loss function with better performance as the positioning loss in the YOLOv5 network to increase the weight of high IOU targets in the training process.Through ablation and comparison experiments on the self-made face mask wearing dataset,it is proved that the three improvement strategies proposed can effectively improve the detection accuracy of the model.(3)In view of the high complexity of the face mask wearing detection model in public scenes,this paper proposes three lightweight YOLOv5 face mask wearing detection algorithms.First,based on the Mobile Net V3 module and the Shuffle Net V2 module,the YOLOv5 backbone network is lightweight designed,and two lightweight YOLOv5 networks are proposed.Secondly,based on the Ghost module,the lightweight Ghost Bottleneck and Ghost C3 structures are proposed,and the Ghost Net-YOLOv5 network is designed.Finally,through comparative experiments,it was found that among the three lightweight YOLOv5 networks,Ghost Net-YOLOv5 achieved the best balance of complexity and accuracy in the self-made face mask wearing dataset.
Keywords/Search Tags:face mask wearing detection, object detection, lightweight network, YOLOv5
Related items