Electric vehicle helmet wearing detection method and system based on multi-target association and motion state analysis

The electric vehicle helmet wearing detection method, which combines multi-stage logical judgment and deep learning, solves the problems of accuracy and robustness in detecting electric vehicle driver helmet wearing in complex scenarios, reduces false alarm rate, optimizes resource utilization, and improves the system's adaptability in complex environments.

CN121582872APending Publication Date: 2026-02-27CHINA UNICOM (GUANGDONG) IND INTERNET CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511742669.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-25
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

Existing methods for detecting helmet wearing by electric vehicle drivers have low accuracy and high false alarm rates in complex scenarios, lack dynamic judgment capabilities, and lack effective processing mechanisms for detection in static states.

Method used

A multi-stage logical judgment method is adopted, including rules for judging the motion state of electric vehicles, the association between the human body and the electric vehicle, and the association between the helmet and the human body. Target detection is performed through a deep learning model, and electric vehicle tracking is performed by combining Kalman filtering and SORT algorithm. The cross-union ratio and intersection area are calculated to determine the helmet wearing status.

Benefits of technology

It significantly improves the accuracy and robustness of helmet wearing detection, reduces the false alarm rate, enhances the system's adaptability in complex environments, optimizes resource utilization, and provides clear judgment logic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121582872A_ABST
    Figure CN121582872A_ABST
Patent Text Reader

Abstract

The invention discloses an electric vehicle helmet wearing detection method and system based on multi-target association and motion state analysis. The method comprises the following steps: S1, carrying out target detection on a video stream, and identifying an electric vehicle, a helmet, a person wearing the helmet and a person not wearing the helmet; s2, judging whether the electric vehicle is in a motion state or not based on electric vehicle tracking of a plurality of continuous frames; s3, if the electric vehicle is in the moving state, detecting a helmet-worn human body and a helmet-unworn human body, and judging the intersection-union ratio of a human body target area and an electric vehicle target area; s4, if the intersection-union ratio is larger than a preset threshold value, helmet target detection is carried out, and the intersection-union ratio of the helmet target area and the human body target area is judged; and S5, judging whether the electric vehicle driver wears the helmet or not according to a detection result, and giving an alarm.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of artificial intelligence, computer vision and traffic safety, and particularly relates to a helmet wearing detection method for electric vehicle drivers based on video analysis. BACKGROUND

[0002] With the popularity of electric vehicles, traffic accidents and casualties caused by electric vehicle drivers not wearing safety helmets are increasing. In order to improve traffic safety, many regions have made it mandatory for electric vehicle drivers to wear safety helmets. However, relying on manual law enforcement for supervision has problems such as low efficiency and narrow coverage. Therefore, it is of great practical significance to develop an automatic and intelligent helmet wearing detection system for electric vehicle drivers.

[0003] Currently, existing helmet wearing detection methods mainly focus on image recognition-based technologies. These methods usually use deep learning models to analyze images or video frames, identify electric vehicles, drivers, and helmets, and further determine whether the driver is wearing a helmet. However, these methods still face some challenges in practical applications:

[0004] 1. Poor adaptability to complex scenes: In complex environments such as changes in lighting, bad weather (such as rain, fog), and obstructions (such as trees, other vehicles), the accuracy of target detection and recognition will significantly decrease.

[0005] 2. High false positive rate: Due to factors such as perspective, posture, and clothing color, non-helmet objects may be misidentified as helmets, or helmet-wearing drivers may be misjudged as not wearing helmets, resulting in a high false positive rate.

[0006] 3. Lack of dynamic judgment ability: Most existing systems only make judgments based on single-frame images and cannot effectively use time-series information in video streams. They lack effective processing mechanisms for misjudgments or omissions in the stationary state of electric vehicles.

[0007] 4. Lack of detailed judgment on detection results: When both helmet-wearing and non-helmet-wearing targets are detected, there is a lack of clear judgment rules to determine the final wearing state.

[0008] Therefore, there is still a need in the art for a new method that can effectively solve the above problems and improve the accuracy and robustness of electric vehicle driver helmet wearing detection. SUMMARY

