CN116645564A - Vehicle recognition model training, vehicle recognition method, device, equipment and medium - Google Patents

Vehicle recognition model training, vehicle recognition method, device, equipment and medium Download PDF

Info

Publication number
CN116645564A
CN116645564A CN202310692610.1A CN202310692610A CN116645564A CN 116645564 A CN116645564 A CN 116645564A CN 202310692610 A CN202310692610 A CN 202310692610A CN 116645564 A CN116645564 A CN 116645564A
Authority
CN
China
Prior art keywords
vehicle
vehicle identification
identification model
model
picture sample
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310692610.1A
Other languages
Chinese (zh)
Inventor
郭平
姜佳成
郑岩
王柏淇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
FAW Jiefang Automotive Co Ltd
Original Assignee
FAW Jiefang Automotive Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by FAW Jiefang Automotive Co Ltd filed Critical FAW Jiefang Automotive Co Ltd
Priority to CN202310692610.1A priority Critical patent/CN116645564A/en
Publication of CN116645564A publication Critical patent/CN116645564A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Image Analysis (AREA)

Abstract

The embodiment of the invention discloses a vehicle identification model training method, a vehicle identification method, a device, equipment and a medium, wherein the vehicle identification model training method comprises the following steps: acquiring vehicle picture sample data to be identified; classifying sample vehicles of the vehicle picture sample data to be identified to obtain a target vehicle picture sample data set; training a first vehicle identification model according to the target vehicle picture sample dataset; wherein the first vehicle identification model comprises a deep learning network model; splicing the second vehicle identification model with the trained first vehicle identification model to obtain a spliced vehicle identification model; wherein the second vehicle identification model comprises a decision tree model; the target vehicle picture sample dataset is input to the stitched vehicle identification model to train the stitched vehicle identification model. The technical scheme of the embodiment of the invention improves the accuracy of vehicle identification and the interpretability of the identification result.

Description

