Abstract:It has become a mandatory requirement of the traffic management department that electric vehicles must wear safety helmets on the road. In order to automatically detect the wearing of helmets by electric vehicle riders, a helmet and license plate detection method based on the improved YOLOv5m model is proposed, which can detect the electric vehicle license plate while detecting that the riders do not wear helmets, so as to track down the violators. The model is trained with self built data set, and DIOU loss function is used to replace GIOU loss function, DIOU_NMS replaces weighted NMS to enhance the recognition ability of the model for dense cycling scenes. At the same time, ECA attention mechanism is added to the Backone part and the Neck part for predicting small and medium-sized targets, which improves the recognition rate of the model for small and medium-sized targets. Then, the Kmeans algorithm is used to re-cluster the anchor frame size. Finally, the Mosaic data enhancement method is improved.The experimental results show that the map of the improved YOLOv5m electric vehicle rider helmet and license plate detection model is 92.7%, which is 2.15% higher than the original YOLOv5m model, and 5.7% and 6.9% higher than the YOLOv4 tiny and Faster RCNN models respectively. The improved YOLOv5m model can effectively improve the recognition rate of helmet and license plate.