[0009] The purpose of the present application is to provide a helmet wearing detection method for electric vehicle drivers, aiming to improve the accuracy and robustness of electric vehicle driver helmet wearing detection in complex traffic scenes, reduce false positives and omissions, and effectively handle detection problems in the stationary state of electric vehicles.

[0010] Technical solution: To achieve the above-mentioned purpose of the application, the technical solution adopted by the application is a helmet wearing detection method for electric vehicle drivers, comprising the following steps:

[0011] S1. Target detection: Real-time target detection is performed on the input video stream, and the following four targets are identified and framed: electric vehicle, helmet, person wearing helmet and person not wearing helmet.

[0012] S2. Electric vehicle tracking and state judgment: Based on electric vehicle tracking of consecutive frames, it is judged whether the electric vehicle is in motion state. If the electric vehicle is in static state, the subsequent helmet wearing judgment is not performed to avoid unnecessary false positives.

[0013] S3. Human body and electric vehicle association judgment: If the electric vehicle is in motion state, the detected helmet-wearing human body and non-helmet-wearing human body are further analyzed. The intersection over union (IoU) of each human body target area and electric vehicle target area is calculated. If the intersection over union is greater than a preset threshold (for example, 0.5, which can be adjusted according to actual conditions), it is considered that the human body is associated with the electric vehicle, and the next step is entered.

[0014] S4. Helmet and human body association judgment: For the human body target associated with the electric vehicle, helmet target detection is performed. The intersection of the helmet target area and the human body target area is calculated. If the intersection of the helmet target area and the human body target area is greater than a preset threshold (for example, 0.8, which can be adjusted according to actual conditions, and in theory the helmet target should be located within the human body target area), it is determined that the human body is wearing a helmet.

[0015] S5. Wearing state judgment and alarm: S5.1. If both helmet-wearing human body and non-helmet-wearing human body are detected, and the detection scores of both are greater than a set threshold, it is determined that the electric vehicle driver is wearing a helmet. S5.2. If only non-helmet-wearing human body is detected, it is determined that the electric vehicle driver is not wearing a helmet, and the system will trigger an alarm.

[0016] The present application introduces the rules of electric vehicle motion state judgment, human body and electric vehicle association, and helmet and human body association, significantly improving the accuracy and robustness of electric vehicle driver helmet wearing detection. Specific beneficial effects include:

[0017] 1. Improve detection accuracy: Through multi-stage logical judgment, false positives caused by single target detection can be effectively avoided, especially in complex scenes, the wearing state can be more accurately identified.

[0018] 2. Reduce false positives: No judgment is made when the electric vehicle is in static state, avoiding false positives for parked vehicles. At the same time, strict association judgment of human body and electric vehicle, and helmet and human body reduces the situation of misjudging unrelated objects or non-drivers as not wearing helmets.

[0019] 3. Enhanced robustness: By combining continuous frame tracking with geometric relationship judgments such as intersection-union ratio and intersection, the system becomes more adaptable to environmental changes such as lighting, angle, and occlusion.

[0020] 4. Optimize resource utilization: Skip subsequent judgments when the electric vehicle is stationary, reducing unnecessary consumption of computing resources.

[0021] 5. Clear judgment logic: Clear judgment rules are provided for situations where both helmets are being worn and helmets are not being worn at the same time, ensuring the reasonableness of the final judgment result. Attached Figure Description

[0022] Figure 1 This is a schematic diagram of the overall process of the electric vehicle driver helmet wearing detection method of the present invention.

[0023] Figure 2 This is a schematic diagram illustrating the correlation determination between the human body and the electric vehicle in this invention;

[0024] Figure 3 This is a schematic diagram illustrating the association determination between the helmet and the human body in this invention. Detailed Implementation

[0025] The present invention will be further illustrated below with reference to the accompanying drawings and specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. After reading this invention, any modifications of the invention in various equivalent forms by those skilled in the art will fall within the scope defined by the appended claims.

[0026] This invention discloses a method for detecting helmet wearing by electric vehicle drivers, comprising the following steps:

[0027] S1. Target Detection:

[0028] Real-time object detection is performed on the input video stream. This step utilizes deep learning models, such as YOLO (YouOnly Look Once) and Faster R-CNN, to analyze each frame of the image, identify, and box-frame four preset object categories: electric vehicles, helmets, people wearing helmets, and people not wearing helmets. The object detection model needs to be trained on a large amount of labeled data to ensure accurate object identification under various complex scenes (such as different lighting, weather, angles, occlusion, etc.). For each detected object, its category, bounding box coordinates, and confidence score are returned.

[0029] S2. Electric vehicle tracking and status assessment:

[0030] S21. Electric Vehicle Tracking: To determine the motion state of an electric vehicle, this invention employs electric vehicle tracking technology based on several consecutive frames. Once an electric vehicle target is detected in the video stream, the system continuously tracks it. The tracking algorithm can utilize mature algorithms such as Kalman filtering and SORT (Simple Online and Realtime Tracking) to ensure that the target's identity ID is maintained even when it temporarily disappears or is occluded, and to smooth its motion trajectory.

[0031] S22. Motion State Determination: By analyzing the tracking results of the electric vehicle across consecutive frames, the positional change of the electric vehicle between consecutive frames is calculated. If the positional change of the electric vehicle within a certain number of consecutive frames (e.g., 5-10 frames, this number is adjustable) is less than a preset threshold (e.g., pixel displacement less than 5 pixels), the electric vehicle is determined to be stationary. Conversely, if the positional change is greater than the threshold, the electric vehicle is determined to be in motion.

[0032] S23. Stationary State Handling: If an electric vehicle is determined to be stationary, subsequent helmet-wearing determination will not be performed. This mechanism effectively avoids misjudging parked or briefly stopped electric vehicles, reducing unnecessary computational resource consumption and alarms.

[0033] S3. Determining the correlation between human body and electric vehicle:

[0034] S31. Filter electric vehicles in motion: This step is only performed when the electric vehicle is in motion.

[0035] S32. Human Target Detection: Near a moving electric vehicle, the system will detect whether there are human targets wearing helmets or not.

[0036] S33. Calculate the Intersection over Union (IoU): For each detected human target (whether wearing a helmet or not), calculate the Intersection over Union (IoU) between its bounding box and the bounding box of the electric vehicle. The formula for calculating IoU is:

[0037]

[0038] Among them, B person B represents the bounding box of the human target. e-bike The bounding box represents the target electric vehicle. The intersection-union ratio (IUGR) reflects the degree of overlap between the two bounding boxes.

[0039] S34. Association Determination: Set an adjustable IoU threshold, for example, 0.5. If the IoU between the human target and the electric vehicle target is greater than this threshold, it is considered that the human target and the electric vehicle are associated, that is, the human target may be the driver or passenger of the electric vehicle. Only human targets associated with the electric vehicle will proceed to the next step of helmet wearing determination.

[0040] S4. Helmet-human body association determination:

[0041] S41. Filter related human targets: Perform this step to judge the human targets that were determined to be related to electric vehicles in step S3.

[0042] S42. Helmet Target Detection: Within these areas associated with human targets, the system will further detect whether a helmet target exists.

[0043] S43. Calculate the intersection area: For a detected helmet target, calculate the area of ​​the intersection area between its bounding box and the corresponding human target bounding box. The area of ​​the intersection area reflects whether the helmet is located within the human head region.

