Method for recognizing traffic potential safety hazard behaviors through persuasion robot of electric bicycle
The combination of a multi-label image classification model built through multi-task learning and RFID technology solves the problem of low accuracy of electric bicycle mobile persuasion robots in identifying traffic safety hazards, achieving high accuracy and real-time correction.
Patent Information
- Application Number
- CN202411475472.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-01-21
AI Technical Summary
The existing electric bicycle mobile persuasion robots have low accuracy and are difficult to meet the needs of real-time discovery and correction when identifying various traffic safety hazard behaviors. Due to the influence of equipment deployment methods and angles, there are fewer image feature analysis scenarios.
A multi-task learning method is used to build a multi-label image classification model, and refined features are trained through shared network design to identify potential traffic safety hazards of electric bicycles. The RFID reader is embedded into the persuasion robot to accurately read the license plate. information to improve identification accuracy.
It improves the identification accuracy of electric bicycle traffic safety hazard behaviors, enables rapid and accurate identification and correction of various hidden hazard behaviors, improves the accuracy of identity recognition, and meets the needs of real-time discovery and correction.
Smart Images

Figure CN119339339A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent transportation technology, and more specifically, to a method for identifying behaviors that pose potential traffic safety hazards through an electric bicycle persuasion robot. Background Art
[0002] my country is a major producer and consumer of electric bicycles in the world. At present, the number of electric bicycles in China has reached 350 million, and electric bicycles have become an important means of transportation for people to travel short distances. However, with the rapid popularization of electric bicycles, hidden dangers such as driving against traffic, carrying passengers illegally, not wearing helmets, and installing awnings are increasing, and road traffic accidents are frequent. In recent years, electric bicycles have become one of the key points of rectification by traffic control departments. For this reason, various regions have successively introduced a series of governance measures and achieved remarkable results. Among the many governance measures, the electric bicycle mobile persuasion robot has shown unique advantages, transforming the governance of electric bicycle road traffic safety from passive defense to active prevention and control. On the one hand, it truly puts risk correction and education guidance in front, reminding drivers to eliminate traffic safety hazards in a timely manner, so that hidden dangers can be discovered and intervened as soon as they occur, ensuring effective risk control; on the other hand, it replaces "cold" punishment with "warm" notifications and reminders, and promotes the unity of law enforcement intensity and temperature.
[0003] At present, the mobile persuasion robot for electric bicycles mainly uses cameras to automatically shoot and identify behaviors such as not wearing helmets, illegally carrying passengers, and driving against traffic, and broadcasts voice warnings to the parties on the spot. Although good recognition results have been achieved, there are two problems. First, each hidden danger behavior is detected serially, and one hidden danger corresponds to an algorithm model. This means that in order to meet real-time reasoning, each model can only use lightweight algorithms for detection, and the detection accuracy is limited. Second, it is difficult to meet the needs of timely discovery and correction of hidden dangers in traffic safety behaviors of electric bicycles during driving. Third, since mobile devices are generally placed on the side of the road, the capture direction is 90° to the vehicle's travel. Only the license plate hanging on the tail of the electric bicycle is recognized through video images, and the accuracy of identity recognition is low. Fourth, the deployment of mobile devices is different from the fixed capture equipment installed on the roadside. Affected by the placement angle of the equipment, there are fewer scenes where image features can be directly captured for analysis.
[0004] In view of the above problems, the present invention solves them from the perspective of multi-task learning. Multi-task learning can be simply understood as a model that can handle more than two tasks at the same time, while traditional models can usually only solve one specific task. Entering the era of deep learning, especially in many tasks related to image processing, features can be shared. The sharing here can be understood as the features on each subtask have a certain degree of reusability. The features trained by this multi-task itself take into account the correlation between multiple tasks, and can effectively remove the feature redundancy between each subtask. In other words, through the shared network design, the most refined features can be trained to extract identification features for multiple subtasks. The use of a multi-task learning model can greatly reduce the complexity of the system execution process, so that multiple models that originally need to be connected in series only need to be inferred under a unified model. In addition, in view of the low accuracy of identity recognition, the present invention embeds an RFID reader into an electric bicycle mobile persuasion robot, which can accurately and stably read the identity information in the electric bicycle digital license plate RFID, and verify and match it with the license plate image recognition result, thereby improving the accuracy of identity recognition. Summary of the invention
[0005] In view of the above problems existing in the prior art, the present invention provides a method for identifying traffic safety hazard behaviors through an electric bicycle persuasion robot, so as to solve the problems of low accuracy and poor timeliness in identifying various traffic safety hazard behaviors of electric bicycles existing in the related art.
[0006] As a first aspect of the present invention, a method for identifying traffic safety hazard behaviors by using an electric bicycle persuasion robot is provided. The method for identifying traffic safety hazard behaviors by using an electric bicycle persuasion robot comprises the following steps:
[0007] Step S1: Acquire historical electric bicycle images on the road;
[0008] Step S2: marking the traffic safety hazard behavior category in the historical electric bicycle image to obtain traffic safety hazard behavior category marking information of the historical electric bicycle image;
[0009] Step S3: constructing a multi-label image classification model, and training the multi-label image classification model using the historical electric bicycle images and their corresponding traffic safety hazard behavior category annotation information to obtain a trained multi-label image classification model;
[0010] Step S4: quantizing and accelerating the trained multi-label image classification model to obtain a quantized multi-label image classification model, and loading the quantized multi-label image classification model into the electric bicycle persuasion robot;
[0011] Step S5: Acquire the current electric bicycle image on the road, and identify the traffic safety hazard behavior category in the current electric bicycle image through the quantized multi-label image classification model to obtain the traffic safety hazard behavior category identification result of the current electric bicycle image.
[0012] Furthermore, the marking of the traffic safety hazard behavior category in the historical electric bicycle image to obtain the traffic safety hazard behavior category marking information of the historical electric bicycle image also includes:
[0013] The historical electric bicycle images are labeled with traffic safety hazard behavior categories according to a total of 10 labels, namely, "not wearing a helmet", "the driver is a minor", "the passenger is an adult", "overloaded", "no license plate", "installing a canopy", "driving from left to right", "driving from top to bottom", "playing with a mobile phone", and "running a red light", so as to obtain the traffic safety hazard behavior category labeling information of the historical electric bicycle images; wherein, one historical electric bicycle image can be labeled with multiple labels at the same time;
[0014] The traffic safety hazard behavior category labeling information of the historical electric bicycle image is converted into a 0 / 1 binary string for training the multi-label image classification model, wherein 0 indicates no corresponding label and 1 indicates the presence of a corresponding label.
[0015] Furthermore, the multi-label image classification model is constructed, and the multi-label image classification model is trained using the historical electric bicycle images and their corresponding traffic safety hazard behavior category annotation information to obtain the trained multi-label image classification model, which also includes:
[0016] The multi-label image classification model includes a basic model, multiple branch modules and multiple softmax layers; wherein each branch module uses 3 convolutions with a kernel size of 3×3;
[0017] Inputting the historical electric bicycle image into the basic model, the basic model uses the LCNet algorithm pre-trained on the ImageNet dataset to extract multi-task common features from the historical electric bicycle image to output a multi-task common feature;
[0018] Inputting the multi-task common features into corresponding branch modules respectively to extract task-specific features, so as to output corresponding task-specific features;
[0019] The corresponding task-specific features are input into the corresponding softmax layer for dimensionality reduction processing to output the traffic safety hazard behavior category recognition result of the historical electric bicycle image.
[0020] Furthermore, in the training process of the multi-label image classification model, it also includes:
[0021] The cross entropy loss function L corresponding to multiple labels is used to compare the predicted value and the true value. The formula is defined as follows:
[0022]
[0023] Where m represents the total number of historical electric bicycle images, q represents the total number of traffic safety hazard behavior categories, represents the true value of the jth traffic safety hazard behavior category of the i-th historical electric bicycle image, Represents the predicted value of the jth traffic safety hazard behavior category of the i-th historical electric bicycle image.
[0024] Furthermore, the traffic safety hazard behavior category recognition results of the current electric bicycle image include any one or more of "not wearing a helmet", "driver is a minor", "passenger is an adult", "overloaded", "no license plate", "installed with a awning", "driving from left to right", "driving from top to bottom", "playing with mobile phone" and "running a red light".
[0025] Furthermore, the identifying the traffic safety hazard behavior category in the current electric bicycle image by the quantized multi-label image classification model to obtain the traffic safety hazard behavior category identification result of the current electric bicycle image also includes:
[0026] When the traffic safety hazard behavior category recognition result of the current electric bicycle image is any one or more of "not wearing a helmet", "the driver is a minor", "the passenger is an adult", "overloaded", "unlicensed" and "installed with a awning", a voice warning is directly given to the current driver of the electric bicycle.
[0027] Furthermore, the identifying the traffic safety hazard behavior category in the current electric bicycle image by the quantized multi-label image classification model to obtain the traffic safety hazard behavior category identification result of the current electric bicycle image also includes:
[0028] When the traffic safety hazard behavior category recognition result of the current electric bicycle image is "driving from left to right" or "driving from top to bottom", it is determined whether the current electric bicycle is driving in the opposite direction; when the current electric bicycle is driving in the opposite direction, a voice broadcast warning is given to the driver of the current electric bicycle.
[0029] Furthermore, the identifying the traffic safety hazard behavior category in the current electric bicycle image by the quantized multi-label image classification model to obtain the traffic safety hazard behavior category identification result of the current electric bicycle image also includes:
[0030] When the traffic safety hazard behavior category recognition result of the current electric bicycle image is "playing with mobile phone", it is determined whether the current electric bicycle is in a driving state. When the current electric bicycle is in a driving state, a voice broadcast warning is given to the driver of the current electric bicycle.
[0031] Furthermore, the identifying the traffic safety hazard behavior category in the current electric bicycle image by the quantized multi-label image classification model to obtain the traffic safety hazard behavior category identification result of the current electric bicycle image also includes:
[0032] When the traffic safety hazard behavior category identification result of the current electric bicycle image is "running a red light", determine whether some other electric bicycles remain stationary behind the stop line after the current electric bicycle moves and move in the same direction after a certain period of time; if some other electric bicycles remain stationary behind the stop line after the current electric bicycle moves and move in the same direction after a certain period of time, then give a voice broadcast warning to the driver of the current electric bicycle; or
[0033] When the traffic safety hazard behavior category identification result of the current electric bicycle image is "running a red light", it is determined whether the motor vehicle on the adjacent motor vehicle lane with the same travel direction is stationary; if the motor vehicle on the adjacent motor vehicle lane with the same travel direction is stationary, a voice warning is given to the driver of the current electric bicycle.
[0034] Furthermore, the identifying the traffic safety hazard behavior category in the current electric bicycle image by the quantized multi-label image classification model to obtain the traffic safety hazard behavior category identification result of the current electric bicycle image also includes:
[0035] For the current electric bicycle image with a license plate identified, the license plate number in the current electric bicycle image is identified by using the PPOCRv4 algorithm to obtain a license plate number recognition result of the current electric bicycle;
[0036] The license plate number information stored in the current electric bicycle license plate is read by the RFID reader / writer in the electric bicycle persuasion robot to obtain the actual result of the license plate number of the current electric bicycle;
[0037] When the license plate number recognition result of the current electric bicycle is inconsistent with the actual license plate number result, the actual license plate number result of the current electric bicycle is marked on the current electric bicycle image.
[0038] The method provided by the present invention for identifying traffic safety hazard behaviors through an electric bicycle persuasion robot has the following beneficial effects: by making full use of RFID and visual feature information, the traffic safety hazard behaviors of electric bicycles can be accurately identified and precise persuasion can be achieved, thereby providing technical support for the flexible management of electric bicycles, which has important value and significance in practical applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present invention, but do not constitute a limitation of the present invention.
[0040] Figure 1 A flow chart of a method for identifying traffic safety hazard behaviors through an electric bicycle persuasion robot provided by the present invention.
[0041] Figure 2 This is a structural diagram of the multi-label image classification model provided by the present invention. DETAILED DESCRIPTION
[0042] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, characteristics and effects of a method for identifying traffic safety hazard behaviors through an electric bicycle persuasion robot proposed by the present invention in combination with the accompanying drawings and preferred embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so as to describe the embodiments of the present invention described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0044] In this embodiment, a method for identifying traffic safety hazard behaviors through an electric bicycle persuasion robot is provided. Figure 1 As shown, the method for identifying traffic safety hazard behaviors by using an electric bicycle persuasion robot includes the following steps:
[0045] Step S1: Acquire historical electric bicycle images on the road;
[0046] It should be noted that the YOLOv8 algorithm is used to detect the electric bicycle area in the road traffic image. The detection result is the minimum circumscribed rectangular frame of each electric bicycle, which also includes the electric bicycle, the driver and the passenger on the electric bicycle; each electric bicycle image is extracted from the rectangular frame; the YOLOv8 algorithm has fast detection speed and high accuracy, and can quickly locate the electric bicycle area in complex traffic scenes. It is especially suitable for edge scenarios such as mobile persuasion robots with limited computing resources and high real-time requirements.
[0047] Step S2: marking the traffic safety hazard behavior category in the historical electric bicycle image to obtain traffic safety hazard behavior category marking information of the historical electric bicycle image;
[0048] Preferably, the marking of the traffic safety hazard behavior category in the historical electric bicycle image to obtain the traffic safety hazard behavior category marking information of the historical electric bicycle image further includes:
[0049] The labeling tool used is labelme, and the labeling mode is the checkbox selection mode. The historical electric bicycle image is labeled with traffic safety hazard behavior categories according to a total of 10 labels, including "not wearing a helmet", "the driver is a minor", "the passenger is an adult", "overloaded", "no license plate", "installing a canopy", "driving from left to right", "driving from top to bottom", "playing with mobile phones", and "running a red light", so as to obtain the traffic safety hazard behavior category labeling information of the historical electric bicycle image; wherein, one historical electric bicycle image can be labeled with multiple labels at the same time;
[0050] The traffic safety hazard behavior category labeling information of the historical electric bicycle image is converted into a 0 / 1 binary string for training the multi-label image classification model, wherein 0 indicates no corresponding label and 1 indicates the presence of a corresponding label.
[0051] It should be noted that the traffic safety hazard behavior category annotation information of the historical electric bicycle images is a json annotation file.
[0052] Step S3: construct a multi-label image classification model, and train the multi-label image classification model using the historical electric bicycle images and their corresponding traffic safety hazard behavior category annotation information to obtain a trained multi-label image classification model to adapt to the model weights of the real scene;
[0053] Preferably, if Figure 2 As shown, the multi-label image classification model is constructed, and the multi-label image classification model is trained using the historical electric bicycle images and their corresponding traffic safety hazard behavior category annotation information to obtain the trained multi-label image classification model, and further includes:
[0054] The multi-label image classification model includes a basic model, multiple branch modules and multiple softmax layers; wherein a task-specific branch module is constructed for each label task branch on the basic model, and each branch module uses 3 convolutions with a kernel size of 3×3;
[0055] Inputting the historical electric bicycle image into the basic model, the basic model uses the LCNet algorithm pre-trained on the ImageNet dataset to extract multi-task common features from the historical electric bicycle image to output a multi-task common feature;
[0056] Inputting the multi-task common features into corresponding branch modules respectively to extract task-specific features, so as to output corresponding task-specific features;
[0057] The corresponding task-specific features are input into the corresponding softmax layer for dimensionality reduction processing to output the traffic safety hazard behavior category recognition result of the historical electric bicycle image.
[0058] In an embodiment of the present invention, a multi-label image classification algorithm is used to construct various traffic safety hazard behaviors of electric bicycles into a multi-task label image classification model, which can realize multi-task feature sharing in a unified end-to-end training framework and make full use of the advantages of multi-task image feature recognition, thereby laying the foundation for fast and accurate safety hazard behavior analysis.
[0059] Specifically, the training process of the multi-label image classification model also includes:
[0060] The cross entropy loss function L corresponding to multiple labels is used to compare the predicted value and the true value. The formula is defined as follows:
[0061]
[0062] Where m represents the total number of historical electric bicycle images, q represents the total number of traffic safety hazard behavior categories, represents the true value of the jth traffic safety hazard behavior category of the i-th historical electric bicycle image, represents the predicted value of the jth traffic safety hazard behavior category of the i-th historical electric bicycle image; in the example of the present invention, q = 10. The optimizer used in the training process is Adam, and the learning rate is set to 0.0001 according to the experimental results.
[0063] Step S4: quantizing and accelerating the trained multi-label image classification model to obtain a quantized multi-label image classification model, and loading the quantized multi-label image classification model into the electric bicycle persuasion robot;
[0064] It should be noted that the trained multi-label image classification model is statically exported for engineering deployment, and INT16 is used for quantization acceleration during the export to obtain a quantized model, thereby improving the reasoning speed of the model on the persuasive robot.
[0065] Step S5: Acquire the current electric bicycle image on the road, and identify the traffic safety hazard behavior category in the current electric bicycle image through the quantized multi-label image classification model to obtain the traffic safety hazard behavior category identification result of the current electric bicycle image.
[0066] Preferably, the traffic safety hazard behavior category recognition result of the current electric bicycle image includes any one or more of "not wearing a helmet", "driver is a minor", "passenger is an adult", "overloaded", "unlicensed", "installed with a awning", "driving from left to right", "driving from top to bottom", "playing with mobile phone" and "running a red light".
[0067] Preferably, the identifying the traffic safety hazard behavior category in the current electric bicycle image by the quantized multi-label image classification model to obtain the traffic safety hazard behavior category identification result of the current electric bicycle image also includes:
[0068] When the traffic safety hazard behavior category recognition result of the current electric bicycle image is any one or more of "not wearing a helmet", "the driver is a minor", "the passenger is an adult", "overloaded", "unlicensed" and "installed with a awning", a voice warning is directly given to the current driver of the electric bicycle.
[0069] Preferably, the identifying the traffic safety hazard behavior category in the current electric bicycle image by the quantized multi-label image classification model to obtain the traffic safety hazard behavior category identification result of the current electric bicycle image also includes:
[0070] When the traffic safety hazard behavior category recognition result of the current electric bicycle image is "driving from left to right" or "driving from top to bottom", it is determined whether the current electric bicycle is driving in the opposite direction; when the current electric bicycle is driving in the opposite direction, a voice broadcast warning is given to the driver of the current electric bicycle.
[0071] It should be noted that when the electric bicycle persuasion robot is limited in the capture scene and cannot capture the road marking features, that is, it is impossible to determine which direction is the wrong direction through image features. At this time, the method of reasoning using the electric bicycle traffic characteristics is that if the proportion of vehicles traveling in the same direction within a certain spatial range and a certain duration is greater than 90%, and the proportion of vehicles traveling in the opposite direction is less than 10%, then the direction traveled by the vehicles with a proportion greater than 90% is defined as the correct direction of travel, and the vehicles traveling in the opposite direction are defined as suspected wrong-travel vehicles, and the suspected wrong-travel vehicles are reminded.
[0072] Furthermore, if the number of vehicles traveling in the two directions on the same road is close, it can be determined that the road has a two-way direction of travel. The center line of the two-way road can be identified by defining the driving direction feature.
[0073] Preferably, the identifying the traffic safety hazard behavior category in the current electric bicycle image by the quantized multi-label image classification model to obtain the traffic safety hazard behavior category identification result of the current electric bicycle image also includes:
[0074] When the traffic safety hazard behavior category recognition result of the current electric bicycle image is "playing with mobile phone", it is determined whether the current electric bicycle is in a driving state. When the current electric bicycle is in a driving state, a voice broadcast warning is given to the driver of the current electric bicycle.
[0075] Preferably, the identifying the traffic safety hazard behavior category in the current electric bicycle image by the quantized multi-label image classification model to obtain the traffic safety hazard behavior category identification result of the current electric bicycle image also includes:
[0076] Due to the limited recognition and capture scenes, "running a red light" cannot capture the status of traffic lights, and it is necessary to judge the status of traffic lights through reasoning.
[0077] When the traffic safety hazard behavior category identification result of the current electric bicycle image is "running a red light", determine whether some other electric bicycles remain stationary behind the stop line after the current electric bicycle moves and move in the same direction after a certain period of time; if some other electric bicycles remain stationary behind the stop line after the current electric bicycle moves and move in the same direction after a certain period of time, then give a voice broadcast warning to the driver of the current electric bicycle; or
[0078] When the traffic safety hazard behavior category identification result of the current electric bicycle image is "running a red light", it is determined whether the motor vehicle on the adjacent motor vehicle lane with the same travel direction is stationary; if the motor vehicle on the adjacent motor vehicle lane with the same travel direction is stationary, a voice warning is given to the driver of the current electric bicycle.
[0079] It should be noted that the time interval is less than a signal cycle, and the signal cycle can be obtained by learning the release rules of cyclic traffic at each intersection.
[0080] Preferably, the identifying the traffic safety hazard behavior category in the current electric bicycle image by the quantized multi-label image classification model to obtain the traffic safety hazard behavior category identification result of the current electric bicycle image also includes:
[0081] For the current electric bicycle image with a license plate identified, the license plate number in the current electric bicycle image is identified by using the PPOCRv4 algorithm to obtain a license plate number recognition result of the current electric bicycle;
[0082] The license plate number information stored in the current electric bicycle license plate is read by the RFID reader / writer in the electric bicycle persuasion robot to obtain the actual result of the license plate number of the current electric bicycle;
[0083] When the license plate number recognition result of the current electric bicycle is inconsistent with the actual license plate number result, the actual license plate number result of the current electric bicycle is marked on the current electric bicycle image.
[0084] In an embodiment of the present invention, a multi-label image classification algorithm is adopted to construct various traffic safety hazard behaviors of electric bicycles into multi-task labels, and multi-task feature sharing is realized in a unified end-to-end training framework. The advantages of multi-task image feature recognition are fully utilized to quickly and accurately analyze the traffic safety hazard behaviors of electric bicycles. At the same time, the RFID reader / writer in the persuasion robot is combined with the electric bicycle license plate image to complete identity recognition, and finally a one-to-one match between the electric bicycle identity information and the traffic safety hazard behavior is formed.
[0085] The method for identifying traffic safety hazard behaviors through an electric bicycle persuasion robot provided in the embodiment of the present invention utilizes RFID radio frequency reading and image and video recognition information in the persuasion robot to accurately identify the identity of the electric bicycle, and associate and identify multiple existing hazard behaviors, thereby providing technical support for timely and flexible management of electric bicycles; it can improve the error correction efficiency of traffic management, and has important value and significance in practical applications.
[0086] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technician familiar with this profession can make some changes or modifications to equivalent embodiments of equivalent changes using the technical contents disclosed above without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention still falls within the scope of the technical solution of the present invention.
Claims
1. A method for identifying traffic safety hazard behaviors through an electric bicycle persuasion robot, characterized in that: The method for identifying traffic safety hazard behaviors by using an electric bicycle persuasion robot comprises the following steps: Step S1: Acquire historical electric bicycle images on the road; Step S2: marking the traffic safety hazard behavior category in the historical electric bicycle image to obtain traffic safety hazard behavior category marking information of the historical electric bicycle image; Step S3: constructing a multi-label image classification model, and training the multi-label image classification model using the historical electric bicycle images and their corresponding traffic safety hazard behavior category annotation information to obtain a trained multi-label image classification model; Step S4: quantizing and accelerating the trained multi-label image classification model to obtain a quantized multi-label image classification model, and loading the quantized multi-label image classification model into the electric bicycle persuasion robot; Step S5: Acquire the current electric bicycle image on the road, and identify the traffic safety hazard behavior category in the current electric bicycle image through the quantized multi-label image classification model to obtain the traffic safety hazard behavior category identification result of the current electric bicycle image.
2. The method for identifying traffic safety hazard behaviors by using an electric bicycle persuasion robot according to claim 1, characterized in that: The step of labeling the traffic safety hazard behavior category in the historical electric bicycle image to obtain the traffic safety hazard behavior category labeling information of the historical electric bicycle image further includes: The historical electric bicycle images are labeled with traffic safety hazard behavior categories according to 10 labels, including "not wearing a helmet", "the driver is a minor", "the passenger is an adult", "overloaded", "no license plate", "installing a canopy", "driving from left to right", "driving from top to bottom", "playing with mobile phone", and "running a red light", so as to obtain the traffic safety hazard behavior category labeling information of the historical electric bicycle images; wherein, one historical electric bicycle image can be labeled with multiple labels at the same time; The traffic safety hazard behavior category labeling information of the historical electric bicycle image is converted into a 0 / 1 binary string for training the multi-label image classification model, wherein 0 indicates no corresponding label and 1 indicates the presence of a corresponding label.
3. The method for identifying traffic safety hazard behaviors by an electric bicycle persuasion robot according to claim 1, characterized in that: The method of constructing a multi-label image classification model and training the multi-label image classification model using the historical electric bicycle images and their corresponding traffic safety hazard behavior category annotation information to obtain a trained multi-label image classification model further includes: The multi-label image classification model includes a basic model, multiple branch modules and multiple softmax layers; wherein each branch module uses 3 convolutions with a kernel size of 3×3; Inputting the historical electric bicycle image into the basic model, the basic model uses the LCNet algorithm pre-trained on the ImageNet dataset to extract multi-task common features from the historical electric bicycle image to output a multi-task common feature; Inputting the multi-task common features into corresponding branch modules respectively to extract task-specific features, so as to output corresponding task-specific features; The corresponding task-specific features are input into the corresponding softmax layer for dimensionality reduction processing to output the traffic safety hazard behavior category recognition result of the historical electric bicycle image.
4. The method for identifying traffic safety hazard behaviors by using an electric bicycle persuasion robot according to claim 3, characterized in that: The training process of the multi-label image classification model also includes: The cross entropy loss function L corresponding to multiple labels is used to compare the predicted value and the true value. The formula is defined as follows: Where m represents the total number of historical electric bicycle images, q represents the total number of traffic safety hazard behavior categories, represents the true value of the jth traffic safety hazard behavior category of the i-th historical electric bicycle image, Represents the predicted value of the jth traffic safety hazard behavior category of the i-th historical electric bicycle image.
5. The method for identifying traffic safety hazard behaviors by using an electric bicycle persuasion robot according to claim 1, characterized in that: The traffic safety hazard behavior category recognition results of the current electric bicycle image include "not wearing a helmet", "the driver is a minor", "the passenger is an adult", Any one or more of "overloading", "no license plate", "installing a awning", "driving from left to right", "driving from top to bottom", "playing with mobile phone" and "running a red light".
6. The method for identifying traffic safety hazard behaviors by using an electric bicycle persuasion robot according to claim 5, characterized in that: The method further includes: identifying the traffic safety hazard behavior category in the current electric bicycle image by using the quantized multi-label image classification model to obtain a traffic safety hazard behavior category identification result of the current electric bicycle image; When the traffic safety hazard behavior category recognition result of the current electric bicycle image is any one or more of "not wearing a helmet", "the driver is a minor", "the passenger is an adult", "overloaded", "no license plate" and "installed with a awning", a voice warning is directly given to the current driver of the electric bicycle.
7. The method for identifying traffic safety hazard behaviors by using an electric bicycle persuasion robot according to claim 5, characterized in that: The method further includes: identifying the traffic safety hazard behavior category in the current electric bicycle image by using the quantized multi-label image classification model to obtain a traffic safety hazard behavior category identification result of the current electric bicycle image; When the traffic safety hazard behavior category recognition result of the current electric bicycle image is "driving from left to right" or "driving from top to bottom", it is determined whether the current electric bicycle is driving in the opposite direction; when the current electric bicycle is driving in the opposite direction, a voice broadcast warning is given to the driver of the current electric bicycle.
8. The method for identifying traffic safety hazard behaviors by using an electric bicycle persuasion robot according to claim 5, characterized in that: The method further includes: identifying the traffic safety hazard behavior category in the current electric bicycle image by using the quantized multi-label image classification model to obtain a traffic safety hazard behavior category identification result of the current electric bicycle image; When the traffic safety hazard behavior category recognition result of the current electric bicycle image is "playing with mobile phone", it is determined whether the current electric bicycle is in a driving state. When the current electric bicycle is in a driving state, a voice broadcast warning is given to the driver of the current electric bicycle.
9. The method for identifying traffic safety hazard behaviors by using an electric bicycle persuasion robot according to claim 5, characterized in that: The method further includes: identifying the traffic safety hazard behavior category in the current electric bicycle image by using the quantized multi-label image classification model to obtain a traffic safety hazard behavior category identification result of the current electric bicycle image; When the traffic safety hazard behavior category identification result of the current electric bicycle image is "running a red light", it is determined whether some other electric bicycles remain stationary behind the stop line after the current electric bicycle moves and move in the same direction after a certain period of time; if some other electric bicycles remain stationary behind the stop line after the current electric bicycle moves and move in the same direction after a certain period of time, a voice broadcast warning is given to the driver of the current electric bicycle; or When the traffic safety hazard behavior category identification result of the current electric bicycle image is "running a red light", it is determined whether the motor vehicle on the adjacent motor vehicle lane with the same travel direction is stationary; if the motor vehicle on the adjacent motor vehicle lane with the same travel direction is stationary, a voice broadcast warning is given to the driver of the current electric bicycle.
10. The method for identifying traffic safety hazard behaviors by using an electric bicycle persuasion robot according to claim 5, characterized in that: The method further includes: identifying the traffic safety hazard behavior category in the current electric bicycle image by using the quantized multi-label image classification model to obtain a traffic safety hazard behavior category identification result of the current electric bicycle image; For the current electric bicycle image with a license plate identified, the license plate number in the current electric bicycle image is identified by using the PPOCRv4 algorithm to obtain a license plate number recognition result of the current electric bicycle; The license plate number information stored in the current electric bicycle license plate is read by the RFID reader / writer in the electric bicycle persuasion robot to obtain the actual result of the license plate number of the current electric bicycle; When the license plate number recognition result of the current electric bicycle is inconsistent with the actual license plate number result, the actual license plate number result of the current electric bicycle is marked on the current electric bicycle image.
Citation Information
Patent Citations
Pedestrian re-identification method and system based on generative adversarial network
CN112364791A
Method and system for evidence collection of traffic violation
CN113111876A
Multi-task attribute identification method and device, and computer readable storage medium
CN113128345A
Pedestrian multi-attribute identification method combining local region detection and multi-level feature capture
CN113139501A
Text description pedestrian re-identification method based on deep learning
CN117475369A