Vehicle recognition model training, vehicle recognition method, device, equipment and medium
Technical Field
The embodiment of the invention relates to the technical field of artificial intelligence, in particular to a vehicle identification model training method, a vehicle identification method, a device, equipment and a medium.
Background
With the rapid development of cities, traffic systems are more and more intelligent, and a plurality of intelligent traffic technologies are gradually developed, wherein the vehicle identification technology is one of the most representative deep learning derivative technologies. The technology has a very wide application range, such as an entrance and an exit of an urban parking lot, a high-speed toll station and the like, and each monitor on a road also has a vehicle identification function, so that intelligent vehicle information management is realized.
In the process of implementing the invention, the inventor finds that the existing vehicle identification technology is mainly based on the convolutional neural network for identification, but the vehicle identification technology is lack of interpretability due to the limitation of the accuracy of the traditional convolutional neural network algorithm and the black box characteristic thereof.
Disclosure of Invention
The embodiment of the invention provides a vehicle identification model training method, a vehicle identification device, vehicle identification equipment and a medium, which improve the accuracy of vehicle identification and the interpretability of the identification result.
According to an aspect of the present invention, there is provided a vehicle recognition model training method including:
acquiring vehicle picture sample data to be identified;
classifying the sample vehicles of the vehicle picture sample data to be identified to obtain a target vehicle picture sample data set;
Training a first vehicle identification model according to the target vehicle picture sample dataset; wherein the first vehicle identification model comprises a deep learning network model;
splicing the second vehicle identification model with the trained first vehicle identification model to obtain a spliced vehicle identification model; wherein the second vehicle identification model comprises a decision tree model;
and inputting the target vehicle picture sample data set into the spliced vehicle identification model to train the spliced vehicle identification model.
According to another aspect of the present invention, there is provided a vehicle identification method including:
acquiring image data to be identified of a target vehicle;
inputting the image data to be identified into a spliced vehicle identification model for image identification to obtain a vehicle identification classification result of the target vehicle;
the spliced vehicle recognition model is obtained through training by the vehicle recognition model training method.
According to another aspect of the present invention, there is provided a vehicle identification model training apparatus including:
the vehicle picture sample data acquisition module is used for acquiring vehicle picture sample data to be identified;
the vehicle picture sample data classification module is used for classifying the sample vehicles of the vehicle picture sample data to be identified to obtain a target vehicle picture sample data set;
The first vehicle identification model training module is used for training a first vehicle identification model according to the target vehicle picture sample data set; wherein the first vehicle identification model comprises a deep learning network model;
the vehicle identification model splicing module is used for splicing the second vehicle identification model with the trained first vehicle identification model to obtain a spliced vehicle identification model; wherein the second vehicle identification model comprises a decision tree model;
and the vehicle identification model training module is used for inputting the target vehicle picture sample data set into the spliced vehicle identification model so as to train the spliced vehicle identification model.
According to another aspect of the present invention, there is provided a vehicle identification apparatus including:
the image data acquisition module to be identified is used for acquiring the image data to be identified of the target vehicle;
the image recognition module is used for inputting the image data to be recognized into a spliced vehicle recognition model to perform image recognition, so as to obtain a vehicle recognition classification result of the target vehicle;
the spliced vehicle identification model is obtained by training the vehicle identification model training method according to any one of claims 1-4.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the vehicle identification model training method or the vehicle identification method according to any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the vehicle recognition model training method or the vehicle recognition method according to any one of the embodiments of the present invention when executed.
According to the technical scheme, firstly, vehicle picture sample data to be identified are obtained, sample vehicles of the vehicle picture sample data to be identified are classified to obtain a target vehicle picture sample data set, a first vehicle identification model is trained according to the target vehicle picture sample data set, then a second vehicle identification model is spliced with the trained first vehicle identification model to obtain a spliced vehicle identification model, and finally the target vehicle picture sample data set is input into the spliced vehicle identification model to train the spliced vehicle identification model. After the training of the spliced vehicle recognition model is completed, the image data to be recognized of the target vehicle can be input into the spliced vehicle recognition model, so that the vehicle recognition classification result of the target vehicle can be automatically recognized through the spliced vehicle recognition model. The technical scheme solves the problems that the vehicle identification accuracy is not high and the identification result has no interpretability in the prior art, and improves the vehicle identification accuracy and the interpretability of the identification result by introducing the decision tree model on the basis of the deep learning network model.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a vehicle recognition model training method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a training method for a vehicle recognition model according to a second embodiment of the present invention;
fig. 3 is a flowchart of a method for constructing a target vehicle picture sample dataset according to a second embodiment of the present invention;
fig. 4 is a flowchart of a first vehicle identification model building method according to a second embodiment of the present invention;
FIG. 5 is a flowchart of a first vehicle identification model training method according to a second embodiment of the present invention;
FIG. 6 is a flowchart of a method for building and training a spliced vehicle identification model provided in a second embodiment of the present invention;
fig. 7 is a flowchart of a vehicle identification method according to a second embodiment of the present invention;
fig. 8 is a schematic diagram of a recognition result of a vehicle recognition model according to a second embodiment of the present invention;
fig. 9 is a flowchart of a vehicle identification method according to a third embodiment of the present invention;
FIG. 10 is a schematic diagram of a training device for a vehicle recognition model according to a fourth embodiment of the present invention;
fig. 11 is a schematic structural view of a vehicle identification device according to a fifth embodiment of the present invention;
fig. 12 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a vehicle recognition model training method provided in an embodiment of the present invention, where the embodiment is applicable to a case of classifying and recognizing vehicle picture sample data, the method may be performed by a vehicle recognition model training apparatus, and the apparatus may be implemented by software and/or hardware, and may be generally integrated in an electronic device, where the electronic device may be a terminal device or a server device, and the embodiment of the present invention is not limited to a specific device type of the electronic device. Accordingly, as shown in fig. 1, the method includes the following operations:
S110, acquiring vehicle picture sample data to be identified.
The vehicle picture sample data to be identified may be sample data of a vehicle picture with sample vehicle information.
In the embodiment of the invention, the image capturing device can be used for capturing the vehicle entity to obtain the image sample data of the vehicle to be identified, or the image sample data of the vehicle to be identified can be obtained by copying in the vehicle website.
S120, classifying the sample vehicles of the vehicle picture sample data to be identified to obtain a target vehicle picture sample data set.
The sample vehicle can be a vehicle which can be used as a training sample of a vehicle identification model in the vehicle picture sample data to be identified. The target vehicle picture sample data set may be picture sample data for training a vehicle identification model.
After the above steps are completed and the vehicle picture sample data to be identified is obtained, the sample vehicles of the vehicle picture sample data to be identified can be classified. For example, the sample vehicle may be divided according to the type of the sample vehicle, so as to obtain a target vehicle picture sample data set, so as to implement the training of the first vehicle identification model and the second vehicle identification model in the subsequent steps.
S130, training a first vehicle identification model according to the target vehicle picture sample data set; wherein the first vehicle identification model comprises a deep learning network model.
The first vehicle identification model may be a vehicle identification model for extracting vehicle features in the vehicle picture sample dataset. For example, the first vehicle identification model may include, but is not limited to, a deep learning network model.
Accordingly, the target vehicle picture sample data set obtained in the above steps can be sent to the deep learning recognition model as input data of the deep learning recognition model. In the embodiment of the invention, the deep learning recognition model can be a convolutional neural network model, a residual neural network, a dense connection network and the like, and the embodiment of the invention does not specifically limit the deep learning recognition model.
S140, splicing the second vehicle identification model with the trained first vehicle identification model to obtain a spliced vehicle identification model; wherein the second vehicle identification model comprises a decision tree model.
The second vehicle recognition model may be a vehicle recognition model for extracting vehicle features in the vehicle picture sample data set and performing classification recognition according to the vehicle features. For example, the second vehicle identification model may include, but is not limited to, a decision tree model. The spliced vehicle identification model may be a model for vehicle identification that is spliced by the first vehicle identification model and the second vehicle identification model. The decision tree model can be a network model with a tree structure and can realize classification recognition through supervised learning.
After the learning and training of the first vehicle identification model are completed, the second vehicle identification model and the first vehicle identification model can be spliced to obtain the spliced vehicle identification model. Since the decision tree model is a tree structure in which each internal node represents a judgment on an attribute, each branch represents an output of a judgment result, and each leaf node represents a classification result. When the decision tree performs supervision learning, a large amount of sample data can be used for training to obtain a tree structure. Wherein each sample has a set of attributes and a classification result, i.e. the classification result of the decision tree is known. Therefore, the decision tree model and the deep learning model are spliced, the deep learning model in the obtained spliced vehicle recognition model can extract vehicle picture features in a target vehicle picture sample data set, and further vehicle recognition accuracy is improved, meanwhile, the decision tree model in the spliced vehicle recognition model can be trained by a large amount of sample data to obtain a tree structure, the tree structure can represent the attribute and the classification result of each sample, and further the interpretability of the vehicle recognition result can be improved.
S150, inputting the target vehicle picture sample data set into the spliced vehicle identification model to train the spliced vehicle identification model.
After the first vehicle recognition model and the second vehicle recognition model are spliced to obtain the spliced vehicle recognition model, the target vehicle picture sample dataset can be used as input data of the spliced vehicle recognition model to be sent to the spliced vehicle recognition model, so that learning training of the spliced vehicle recognition model is realized.
According to the technical scheme, firstly, vehicle picture sample data to be identified are obtained, sample vehicles of the vehicle picture sample data to be identified are classified to obtain a target vehicle picture sample data set, a first vehicle identification model is trained according to the target vehicle picture sample data set, then a second vehicle identification model is spliced with the trained first vehicle identification model to obtain a spliced vehicle identification model, and finally the target vehicle picture sample data set is input into the spliced vehicle identification model to train the spliced vehicle identification model. The spliced vehicle recognition model obtained through training can be used for automatically recognizing the image data to be recognized of the target vehicle, the problem that in the prior art, the vehicle recognition accuracy is low, and the recognition result does not have the interpretability is solved, and the vehicle recognition accuracy and the interpretability of the recognition result are improved through introducing the decision tree model.
Example two
Fig. 2 is a flowchart of a vehicle recognition model training method according to a second embodiment of the present invention, which is embodied based on the above embodiment, and in this embodiment, specific alternative implementation manners of classifying a sample vehicle of vehicle picture sample data to be recognized, training a spliced vehicle recognition model by using a target vehicle picture sample data set, and splicing a second vehicle recognition model with a trained first vehicle recognition model are provided. Accordingly, as shown in fig. 2, the method of this embodiment may include:
s210, acquiring vehicle picture sample data to be identified.
S220, classifying the sample vehicles of the vehicle picture sample data to be identified to obtain a target vehicle picture sample data set.
In an optional embodiment of the present invention, classifying the sample vehicle of the vehicle picture sample data to be identified to obtain a target vehicle picture sample data set may include: extracting preset characteristic data from the picture sample data to be identified; generating tag data for the feature data; and classifying the vehicle types of the sample vehicles in the picture sample data to be identified according to the characteristic data and the tag data to obtain a target vehicle picture sample data set.
The feature data may be vehicle feature data obtained by feature extraction of the image sample data to be identified. The tag data may be data obtained by performing tagging processing on the image sample data to be identified in advance.
In the embodiment of the invention, the image sample data of the vehicle to be identified is obtained and adjusted to a proper image frame rate, the preset characteristic data extraction is carried out on the image sample data of the vehicle to be identified, and meanwhile, the corresponding tag data is generated according to the extracted characteristic data. Classifying the vehicle types of the sample vehicles in the picture sample data to be identified according to the feature data and the tag data, and further obtaining a target vehicle picture sample data set. The method comprises the steps of obtaining a large amount of vehicle picture sample data to be identified, extracting the vehicle picture sample data to be identified to obtain preset feature data and label data, and classifying the vehicle types of sample vehicles in the picture sample data to be identified according to the feature data and the label data to obtain a target vehicle picture sample data set comprising commercial vehicles, passenger vehicles, new energy vehicles and fuel vehicles.
S230, training a first vehicle identification model according to the target vehicle picture sample data set; wherein the first vehicle identification model comprises a deep learning network model.
It is understood that the convolutional neural network model has a deep junction structure, and a feedforward neural network using convolution operations. The convolutional neural network comprises a feature extractor consisting of a convolutional layer and a sub-sampling layer. In the convolutional layer of a convolutional neural network, one neuron is connected with only a part of adjacent layer neurons. Subsampling is also known as pooling, and has two forms, average subsampling and maximum subsampling. The convolution and sub-sampling can greatly simplify the complexity of the model and reduce the parameters of the model. In a convolutional neural network, a plurality of feature maps are usually included, each feature map is composed of a plurality of neurons arranged in a rectangular shape, and the neurons of the same feature map share the same convolutional kernel. The convolution kernel is initialized in the form of a random decimal matrix, and reasonable weight values are obtained through learning in the training process of the network. Reasonable arrangement of the convolution kernel can reduce connection among layers of the network, and meanwhile the risk of overfitting is reduced.
For convolutional neural networks, as the number of layers of the neural network increases, the training error and the test error of the neural network should be smaller and smaller than those of the lower layers, but in reality, the error rate of the neural network increases along with the increase of the number of layers, because the gradient vanishes after the data passes through the conventional neural network layers and is multiplied by the chain rule gradient, and the convergence rate of the neural network decreases. Therefore, to solve the problem of gradient extinction, a residual neural network has been developed. The output of a certain layer of residual errors is the accumulation of an input value X and an output value F (X), and the accumulation of a common neural network is replaced, so that the problem of gradient disappearance can be fundamentally solved by utilizing the residual error network to identify vehicles.
However, the DenseNet dense connection network can realize feature reuse through the connection of the features on the channels, so that the quantity of parameters and the calculation cost of the DenseNet dense connection network are greatly reduced compared with those of the residual neural network, and the training effect is also remarkably improved. Therefore, in the embodiment of the invention, the DenseNet dense connection network model can be used as the first vehicle recognition model, and the target vehicle picture sample data set can be used as the input data of the DenseNet dense connection network model and sent to the DenseNet dense connection network model for learning training, so that the learning training of the first vehicle recognition model is realized.
S240, generating hierarchical classification data according to the feature vector of the vehicle identification category output by the first vehicle identification model.
The feature vector can be a vector with vehicle features which is trained and output by the first vehicle identification model. The hierarchical classification data may be classification data obtained by classifying the feature vectors using a lexical knowledge base.
After the steps are completed and the first vehicle recognition model is subjected to learning training, a loss function curve and an accuracy rate curve can be drawn, and the recognition accuracy of the first vehicle recognition model is improved according to the increment of the training set number. When the single recognition accuracy of the first vehicle recognition model reaches a preset threshold, the feature vector of the vehicle recognition type in the first vehicle recognition model can be output. Furthermore, the feature vectors of the vehicle recognition categories output by the first vehicle recognition model can be used for carrying out hierarchical classification by utilizing the vocabulary knowledge base, so that hierarchical classification data are obtained.
The training method includes the steps of taking a target vehicle picture sample data set as input data of a first vehicle identification model, sending the input data of the first vehicle identification model to training, outputting feature vectors with target vehicle features after model training is completed, further, sending the feature vectors as input data of a vocabulary knowledge base to the vocabulary knowledge base to training, outputting the target vehicle features with a hierarchical tree structure after training is completed, and taking the target vehicle features with the hierarchical tree structure as hierarchical classification data to achieve the induced hierarchical tree model of the subsequent steps.
S250, generating an induced hierarchical tree model according to the second vehicle identification model and the hierarchical classification data, and using the induced hierarchical tree model as the spliced vehicle identification model.
The induced hierarchical tree model may be a network model generated by training the second vehicle identification model using hierarchical classification data.
In the embodiment of the invention, the hierarchical classification data obtained in the above steps can be used as input data of a second vehicle recognition model to be sent to the second vehicle recognition model for learning and training to obtain an induced hierarchical tree model, and the induced hierarchical tree model is used as a spliced vehicle recognition model. The induced hierarchical tree model is obtained by splicing a first vehicle identification model and a second vehicle identification model.
S260, inputting the target vehicle picture sample data set into the spliced vehicle identification model to train the spliced vehicle identification model.
In an alternative embodiment of the present invention, inputting the target vehicle picture sample dataset into the stitched vehicle identification model to train the stitched vehicle identification model may include: inputting the target vehicle picture sample data set into a first vehicle recognition model in the spliced vehicle recognition model so as to output a multidimensional vector through the first vehicle recognition model; traversing intermediate nodes of the second vehicle identification model in a top-down mode by adopting a traversing mode of a soft decision tree, and calculating an inner product between the multidimensional vector and each intermediate node; calculating the product of probabilities of each intermediate node on a path reaching each leaf node for each leaf node of the second vehicle identification model; the probabilities of the leaf nodes of the second vehicle identification model are compared to determine a classification category of the multi-dimensional vector.
The multidimensional vector can be a characteristic vector which is obtained by learning and training the target vehicle picture sample data through a first vehicle identification model and can represent the characteristic of the target vehicle sample. The soft decision tree traversal pattern may be a top-down traversal pattern. The intermediate node may be a node other than the root node and the leaf node in the second vehicle model.
In the embodiment of the invention, the target vehicle picture sample data set can be used as the input data of the first vehicle recognition model in the spliced vehicle recognition model to be sent to the first vehicle recognition model for learning and training, so as to obtain multidimensional vectors and output the multidimensional vectors. Further, traversing a second vehicle recognition model in the spliced vehicle recognition model by adopting a traversing mode of the soft decision tree to obtain an intermediate node of the second vehicle recognition model, and carrying out product operation on each one-dimensional vector in the multi-dimensional vectors and the intermediate node of the second vehicle recognition model. Further, the product of probabilities of each intermediate node on the path to the leaf node is calculated for each leaf node of the second vehicle identification model, and the classification category of the multidimensional vector is determined by comparing the probabilities of each leaf node of the second vehicle identification model.
In a specific example, a first vehicle identification model of the vehicle identification model is illustrated as a dense connection network and a second vehicle identification model is illustrated as a decision tree model. Fig. 3 is a flowchart of a method for constructing a target vehicle picture sample data set according to a second embodiment of the present invention, as shown in fig. 3, firstly, obtaining the vehicle picture sample data to be identified and adjusting to a suitable image frame rate, then, extracting features of the picture to obtain vehicle feature data and tag data, further, completing the construction of the target vehicle picture sample data set, and finally, dividing the target vehicle picture sample data set into a training set, a verification set and a test set. The training set is used for fitting the vehicle identification model, the classification model is trained by setting parameters of the classifier, and different values of the same parameter can be selected when the testing set is tested, so that the fitting of a plurality of classifiers is realized. The verification set is obtained by training a plurality of models in a training set, predicting verification set data by using each model in order to find out the model with the best effect, and recording model accuracy. And comparing the accuracy of each model, further selecting the parameters corresponding to the model with the best effect, and adjusting the model parameters to obtain the best model. And the test set is used for carrying out model prediction by using the test set after the training set and the verification set obtain the optimal model and measuring the performance, the classifying capability and the generalization capability of the optimal model.
Fig. 4 is a flowchart of a first vehicle identification model building method according to a second embodiment of the present invention, and as shown in fig. 4, an exemplary method includes determining an input value of a densnet dense connection network model according to a format of a target vehicle image sample data set, determining a multi-class cross entropy formula used in a densnet dense connection network model training process, and defining a multi-layer neural network and a loss function to implement building of the first vehicle identification model.
Fig. 5 is a flowchart of a first vehicle recognition model training method according to a second embodiment of the present invention, and exemplary, as shown in fig. 5, a target vehicle image sample pre-training data set is first obtained, and the target vehicle image sample pre-training data set is sent to a densnet dense connection network model as input data of the densnet dense connection network model for learning training, and meanwhile, a loss function curve and an accuracy curve are drawn, and further parameters of the densnet dense connection network model are fine-tuned by comparing curve images of the two curves, so as to realize learning training of the first vehicle recognition model.
Fig. 6 is a flowchart of a method for building and training a spliced vehicle recognition model, which is provided in a second embodiment of the present invention, and is exemplary, as shown in fig. 6, a soft decision tree is adopted to reconstruct a densanenet dense connection network model and a decision tree model of the vehicle recognition model to obtain the spliced vehicle recognition model, further, a target vehicle picture sample pre-training dataset of the steps is utilized to learn and train the spliced vehicle recognition model, and parameters of the spliced vehicle recognition model are finely tuned according to node labels and classification accuracy of the decision tree model of the spliced vehicle recognition model, so as to implement building and training of the spliced vehicle recognition model.
Fig. 7 is a flowchart of a vehicle recognition method according to a second embodiment of the present invention, and exemplary, as shown in fig. 7, image data to be recognized of a target vehicle is obtained, and the image data to be recognized of the target vehicle is sent to a spliced vehicle recognition model as input data of the spliced vehicle recognition model to be recognized, so as to obtain a vehicle recognition classification result of the target vehicle.
Fig. 8 is a schematic diagram of a recognition result of a vehicle recognition model provided in the second embodiment of the present invention, and exemplary, as shown in fig. 8, image data to be recognized of a target vehicle is obtained, and the image data to be recognized of the target vehicle is sent to a spliced vehicle recognition model as input data of the vehicle recognition model for recognition, so as to obtain a vehicle recognition classification result of the target vehicle. Alternatively, the vehicle identification classification result may be a commercial vehicle or a passenger vehicle. The vehicle identification and classification results obtained by the commercial vehicle through the vehicle identification model can be a new energy commercial vehicle, a fuel commercial vehicle, a new energy passenger vehicle, a fuel passenger vehicle and the like.
According to the technical scheme, firstly, vehicle picture sample data to be identified are obtained, sample vehicles of the vehicle picture sample data to be identified are classified to obtain a target vehicle picture sample data set, then a first vehicle identification model is trained according to the target vehicle picture sample data set, hierarchical classification data is generated according to feature vectors of vehicle identification categories output by the first vehicle identification model, an induced hierarchical tree model is generated according to a second vehicle identification model and the hierarchical classification data to serve as a spliced vehicle identification model, finally, the target vehicle picture sample data set is input into the spliced vehicle identification model to train the spliced vehicle identification model, vehicle picture features in the target vehicle picture sample data set can be extracted by the first vehicle identification model in the spliced vehicle identification model, vehicle identification accuracy is improved, meanwhile, a tree structure can be obtained by training a large amount of sample data by the second vehicle identification model in the spliced vehicle identification model, the tree structure can represent attributes and classification results of each sample, and therefore the interpretability of vehicle identification results can be improved.
Example III
Fig. 9 is a flowchart of a vehicle recognition method according to a third embodiment of the present invention, where the present embodiment is applicable to a case of performing vehicle recognition on a spliced vehicle recognition model trained by the foregoing embodiment, and the method may be performed by a vehicle recognition device, where the device may be implemented by software and/or hardware, and may be generally integrated in an electronic device, where the electronic device may be a terminal device or a server device, and the embodiment of the present invention is not limited to a specific device type of the electronic device. Accordingly, as shown in fig. 9, the method of this embodiment may include:
s310, acquiring image data to be identified of the target vehicle.
S320, inputting the image data to be identified into a spliced vehicle identification model for image identification, and obtaining a vehicle identification classification result of the target vehicle;
the spliced vehicle recognition model is obtained through training by the vehicle recognition model training method according to any one of the embodiments of the invention.
The image data to be identified may be image data that requires vehicle identification using a spliced vehicle identification model. The vehicle identification classification result may be a classification result of a vehicle type of which the image data to be identified is identified by the spliced vehicle identification model.
After the training of the spliced vehicle recognition model in the embodiment is completed, the image data to be recognized of the target vehicle can be obtained, the image data to be recognized of the target vehicle is used as input data of the spliced vehicle recognition model to be sent to the spliced vehicle recognition model for recognition, and then a vehicle recognition classification result of the target vehicle is obtained.
According to the technical scheme, firstly, vehicle picture sample data to be identified are obtained, sample vehicles of the vehicle picture sample data to be identified are classified to obtain a target vehicle picture sample data set, a first vehicle identification model is trained according to the target vehicle picture sample data set, then a second vehicle identification model is spliced with the trained first vehicle identification model to obtain a spliced vehicle identification model, and finally the target vehicle picture sample data set is input into the spliced vehicle identification model to train the spliced vehicle identification model. After the training of the spliced vehicle recognition model is completed, the image data to be recognized of the target vehicle can be input into the spliced vehicle recognition model, so that the vehicle recognition classification result of the target vehicle can be automatically recognized through the spliced vehicle recognition model. The technical scheme solves the problems that the vehicle identification accuracy is not high and the identification result has no interpretability in the prior art, and improves the vehicle identification accuracy and the interpretability of the identification result by introducing the decision tree model on the basis of the deep learning network model.
Example IV
Fig. 10 is a schematic diagram of a vehicle recognition model training device according to a fourth embodiment of the present invention, where, as shown in fig. 10, the vehicle recognition model training device includes: a vehicle picture sample data to be identified acquisition module 410, a vehicle picture sample data to be identified classification module 420, a first vehicle identification model training module 430, a vehicle identification model stitching module 440, and a vehicle identification model training module 450, wherein:
a vehicle picture sample data to be identified obtaining module 410, configured to obtain vehicle picture sample data to be identified;
the vehicle picture sample data classification module 420 is configured to classify a sample vehicle of the vehicle picture sample data to be identified to obtain a target vehicle picture sample data set;
a first vehicle identification model training module 430 for training a first vehicle identification model from the target vehicle picture sample dataset; wherein the first vehicle identification model comprises a deep learning network model;
the vehicle recognition model stitching module 440 is configured to stitch the second vehicle recognition model and the trained first vehicle recognition model to obtain a stitched vehicle recognition model; wherein the second vehicle identification model comprises a decision tree model;
The vehicle recognition model training module 450 is configured to input the target vehicle picture sample data set to the spliced vehicle recognition model, so as to train the spliced vehicle recognition model.
According to the technical scheme, firstly, vehicle picture sample data to be identified are obtained, sample vehicles of the vehicle picture sample data to be identified are classified to obtain a target vehicle picture sample data set, a first vehicle identification model is trained according to the target vehicle picture sample data set, then a second vehicle identification model is spliced with the trained first vehicle identification model to obtain a spliced vehicle identification model, and finally the target vehicle picture sample data set is input into the spliced vehicle identification model to train the spliced vehicle identification model. The spliced vehicle recognition model obtained through training can be used for automatically recognizing the image data to be recognized of the target vehicle, the problem that in the prior art, the vehicle recognition accuracy is low, and the recognition result does not have the interpretability is solved, and the vehicle recognition accuracy and the interpretability of the recognition result are improved through introducing the decision tree model.
Optionally, the vehicle picture sample data classification module 420 to be identified includes:
The feature data extraction unit is used for extracting preset feature data from the picture sample data to be identified;
a tag data generating unit configured to generate tag data for the feature data;
the classification unit is used for classifying the vehicle types of the sample vehicles in the picture sample data to be identified according to the characteristic data and the tag data to obtain a target vehicle picture sample data set.
Optionally, the vehicle identification model stitching module 440 is specifically configured to: generating hierarchical classification data according to the feature vector of the vehicle identification class output by the first vehicle identification model; and generating an induced hierarchical tree model according to the second vehicle identification model and the hierarchical classification data, and using the induced hierarchical tree model as the spliced vehicle identification model.
Optionally, the vehicle identification model training module 450 is specifically configured to: inputting the target vehicle picture sample data set into a first vehicle recognition model in the spliced vehicle recognition model so as to output a multidimensional vector through the first vehicle recognition model; traversing intermediate nodes of the second vehicle identification model in a top-down mode by adopting a traversing mode of a soft decision tree, and calculating an inner product between the multidimensional vector and each intermediate node; calculating the product of probabilities of each intermediate node on a path reaching each leaf node for each leaf node of the second vehicle identification model; the probabilities of the leaf nodes of the second vehicle identification model are compared to determine a classification category of the multi-dimensional vector.
The vehicle recognition model training device can execute the vehicle recognition model training method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. Technical details which are not described in detail in the present embodiment may be referred to the vehicle recognition model training method provided in any embodiment of the present invention.
Example five
Fig. 11 is a schematic structural diagram of a vehicle identification device according to a fifth embodiment of the present invention, as shown in fig. 11, where the device includes: an image data acquisition module 510 to be identified and a picture identification model 520, wherein:
the image data to be identified acquisition module 510 is configured to acquire image data to be identified of the target vehicle.
The image recognition module 520 is configured to input the image data to be recognized into a spliced vehicle recognition model for image recognition, so as to obtain a vehicle recognition classification result of the target vehicle; the spliced vehicle recognition model is obtained through training by the vehicle recognition model training method.
According to the technical scheme, firstly, vehicle picture sample data to be identified are obtained, sample vehicles of the vehicle picture sample data to be identified are classified to obtain a target vehicle picture sample data set, a first vehicle identification model is trained according to the target vehicle picture sample data set, then a second vehicle identification model is spliced with the trained first vehicle identification model to obtain a spliced vehicle identification model, and finally the target vehicle picture sample data set is input into the spliced vehicle identification model to train the spliced vehicle identification model. After the training of the spliced vehicle recognition model is completed, the image data to be recognized of the target vehicle can be input into the spliced vehicle recognition model, so that the vehicle recognition classification result of the target vehicle can be automatically recognized through the spliced vehicle recognition model. The technical scheme solves the problems that the vehicle identification accuracy is not high and the identification result has no interpretability in the prior art, and improves the vehicle identification accuracy and the interpretability of the identification result by introducing the decision tree model on the basis of the deep learning network model.
The vehicle identification device can execute the vehicle identification method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. Technical details not described in detail in this embodiment may be referred to the vehicle identification method provided in any embodiment of the present invention.
Example six
Fig. 12 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 12, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the respective methods and processes described above, such as the vehicle identification model training method or the vehicle identification method.
In some embodiments, the vehicle identification model training method or the vehicle identification method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the vehicle identification model training method or the vehicle identification method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the vehicle identification model training method or the vehicle identification method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.

