Special vehicle identification model training method, identification method and system
Through neural network model training and loss function optimization, combined with real driving data and target tracking algorithm, the problems of low recognition ability and poor timeliness in special vehicle recognition methods are solved, and high-precision and fast recognition effects are achieved, suitable for autonomous vehicles .
Patent Information
- Application Number
- CN202310581259.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-23
- Publication Date
- 2024-11-26
AI Technical Summary
The existing special vehicle identification methods are disconnected from the actual driving process, resulting in low recognition ability, poor generalization and poor timeliness.
Using a special vehicle recognition model training method based on neural network, the target images under different angles, distances and lighting conditions are obtained through actual driving vehicles, and iterative training is carried out, and combined with the target tracking algorithm and loss function optimization, high-precision and low-latency Identify models and deploy them on the on-board chip to achieve rapid identification and human-computer interaction.
It improves the recognition accuracy and timeliness of special vehicles, meets the needs of rapid response in autonomous driving, and enhances the generalization and practicality of the identification model.
Smart Images

Figure FDA0004241705750000021 
Figure FDA0004241705750000022 
Figure FDA0004241705750000023
Abstract
Description
Technical Field
[0001] The present application relates to the field of autonomous driving technology, and specifically to a special vehicle recognition model training method, recognition method and system. Background Art
[0002] Autonomous driving is a driving technology that uses a computer system to achieve unmanned driving of vehicles. It can free people from the driver's seat and has far-reaching significance from the perspective of liberating productivity.
[0003] For autonomous driving, in addition to ensuring the basic premise of safe driving, how to achieve intelligent driving in the face of various actual road conditions is also crucial. Specifically, how to effectively identify special vehicles on the road (such as ambulances, police cars, consumer vehicles, etc.) and then take avoidance measures is the focus of autonomous driving vehicles in achieving intelligent driving. At present, the following measures are mainly taken for special vehicle identification: first, set screening rules based on the appearance or size of different types of special vehicles; then, based on the screening rules, compare the target image and standard image obtained by sensors, lidar, etc. to obtain the information of the current special vehicle; finally, display the special vehicle information through the human-computer interaction interface so that personnel can be informed.
[0004] However, the existing special vehicle identification method based on screening rules cannot be compared with the actual driving process during the rule specification process, that is, the specification of the screening rules is only related to the vehicle itself, and does not consider external factors, such as the angle of target image acquisition, the interference of adjacent vehicles in actual road conditions, etc.; thus, this method has the defects of low recognition ability and poor generalization when performing special vehicle identification. At the same time, since it adopts a one-by-one comparison method during the identification process, it also has the defect of poor recognition timeliness. Summary of the invention
[0005] The purpose of this application is to provide a special vehicle identification model training method, identification method and system to improve the technical problems of low recognition ability, poor generalization and poor timeliness when performing special vehicle identification based on existing screening rules.
[0006] To achieve the above objectives, this application proposes the following technical solutions:
[0007] In a first aspect, the technical solution provides a special vehicle recognition model training method, including:
[0008] Acquire a number of target images based on actual driving vehicles; wherein the target images are images of special vehicles acquired at different angles, different distances and different lighting conditions based on preset acquisition rules; each of the target images has a label of the actual category of the corresponding special vehicle;
[0009] Iteratively training the first classification model based on the target image and the label to obtain an auxiliary training model, and obtaining a prediction probability of a special vehicle corresponding to each of the target images based on the auxiliary training model;
[0010] The target image is used as an input of the second classification model, and the error between the output of the second classification model and the label corresponding to the target image, and the error between the output of the second classification model and the predicted probability of the special vehicle corresponding to the target image are both less than corresponding thresholds, so as to iteratively train the second classification model to obtain a target recognition model;
[0011] Among them, the network scale of the first classification model is higher than that of the second classification model, the accuracy of the first classification model is higher than that of the second classification model, and the delay of the first classification model is lower than that of the second classification model.
[0012] Furthermore, the acquiring of a plurality of target images based on the actual driving of the vehicle includes:
[0013] Acquire a number of original images based on sensors deployed on the actual driving vehicle;
[0014] Screening the plurality of original images based on a third classification model to obtain the plurality of target images corresponding to various types of special vehicles;
[0015] The target images are grouped based on a target tracking algorithm; wherein each group of target images corresponds to the same special vehicle at different angles, different distances or different lighting conditions.
[0016] Furthermore, the first classification model is iteratively trained based on the target image and the label to obtain an auxiliary training model, and the prediction probability of a special vehicle corresponding to each target image is obtained based on the auxiliary training model; the target image is used as the input of the second classification model, and the error between the output of the second classification model and the label corresponding to the target image, and the error between the output of the second classification model and the prediction probability of the special vehicle corresponding to the target image are both less than the corresponding threshold value. The second classification model is iteratively trained to obtain a target recognition model; including:
[0017] based on Constructing a first loss function corresponding to the first classification model, and taking the plurality of target images as input, iteratively training the first classification model with the loss value of the first loss function being less than a first threshold as the goal to obtain the auxiliary training model; wherein the second loss function of the auxiliary training model is Among them, i is the category of special vehicles, z i is the logits value corresponding to category i, T is the temperature value, qi is the probability corresponding to category i; T high is a high temperature value other than 1;
[0018] Taking the second loss function and as the third loss function corresponding to the second classification model, and taking the several target images as input, the second classification model is iteratively trained with the loss value of the third loss function being less than a second threshold as the goal to obtain the target recognition model.
[0019] In a second aspect, the present technology provides a special vehicle identification method, including:
[0020] Based on the on-board chip, special vehicles in the driving process are identified and displayed on the human-vehicle interaction interface of the target vehicle; wherein the on-board chip is loaded with the target recognition model.
[0021] Furthermore, the identification of special vehicles during driving based on the vehicle-mounted chip includes:
[0022] quantizing the weights of the neural network layers of the target recognition model;
[0023] Special vehicles in the driving process are identified based on the target recognition model after weight quantization.
[0024] Furthermore, the identifying of the special vehicle during driving based on the vehicle chip and displaying it on the human-vehicle interaction interface of the target vehicle includes:
[0025] Based on the confidence level, the recognition result of the special vehicle is displayed in different colors according to the color gradient map;
[0026] The external environment where the target vehicle is located is obtained to display the recognition results in different forms; wherein the different forms of display include: text floating display, sound vibration display and voice broadcast display.
[0027] Furthermore, after the special vehicle in the driving process is identified based on the vehicle chip and displayed on the human-vehicle interaction interface of the target vehicle, it also includes:
[0028] Evaluating the special vehicle recognition result displayed on the human-vehicle interaction interface of the target vehicle to obtain an evaluation result;
[0029] Optimize and adjust preset collection rules according to the evaluation results;
[0030] The method is re-described based on the adjusted acquisition rules to obtain a new target classification model.
[0031] In a third aspect, the technical solution provides a special vehicle recognition model training system, including:
[0032] A sample acquisition module is used to acquire a number of target images based on actual driving vehicles; wherein the target images are images of special vehicles acquired at different angles, different distances and different lighting conditions based on preset acquisition rules; each of the target images has a label of the actual category of the corresponding special vehicle;
[0033] A first training module is used to iteratively train the first classification model based on the target image and the label to obtain an auxiliary training model, and obtain a prediction probability of a special vehicle corresponding to each of the target images based on the auxiliary training model;
[0034] The second training module is used to use the target image as the input of the second classification model, and iteratively train the second classification model with the error between the output of the second classification model and the label corresponding to the target image, and the error between the output of the second classification model and the predicted probability of the special vehicle corresponding to the target image being less than corresponding thresholds to obtain a target recognition model.
[0035] In a fourth aspect, the technical solution provides an electronic device, comprising at least one processor, wherein the processor is coupled to a memory, wherein a computer program is stored in the memory, and wherein the computer program is configured to execute the method described when executed by the processor.
[0036] In a fifth aspect, the present technical solution provides a computer-readable storage medium, characterized in that a computer program is stored thereon, and the computer program is used to execute the described method.
[0037] It can be seen from the above technical solutions that the technical solution of the present application provides a special vehicle recognition model training method to improve the current technical defects of low generalization and poor recognition ability in special vehicle recognition.
[0038] Considering that the fundamental reason why the generalization and recognition ability of special vehicle identification cannot meet the actual recognition requirements is based on the rule-based screening method, this technical solution designs a recognition method based on a neural network model. Specifically, in the model training stage, the actual driving vehicle is first used to obtain samples so that the acquired target image contains external factors such as angle, distance and illumination that will affect the accuracy of model recognition, so as to improve the generalization of subsequent model recognition. Then, considering that the trained model not only needs to have high accuracy and timeliness, but also needs to be loaded on mobile devices such as vehicle-mounted chips to complete the interactive display of recognition results and human-computer interaction interfaces. Therefore, the second classification model is used as the training target, and the first classification model is introduced to assist in training, although the model scale is larger than the second classification model, but the accuracy and latency are better than it; thereby, the second classification model not only meets the requirements of fast operation when loaded on the vehicle-mounted chip, but also has the advantages of high accuracy and strong timeliness. In this way, the advantages of high recognition accuracy when identifying special vehicles in automatic driving are met, and due to the strong recognition timeliness, it can also be recognized more quickly to meet the needs of rapid response in driving.
[0039] It should be appreciated that all combinations of the foregoing concepts, as well as additional concepts described in greater detail below, may be considered to be part of the inventive subject matter of the present disclosure, provided such concepts are not mutually inconsistent.
[0040] The foregoing and other aspects, embodiments and features of the present application can be more fully understood from the following description in conjunction with the accompanying drawings. Other additional aspects of the present application, such as the features and / or beneficial effects of the exemplary embodiments, will be apparent from the following description or learned through practice of the specific embodiments according to the teachings of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The drawings are not intended to be drawn to scale. In the drawings, each identical or nearly identical component shown in various figures may be represented by the same reference numeral. For clarity, not every component is labeled in each figure. Embodiments of various aspects of the present application will now be described by way of example and with reference to the accompanying drawings, in which:
[0042] Figure 1 is a flow chart of the special vehicle recognition model training method described in this embodiment;
[0043] Figure 2 A flowchart for target image acquisition;
[0044] Figure 3 Another flow chart for performing target image acquisition;
[0045] Figure 4 Flowchart for iterative training of target recognition model;
[0046] Figure 5 is a flow chart of the special vehicle identification method described in this embodiment;
[0047] Figure 6 Flowchart for preprocessing of target recognition model before recognition;
[0048] Figure 7 A flowchart for displaying the recognition results based on the human-computer interaction interface;
[0049] Figure 8 A flowchart for further optimizing the target recognition model based on the recognition results;
[0050] Fig. 9 is a block diagram of the composition of the special vehicle recognition model training system described in this embodiment;
[0051] Fig.10 Schematic diagram of the structure of the electronic device described in this embodiment. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the embodiments of the present application will be clearly and completely described below in conjunction with the drawings of the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the described embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application. Unless otherwise defined, the technical terms or scientific terms used herein should be the common meanings understood by people with general skills in the field to which this application belongs.
[0053] The words "first", "second" and similar words used in the patent application specification and claims of this application do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, unless the context clearly indicates otherwise, the singular form of "a", "an" or "the" and other similar words do not indicate a quantitative limitation, but rather indicate the presence of at least one. Words such as "include" or "comprise" mean that the elements or objects appearing before "include" or "comprise" include the features, wholes, steps, operations, elements and / or components listed after "include" or "comprise", and do not exclude the existence or addition of one or more other features, wholes, steps, operations, elements, components and / or their collections. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0054] Identifying special vehicles and displaying them on the human-computer interaction interface is of great significance to improving the intelligence of autonomous driving. However, the existing identification of special vehicles is mostly based on screening rules. Since the formulation stage of the screening rules is independent of the actual driving process, the identification of special vehicles in the actual autonomous driving process has the problems of low generalization and poor recognition ability. Therefore, this embodiment aims to provide a special vehicle identification model training method and identification method to improve the above defects.
[0055] The following is a further detailed introduction to a special vehicle recognition model training method disclosed in this embodiment in conjunction with the accompanying drawings.
[0056] like Figure 1 As shown, the training method comprises:
[0057] Step S102: Acquire a number of target images based on the actual driving vehicle.
[0058] The actual driving vehicle refers to an autonomous driving vehicle that is normally traveling on a real road section. The several target images, and each of the target images has a label of the corresponding actual category of the special vehicle to be used as an input sample for subsequent model training. In order to improve the generalization of the trained model when performing special vehicle recognition, it should be ensured that the several target images correspond to various special vehicles at different angles, different distances or different lighting conditions during acquisition. At the same time, the target image is acquired based on various sensors mounted on the actual driving vehicle. Based on this, in the specific implementation, the target image is realized based on a preset acquisition rule. For example, the actual distance and relative angular position between the special vehicle and the actual driving vehicle are obtained based on the vehicle-mounted radar, so that the camera is called to take pictures when the actual distance or relative angular position reaches the preset distance or preset angle. For another example, the camera is called to take pictures when the ambient light brightness reaches the preset brightness detected by the light sensor.
[0059] Since the real road section includes various types of vehicles, except for special vehicles, the sensor directly obtains all the original images corresponding to various types of vehicles. Figure 2 As shown, the acquisition of the several target images is performed in the following manner:
[0060] Step S1022: acquiring a plurality of original images based on sensors deployed on the actual driving vehicle.
[0061] Step S1024: Screening the plurality of original images based on the third classification model to obtain the plurality of target images corresponding to each type of special vehicle.
[0062] The third classification model described in this embodiment is specifically built based on a CNN network (i.e., Convolutional Neural Network, feedforward convolutional neural network), which takes the original image as input to obtain the corresponding vehicle category (i.e., special vehicle or ordinary vehicle). In addition, when the frequency of special vehicles in actual driving is low, the number of target images is ensured to ensure the effective acquisition of the following target recognition model.
[0063] Preferably, after acquiring the target images, the following steps are further performed to improve the regularity of subsequent model training, thereby facilitating the technicians to perform corresponding evaluation and analysis to better achieve model optimization.
[0064] Step S1026: grouping the target images based on a target tracking algorithm; wherein each group of target images corresponds to the same special vehicle at different angles, different distances or different lighting conditions.
[0065] In this embodiment, the target tracking algorithm first performs target detection based on the yolov4 or yolov5 algorithm to anchor the special vehicle in the target image, and then adds a tracking frame to it to obtain all target images corresponding to it, thereby realizing grouping. Among them, the yolo algorithm (You Only Look Once, unified and real-time object detection algorithm) is an object recognition and positioning algorithm based on a deep neural network.
[0066] As an optional implementation, Figure 3 As shown, the acquisition of the plurality of target images may also be performed in the following manner:
[0067] Step S1022': acquiring a plurality of original images based on the sensors deployed on the actual driving vehicle.
[0068] Step S1024': extracting image features from the plurality of original images in sequence based on an open source neural network.
[0069] Step S1026': input the extracted image features into a binary classifier to screen and obtain the target images corresponding to each type of special vehicle.
[0070] The binary classifier uses focal loss as the loss function.
[0071] Step S104: iteratively train the first classification model based on the target image and the label to obtain an auxiliary training model, and obtain a special vehicle prediction probability corresponding to each of the target images based on the auxiliary training model.
[0072] Step S106, taking the target image as the input of the second classification model, and iteratively training the second classification model with the error between the output of the second classification model and the label corresponding to the target image, and the error between the output of the second classification model and the predicted probability of the special vehicle corresponding to the target image being less than corresponding thresholds, to obtain a target recognition model.
[0073] Among them, the network scale of the first classification model is higher than that of the second classification model, the accuracy of the first classification model is higher than that of the second classification model, and the delay of the first classification model is lower than that of the second classification model.
[0074] Since the target recognition model finally obtained in this embodiment needs to be carried on a mobile device, that is, an on-board chip. Therefore, it has certain limitations in terms of network scale, number of parameters, etc.; and these limitations will cause the target recognition model to have the defects of low recognition accuracy and poor latency; and these defects will cause the target recognition model to have the same defects as the prior art when it is finally applied. Therefore, this embodiment introduces a first classification model with a higher network scale, higher model accuracy, and better latency to assist in training the original model corresponding to the target recognition model, that is, the second classification model. Thereby, the target recognition model finally obtained meets the requirements of the on-board chip in terms of neural network deployment, and meets the requirements of special vehicle recognition in terms of performance. Specifically, the second classification model described in this embodiment uses a network architecture that can use depthwise separable convolution and point-by-point convolution.
[0075] As a specific implementation method, Figure 4 As shown, steps S104 to S106 are specifically obtained in the following manner:
[0076] Step S104', based on Construct a first loss function corresponding to the first classification model, and use the plurality of target images as input, iteratively train the first classification model with the loss value of the first loss function being less than a first threshold as a goal to obtain the auxiliary training model.
[0077] Among them, the second loss function of the auxiliary training model is Among them, i is the category of special vehicles, z i is the logits value (i.e., model value) corresponding to category i, T is the temperature value, q i is the probability corresponding to category i; T high is a high temperature value other than 1.
[0078] Step S106', using the second loss function and as the third loss function corresponding to the second classification model, and taking the several target images as input, the second classification model is iteratively trained with the loss value of the third loss function being less than a second threshold as the goal to obtain the target recognition model.
[0079] In the specific implementation, T high The higher the value, the greater the probability distribution entropy of each special vehicle category output by the softmax layer (i.e., normalization layer) in the neural network of the auxiliary training model. At this time, the information carried by the negative label will be relatively amplified, and the model training will pay more attention to the negative label. At this time, when the auxiliary second classification model is trained, the second classification model will obtain a richer amount of information; it makes up for the adverse effects of the defects in the neural network deployment of the second classification model on the training results.
[0080] This embodiment also provides a special vehicle recognition method based on the target recognition model obtained in Embodiment 1. The method will be described in detail below in conjunction with the accompanying drawings.
[0081] like Figure 5 As shown, the identification method includes:
[0082] Step S202: identifying a special vehicle during driving based on the on-board chip and displaying it on the human-vehicle interaction interface of the target vehicle; wherein the on-board chip is loaded with the target recognition model.
[0083] As a specific implementation method, in order to further improve the timeliness of the target recognition model recognition to meet the recognition requirements in actual driving, such as Figure 6 As shown, the following steps are also included:
[0084] Step S2012: quantize the weights of each neural network layer of the target recognition model.
[0085] In this embodiment, the specific method of weight quantization is: converting the 32-bit floating point weights of each neural network layer into 8-bit fixed point numbers, thereby reducing the memory usage of the vehicle chip by 4 times, thereby reducing power consumption and increasing computing speed.
[0086] Step S2014: identifying special vehicles during driving based on the weighted quantized target recognition model.
[0087] As another specific implementation, in order to better enable the occupants to obtain the recognition result, Figure 7 As shown, the following steps are included:
[0088] Step S2032: Display the recognition result of the special vehicle in different colors according to the color gradient map based on the confidence level.
[0089] In specific implementation, warm colors are used to display high-confidence recognition results, and cold colors are used to display low-confidence recognition results, so that high-confidence recognition results can better attract the attention of people in the car.
[0090] Step S2034, obtaining the external environment where the target vehicle is located to display the recognition results in different forms; wherein the different forms of display include: text floating display, sound vibration display and voice broadcast display.
[0091] In specific implementation, if the target vehicle is in a noisy environment, a combination of text floating display and sound vibration display can be used. If the target vehicle is driving at night, a voice broadcast display can be used. As a further implementation method, the occupants can choose the display format according to their information viewing preferences; they can also personalize the display format. For example, the size, font, floating display position and floating display duration of the text floating display can be set; the vibration volume and vibration frequency of the sound vibration display can be set; the voice volume and original voice source of the language broadcast display can be set.
[0092] As a preferred embodiment, Figure 8 As shown, after step S203, the following steps are further performed to further optimize the target recognition model to improve the recognition effect of special vehicles.
[0093] Step S2042 is used to evaluate the special vehicle recognition result displayed on the human-vehicle interaction interface of the target vehicle to obtain an evaluation result.
[0094] Step S2044 is used to optimize and adjust the preset collection rules according to the evaluation results.
[0095] Specifically, the optimization of the acquisition rule includes optimizing the preset brightness, preset spacing and preset relative angle position when the camera is shooting.
[0096] Step S2046: Based on the adjusted acquisition rules, the actual driving vehicle is controlled to reacquire the target image, and the iterative training step is repeated to obtain a new target classification model.
[0097] At this point, the collection rules can be adjusted based on the evaluation results, and then the target classification model can be adjusted and optimized, thereby improving the recognition rate in actual use.
[0098] As can be seen from the above, the recognition method described in this embodiment is based on a neural network model. And when training the model, the influence of training samples on generalization, as well as the dual requirements of model deployment requirements and model recognition performance are taken into account. As a result, the target recognition model finally obtained has the advantages of good generalization, strong recognition ability and high timeliness when performing special vehicle recognition. Furthermore, the timeliness of model recognition is further optimized through weight quantization, and the interactive process is made more intelligent through the differentiated display of the human-computer interaction interface to meet the information reception needs of actual driving.
[0099] The above program can be run in the processor, or it can be stored in the memory (or computer-readable storage medium), which includes permanent and non-permanent, removable and non-removable media. Information storage can be achieved by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined in this article, computer-readable storage media does not include temporary computer-readable media, such as modulated data signals and carrier waves.
[0100] These computer programs can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps of the functions specified in one or more blocks can be implemented by different modules corresponding to different steps.
[0101] Based on this, this embodiment also provides a special vehicle recognition model training system. The system is built based on the training method. The training system is specifically introduced below.
[0102] like Fig. 9 As shown, the training system comprises:
[0103] A sample acquisition module is used to acquire a number of target images based on actual driving vehicles; wherein the target images are images of special vehicles acquired at different angles, different distances and different lighting conditions based on preset acquisition rules; each of the target images has a label of the actual category of the corresponding special vehicle;
[0104] A first training module is used to iteratively train the first classification model based on the target image and the label to obtain an auxiliary training model, and obtain a prediction probability of a special vehicle corresponding to each of the target images based on the auxiliary training model;
[0105] The second training module is used to use the target image as the input of the second classification model, and iteratively train the second classification model with the error between the output of the second classification model and the label corresponding to the target image, and the error between the output of the second classification model and the predicted probability of the special vehicle corresponding to the target image being less than corresponding thresholds to obtain a target recognition model.
[0106] The training system is used to implement the steps of the method of the above-mentioned embodiment 1, so what has been described has not been repeated here.
[0107] For example, the sample acquisition module includes:
[0108] The acquisition unit is used to acquire a plurality of original images based on sensors deployed on the actual driving vehicle.
[0109] The first processing unit is used to screen the plurality of original images based on the third classification model to obtain the plurality of target images corresponding to various types of special vehicles.
[0110] The second processing unit is used to group the plurality of target images based on a target tracking algorithm; wherein each group of the target images corresponds to the same special vehicle at different angles, different distances or different lighting conditions.
[0111] For example, the first training module includes:
[0112] The first training unit is used to Constructing a first loss function corresponding to the first classification model, and taking the plurality of target images as input, iteratively training the first classification model with the loss value of the first loss function being less than a first threshold as the goal to obtain the auxiliary training model; wherein the second loss function of the auxiliary training model is Among them, i is the category of special vehicles, z i is the logits value corresponding to category i, T is the temperature value, q i is the probability corresponding to category i; T high is a high temperature value other than 1.
[0113] The second training module includes:
[0114] The second training unit is used to train the as the third loss function corresponding to the second classification model, and taking the several target images as input, the second classification model is iteratively trained with the loss value of the third loss function being less than a second threshold as the goal to obtain the target recognition model.
[0115] This embodiment also provides a special vehicle identification system. The identification system is built based on the identification method. The identification system is described in detail below.
[0116] The identification system comprises:
[0117] A recognition module is deployed to identify special vehicles during driving based on an on-board chip and display them on the human-vehicle interaction interface of the target vehicle; wherein the on-board chip is loaded with the target recognition model.
[0118] The identification system is used to implement the steps of the above method, so what has been explained will not be repeated here.
[0119] For example, the deployment identification module includes:
[0120] The third processing unit is used to quantize the weights of each neural network layer of the target recognition model.
[0121] The recognition unit is used to recognize special vehicles during driving based on the target recognition model after weight quantization.
[0122] For another example, the deployment identification module includes:
[0123] The first display unit is used to display the recognition result of the special vehicle in different colors according to the color gradient map based on the confidence level.
[0124] The second display unit is used to obtain the external environment where the target vehicle is located so as to display the recognition result in different forms; wherein the different forms of display include: text floating display, sound vibration display and voice broadcast display.
[0125] For another example, the identification system further includes:
[0126] An evaluation module is used to evaluate the special vehicle recognition result displayed on the human-vehicle interaction interface of the target vehicle to obtain an evaluation result;
[0127] An adjustment and optimization module, used to optimize and adjust the preset collection rules according to the evaluation results;
[0128] The model updating module is used to control the actual driving vehicle to reacquire the target image based on the adjusted acquisition rules, and repeat the iterative training steps to obtain a new target classification model.
[0129] Since the system is built based on the method, it also has the advantages of strong generalization and recognition ability when performing special vehicle identification.
[0130] This embodiment also provides an electronic device. Fig.10 As shown, it includes at least one processor, the processor is coupled to a memory, a computer program is stored in the memory, and the computer program is configured to execute the above method when executed by the processor.
[0131] This embodiment also provides a computer-readable storage medium on which a computer program is stored. The computer program is used to execute the above method.
[0132] Although the present application has been disclosed as above with preferred embodiments, it is not intended to limit the present application. A person with ordinary knowledge in the technical field to which the present application belongs can make various changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be determined by the definition of the claims.
Claims
1. A special vehicle recognition model training method, characterized in that: include: Acquire a number of target images based on actual driving vehicles; wherein the target images are images of special vehicles acquired at different angles, different distances and different lighting conditions based on preset acquisition rules; each of the target images has a label of the actual category of the corresponding special vehicle; Iteratively training the first classification model based on the target image and the label to obtain an auxiliary training model, and obtaining a prediction probability of a special vehicle corresponding to each of the target images based on the auxiliary training model; The target image is used as an input of the second classification model, and the error between the output of the second classification model and the label corresponding to the target image, and the error between the output of the second classification model and the predicted probability of the special vehicle corresponding to the target image are both less than corresponding thresholds, so as to iteratively train the second classification model to obtain a target recognition model; Among them, the network scale of the first classification model is higher than that of the second classification model, the accuracy of the first classification model is higher than that of the second classification model, and the delay of the first classification model is lower than that of the second classification model.
2. The special vehicle recognition model training method according to claim 1, characterized in that: The acquiring of a plurality of target images based on the actual driving vehicle comprises: Acquire a number of original images based on sensors deployed on the actual driving vehicle; Screening the plurality of original images based on a third classification model to obtain the plurality of target images corresponding to various types of special vehicles; The target images are grouped based on a target tracking algorithm; wherein each group of target images corresponds to the same special vehicle at different angles, different distances or different lighting conditions.
3. The special vehicle recognition model training method according to claim 1, characterized in that: Iteratively training the first classification model based on the target image and the label to obtain an auxiliary training model, and obtaining a prediction probability of a special vehicle corresponding to each of the target images based on the auxiliary training model; The target image is used as the input of the second classification model, and the error between the output of the second classification model and the label corresponding to the target image, and the error between the output of the second classification model and the predicted probability of the special vehicle corresponding to the target image are both less than corresponding thresholds, and the second classification model is iteratively trained to obtain a target recognition model; including: based on Constructing a first loss function corresponding to the first classification model, and taking the plurality of target images as input, iteratively training the first classification model with the loss value of the first loss function being less than a first threshold as the goal to obtain the auxiliary training model; wherein the second loss function of the auxiliary training model is Among them, i is the category of special vehicles, z i is the logits value corresponding to category i, T is the temperature value, q i is the probability corresponding to category i; T high is a high temperature value other than 1; With the second loss function and as the third loss function corresponding to the second classification model, and taking the several target images as input, the second classification model is iteratively trained with the loss value of the third loss function being less than a second threshold as the goal to obtain the target recognition model.
4. A special vehicle identification method, characterized in that: include: Based on the on-board chip, special vehicles in the driving process are identified and displayed on the human-vehicle interaction interface of the target vehicle; wherein the on-board chip is loaded with the target recognition model obtained by any method of claims 1-3.
5. The special vehicle identification method according to claim 4, characterized in that: The identification of special vehicles during driving based on the vehicle chip includes: quantizing the weights of the neural network layers of the target recognition model; Special vehicles in the driving process are identified based on the target recognition model after weight quantization.
6. The special vehicle identification method according to claim 4, characterized in that: The identifying of a special vehicle during driving based on the vehicle chip and displaying it on the human-vehicle interaction interface of the target vehicle includes: Based on the confidence level, the recognition result of the special vehicle is displayed in different colors according to the color gradient map; The external environment where the target vehicle is located is obtained to display the recognition results in different forms; wherein the different forms of display include: text floating display, sound vibration display and voice broadcast display.
7. The special vehicle identification method according to claim 4, characterized in that: After the special vehicle in the driving process is identified based on the vehicle chip and displayed on the human-vehicle interaction interface of the target vehicle, the method further includes: Evaluating the special vehicle recognition result displayed on the human-vehicle interaction interface of the target vehicle to obtain an evaluation result; Optimize and adjust preset collection rules according to the evaluation results; Re-execute the method described in any one of claims 1 to 3 based on the adjusted acquisition rules to obtain a new target classification model.
8. A special vehicle recognition model training system, characterized in that: include: A sample acquisition module is used to acquire a number of target images based on actual driving vehicles; wherein the target images are images of special vehicles acquired at different angles, different distances and different lighting conditions based on preset acquisition rules; each of the target images has a label of the actual category of the corresponding special vehicle; A first training module is used to iteratively train the first classification model based on the target image and the label to obtain an auxiliary training model, and obtain a prediction probability of a special vehicle corresponding to each of the target images based on the auxiliary training model; The second training module is used to use the target image as the input of the second classification model, and iteratively train the second classification model with the error between the output of the second classification model and the label corresponding to the target image, and the error between the output of the second classification model and the predicted probability of the special vehicle corresponding to the target image being less than corresponding thresholds to obtain a target recognition model.
9. An electronic device, characterized in that: The method comprises at least one processor, wherein the processor is coupled to a memory, wherein a computer program is stored in the memory, and wherein the computer program is configured to execute the method according to any one of claims 1 to 3 when executed by the processor.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is used to execute the method described in any one of claims 1 to 3.