[0044] S44. Association Determination: Set an adjustable intersection area threshold, for example, 0.8 (representing the proportion of the intersection area between the helmet target area and the human target area to the helmet's own area). Theoretically, the helmet target should be completely or mostly located within the human target area. If the intersection area between the helmet target area and the human target area is greater than this threshold, it is determined that the helmet and the human body are associated, i.e., the human body is wearing a helmet.

[0045] S5. Wearing Status Determination and Alarm:

[0046] S51. Comprehensive Judgment: After completing steps S3 and S4, the system will make a final determination of the wearing status based on the information of the detected people wearing helmets and people not wearing helmets, as well as their confidence scores.

[0047] S52. Helmet Wearing Determination: If both a person wearing a helmet and a person not wearing a helmet are detected simultaneously, and both detection scores are greater than a set threshold (e.g., 0.7, which is adjustable and used to exclude low-confidence false detections), then the electric vehicle driver is preliminarily determined to be wearing a helmet. This usually occurs when the driver is wearing a helmet, but due to angle, lighting, or other reasons, the "person not wearing a helmet" category also shows high-confidence detections; in this case, wearing a helmet should be the determining factor.

[0048] S53. Helmet-less detection and alarm: If only a person not wearing a helmet is detected (and their confidence score is greater than the set threshold), but no person wearing a helmet is detected, or the confidence score of a person wearing a helmet is lower than the threshold, then the electric vehicle driver is determined to be not wearing a helmet. The system will immediately trigger an alarm. The alarm information may include time, location, image / video evidence, etc., and can be uploaded to the management platform for further processing.

[0049] Through the above steps, this invention establishes a complete and robust helmet-wearing detection process for electric vehicle riders, effectively improving the accuracy and practicality of the detection. Claims

[0050] 1. A method for detecting helmet wearing by electric vehicle drivers, characterized in that the method includes the following steps:

[0051] S1. Perform object detection on the input video stream to identify electric vehicles, helmets, people wearing helmets, and people not wearing helmets;

[0052] S2. Based on electric vehicle tracking of several consecutive frames, determine whether the electric vehicle is in motion;

[0053] S3. If the electric vehicle is in motion, analyze the detected people wearing helmets and people not wearing helmets, calculate the intersection-union ratio (IoU) between the target area of ​​each person and the target area of ​​the electric vehicle, and if the IoU is greater than a preset threshold, then the person is considered to be associated with the electric vehicle.

[0054] S4. For human targets associated with electric vehicles, perform helmet target detection, calculate the intersection of the helmet target area and the human target area, and if the intersection is greater than a preset threshold, determine that the human is wearing a helmet.

[0055] S5. Based on the detection results of S3 and S4, determine whether the electric vehicle driver is wearing a helmet and issue an alarm.

[0056] 2. The method for detecting helmet wearing by electric vehicle drivers according to claim 1, wherein in step S2, if the position change of the electric vehicle within a number of consecutive frames is less than a preset threshold, the electric vehicle is determined to be in a stationary state; otherwise, it is determined to be in a moving state.

[0057] 3. The method for detecting helmet wearing by electric vehicle drivers according to claim 1, wherein in step S2, if the electric vehicle is stationary, no subsequent helmet wearing determination is performed.

[0058] 4. The method for detecting helmet wearing by electric vehicle drivers according to claim 1, wherein in step S3, the preset threshold of the crossover ratio is 0.5.

[0059] 5. The method for detecting helmet wearing by electric vehicle drivers according to claim 1, wherein in step S4, the preset threshold of the intersection is 0.8.

[0060] 6. The method for detecting helmet wearing by electric vehicle drivers according to claim 1, wherein in step S5, if both a person wearing a helmet and a person not wearing a helmet are detected simultaneously, and both detection scores are greater than a set threshold, then it is determined that the electric vehicle driver is wearing a helmet.

[0061] 7. The method for detecting helmet wearing by electric vehicle drivers according to claim 1, wherein in step S5, if only a person not wearing a helmet is detected, it is determined that the electric vehicle driver is not wearing a helmet and an alarm is triggered.

[0062] S1. Further explanation of object detection

[0063] The target detection module in this invention is the foundation of the entire system, and its performance directly affects the accuracy of subsequent judgments. The core of this module is the use of advanced deep learning technology to analyze each frame of the input video stream in real time. Specifically, we employ a convolutional neural network (CNN) as the backbone network, combined with target detection algorithms (such as YOLOv8, Mask R-CNN, etc.) to achieve the identification and localization of specific targets. These targets include:

[0064] • Electric Bikes: Identify the overall outline and position of electric bikes to provide a basis for subsequent tracking and motion status assessment.

[0065] • Helmet: Identify safety helmets to determine their presence and relative position to the human body.

[0066] • Person with Helmet: This directly identifies drivers or passengers wearing helmets. It is an end-to-end detection method that can provide preliminary judgment.

[0067] • Person without helmet: Directly identifies drivers or passengers who are not wearing helmets, providing a preliminary basis for judgment.

[0068] To ensure the accuracy and robustness of object detection, model training requires a large amount of diverse labeled data, covering different lighting conditions (daytime, nighttime, backlighting), different weather conditions (sunny, cloudy, rainy), different shooting angles (front, side, back), different distances, different types of electric vehicles, different helmet styles, and different human postures. Data augmentation techniques (such as random cropping, rotation, and color jitter) are used to further expand the dataset and improve the model's generalization ability.

[0069] For each detected target, a bounding box, a corresponding class label, and a confidence score are output. The bounding box is typically represented by the coordinates of its top-left corner (x1, y1) and bottom-right corner (x2, y2), or by the coordinates of its center point (cx, cy), width (w), and height (h). The confidence score indicates how certain the model is about the detection result, and is usually between 0 and 1; a higher score indicates a more reliable detection result.

[0070] For example, for an input image I, the object detection model M will output a set of detection results D = {d1, d2, ..., d...} n}, where each detection result d i Include:

[0071] d i =(C i B i ,S i )

[0072] Among them, C i The detected target category (e.g., "electric vehicle", "helmet", "person wearing a helmet", "person not wearing a helmet"), B i These are the bounding box coordinates of the target, while S... i This is the confidence score of the detection. A minimum confidence threshold is typically set; detection results below this threshold are filtered out to reduce low-quality false positives.

[0073] S2. Further explanation of electric vehicle tracking and status determination

[0074] Determining the motion state of the electric vehicle is one of the key differences between this invention and traditional methods, effectively avoiding misjudgments of stationary vehicles. This step is divided into two sub-steps: electric vehicle tracking and motion state determination.

[0075] S21. Electric vehicle tracking

[0076] To achieve continuous tracking of electric vehicles, this invention employs Multi-Object Tracking (MOT) technology. The electric vehicle targets detected in step S1 are associated with each other across consecutive frames using a tracking algorithm. Commonly used tracking algorithms include:

[0077] • Kalman Filter: A highly efficient recursive filter capable of estimating the state of a dynamic system from a series of incomplete or noisy measurements. In target tracking, the Kalman filter can predict the target's future position and, combined with actual detection results, correct for errors, thereby smoothing the target's trajectory and handling transient occlusions.

[0078] • SORT (Simple Online and Realtime Tracking): A simple and efficient tracker based on Kalman filtering and the Hungarian algorithm. It correlates detection results with existing trajectories and uses Kalman filtering to predict the target position. SORT's advantages include good real-time performance, making it suitable for high frame rate video.

[0079] • DeepSORT: Based on SORT, it introduces deep learning features and uses appearance feature matching to handle target ID switching problems, especially when the target reappears after being occluded for a long time.

[0080] The core of the tracking algorithm is to assign a unique ID to each tracked electric vehicle and maintain the continuity of this ID in subsequent frames. When the electric vehicle target is not detected in a frame (e.g., due to occlusion), the tracker predicts its possible location based on its historical motion trajectory and attempts to re-associate it in subsequent frames, thereby achieving robust tracking.

[0081] S22. Motion State Judgment

[0082] By tracking the electric vehicle across consecutive frames, we can obtain its precise position information at different points in time. The determination of its motion state is based on the changes in this positional information. Assume that at time t, the coordinates of the center point of the electric vehicle k are... The coordinates of the center point at time t+1 are: Then its displacement distance between two frames It can be calculated as follows:

[0083]

[0084] To determine if the electric vehicle is stationary, we accumulate its displacement over N consecutive frames (e.g., 5 to 10 frames, this parameter can be adjusted according to the actual application scenario and video frame rate). The total displacement of the electric vehicle within N frames is then calculated. Less than a preset pixel threshold T move If the resolution is 5 pixels (e.g., 5 pixels), the electric vehicle is considered stationary. This threshold should be calibrated based on the actual resolution and installation height of the surveillance camera to ensure that it can distinguish between minor vibrations and actual movement of the vehicle.

[0085] S23. Static State Processing