Claims (10)

1. A vehicle identification model training method, characterized by comprising:
acquiring vehicle picture sample data to be identified;
classifying the sample vehicles of the vehicle picture sample data to be identified to obtain a target vehicle picture sample data set;
training a first vehicle identification model according to the target vehicle picture sample dataset; wherein the first vehicle identification model comprises a deep learning network model;
splicing the second vehicle identification model with the trained first vehicle identification model to obtain a spliced vehicle identification model; wherein the second vehicle identification model comprises a decision tree model;
and inputting the target vehicle picture sample data set into the spliced vehicle identification model to train the spliced vehicle identification model.
2. The method of claim 1, wherein classifying the sample vehicle of the vehicle picture sample data to be identified to obtain a target vehicle picture sample data set comprises:
extracting preset characteristic data from the picture sample data to be identified;
generating tag data for the feature data;
and classifying the vehicle types of the sample vehicles in the picture sample data to be identified according to the characteristic data and the tag data to obtain a target vehicle picture sample data set.
3. The method of claim 1, wherein stitching the second vehicle identification model with the trained first vehicle identification model comprises:
generating hierarchical classification data according to the feature vector of the vehicle identification class output by the first vehicle identification model;
and generating an induced hierarchical tree model according to the second vehicle identification model and the hierarchical classification data, and using the induced hierarchical tree model as the spliced vehicle identification model.
4. The method of claim 1, wherein the inputting the target vehicle picture sample dataset into the stitched vehicle identification model to train the stitched vehicle identification model comprises:
inputting the target vehicle picture sample data set into a first vehicle recognition model in the spliced vehicle recognition model so as to output a multidimensional vector through the first vehicle recognition model;
traversing intermediate nodes of the second vehicle identification model in a top-down mode by adopting a traversing mode of a soft decision tree, and calculating an inner product between the multidimensional vector and each intermediate node;
calculating the product of probabilities of each intermediate node on a path reaching each leaf node for each leaf node of the second vehicle identification model;
The probabilities of the leaf nodes of the second vehicle identification model are compared to determine a classification category of the multi-dimensional vector.
5. A vehicle identification method, characterized by comprising:
acquiring image data to be identified of a target vehicle;
inputting the image data to be identified into a spliced vehicle identification model for image identification to obtain a vehicle identification classification result of the target vehicle;
the spliced vehicle identification model is obtained by training the vehicle identification model training method according to any one of claims 1-4.
6. A vehicle identification model training device, characterized by comprising:
the vehicle picture sample data acquisition module is used for acquiring vehicle picture sample data to be identified;
the vehicle picture sample data classification module is used for classifying the sample vehicles of the vehicle picture sample data to be identified to obtain a target vehicle picture sample data set;
the first vehicle identification model training module is used for training a first vehicle identification model according to the target vehicle picture sample data set; wherein the first vehicle identification model comprises a deep learning network model;
the vehicle identification model splicing module is used for splicing the second vehicle identification model with the trained first vehicle identification model to obtain a spliced vehicle identification model; wherein the second vehicle identification model comprises a decision tree model;
And the vehicle identification model training module is used for inputting the target vehicle picture sample data set into the spliced vehicle identification model so as to train the spliced vehicle identification model.
7. The apparatus of claim 6, wherein the vehicle picture sample data classification module to be identified further comprises:
the feature data extraction unit is used for extracting preset feature data from the picture sample data to be identified;
a tag data generating unit configured to generate tag data for the feature data;
the classification unit is used for classifying the vehicle types of the sample vehicles in the picture sample data to be identified according to the characteristic data and the tag data to obtain a target vehicle picture sample data set.
8. A vehicle identification apparatus, characterized by comprising:
the image data acquisition module to be identified is used for acquiring the image data to be identified of the target vehicle;
the image recognition module is used for inputting the image data to be recognized into a spliced vehicle recognition model to perform image recognition, so as to obtain a vehicle recognition classification result of the target vehicle;
the spliced vehicle identification model is obtained by training the vehicle identification model training method according to any one of claims 1-4.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the vehicle identification model training method of any one of claims 1-4 or to implement the vehicle identification method of claim 5.
10. A computer storage medium storing computer instructions for causing a processor to implement the vehicle identification model training method of any one of claims 1-4 or the vehicle identification method of claim 5 when executed.
CN202310692610.1A 2023-06-12 2023-06-12 Vehicle recognition model training, vehicle recognition method, device, equipment and medium Pending CN116645564A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310692610.1A CN116645564A (en) 2023-06-12 2023-06-12 Vehicle recognition model training, vehicle recognition method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310692610.1A CN116645564A (en) 2023-06-12 2023-06-12 Vehicle recognition model training, vehicle recognition method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN116645564A true CN116645564A (en) 2023-08-25

