Research on Improved Object Detection of YOLOv4 Helmet Wearing
An improved YOLOv4 algorithm is proposed to address the issue of whether riders wear helmets while riding,which can more accurately identify and detect whether they are wearing helmets,thereby providing stable safety protection for riders.Firstly,select the lightweight network MobileNetv1 as the backbone feature network,and the standard convolutional layers of size 3×3 and step size 1 in YOLOv4 network are replaced with depthwise separable convolutions to reduce model computation and improve detection speed.Secondly,introducing ECA attention mechanism to focus on key features and suppress non-essential features to increase the expressive power of the feature network.Finally,an improved loss function Focal EIOU is introduced to address common sample imbalance issues.The experimental results show that the weight size of the model generated by the improved YOLOv4 algorithm is 48.43 M,which is 19.3%of the weight size of the YOLOv4 algorithm.The detection speed has been improved from 33.40 frames per second to 50.40 frames per second,and the mAP value is 95.56%.This is more conducive to lightweight deployment while meeting the accuracy requirements.