[0086] When an electric scooter is determined to be stationary, the system will pause further helmet-wearing checks. This means that even if someone on a stationary electric scooter is detected not wearing a helmet, the system will not trigger an alarm. The advantage of this strategy is:

[0087] • Reduce false alarms: Avoids unnecessary alarms for stationary electric vehicles parked on the roadside, in parking lots, or waiting at traffic lights, improving the user experience and acceptance of the system.

[0088] • Optimized resource utilization: Reduced continuous analysis of stationary targets lowers the computational load on the system, allowing limited computing resources to be more focused on processing moving targets, thus improving the overall system efficiency.

[0089] The system only resumes its assessment of the rider's helmet wearing status when the electric vehicle resumes operation. This dynamic assessment mechanism makes the invention more intelligent and practical.

[0090] S3. Further explanation of the correlation between human body and electric vehicle

[0091] This step aims to identify which human targets on a moving electric vehicle are associated with the driver or passengers of that vehicle. This is achieved by calculating the intersection-over-union (IoU) ratio between the bounding boxes of the human targets and the bounding boxes of the electric vehicle targets.

[0092] S31. Filter electric vehicles in motion.

[0093] This step only processes electric vehicles that were determined to be in motion in step S2. For stationary electric vehicles, the system will skip this step and will not perform any human-related judgments, thereby avoiding misjudgments of non-driving behavior.

[0094] S32. Human Target Detection

[0095] In the target detection phase (S1), the system has identified two types of human targets: "people wearing helmets" and "people not wearing helmets." In step S3, we associate these human targets with the moving electric vehicle.

[0096] S33. Calculate the Intersection over Union (IoU) ratio.

[0097] The intersection-over-union ratio (IoU) is a commonly used metric to measure the degree of overlap between two bounding boxes. For an electric vehicle target B... e-bike And a potential human target B person Their IoU calculation formulas are as follows:

[0098]

[0099] Among them, Area(B person ∩B e-bike Area(B) represents the intersection area of ​​the human bounding box and the electric vehicle bounding box. person ∪B e-bike The area of ​​their union is represented by (). The value of IoU is between 0 and 1, and the larger the value, the greater the degree of overlap between the two bounding boxes.

[0100] S34. Association Detection

[0101] To determine the correlation between the human body and electric vehicles, we set an adjustable IoU threshold T. IoU Based on experience, this threshold is usually set to 0.5. If a certain electric vehicle target B... e-bike With one or more human targets B person IoU greater than or equal to T IoU If the human body is identified as such, it is considered to be associated with the electric vehicle. This implies that the human body is likely the driver or passenger of the electric vehicle.

[0102] IfIoU(B person B e-bike )≥T IoU then Person is Associated with Electric Bike

[0103] This judgment mechanism effectively excludes human targets unrelated to the electric vehicle in the image, such as pedestrians or people standing on the roadside, thus focusing subsequent helmet-wearing judgments on the actual electric vehicle driver or passenger, significantly reducing the false alarm rate. Only human targets that pass this association judgment will be sent to step S4 for further helmet-wearing determination.

[0104] S4. Further explanation of the correlation between helmet and human body

[0105] This step aims to accurately determine whether a human target associated with an electric vehicle is wearing a helmet. This is achieved by analyzing the spatial relationship between the helmet target and the human target, specifically by calculating the intersection area of ​​their bounding boxes.

[0106] S41. Filter related human targets

[0107] This step only processes human targets identified as associated with the electric vehicle in step S3. These human targets are considered to be the driver or passenger of the electric vehicle and are the primary focus of helmet-wearing detection.

[0108] S42. Helmet Target Detection

[0109] In step S1, the system has identified all helmet targets in the image. In step S4, we match these helmet targets with the human targets selected in step S41. A key assumption is that if a person is wearing a helmet, the helmet's bounding box should significantly overlap with the person's head area.

[0110] S43. Calculate the intersection region

[0111] For each human target B associated with an electric vehicle person And each helmet target B detected in the image h elmet We calculate the intersection area of ​​their bounding boxes, Area(B). person ∩B h elmet This intersection area reflects the degree of helmet coverage within the human body bounding box. Since the helmet is typically positioned over the head, we focus more on the intersection of the helmet's bounding box and the human body bounding box.

[0112] S44. Association Detection

[0113] To determine whether a helmet is being worn by the person, we set an adjustable intersection area threshold T. intersection This threshold is typically set at 0.8, meaning the intersection area of ​​the helmet's target area and the human target area should account for more than 80% of the helmet's own area. This threshold is set to ensure that the helmet is truly "worn" on the human body, and not merely near the body or partially obscured. If the following conditions are met, the helmet is considered to be associated with the human body, meaning the human body is wearing the helmet:

[0114]

[0115] Among them, Area(B h elmet The area of ​​the helmet itself is the target area. This determination effectively distinguishes between situations where a helmet is actually worn and situations where the helmet is merely near the person but not worn, such as when it's hanging on the handlebars or placed on the seat. This refined spatial relationship determination further improves the accuracy of helmet wearing detection.

[0116] S5. Further explanation of wearing status determination and alarms

[0117] This step is the final decision-making stage of the entire testing process. It integrates the test results and correlation judgments of the previous steps to make a final determination on whether the electric vehicle driver is wearing a helmet, and triggers an alarm as needed.

[0118] S51. Comprehensive Judgment

[0119] After completing steps S3 (associating the human body with the electric vehicle) and S4 (associating the helmet with the human body), the system collects information on all human targets associated with the electric vehicle, including whether they are identified as "people wearing helmets" or "people not wearing helmets," and the confidence scores of these detection results. It also considers the helmet-human association results determined through step S4.

[0120] S52. Helmet Wearing Determination

[0121] This invention introduces a robust judgment mechanism to handle multiple detection results that may occur in complex scenarios. If the system simultaneously detects both "people wearing helmets" and "people not wearing helmets," and the confidence scores of both detection results are higher than a preset threshold T, the mechanism will be implemented. confidence If the value is 0.7 (e.g., 0.7), the system will prioritize determining that the electric vehicle driver is wearing a helmet. This typically occurs in the following scenarios:

[0122] • Partial obstruction: The driver is wearing a helmet, but due to angle, lighting, or other objects (such as vehicle rearview mirrors or handlebars), the features of the "helmet-wearing person" are incomplete.

[0123] The characteristics of "people not wearing helmets" are also partially revealed, thus allowing them to be detected simultaneously.

[0124] • Model generalization issue: In certain special cases, insufficiently covered samples in the training data may cause the model to produce low-confidence detections of "people not wearing helmets" even when people are wearing helmets.

[0125] vice versa.

[0126] In such ambiguous situations, this invention tends to make a conservative judgment, prioritizing the assumption that the driver is wearing a helmet. This is based on the actual needs of traffic safety supervision; it is better to let one person who is not wearing a helmet go unpunished than to falsely report one who is wearing one, in order to avoid unnecessary administrative intervention and waste of resources.

[0127] If (a person wearing a helmet is detected with confidence Sph ≥ Tconfidence) and (a person not wearing a helmet is detected with confidence Spwh ≥ Tconfidence) are both detected, then the person is considered to be "wearing a helmet".

[0128] Among them, S ph It is the confidence score of "the person wearing a helmet", S pwh It is the confidence score for "people not wearing helmets".

[0129] S53. Helmet-less detection and warning

[0130] If the system only detects the category "people not wearing helmets", and its confidence score Spwh Higher than the preset threshold T confidence The "person wearing a helmet" category was not detected, or the confidence score for "person wearing a helmet" was lower than T. confidence If the system detects that the electric vehicle driver is not wearing a helmet, it will immediately trigger an alarm.

[0131] If (a "human target wearing a helmet" is detected and the confidence level is S) ph ≥T confidence (Detection of "human target not wearing a helmet" with confidence S) pwh ≥T confidence If so, it is determined as "wearing a helmet".

[0132] Among them, S ph It is the confidence score of "human target wearing a helmet", S pwh It is the confidence score for "human targets not wearing helmets".

[0133] Alarm information may include, but is not limited to:

[0134] • Timestamp: The precise time when the event occurred.

[0135] • Location information: Geographical location obtained through camera location or GPS information.

[0136] • Image / video evidence: Captured image frames or short video clips containing drivers not wearing helmets, as evidence for law enforcement.

[0137] • Vehicle Information: If possible, obtain relevant information about electric vehicles through technologies such as license plate recognition.

[0138] Alarm level: Set according to the severity of the violation.

[0139] These alerts can be uploaded in real time to traffic management platforms, cloud servers, or local storage devices for subsequent manual review, data analysis, and enforcement. This automated alert mechanism can significantly improve the efficiency of detecting and processing traffic violations, effectively enhancing traffic safety management.

[0140] Through the complete process of S1 to S5 described above, this invention forms an intelligent system that detects targets at the bottom level and makes logical judgments at the top level. It can effectively and accurately identify whether electric vehicle drivers are wearing helmets, providing strong technical support for intelligent traffic management.

Claims

1. A method for detecting helmet wearing on electric vehicles based on multi-target association and motion state analysis, characterized in that, The method includes: S1. Perform target detection on the input video stream, identify and box out electric vehicles, helmets, people wearing helmets, and people not wearing helmets; S2. Track the electric vehicle target based on video data of several consecutive frames and determine whether the electric vehicle is in motion; wherein, when the change in the position of the electric vehicle between consecutive frames is less than a preset threshold, it is determined to be in a stationary state, otherwise it is in a moving state. S3. If the electric vehicle is in motion, the detection of people wearing helmets and people not wearing helmets is associated with the electric vehicle target. The intersection-union ratio (IoU) of each human target area and the electric vehicle target area is calculated. When the IoU is greater than the first preset threshold, the human body is considered to be associated with the electric vehicle. S4. Further helmet detection is performed on the human target associated with the electric vehicle to determine whether the intersection area between the helmet target area and the human target area exceeds the second preset threshold. If it exceeds the threshold, it is determined that the human is wearing a helmet. S5. Based on the detected wearing status of human targets related to electric vehicles, comprehensively determine whether the electric vehicle driver is wearing a helmet, and trigger an alarm mechanism if not wearing one.

2. The method according to claim 1, characterized in that, The first preset threshold is 0.

5.

3. The method according to claim 1, characterized in that, The second preset threshold is 0.8, and the intersection area is the ratio of the overlapping area of ​​the helmet target area and the human target area to the helmet target area.

4. The method according to claim 1, characterized in that, When an electric vehicle is determined to be stationary, the system skips the helmet wearing detection and alarm processing steps to reduce false alarms and computational resource consumption.

5. The method according to claim 1, characterized in that, In step S5: If both "people wearing helmets" and "people not wearing helmets" are detected at the same time, and the detection confidence of both is higher than the preset confidence threshold, then the person is judged to be wearing a helmet first. If only "people not wearing helmets" are detected, and the detection confidence level is higher than the preset threshold, then it is determined that they are not wearing helmets and an alarm is triggered.

6. The method according to claim 1, characterized in that, The target detection is based on a deep learning model, and the training data covers complex scenarios with different weather, lighting, angles, and occlusions.

7. The method according to claim 1, characterized in that, The electric vehicle tracking algorithm is either Kalman filtering or DeepSORT tracking algorithm, used to achieve cross-frame target consistency and displacement change judgment of electric vehicles.

8. An electric vehicle helmet wearing detection system, characterized in that, include: The video acquisition module is used to acquire video data during the electric vehicle's movement. The target detection module is used to detect electric vehicles, helmets, helmet-wearing people, and unhelmeted people in the acquired video frames. The tracking and state judgment module is used to track electric vehicle targets and determine whether they are in motion. The multi-target association module is used to calculate the intersection-union ratio between the human body and the electric vehicle target, as well as the intersection relationship between the helmet and the human body; The determination and alarm module is used to determine whether a helmet is being worn based on the results of multi-target correlation, and to output alarm information when not being worn.

9. The system according to claim 8, characterized in that, The alarm information includes timestamps, location information, video evidence, and optional vehicle information, and can be uploaded to the management platform for law enforcement recording.