Non-motor vehicle driving identification method, device, computer and readable storage medium
Through convolutional neural network training of single-label and multi-label data sets, detection models are generated and merged, which solves the problems of recognition accuracy and reasoning speed in non-motor vehicle driving behavior recognition, and achieves efficient non-motor vehicle attribute recognition.
Patent Information
- Application Number
- CN202210033505.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-12
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2042-01-12
AI Technical Summary
The existing technology is difficult to balance the reasoning speed and recognition accuracy in non-motor vehicle driving behavior recognition. In particular, the multi-attribute recognition model for non-motor vehicles has low accuracy and slow reasoning speed.
Convolutional neural networks are used to train single-label and multi-label data sets to generate driver and non-motor vehicle detection models, and the recognition accuracy is improved by merging single-label and multi-label recognition models while maintaining fast inference speed.
It achieves relatively accurate recognition of non-motor vehicle drivers and vehicle attributes, solves the problem of low reasoning speed in traditional methods, and combines high recognition accuracy with fast reasoning.
Smart Images

Figure CN114529888B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of transportation, and in particular to a non-motor vehicle driving identification method, device, computer and readable storage medium. Background Art
[0002] With the continuous development of artificial intelligence, its application in smart transportation has become increasingly mature, and the traditional control of motor vehicles can no longer meet the needs of relevant departments today. Especially with the rise of the food delivery industry, it is very common for non-motor vehicles such as electric vehicles and bicycles to run red lights, drive in motor vehicle lanes, and overload. Therefore, it is particularly important to detect the driving behavior of non-motor vehicles and automatically identify the attributes of their drivers and the vehicles they drive.
[0003] At present, there are relatively few studies on the attribute recognition of people riding bicycles at home and abroad. Most of them use the following method to realize attribute recognition research: first use a detector to detect the location of the driver driving the vehicle, and then perform attribute recognition on the driver and non-motor vehicle respectively. For the various attributes of the driver and non-motor vehicle, such as the gender, age, clothing characteristics of the driver, and the category, direction, appearance characteristics of the non-motor vehicle, they are often classified through multi-label. Although the method is relatively simple as a whole and does not require separate training for each attribute, the accuracy of the model trained by the convolutional neural network cannot reach the level of practical use. In particular, some attributes have high accuracy, while other attributes have low accuracy, and it is impossible to adjust a single attribute. If multi-label classification is abandoned and a model is trained for each attribute separately, the inference speed of multiple models combined will be greatly reduced. Summary of the invention
[0004] Aiming at the problem that the existing attribute recognition model cannot take into account both the reasoning speed and the recognition accuracy, the present invention provides a non-motor vehicle driving recognition method, device, computer and readable storage medium.
[0005] The technical solution proposed by the present invention for the above-mentioned technical problem is as follows:
[0006] In a first aspect, the present invention provides a non-motor vehicle driving recognition method, the method comprising:
[0007] Preliminarily processing the captured image to obtain a preliminarily processed image of the driver driving the non-motor vehicle;
[0008] The initially processed images are made into a data set, wherein the data set includes a first data set for detection model training and a second data set for classification model training;
[0009] The drivers and non-motor vehicles in the first data set are respectively labeled, and a preset detection model is used for training to obtain a driver detection model and a non-motor vehicle detection model;
[0010] Inputting the second data set into the driver detection model to obtain a driver object; inputting the second data set into the non-motor vehicle detection model to obtain a non-motor vehicle object;
[0011] The driver objects are labeled based on the first preset association rule to obtain a driver single-label data set and a driver multi-label data set; the non-motor vehicle objects are labeled based on the second preset association rule to obtain a non-motor vehicle single-label data set and a non-motor vehicle multi-label data set;
[0012] Using a first convolutional neural network, the driver single-label dataset and the driver multi-label dataset are respectively trained until they meet the convergence requirements, and a trained first single-label recognition model and a first multi-label recognition model are respectively obtained; using a second convolutional neural network, the non-motor vehicle single-label dataset and the non-motor vehicle multi-label dataset are respectively trained until they meet the convergence requirements, and a trained second single-label recognition model and a second multi-label recognition model are respectively obtained;
[0013] The first single-label recognition model and the first multi-label recognition model are combined to obtain a driver recognition model; and the second single-label recognition model and the second multi-label recognition model are combined to obtain a non-motor vehicle recognition model.
[0014] Preferably, the step of inputting the second data set into the driver detection model to obtain a driver object comprises:
[0015] Inputting the second data set into the driver detection model to obtain four position coordinate points of the driver;
[0016] The four position coordinate points are used to determine the position rectangular frame of the driver as the driver object.
[0017] Preferably, the method of using a preset detection model for training to obtain a driver detection model and a non-motor vehicle detection model comprises:
[0018] The YOLOV5 detection model is used to train the corresponding annotations to obtain the corresponding driver detection model and the non-motor vehicle detection model.
[0019] Preferably, the first convolutional neural network and the second convolutional neural network both use a cross entropy loss function, satisfying the following relationship:
[0020]
[0021] Among them, xi represents the i-th sample, i = {1, 2, ..., n}, y i represents the label corresponding to the i-th sample, Net1 represents the first convolutional neural network trained on the driver single-label dataset; Net2 represents the first convolutional neural network trained on the driver multi-label dataset; Net4 represents the second convolutional neural network trained on the non-motor vehicle single-label dataset; Net5 represents the second convolutional neural network trained on the non-motor vehicle multi-label dataset; Net is one of Net1, Net2, Net4 or Net5.
[0022] Preferably, the step of merging the first single-label recognition model and the first multi-label recognition model to obtain a driver recognition model; and merging the second single-label recognition model and the second multi-label recognition model to obtain a non-motor vehicle recognition model comprises:
[0023] Copying the parameters of the first single-label recognition model and the parameters of the first multi-label recognition model into the driver recognition model as parameters of the driver recognition model;
[0024] The parameters of the second single-label recognition model and the parameters of the second multi-label recognition model are copied to the non-motor vehicle recognition model to serve as the parameters of the non-motor vehicle recognition model.
[0025] Preferably, the preliminarily processing the captured image to obtain a preliminarily processed image of the driver driving the non-motor vehicle comprises:
[0026] The captured pictures are filtered to obtain pictures containing the driver and the non-motor vehicle he is driving.
[0027] Preferably, after the steps of combining the first single-label recognition model and the first multi-label recognition model to obtain a driver recognition model; and combining the second single-label recognition model and the second multi-label recognition model to obtain a non-motor vehicle recognition model, the method further comprises:
[0028] The driver recognition model and the non-motor vehicle recognition model are used to recognize the image to be recognized respectively to output the attributes of the driver and the non-motor vehicle.
[0029] In a second aspect, the present invention provides a non-motor vehicle driving recognition device, the device comprising:
[0030] The initial processing module is used to perform initial processing on the captured image to obtain an initial processed image of the driver driving the non-motor vehicle;
[0031] A data set preparation module, used to prepare the initially processed images into a data set, wherein the data set includes a first data set for detection model training and a second data set for classification model training;
[0032] A first training module, for labeling the drivers and non-motor vehicles in the first data set respectively, and training them using a preset detection model to obtain a driver detection model and a non-motor vehicle detection model;
[0033] An object acquisition module, used for inputting the second data set into the driver detection model to obtain a driver object; inputting the second data set into the non-motor vehicle detection model to obtain a non-motor vehicle object;
[0034] A labeling module, for labeling the driver object based on a first preset association rule to obtain a driver single-label data set and a driver multi-label data set; and for labeling the non-motor vehicle object based on a second preset association rule to obtain a non-motor vehicle single-label data set and a non-motor vehicle multi-label data set;
[0035] A second training module is used to use the first convolutional neural network to train the driver single-label data set and the driver multi-label data set respectively until they meet the convergence requirements, and obtain the trained first single-label recognition model and the first multi-label recognition model respectively; use the second convolutional neural network to train the non-motor vehicle single-label data set and the non-motor vehicle multi-label data set respectively until they meet the convergence requirements, and obtain the trained second single-label recognition model and the second multi-label recognition model respectively;
[0036] A merging module is used to merge the first single-label recognition model and the first multi-label recognition model to obtain a driver recognition model; and merge the second single-label recognition model and the second multi-label recognition model to obtain a non-motor vehicle recognition model.
[0037] In a third aspect, the present invention further provides a computer, the computer comprising a processor, the processor being configured to implement the steps in the above-mentioned non-motor vehicle driving identification method when executing a computer program stored in a memory.
[0038] In a fourth aspect, the present invention further provides a readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps in the non-motor vehicle driving identification method as described above.
[0039] The technical solution provided by the embodiment of the present invention has the following beneficial effects:
[0040] The present invention uses captured images to create corresponding data sets, and the driver detection model and non-motor vehicle detection model generated by the present invention are used to obtain driver objects and non-motor vehicle objects. Subsequently, the non-motor vehicle and its driver are labeled with single labels and multiple labels, and four convolutional neural networks are used for training respectively to obtain the driver's single label and multiple label recognition models and the non-motor vehicle's single label and multiple label recognition models. Then, the driver's single label recognition model and the multiple label recognition model, the non-motor vehicle's single label recognition model and the multiple label recognition model are combined to obtain the corresponding driver recognition model and non-motor vehicle recognition model. When applied, the captured photos can be input into the driver recognition model and the non-motor vehicle recognition model to obtain the attributes of the driver and the non-motor vehicle, so as to obtain relatively accurate attributes. Compared with the traditional method that requires a separate model training for each attribute, which leads to a low reasoning speed, the present invention also ensures a better reasoning speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0042] Figure 1 A flowchart of a non-motor vehicle driving identification method provided by the present invention in one embodiment;
[0043] Figure 2 A functional module diagram of a non-motor vehicle driving identification device provided by the present invention in one embodiment. DETAILED DESCRIPTION
[0044] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0045] See also Figure 1 , which is a flow chart of a non-motor vehicle driving identification method provided by the present invention under one embodiment. The non-motor vehicle driving identification method is mainly used in a transportation system to identify the attributes of a non-motor vehicle on a target road surface, including but not limited to the driver, the driver's gender, the driver's appearance and clothing, the non-motor vehicle type, the non-motor vehicle appearance and the driving direction, etc.
[0046] like Figure 1 As shown, the non-motor vehicle driving identification method may include the following steps:
[0047] S101: Preliminary processing is performed on the captured image to obtain a preliminarily processed image of the driver driving the non-motor vehicle. Here, the captured image may be filtered to filter out images that do not include the non-motor vehicle and the driver, thereby obtaining an image that includes the driver and the non-motor vehicle he is driving.
[0048] S102: The initially processed images are made into a data set, wherein the data set includes a first data set for detection model training and a second data set for classification model training.
[0049] In this step, here, the first data set may be A1, and the second data set may be A2.
[0050] S103: The drivers and non-motor vehicles in the first data set are respectively labeled, and trained using a preset detection model to obtain a driver detection model and a non-motor vehicle detection model.
[0051] In this step, the first data set A1 is labeled to obtain driver labeling information and non-motor vehicle labeling information. Afterwards, YOLOV5 can be used to train the data set to obtain a driver detection model D_Net1 and a non-motor vehicle detection model D_Net2. Here, YOLOV5 is more suitable for snapshot scenes in transportation systems than other YOLO algorithms due to its flexibility and good speed.
[0052] S104: Inputting the second data set into the driver detection model to obtain a driver object; inputting the second data set into the non-motor vehicle detection model to obtain a non-motor vehicle object.
[0053] In this step, the second data set A2 is input into the driver detection model D_Net1 and the non-motor vehicle detection model D_Net2 respectively, so as to obtain the position coordinates of the driver and the non-motor vehicle.
[0054] Here, the position coordinates output by the driver detection model may include four coordinate points, located at the upper left corner coordinates (x1, y1), the lower left corner coordinates (x1, y2), the upper right corner (x2, y1) and the lower right corner coordinates (x2, y2). According to these four coordinates, the position rectangle of the driver can be obtained, thereby obtaining the driver object. Similarly, in the non-motor vehicle detection model, the position rectangle of the non-motor vehicle is obtained according to the four coordinate points, thereby obtaining the non-motor vehicle object.
[0055] S105: Labeling the driver object based on the first preset association rule to obtain a driver single-label data set and a driver multi-label data set; labeling the non-motor vehicle object based on the second preset association rule to obtain a non-motor vehicle single-label data set and a non-motor vehicle multi-label data set.
[0056] In this step, the first preset association rule is an association rule for people, which can be based on the correlation between gender and appearance (such as hair length), the correlation between gender and clothing (clothing style), the correlation between age and appearance, etc. For those that do not have correlation, they can be marked as single labels and counted as driver single label data set B1, such as age, clothing color and body shape. For those that have correlation, they can be marked as multi-label and counted as driver multi-label data set B2, such as gender, hair length and clothing style, which can be marked at the same time.
[0057] Similarly, the second preset association rule is an association rule for non-motor vehicles, which can be based on the correlation between non-motor vehicle type and non-motor vehicle appearance, the correlation between non-motor vehicle brand and non-motor vehicle color, non-motor vehicle license plate and non-motor vehicle type, etc. For those that do not have correlation, they can also be marked as single labels and counted as non-motor vehicle single label data set C1, such as non-motor vehicle age, non-motor vehicle appearance completeness and vehicle orientation, etc. For those that have correlation, they can also be marked as multi-label and counted as non-motor vehicle multi-label data set C2, such as non-motor vehicle brand, non-motor vehicle type and non-motor vehicle color attributes can be marked at the same time.
[0058] S106: Using a first convolutional neural network, the driver single-label dataset and the driver multi-label dataset are respectively trained until they meet the convergence requirements, and a trained first single-label recognition model and a trained first multi-label recognition model are respectively obtained; using a second convolutional neural network, the non-motor vehicle single-label dataset and the non-motor vehicle multi-label dataset are respectively trained until they meet the convergence requirements, and a trained second single-label recognition model and a second multi-label recognition model are respectively obtained.
[0059] In this step, the first convolutional neural network is used to train the driver object with a single-label data set and a multi-label data set, respectively, and the second convolutional neural network is used to train the non-motor vehicle object with a single-label data set and a multi-label data set, respectively.
[0060] Here, the first convolutional neural network may include two sub-convolutional neural networks, namely, a driver single-label convolutional neural network trained with a single-label data set for the driver object, which can be counted as Net1; and a driver multi-label convolutional neural network trained with multi-label data for the driver object, which can be counted as Net2.
[0061] Similarly, the second convolutional neural network may include two sub-convolutional neural networks, namely, a non-motor vehicle single-label convolutional neural network that is trained with a single-label data set for non-motor vehicle objects, which can be counted as Net4; and a non-motor vehicle multi-label convolutional neural network that is trained with multi-label data for non-motor vehicle objects, which can be counted as Net5.
[0062] During the training process, the above-mentioned Net1, Net2, Net4 and Net5 networks converge through cyclic iterations, and the loss tends to be stable, thus meeting the convergence requirements. Here, Net1, Net2, Net4 and Net5 all use the cross entropy loss function, and satisfy the following relationship:
[0063]
[0064] Among them, x i represents the i-th sample, i = {1, 2, ..., n}, y i represents the label corresponding to the i-th sample, Net1 represents the first convolutional neural network trained on the driver single-label dataset; Net2 represents the first convolutional neural network trained on the driver multi-label dataset; Net4 represents the second convolutional neural network trained on the non-motor vehicle single-label dataset; Net5 represents the second convolutional neural network trained on the non-motor vehicle multi-label dataset; Net is one of Net1, Net2, Net4 or Net5.
[0065] It can be understood that Net1, Net2, Net4 and Net5 obtained after the training are completed correspond to the first single-label recognition model, the first multi-label recognition model, the second single-label recognition model and the second multi-label recognition model respectively.
[0066] S107: Merge the first single-label recognition model and the first multi-label recognition model to obtain a driver recognition model; merge the second single-label recognition model and the second multi-label recognition model to obtain a non-motor vehicle recognition model.
[0067] In this step, the single-label model of the driver object and the single-label model of the non-motor vehicle object are merged, that is, the first single-label recognition model and the first multi-label recognition model are merged to obtain the driver recognition model, which can be calculated as Net3. Similarly, the multi-label model of the driver object and the multi-label model of the non-motor vehicle object are merged to obtain the non-motor vehicle recognition model, which can be calculated as Net6.
[0068] In this step, parallel relationships are used for merging, and the merging is achieved by copying the parameters of each model into one model, that is:
[0069] For the first single-label recognition model and the first multi-label recognition model, the parameters of the first single-label recognition model and the parameters of the first multi-label recognition model are copied to the driver recognition model (new recognition model) and used as model parameters of the driver recognition model.
[0070] Similarly, for the second single-label recognition model and the second multi-label recognition model, the parameters of the second single-label recognition model and the parameters of the second multi-label recognition model are copied to the non-motor vehicle recognition model (new recognition model) and used as model parameters of the non-motor vehicle recognition model.
[0071] The non-motor vehicle driving identification method provided by the present invention uses the captured pictures to make the corresponding data set. The driver detection model and the non-motor vehicle detection model generated by the present invention are used to obtain the driver object and the non-motor vehicle object. Then, the non-motor vehicle and its driver are labeled with single labels and multiple labels, and four convolutional neural networks are used to train them respectively to obtain the driver's single label and multiple label recognition models and the non-motor vehicle's single label and multiple label recognition models. Then, the driver's single label recognition model and the multiple label recognition model, the non-motor vehicle's single label recognition model and the multiple label recognition model are combined to obtain the corresponding driver recognition model and the non-motor vehicle recognition model. When applied, the captured photos can be input into the driver recognition model and the non-motor vehicle recognition model to obtain the attributes of the driver and the non-motor vehicle, so as to obtain relatively accurate attributes. Compared with the traditional method that requires a separate model training for each attribute, which leads to the low reasoning speed, the present invention also ensures a better reasoning speed.
[0072] It can be understood that after step S107, the process of the non-motor vehicle driving identification method may also include the following steps: using the driver identification model and the non-motor vehicle identification model to identify the image to be identified to output the attributes of the driver and the non-motor vehicle, thereby obtaining a classification result.
[0073] See also Figure 2 , is a functional module diagram of a non-motor vehicle driving recognition device provided by the present invention under one embodiment. The non-motor vehicle driving recognition device 100 may include an initial processing module 11, a data set making module 12, a first training module 13, an object acquisition module 14, a labeling module 15, a second training module 16, a merging module 17 and an output module 18. The corresponding data set is made by using the captured image through the cooperation between the functional modules. The driver detection model and the non-motor vehicle detection model generated by the non-motor vehicle detection model are used to obtain the driver object and the non-motor vehicle object. Then, the single-label and multi-label recognition models of the driver and the single-label and multi-label recognition models of the non-motor vehicle are obtained by labeling the non-motor vehicle and its driver with single labels and multi-labels, and four convolutional neural networks are used for training respectively. Then, the single-label recognition model and multi-label recognition model of the driver, the single-label recognition model and multi-label recognition model of the non-motor vehicle are merged to obtain the corresponding driver recognition model and the non-motor vehicle recognition model.
[0074] like Figure 2 As shown, in the non-motor vehicle driving identification device 100 provided by the present invention, the specific functions of each functional module are as follows:
[0075] The initial processing module 11 is used to perform initial processing on the captured image to obtain an initial processed image of the driver driving the non-motor vehicle;
[0076] A data set preparation module 12, used to prepare the initially processed images into a data set, wherein the data set includes a first data set for detection model training and a second data set for classification model training;
[0077] A first training module 13 is used to label the drivers and non-motor vehicles in the first data set respectively, and train them using a preset detection model to obtain a driver detection model and a non-motor vehicle detection model;
[0078] The object acquisition module 14 is used to input the second data set into the driver detection model to obtain a driver object; input the second data set into the non-motor vehicle detection model to obtain a non-motor vehicle object;
[0079] The labeling module 15 is used to label the driver object based on the first preset association rule to obtain a driver single-label data set and a driver multi-label data set; and label the non-motor vehicle object based on the second preset association rule to obtain a non-motor vehicle single-label data set and a non-motor vehicle multi-label data set;
[0080] The second training module 16 is used to use the first convolutional neural network to train the driver single-label dataset and the driver multi-label dataset respectively until they meet the convergence requirements, and obtain the trained first single-label recognition model and the first multi-label recognition model respectively; use the second convolutional neural network to train the non-motor vehicle single-label dataset and the non-motor vehicle multi-label dataset respectively until they meet the convergence requirements, and obtain the trained second single-label recognition model and the second multi-label recognition model respectively.
[0081] The merging module 17 is used to merge the first single-label recognition model and the first multi-label recognition model to obtain a driver recognition model; and merge the second single-label recognition model and the second multi-label recognition model to obtain a non-motor vehicle recognition model.
[0082] The output module 18 is used to respectively use the driver recognition model and the non-motor vehicle recognition model to recognize the image to be recognized so as to output the attributes of the driver and the non-motor vehicle.
[0083] It is understandable that, in a specific application process, the present invention provides a computer, wherein the computer includes a processor, and the processor is used to implement the steps in the above-mentioned non-motor vehicle driving identification method when executing a computer program stored in a memory.
[0084] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the computer device, and uses various interfaces and lines to connect various parts of the entire computer device.
[0085] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the computer device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0086] In addition, the present invention also provides a readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the aforementioned non-motor vehicle driving identification method are implemented.
[0087] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A non-motor vehicle driving identification method, characterized in that: The method comprises: Preliminarily processing the captured image to obtain a preliminarily processed image of the driver driving the non-motor vehicle; The initially processed images are made into a data set, wherein the data set includes a first data set for detection model training and a second data set for classification model training; The drivers and non-motor vehicles in the first data set are respectively labeled, and a preset detection model is used for training to obtain a driver detection model and a non-motor vehicle detection model; Inputting the second data set into the driver detection model to obtain a driver object; inputting the second data set into the non-motor vehicle detection model to obtain a non-motor vehicle object; The driver objects are labeled based on the first preset association rule to obtain a driver single-label data set and a driver multi-label data set; the non-motor vehicle objects are labeled based on the second preset association rule to obtain a non-motor vehicle single-label data set and a non-motor vehicle multi-label data set; Using a first convolutional neural network, the driver single-label dataset and the driver multi-label dataset are respectively trained until they meet the convergence requirements, and a trained first single-label recognition model and a first multi-label recognition model are respectively obtained; using a second convolutional neural network, the non-motor vehicle single-label dataset and the non-motor vehicle multi-label dataset are respectively trained until they meet the convergence requirements, and a trained second single-label recognition model and a second multi-label recognition model are respectively obtained; The first single-label recognition model and the first multi-label recognition model are combined to obtain a driver recognition model; and the second single-label recognition model and the second multi-label recognition model are combined to obtain a non-motor vehicle recognition model.
2. The non-motor vehicle driving identification method according to claim 1, characterized in that: The step of inputting the second data set into the driver detection model to obtain a driver object comprises: Inputting the second data set into the driver detection model to obtain four position coordinate points of the driver; The four position coordinate points are used to determine the position rectangular frame of the driver as the driver object.
3. The non-motor vehicle driving identification method according to claim 1, characterized in that: The method of using a preset detection model to train to obtain a driver detection model and a non-motor vehicle detection model includes: The YOLOV5 detection model is used to train the corresponding annotations to obtain the corresponding driver detection model and the non-motor vehicle detection model.
4. The non-motor vehicle driving identification method according to claim 1, characterized in that: The first convolutional neural network and the second convolutional neural network both use a cross entropy loss function, satisfying the following relationship: Among them, x i represents the i-th sample, i = {1, 2, ..., n}, y i represents the label corresponding to the i-th sample, Net1 represents the first convolutional neural network trained on the driver single-label dataset; Net2 represents the first convolutional neural network trained on the driver multi-label dataset; Net4 represents the second convolutional neural network trained on the non-motor vehicle single-label dataset; Net5 represents the second convolutional neural network trained on the non-motor vehicle multi-label dataset; Net is one of Net1, Net2, Net4 or Net5.
5. The non-motor vehicle driving identification method according to claim 1, characterized in that: said combining the first single-label recognition model and the first multi-label recognition model to obtain a driver recognition model; Combining the second single-label recognition model and the second multi-label recognition model to obtain a non-motor vehicle recognition model includes: Copying the parameters of the first single-label recognition model and the parameters of the first multi-label recognition model into the driver recognition model as parameters of the driver recognition model; The parameters of the second single-label recognition model and the parameters of the second multi-label recognition model are copied to the non-motor vehicle recognition model to serve as the parameters of the non-motor vehicle recognition model.
6. The non-motor vehicle driving identification method according to claim 1, characterized in that: The initial processing of the captured image to obtain the initial processed image of the driver driving the non-motor vehicle comprises: The captured pictures are filtered to obtain pictures containing the driver and the non-motor vehicle he is driving.
7. The non-motor vehicle driving identification method according to claims 1 to 6, characterized in that: said combining the first single-label recognition model and the first multi-label recognition model to obtain a driver recognition model; After the step of combining the second single-label recognition model and the second multi-label recognition model to obtain a non-motor vehicle recognition model, the method further includes: The driver recognition model and the non-motor vehicle recognition model are used to recognize the image to be recognized respectively to output the attributes of the driver and the non-motor vehicle.
8. A non-motor vehicle driving identification device, characterized in that: The device comprises: The initial processing module is used to perform initial processing on the captured image to obtain an initial processed image of the driver driving the non-motor vehicle; A data set preparation module, used to prepare the initially processed images into a data set, wherein the data set includes a first data set for detection model training and a second data set for classification model training; A first training module, for labeling the drivers and non-motor vehicles in the first data set respectively, and training them using a preset detection model to obtain a driver detection model and a non-motor vehicle detection model; An object acquisition module, used for inputting the second data set into the driver detection model to obtain a driver object; inputting the second data set into the non-motor vehicle detection model to obtain a non-motor vehicle object; A labeling module, for labeling the driver object based on a first preset association rule to obtain a driver single-label data set and a driver multi-label data set; and for labeling the non-motor vehicle object based on a second preset association rule to obtain a non-motor vehicle single-label data set and a non-motor vehicle multi-label data set; A second training module is used to use the first convolutional neural network to train the driver single-label data set and the driver multi-label data set respectively until they meet the convergence requirements, and obtain the trained first single-label recognition model and the first multi-label recognition model respectively; use the second convolutional neural network to train the non-motor vehicle single-label data set and the non-motor vehicle multi-label data set respectively until they meet the convergence requirements, and obtain the trained second single-label recognition model and the second multi-label recognition model respectively; A merging module is used to merge the first single-label recognition model and the first multi-label recognition model to obtain a driver recognition model; and merge the second single-label recognition model and the second multi-label recognition model to obtain a non-motor vehicle recognition model.
9. A computer, characterized in that: The computer includes a processor, and the processor is used to implement the steps in the non-motor vehicle driving identification method as described in any one of claims 1 to 7 when executing a computer program stored in a memory.
10. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps in the non-motor vehicle driving identification method as described in any one of claims 1 to 7 are implemented.
