| With the increasing problem of urban traffic congestion,young people are more choosing motorcycles as a means of travel.As a necessary protective tool for motorcycle riders,helmets are self-evident to protect the rider’s life safety.It is of great practical significance to study the use of computer vision technology to detect whether motorcycle riders wear helmets.The rapid iteration of deep learning technology has promoted the development of related research on motorcycle helmet wearing detection,but the existing detection algorithms still have many shortcomings.First of all,most of the existing methods are for helmet detection for a single rider,and there are few research schemes for multiple riders;Secondly,in complex scenes such as traffic congestion and dense motorcycles,it is easy to cause problems such as loss of small targets,poor detection frame convergence,and detection of multiple category frames for the same target;Finally,there are fewer relevant data sets and the problem of unbalanced categories.Aiming at the above problems,this thesis studies the motorcycle helmet wearing detection method based on convolutional neural network.Choose YOLOv4 as the basic network and improve its feature extraction network,embed a attention module with spatial location information and channel information to improve the feature extraction ability of the network.A comparative experiment on the COCO data set for a variety of attention modules shows that the improved network obtained a 41.1% mAP,which is an increase of about 0.9%compared to YOLOv4.Improve the neck connection layer of the network,replace the SPP module with the RFB-s module with human vision mechanism,and increase the receptive field of feature extraction.In view of the detection of multiple different categories of the same object,the improved NMS algorithm is used to suppress the repeated detection between the same category and different categories.Trained and tested on the self-built motorcycle data set,the improved network got 96.77% m AP,which is about 1.52% higher than YOLOv4.A two-stage helmet detection method based on YOLOv4 and YOLOv4-tiny cascade network is proposed.Re-encode the detection targets to increase the sensitivity of the network to the features of small targets;The cascade network is used to filter the detection results twice to achieve precise target positioning and classification.For the HELMET 2020 data set,the sample categories are remapped from 36 to 3,the detection of overload behavior is added,and the unbalanced category is amplified by the grab Cut algorithm.In summary,on the modified HELMET 2020 data set,the improved method increases the m AP of helmet wearing detection to 96.87%.On the basis of ensuring real-time performance,it has the characteristics of high detection accuracy and strong ability to adapt to the scene.Compared with YOLOv4 network Have better generalization ability and certain practical application ability. |