Font Size: a A A

Research And Application Of Helmet Wearing Detection Algorithm Based On Improved YOLOv5s

Posted on:2024-08-23Degree:MasterType:Thesis
Country:ChinaCandidate:J C HuangFull Text:PDF
GTID:2531307100988639Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
In the field of construction industry in China,accidents involving casualties of construction personnel occur from time to time,and most safety accidents could have been avoided.However,due to the weak safety awareness of construction personnel and their failure to wear safety helmets,accidents have caused serious consequences,causing huge losses to individuals,families,and companies.The traditional work of supervising the wearing of safety helmets is done manually,which requires a large amount of human resources and is inefficient.With the development and widespread application of computer vision technology,many researchers have attempted to replace manual supervision of helmet wearing by combining camera video monitoring with object detection technology.However,most of the research is limited to theoretical research and has not been implemented in combination with practical situations.There are relatively few systems for helmet wearing detection.In addition,there is a slow detection speed in helmet wearing detection algorithms,The problem of insufficient detection accuracy.Therefore,considering the real-time and accuracy of the algorithm,this article improves the YOLOv5 s benchmark model and designs a helmet wearing detection system that meets the requirements for detection speed and accuracy.The main research content of this article is as follows:(1)In response to the issue of insufficient detection accuracy,this article introduces BoT_CSP2 module,EIo U loss function and En_CBAM attention mechanism to improve YOLOv5 s.BoT_CSP2 module solves the problem of insufficient resolution of deep level feature maps in the backbone network,and utilizes the BoT module to obtain global and local feature information,making the feature information more abundant.The EIo U loss function solves the problem that when the aspect ratio of the prediction frame is consistent with that of the target frame in the original loss function of YOLOv5 s,the loss factor fails and the loss function converges and stops.For EIo U losses,the aspect ratio is split and used as a loss term to construct a loss function,which is more comprehensive.En_CBAM attention mechanism solves the problem of affecting detection accuracy in helmet wearing detection due to the presence of interference factors such as complex environments,multiple obstacles,and image noise.Introducing attention mechanism into the neck network of YOLOv5 s,information filtering is performed on input features before feature fusion,allowing the model to focus on key features and improve its anti-interference ability,thereby improving the accuracy of the model.The experimental results show that compared to the original YOLOv5 s algorithm,the improved YOLOv5 s algorithm improves m AP by 1.88% on the helmet wearing detection dataset.(2)To address the issue of unsatisfactory model detection speed,a lightweight feature extraction module is constructed by introducing Ghost convolution and using channel pruning to reduce the computational complexity of the model and improve its detection speed.Compared to traditional convolution,Ghost convolution first obtains some features through a small amount of convolution calculation,and then obtains another part of the feature map through a series of linear transformations.Finally,the two parts are concatenated to obtain a complete feature map.Ghost convolution uses linear transformations to reduce the computational complexity of traditional convolution.Channel pruning prunes the sparsely trained network through sparse factors,eliminating redundant data in the network,reducing network complexity,and improving the model’s generalization ability.The experimental results show that on the helmet wearing detection dataset,compared with the improved algorithm without lightweight,the optimized algorithm model size reduces by 16.7M and FPS improves by 29.7.On the basis of the above achievements,a helmet wearing detection system with image detection function,video detection function,real-time camera detection function,and history recording function has been designed and implemented.The system has high detection accuracy,detection speed,and stability.
Keywords/Search Tags:Safety helmet wearing detection, Deep learning, Lightweight, Attention mechanism, Loss function
PDF Full Text Request
Related items