Family

ID=87643402

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310692610.1A Pending CN116645564A (en) 2023-06-12 2023-06-12 Vehicle recognition model training, vehicle recognition method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN116645564A (en)

Similar Documents

Publication Publication Date Title
WO2019232853A1 (en) Chinese model training method, chinese image recognition method, device, apparatus and medium
CN112069940B (en) Cross-domain pedestrian re-identification method based on staged feature learning
CN111898432B (en) Pedestrian detection system and method based on improved YOLOv3 algorithm
CN113158777B (en) Quality scoring method, training method of quality scoring model and related device
CN113673482B (en) Cell antinuclear antibody fluorescence recognition method and system based on dynamic label distribution
CN112270317A (en) Traditional digital water meter reading identification method based on deep learning and frame difference method
Wang et al. Railway insulator detection based on adaptive cascaded convolutional neural network
CN117152459A (en) Image detection method, device, computer readable medium and electronic equipment
CN112949510A (en) Human detection method based on fast R-CNN thermal infrared image
CN115019133A (en) Method and system for detecting weak target in image based on self-training and label anti-noise
CN110647897B (en) Zero sample image classification and identification method based on multi-part attention mechanism
CN111582057B (en) Face verification method based on local receptive field
CN116246287B (en) Target object recognition method, training device and storage medium
CN113223011A (en) Small sample image segmentation method based on guide network and full-connection conditional random field
CN117058716A (en) Cross-domain behavior recognition method and device based on image pre-fusion
CN115620083A (en) Model training method, face image quality evaluation method, device and medium
CN113139540B (en) Backboard detection method and equipment
CN116645564A (en) Vehicle recognition model training, vehicle recognition method, device, equipment and medium
CN116861226A (en) Data processing method and related device
CN114663751A (en) Power transmission line defect identification method and system based on incremental learning technology
CN113569835A (en) Water meter numerical value reading method based on target detection and segmentation identification
CN112926670A (en) Garbage classification system and method based on transfer learning
CN117011575B (en) Training method and related device for small sample target detection model
CN113705322B (en) Handwritten Chinese character recognition method and device based on threshold graph neural network
Wang et al. Research and application of deep belief network based on local binary pattern and improved weight initialization

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination