| Since the implementation of the “One Helmet and One Belt” safety protection campaign,the number of deaths of drivers and passengers of electric bicycle has decreased for the first time since 2006,and the campaign has achieved remarkable results.However,the supervision on helmet wearing is carried out manually and the limited police force and the human eyes cannot meet the supervision requirements for helmet wearing during rush hours.To ensure the personal safety of drivers and passengers in the riding process and enhance their awareness of their own safety guarding,it is of great significance to realize the automatic detection of whether drivers and passengers of electric bicycles wear safety helmets or not.Automatic detection can efficiently and accurately complete the examination on safety helmet wearing situation,which can effectively reduce the workload of traffic law enforcement department.Meanwhile,in the supervision process,drivers and passengers of electric bicycles can be urged to consciously wear safety helmets,so as to mitigate the degree of injury in emergencies and promote the formation of behavioral habits of consciously wearing safety helmets.Through improving YOLOv5 s target detection algorithm,this paper realizes the automatic detection of electric bicycle license plates and whether drivers and passengers wear safety helmets in road traffic environment.The main work and achievements are as follows:1.A two-step detection algorithm for helmet and license plate,named YOLOv5 sTwo steps,was put forward.The detection content is adjusted and the whole detection process is divided into two steps.At first,an overall detection on the electric bicycle with its driver and the passenger is carried out,and then a detection on helmet and license plate of the overall human-bicycle image is conducted.The experiment has proved that the overall detection capability of the improved model has further improved,and the ability of detection on small targets such as helmet has significantly improved.The average precision of helmet,no-helmet and ID have increased by 1.6%,1.9% and 3.8% respectively compared with those in the previous time,but the detection speed has decreased by 20 frames/s.2.A two-step detection algorithm for helmet and license plate in combination with splicing mechanism,named YOLOv5s-Splicing-Two steps,was put forward.The network structure of helmet and license plate detection under the overall human-bicycle image is improved,the loss function is modified to SIo U Loss,the ECA attention mechanism is integrated into the C3 module,and the activation function is changed to Mish,which contributes to further improving the model’s feature extraction capability and rate of convergence.In the two-step detection algorithm,the lateral self-adaption splicing mechanism is integrated to splice the detected overall human-bicycle image and then carry out the detection on helmet and license plate,which reduces the number of feature extraction and integration.Experiment has proved that mean average precision and frame per second of the improved model are respectively 1.3% and 11.3% higher than those of YOLOv5s-Two steps.The experiment results have shown that improving the detection method and network structure and meanwhile combining the lateral self-adaption splicing mechanism can effectively promote the detection accuracy of the model.The mean average precision of the improved model has reached 96.3%,3.2% higher than that before improvement.The ability of detection on small targets such as helmets has significantly improved,and the average accurate rates of helmet,no-helmet and ID have increased by 1.4%,3.0% and 8.0%,respectively.Although the detection speed of the model decreases compared with that before the improvement,it meets the requirements for a real-time detection. |