CN113221982A - Vehicle identification method, vehicle identification model creation method and related components - Google Patents

Vehicle identification method, vehicle identification model creation method and related components Download PDF

Info

Publication number
CN113221982A
CN113221982A CN202110466448.2A CN202110466448A CN113221982A CN 113221982 A CN113221982 A CN 113221982A CN 202110466448 A CN202110466448 A CN 202110466448A CN 113221982 A CN113221982 A CN 113221982A
Authority
CN
China
Prior art keywords
target vehicle
vehicle
recognized
image
identified
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
CN202110466448.2A
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.)
Shenzhen Jieshun Science and Technology Industry Co Ltd
Original Assignee
Shenzhen Jieshun Science and Technology Industry 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 Shenzhen Jieshun Science and Technology Industry Co Ltd filed Critical Shenzhen Jieshun Science and Technology Industry Co Ltd
Priority to CN202110466448.2A priority Critical patent/CN113221982A/en
Publication of CN113221982A publication Critical patent/CN113221982A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • G06F18/24133Distances to prototypes
    • G06F18/24137Distances to cluster centroïds
    • G06F18/2414Smoothing the distance, e.g. radial basis function networks [RBFN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/2431Multiple classes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/08Detecting or categorising vehicles

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Biophysics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Multimedia (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)

Abstract

The application discloses a vehicle identification method, a vehicle identification model establishing method and related components, comprising the following steps: acquiring an original image to be identified containing a target vehicle, and detecting the target vehicle in the original image to be identified to obtain an image of the target vehicle to be identified; performing feature extraction on the target vehicle image to be recognized to obtain the feature information to be recognized of the target vehicle image to be recognized; and respectively inputting the characteristic information to be identified into classifiers corresponding to different attribute types of the target vehicle, so that the classifiers can identify the characteristics in the characteristic information to be identified and output the information of the different attribute types of the target vehicle. According to the method and the device, the target vehicle image to be recognized is obtained by detecting the target vehicle in the original image to be recognized, the characteristic extraction is carried out on the target vehicle image to be recognized, then the vehicle is recognized by the classifiers corresponding to different attribute types of the target vehicle, and the recognition efficiency and the accuracy are improved.

Description

Vehicle identification method, vehicle identification model creation method and related components
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a vehicle identification method, a vehicle identification model creation device, vehicle identification equipment and a storage medium.
Background
The vehicle characteristic identification technology is the comprehensive application of computer artificial intelligence, image processing, computer vision, pattern identification and other related technologies. At present, the rapid growth of driving-related cases, the vehicle structuralization and the continuous deepening of smart city application are caused, and more diversified vehicle information is urgently expected to be extracted in the industry. The characteristics have wide and urgent application requirements in the fields of criminal case investigation, traffic accident treatment, hit-and-run traffic, automatic recording of illegal vehicles and the like.
At present, in a vehicle identification system at a parking lot gate, the traditional vehicle characteristic identification is used for identifying small target types in vehicle attribute types, such as vehicle logo identification, the vehicle logo identification is carried out after the vehicle logo detection is mainly relied on, targets needing to be detected are very small, and identification difficulty is caused on samples with large vehicle logo inclination angle and poor image quality, the detection rate and the identification rate are seriously influenced, the vehicle money and the vehicle color are also identified by utilizing an independent network, the deviation between a single target loss function and a macroscopic target is caused due to the inconsistent training targets of modules, and the accumulation of errors makes the whole system difficult to achieve the best performance.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a vehicle identification method, a vehicle identification model creation method, an apparatus, a device and a storage medium, which can avoid the problems of detection of small objects of a vehicle and accumulation of errors of multiple models, thereby improving the identification efficiency and accuracy. The specific scheme is as follows:
a first aspect of the present application provides a vehicle identification method, including:
acquiring an original image to be recognized containing a target vehicle, and detecting the target vehicle in the original image to be recognized to obtain a target vehicle image to be recognized corresponding to the original image to be recognized;
performing feature extraction on the target vehicle image to be recognized to obtain feature information to be recognized of the target vehicle image to be recognized;
and respectively inputting the characteristic information to be identified into classifiers corresponding to different attribute types of the target vehicle, so that the classifiers can identify the characteristics in the characteristic information to be identified and output the information of the different attribute types of the target vehicle.
Optionally, the detecting the target vehicle in the original image to be recognized to obtain an image of the target vehicle to be recognized corresponding to the original image to be recognized includes:
and detecting the target vehicle in the original image to be recognized by using a target detection model constructed based on a deep learning algorithm to obtain a target vehicle image to be recognized corresponding to the original image to be recognized.
Optionally, the detecting the target vehicle in the original image to be recognized by using the target detection model constructed based on the deep learning algorithm includes:
and detecting the target vehicle in the original image to be recognized by using a target detection model constructed based on an SSD algorithm.
Optionally, the performing feature extraction on the target vehicle image to be recognized to obtain the feature information to be recognized of the target vehicle image to be recognized includes:
and utilizing a ResNet network to perform feature extraction on the target vehicle image to be recognized so as to obtain the feature information to be recognized of the target vehicle image to be recognized.
Optionally, the respectively inputting the feature information to be recognized into classifiers corresponding to different attribute types of the target vehicle, so that the classifiers recognize features in the feature information to be recognized and output information of different attribute types of the target vehicle, including:
and respectively inputting the characteristic information to be recognized into a first classifier for recognizing a vehicle logo, a second classifier for recognizing a vehicle type and a third classifier for recognizing a vehicle color, so that the first classifier can recognize the vehicle logo characteristics in the characteristic information to be recognized, the second classifier can recognize the vehicle type characteristics in the characteristic information to be recognized, the third classifier can recognize the vehicle color characteristics in the characteristic information to be recognized, and the vehicle logo information, the vehicle type information and the vehicle color information of the target vehicle are output.
Optionally, the classifier includes a convolutional layer, an active layer, a fully-connected layer, and a softmax layer.
A second aspect of the present application provides a vehicle recognition model creation method, including:
acquiring a target vehicle sample image, and labeling the target vehicle sample image by using information of different attribute types of a target vehicle in the target vehicle sample image to obtain a corresponding sample label;
constructing a training set by using the target vehicle sample image and the corresponding sample label;
training a vehicle recognition model constructed based on a deep learning algorithm by using the training set to obtain the trained vehicle recognition model, and recognizing a target vehicle image to be recognized by using the trained vehicle recognition model; the vehicle identification model comprises a feature extraction module and a feature identification module, wherein the feature extraction module is used for performing feature extraction on the target vehicle image to be identified so as to obtain the feature information to be identified of the target vehicle image to be identified, and the feature identification module is used for respectively inputting the feature information to be identified into classifiers corresponding to different attribute types of the target vehicle, so that the classifiers can identify the features in the feature information to be identified and output the information of the different attribute types of the target vehicle corresponding to the target vehicle image to be identified.
A third aspect of the present application provides a vehicle identification device including:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring an original image to be recognized containing a target vehicle and detecting the target vehicle in the image to be recognized so as to obtain a target vehicle image to be recognized corresponding to the original image to be recognized;
the characteristic extraction module is used for extracting the characteristics of the target vehicle image to be identified so as to obtain the characteristic information to be identified of the target vehicle image to be identified;
and the feature identification module is used for respectively inputting the feature information to be identified into classifiers corresponding to different attribute types of the target vehicle, so that the classifiers can identify the features in the feature information to be identified and output the information of the different attribute types of the target vehicle.
A fourth aspect of the present application provides an electronic device comprising a processor and a memory; wherein the memory is adapted to store a computer program that is loaded and executed by the processor to implement the aforementioned vehicle identification method.
A fifth aspect of the present application provides a computer-readable storage medium having stored thereon computer-executable instructions that, when loaded and executed by a processor, implement the aforementioned vehicle identification method.
In the method, an original image to be recognized containing a target vehicle is obtained first, and the target vehicle in the original image to be recognized is detected, so that a target vehicle image to be recognized corresponding to the original image to be recognized is obtained. And then, carrying out feature extraction on the target vehicle image to be recognized to obtain the feature information to be recognized of the target vehicle image to be recognized. And finally, respectively inputting the characteristic information to be identified into classifiers corresponding to different attribute types of the target vehicle, so that the classifiers can identify the characteristics in the characteristic information to be identified and output the information of the different attribute types of the target vehicle. According to the method and the device, the target vehicle in the original image to be recognized is detected to obtain the image of the target vehicle to be recognized, the image of the target vehicle to be recognized is subjected to feature extraction, then a plurality of attributes of the vehicle are recognized by using classifiers corresponding to different attribute types of the target vehicle, the problems of detection of small targets of the vehicle and error accumulation of a plurality of models are avoided, and therefore recognition efficiency and accuracy are improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a vehicle identification method provided herein;
FIG. 2 is a schematic diagram of a specific vehicle identification method provided herein;
FIG. 3 is a flow chart of a vehicle identification model creation method provided herein;
FIG. 4 is a complete training sample of a vehicle identification model provided herein;
FIG. 5 is an incomplete training sample of a vehicle recognition model provided herein;
FIG. 6 is a schematic diagram of a network structure of a vehicle identification model provided in the present application;
FIG. 7 is a schematic structural diagram of a vehicle identification device according to the present application;
fig. 8 is a structural diagram of a vehicle identification electronic device provided in the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the existing vehicle identification system at the parking lot gate, the vehicle characteristic identification is used for identifying small target types in vehicle attribute types, such as vehicle logos, the vehicle logos are identified after the vehicle logos are detected, the targets to be detected are very small, the samples with large vehicle logo inclination angle and poor image quality are difficult to identify, the detection rate and the identification rate are seriously influenced, the vehicle money and the vehicle color are identified by using an independent network, the training targets of modules are inconsistent, so that a single target loss function is deviated from a macroscopic target, and the accumulation of errors makes the whole system difficult to achieve the best performance. In order to overcome the technical defects, the application provides a vehicle identification scheme, which is characterized in that a target vehicle in an original image to be identified is detected to obtain an image of the target vehicle to be identified, the image of the target vehicle to be identified is subjected to feature extraction, and then a plurality of attributes of the vehicle are identified by using classifiers corresponding to different attribute types of the target vehicle, so that the problems of detection of small targets of the vehicle and error accumulation of a plurality of models are solved, and the identification efficiency and accuracy are improved.
Fig. 1 is a flowchart of a vehicle identification method according to an embodiment of the present application. Referring to fig. 1, the vehicle identification method includes:
s11: the method comprises the steps of obtaining an original image to be recognized containing a target vehicle, and detecting the target vehicle in the original image to be recognized to obtain a target vehicle image to be recognized corresponding to the original image to be recognized.
In this embodiment, an original image to be recognized including a target vehicle is first acquired, and then the target vehicle in the original image to be recognized is detected, so as to obtain an image of the target vehicle to be recognized corresponding to the original image to be recognized. The original image to be recognized can be an image of a target vehicle when the target vehicle enters or exits a gate, which is shot in real time by a camera arranged at a gate such as a parking lot, the original image to be recognized contains the target vehicle to be detected, and the more complete the display of the target vehicle in the original image to be recognized, the more accurate the recognition is. Because information irrelevant to vehicle identification may exist in the original image to be identified, difficulty in vehicle identification is increased, and identification efficiency is reduced, information of the target vehicle in the original image to be identified, such as coordinate information of the target vehicle, needs to be further detected, that is, the target vehicle is positioned, a more detailed image of the target vehicle is obtained based on the coordinate information, that is, an image of the target vehicle to be identified, corresponding to the image to be identified, and efficiency and accuracy in identifying the image of the target vehicle to be identified are relatively high.
S12: and performing feature extraction on the target vehicle image to be recognized to obtain the feature information to be recognized of the target vehicle image to be recognized.
S13: and respectively inputting the characteristic information to be identified into classifiers corresponding to different attribute types of the target vehicle, so that the classifiers can identify the characteristics in the characteristic information to be identified and output the information of the different attribute types of the target vehicle.
In this embodiment, feature extraction is performed on the target vehicle image to be recognized first to obtain feature information to be recognized of the target vehicle image to be recognized. The existing feature extraction algorithms can implement the above functions, such as a resnet (redundant network) network, a yolo (young Only Look once) algorithm, and the like, which is not limited in this embodiment. And then, respectively inputting the characteristic information to be identified into classifiers corresponding to different attribute types of the target vehicle, so that the classifiers can identify the characteristics in the characteristic information to be identified and output the information of the different attribute types of the target vehicle. It is understood that the feature information to be recognized, which is obtained by performing feature extraction on the target vehicle image to be recognized, includes feature information of different attribute types of the target vehicle, such as vehicle logo information, vehicle type information, vehicle color information, and the like. The feature information extraction of different attribute types shares one feature extraction network, on the basis, feature recognition is performed through classifier branches corresponding to different attribute types of the target vehicle, for example, a classifier corresponding to the identification of the logo of the target vehicle, a classifier corresponding to the identification of the model of the target vehicle, a classifier corresponding to the identification of the color of the target vehicle, and the like, and the feature information to be recognized outputs the logo information, the model information, the color information, and the like of the target vehicle after passing through the classifiers.
Therefore, the method and the device for recognizing the target vehicle image acquire the original image to be recognized including the target vehicle at first, and detect the target vehicle in the original image to be recognized so as to obtain the image of the target vehicle to be recognized corresponding to the original image to be recognized. And then, carrying out feature extraction on the target vehicle image to be recognized to obtain the feature information to be recognized of the target vehicle image to be recognized. And finally, respectively inputting the characteristic information to be identified into classifiers corresponding to different attribute types of the target vehicle, so that the classifiers can identify the characteristics in the characteristic information to be identified and output the information of the different attribute types of the target vehicle. According to the method and the device, the target vehicle image to be recognized is obtained by detecting the target vehicle in the original image to be recognized, the characteristic extraction is carried out on the target vehicle image to be recognized, then the classifiers corresponding to different attribute types of the target vehicle are used for recognizing the multiple attributes of the vehicle, the problems of detection of small targets of the vehicle and error accumulation of multiple models are solved, and therefore the recognition efficiency and the recognition accuracy are improved.
Fig. 2 is a flowchart of a specific vehicle identification method according to an embodiment of the present disclosure. Referring to fig. 2, the vehicle identification method includes:
s21: and acquiring an original image to be identified containing the target vehicle.
In this embodiment, specific contents disclosed in the foregoing embodiments may be referred to for specific implementation processes of step S21, and are not described herein again.
S22: and detecting the target vehicle in the original image to be recognized by using a target detection model constructed based on a deep learning algorithm to obtain a target vehicle image to be recognized corresponding to the original image to be recognized.
S23: and utilizing a ResNet network to perform feature extraction on the target vehicle image to be recognized so as to obtain the feature information to be recognized of the target vehicle image to be recognized.
In this embodiment, after the original image to be recognized is obtained, the target vehicle in the original image to be recognized is detected by using a target detection model constructed based on a deep learning algorithm, so as to obtain a target vehicle image to be recognized corresponding to the original image to be recognized. Furthermore, the present embodiment utilizes a target detection model constructed based on the SSD algorithm to detect the target vehicle in the original image to be recognized. The SSD network can quickly detect and identify a plurality of targets in the original image to be identified, so as to obtain a target vehicle image to be identified corresponding to the original image to be identified.
In this embodiment, in the step of extracting the feature of the target vehicle image to be recognized, a ResNet network is used to perform feature extraction on the target vehicle image to be recognized to obtain the feature information to be recognized of the target vehicle image to be recognized, specifically, ResNet18, ResNet50, and the like may be used, which is not limited in this embodiment.
S24: and respectively inputting the characteristic information to be recognized into a first classifier for recognizing a vehicle logo, a second classifier for recognizing a vehicle type and a third classifier for recognizing a vehicle color, so that the first classifier can recognize the vehicle logo characteristics in the characteristic information to be recognized, the second classifier can recognize the vehicle type characteristics in the characteristic information to be recognized, the third classifier can recognize the vehicle color characteristics in the characteristic information to be recognized, and the vehicle logo information, the vehicle type information and the vehicle color information of the target vehicle are output.
In this embodiment, the vehicle type, and the vehicle color of the target vehicle are mainly identified, so that the feature information to be identified extracted by the ResNet network is respectively input to a first classifier for identifying a vehicle logo, a second classifier for identifying a vehicle type, and a third classifier for identifying a vehicle color, and the first classifier, the second classifier, and the third classifier respectively identify and classify the vehicle logo feature information, the vehicle type feature information, and the vehicle color feature information of the target vehicle in the feature information to be identified, and finally output corresponding vehicle logo information, vehicle type information, and vehicle color information. It can be understood that when information of other attribute types of the target vehicle needs to be identified, a corresponding classifier can be added, so as to identify and classify the information of other attribute types of the target vehicle, so as to obtain the structured information of the target vehicle.
It can be seen that, in the embodiment of the present application, the target detection model constructed based on the deep learning algorithm is firstly used to detect the target vehicle in the original image to be recognized, so as to obtain the target vehicle image to be recognized corresponding to the original image to be recognized, then the ResNet network is used to perform feature extraction on the target vehicle image to be recognized, so as to obtain the feature information to be recognized of the target vehicle image to be recognized, and finally the first classifier for recognizing the vehicle logo, the second classifier for recognizing the vehicle type and the third classifier for recognizing the vehicle color are respectively used for recognizing the vehicle logo, the vehicle type and the vehicle color of the target vehicle, so that the small target detection error of the vehicle is reduced, and the detection accuracy is improved. In addition, the method is suitable for more generalized image data, and can be well recognized for samples with large vehicle inclination angles and unobvious vehicle features.
Fig. 3 is a flowchart of a vehicle identification model creation method according to an embodiment of the present application. Referring to fig. 3, the vehicle recognition model creation method includes:
s31: and obtaining a target vehicle sample image, and labeling the target vehicle sample image by using information of different attribute types of the target vehicle in the target vehicle sample image to obtain a corresponding sample label.
S32: and constructing a training set by using the target vehicle sample image and the corresponding sample label.
In this embodiment, a target vehicle sample image is obtained, and the target vehicle sample image is labeled by using information of different attribute types of a target vehicle in the target vehicle sample image, so as to obtain a corresponding sample label. In an embodiment, that is, the target vehicle sample image has a complete vehicle, and the target vehicle image is as shown in fig. 4(b), in this case, the trained model has high recognition accuracy, and the specific process of obtaining the target vehicle sample image includes: preparing vehicle picture data of a parking lot gate, wherein fig. 4(a) is the vehicle picture data of a standard gate, a red frame is the marked position of a target vehicle frame, and fig. 4(b) is a sample picture of the target vehicle captured by the red frame in fig. 4 (a). When the sample size is large, the SSD vehicle detection model may be used to locate the vehicle in fig. 4(a) to obtain the target vehicle sample image shown in fig. 4(b), or the SSD vehicle detection model may be used to train the SSD vehicle detection model using a watermark-free mount image such as the image in fig. 4(a) and the vehicle frame coordinates to obtain the trained SSD vehicle detection model. In this embodiment, the information of different attribute types of the target vehicle is a car logo, a car money, and a car color, and the green characters in fig. 4(a) are the marked car logo (galloping), car money (car), and car color (gray), that is, the sample label. In another embodiment, that is, the vehicle in the target vehicle sample image is incomplete, the target vehicle image is as shown in fig. 5(b), and since the end-to-end identification method has low requirement on data and is applicable to the case where the vehicle is complete and the vehicle is incomplete, the vehicle in the acquired mount image as shown in fig. 5(a) may be incomplete, and at this time, the sample label of the target vehicle is the labeling information in fig. 5 (a): car logo (bmw), car model (car) and car color (red).
In this embodiment, the data for training the end-to-end vehicle recognition model is the captured vehicle picture and the labeled category information of the vehicle logo, the vehicle money and the vehicle color. Therefore, a training set is constructed by using the target vehicle sample image in fig. 4(b) and the sample label in fig. 4(a), or by using the target vehicle sample image in fig. 5(b) and the sample label in fig. 5(a), wherein the target vehicle sample image in fig. 4(b) and the target vehicle sample image in fig. 5(b) are both resized images, which meet the input image size requirements for the end-to-end vehicle identification model. In this embodiment, the size of the input image of the vehicle identification model is 224 × 3.
S33: training a vehicle recognition model constructed based on a deep learning algorithm by using the training set to obtain the trained vehicle recognition model, and recognizing a target vehicle image to be recognized by using the trained vehicle recognition model; the vehicle identification model comprises a feature extraction module and a feature identification module, wherein the feature extraction module is used for performing feature extraction on the target vehicle image to be identified so as to obtain the feature information to be identified of the target vehicle image to be identified, and the feature identification module is used for respectively inputting the feature information to be identified into classifiers corresponding to different attribute types of the target vehicle, so that the classifiers can identify the features in the feature information to be identified and output the information of the different attribute types of the target vehicle corresponding to the target vehicle image to be identified.
In this embodiment, taking the identification of the car logo, the car model, and the car color as an example, the end-to-end car identification model structure is shown in fig. 6, RGB car images 224 × 3 are input, car features are extracted through the ResNet18 network, and car feature results are output after passing through three different classifier branches (which are classifiers corresponding to the identification of the car logo, the car model, and the car color, respectively). The classifier is composed of a convolutional layer, a RELU (linear rectification function) activation layer and a full connection layer, and finally the probability of the corresponding category is calculated by a Softmax function. The Softmax function is expressed as:
Figure BDA0003044199990000101
wherein ViIs the output of the classifier output unit, i is the class index, and the total number of classes is C, SiThe ratio of the index of the current element to the index sum of all elements is shown, and the output value of the multi-classifier can be converted into the relative probability of each class through a Softmax function. In FIG. 3, Softmax1, Softmax2 and Softmax3 correspond to different attribute classification probabilities respectively, and classify the summary according to different attributesThe rate may yield information for different attribute classifications.
The loss function during training is cross entropy loss, and the formula is as follows:
Figure BDA0003044199990000102
wherein t isiRepresenting true values, i.e. true tags, true 1, false 0, SiRepresenting the obtained Softmax probability value, K being the attribute index, N being the total number of attributes, CkIs the total category number of the Kth attribute.
Therefore, the target vehicle sample image is obtained, the information of different attribute types of the target vehicle in the target vehicle sample image is utilized to label the target vehicle sample image to obtain a corresponding sample label, then the target vehicle sample image and the corresponding sample label are utilized to construct a training set, and the training set is utilized to train the vehicle identification model constructed based on the deep learning algorithm to obtain the trained vehicle identification model. The vehicle identification model in the embodiment is an end-to-end model, and the problems of detection of small targets and error accumulation of multiple models can be effectively avoided by utilizing the model to identify vehicles.
Referring to fig. 7, the embodiment of the present application further discloses a vehicle identification device, which includes:
the system comprises an acquisition module 11, a processing module and a processing module, wherein the acquisition module is used for acquiring an original image to be recognized containing a target vehicle and detecting the target vehicle in the image to be recognized to obtain a target vehicle image to be recognized corresponding to the original image to be recognized;
the feature extraction module 12 is configured to perform feature extraction on the target vehicle image to be identified, so as to obtain feature information to be identified of the target vehicle image to be identified;
the feature identification module 13 is configured to input the feature information to be identified into classifiers corresponding to different attribute types of the target vehicle, so that the classifiers identify features in the feature information to be identified and output information of different attribute types of the target vehicle.
Therefore, the method and the device for recognizing the target vehicle image acquire the original image to be recognized including the target vehicle at first, and detect the target vehicle in the original image to be recognized so as to obtain the image of the target vehicle to be recognized corresponding to the original image to be recognized. And then, carrying out feature extraction on the target vehicle image to be recognized to obtain the feature information to be recognized of the target vehicle image to be recognized. And finally, respectively inputting the characteristic information to be identified into classifiers corresponding to different attribute types of the target vehicle, so that the classifiers can identify the characteristics in the characteristic information to be identified and output the information of the different attribute types of the target vehicle. According to the method and the device, the target vehicle image to be recognized is obtained by detecting the target vehicle in the original image to be recognized, the characteristic extraction is carried out on the target vehicle image to be recognized, then the classifiers corresponding to different attribute types of the target vehicle are used for recognizing the multiple attributes of the vehicle, the problems of detection of small targets of the vehicle and error accumulation of multiple models are solved, and therefore the recognition efficiency and the recognition accuracy are improved.
In some specific embodiments, the obtaining module 11 is specifically configured to detect the target vehicle in the original image to be recognized by using a target detection model constructed based on a deep learning algorithm, so as to obtain a target vehicle image to be recognized corresponding to the original image to be recognized.
In some specific embodiments, the feature extraction module 12 is specifically configured to perform feature extraction on the target vehicle image to be identified by using a ResNet network, so as to obtain feature information to be identified of the target vehicle image to be identified.
In some specific embodiments, the feature recognition module 13 is specifically configured to input the feature information to be recognized into a first classifier for recognizing a vehicle logo, a second classifier for recognizing a vehicle type, and a third classifier for recognizing a vehicle color, so that the first classifier recognizes a vehicle logo feature in the feature information to be recognized, the second classifier recognizes a vehicle type feature in the feature information to be recognized, and the third classifier recognizes a vehicle color feature in the feature information to be recognized, and outputs the vehicle logo information, the vehicle type information, and the vehicle color information of the target vehicle.
Further, the embodiment of the application also provides electronic equipment. FIG. 8 is a block diagram illustrating an electronic device 20 according to an exemplary embodiment, and nothing in the figure should be taken as a limitation on the scope of use of the present application.
Fig. 8 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present disclosure. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. Wherein the memory 22 is used for storing a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the vehicle identification method disclosed in any one of the foregoing embodiments.
In this embodiment, the power supply 23 is configured to provide a working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and a communication protocol followed by the communication interface is any communication protocol applicable to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to obtain external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.
In addition, the memory 22 is used as a carrier for resource storage, and may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the resources stored thereon may include an operating system 221, a computer program 222, data 223 of the target vehicle, etc., and the storage manner may be a transient storage or a permanent storage.
The operating system 221 is used for managing and controlling each hardware device and the computer program 222 on the electronic device 20, so as to realize the operation and processing of the data 223 of the mass target vehicle in the memory 22 by the processor 21, which may be Windows Server, Netware, Unix, Linux, or the like. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the vehicle identification method performed by the electronic device 20 disclosed in any of the foregoing embodiments. Data 223 may include image data of the target vehicle collected by electronic device 20.
Further, an embodiment of the present application further discloses a storage medium, in which a computer program is stored, and when the computer program is loaded and executed by a processor, the steps of the vehicle identification method disclosed in any of the foregoing embodiments are implemented.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The vehicle identification method, the vehicle identification model creation method, the device, the equipment and the storage medium provided by the invention are described in detail, a specific example is applied in the text to explain the principle and the implementation mode of the invention, and the description of the embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A vehicle identification method, characterized by comprising:
acquiring an original image to be recognized containing a target vehicle, and detecting the target vehicle in the original image to be recognized to obtain a target vehicle image to be recognized corresponding to the original image to be recognized;
performing feature extraction on the target vehicle image to be recognized to obtain feature information to be recognized of the target vehicle image to be recognized;
and respectively inputting the characteristic information to be identified into classifiers corresponding to different attribute types of the target vehicle, so that the classifiers can identify the characteristics in the characteristic information to be identified and output the information of the different attribute types of the target vehicle.
2. The vehicle identification method according to claim 1, wherein the detecting the target vehicle in the original image to be identified to obtain an image of the target vehicle to be identified corresponding to the original image to be identified comprises:
and detecting the target vehicle in the original image to be recognized by using a target detection model constructed based on a deep learning algorithm to obtain a target vehicle image to be recognized corresponding to the original image to be recognized.
3. The vehicle identification method according to claim 2, wherein the detecting the target vehicle in the original image to be identified by using the target detection model constructed based on the deep learning algorithm comprises:
and detecting the target vehicle in the original image to be recognized by using a target detection model constructed based on an SSD algorithm.
4. The vehicle identification method according to claim 1, wherein the performing feature extraction on the target vehicle image to be identified to obtain the feature information to be identified of the target vehicle image to be identified comprises:
and utilizing a ResNet network to perform feature extraction on the target vehicle image to be recognized so as to obtain the feature information to be recognized of the target vehicle image to be recognized.
5. The vehicle identification method according to claim 1, wherein the inputting the feature information to be identified into classifiers corresponding to different attribute types of the target vehicle, respectively, so that the classifiers identify features in the feature information to be identified and output information of the different attribute types of the target vehicle comprises:
and respectively inputting the characteristic information to be recognized into a first classifier for recognizing a vehicle logo, a second classifier for recognizing a vehicle type and a third classifier for recognizing a vehicle color, so that the first classifier can recognize the vehicle logo characteristics in the characteristic information to be recognized, the second classifier can recognize the vehicle type characteristics in the characteristic information to be recognized, the third classifier can recognize the vehicle color characteristics in the characteristic information to be recognized, and the vehicle logo information, the vehicle type information and the vehicle color information of the target vehicle are output.
6. The vehicle identification method according to any one of claims 1 to 5, wherein the classifier includes a convolutional layer, an active layer, a full-link layer, and a softmax layer.
7. A vehicle recognition model creation method, characterized by comprising:
acquiring a target vehicle sample image, and labeling the target vehicle sample image by using information of different attribute types of a target vehicle in the target vehicle sample image to obtain a corresponding sample label;
constructing a training set by using the target vehicle sample image and the corresponding sample label;
training a vehicle recognition model constructed based on a deep learning algorithm by using the training set to obtain the trained vehicle recognition model, and recognizing a target vehicle image to be recognized by using the trained vehicle recognition model; the vehicle identification model comprises a feature extraction module and a feature identification module, wherein the feature extraction module is used for performing feature extraction on the target vehicle image to be identified so as to obtain the feature information to be identified of the target vehicle image to be identified, and the feature identification module is used for respectively inputting the feature information to be identified into classifiers corresponding to different attribute types of the target vehicle, so that the classifiers can identify the features in the feature information to be identified and output the information of the different attribute types of the target vehicle corresponding to the target vehicle image to be identified.
8. A vehicle identification device characterized by comprising:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring an original image to be recognized containing a target vehicle and detecting the target vehicle in the image to be recognized so as to obtain a target vehicle image to be recognized corresponding to the original image to be recognized;
the characteristic extraction module is used for extracting the characteristics of the target vehicle image to be identified so as to obtain the characteristic information to be identified of the target vehicle image to be identified;
and the feature identification module is used for respectively inputting the feature information to be identified into classifiers corresponding to different attribute types of the target vehicle, so that the classifiers can identify the features in the feature information to be identified and output the information of the different attribute types of the target vehicle.
9. An electronic device, comprising a processor and a memory; wherein the memory is for storing a computer program that is loaded and executed by the processor to implement the vehicle identification method according to any one of claims 1 to 6.
10. A computer-readable storage medium storing computer-executable instructions which, when loaded and executed by a processor, carry out a vehicle identification method according to any one of claims 1 to 6.
CN202110466448.2A 2021-04-28 2021-04-28 Vehicle identification method, vehicle identification model creation method and related components Pending CN113221982A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110466448.2A CN113221982A (en) 2021-04-28 2021-04-28 Vehicle identification method, vehicle identification model creation method and related components

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110466448.2A CN113221982A (en) 2021-04-28 2021-04-28 Vehicle identification method, vehicle identification model creation method and related components

Publications (1)

Publication Number Publication Date
CN113221982A true CN113221982A (en) 2021-08-06

Family

ID=77089556

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110466448.2A Pending CN113221982A (en) 2021-04-28 2021-04-28 Vehicle identification method, vehicle identification model creation method and related components

Country Status (1)

Country Link
CN (1) CN113221982A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108549926A (en) * 2018-03-09 2018-09-18 中山大学 A kind of deep neural network and training method for refining identification vehicle attribute
CN109635656A (en) * 2018-11-12 2019-04-16 平安科技(深圳)有限公司 Vehicle attribute recognition methods, device, equipment and medium neural network based
CN109740415A (en) * 2018-11-19 2019-05-10 深圳市华尊科技股份有限公司 Vehicle attribute recognition methods and Related product
CN111126224A (en) * 2019-12-17 2020-05-08 成都通甲优博科技有限责任公司 Vehicle detection method and classification recognition model training method
CN112101246A (en) * 2020-09-18 2020-12-18 济南博观智能科技有限公司 Vehicle identification method, device, equipment and medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108549926A (en) * 2018-03-09 2018-09-18 中山大学 A kind of deep neural network and training method for refining identification vehicle attribute
CN109635656A (en) * 2018-11-12 2019-04-16 平安科技(深圳)有限公司 Vehicle attribute recognition methods, device, equipment and medium neural network based
CN109740415A (en) * 2018-11-19 2019-05-10 深圳市华尊科技股份有限公司 Vehicle attribute recognition methods and Related product
CN111126224A (en) * 2019-12-17 2020-05-08 成都通甲优博科技有限责任公司 Vehicle detection method and classification recognition model training method
CN112101246A (en) * 2020-09-18 2020-12-18 济南博观智能科技有限公司 Vehicle identification method, device, equipment and medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
赵珊;黄强强;曲宏山;刘相利;: "改进的多标签深度学习车辆属性识别研究", 测控技术, no. 02 *
阮航;孙涵;: "基于Faster R-CNN的车辆多属性识别", 计算机技术与发展, no. 10 *

Similar Documents

Publication Publication Date Title
CN107944450B (en) License plate recognition method and device
CN112560999B (en) Target detection model training method and device, electronic equipment and storage medium
CN111898523A (en) Remote sensing image special vehicle target detection method based on transfer learning
CN111967429A (en) Pedestrian re-recognition model training method and device based on active learning
CN109376580B (en) Electric power tower component identification method based on deep learning
CN112766218B (en) Cross-domain pedestrian re-recognition method and device based on asymmetric combined teaching network
CN112309126B (en) License plate detection method and device, electronic equipment and computer readable storage medium
CN112541372B (en) Difficult sample screening method and device
CN111522951A (en) Sensitive data identification and classification technical method based on image identification
CN112580657A (en) Self-learning character recognition method
CN112465854A (en) Unmanned aerial vehicle tracking method based on anchor-free detection algorithm
WO2022252089A1 (en) Training method for object detection model, and object detection method and device
CN116246287B (en) Target object recognition method, training device and storage medium
CN113743434A (en) Training method of target detection network, image augmentation method and device
CN116704490A (en) License plate recognition method, license plate recognition device and computer equipment
CN111539390A (en) Small target image identification method, equipment and system based on Yolov3
CN106960183A (en) A kind of image pedestrian's detection algorithm that decision tree is lifted based on gradient
CN111753618A (en) Image recognition method and device, computer equipment and computer readable storage medium
CN115953744A (en) Vehicle identification tracking method based on deep learning
CN113221982A (en) Vehicle identification method, vehicle identification model creation method and related components
CN114119953A (en) Method for quickly positioning and correcting license plate, storage medium and equipment
CN113743359A (en) Vehicle weight recognition method, model training method and related device
CN112069971A (en) Video-based highway sign line identification method and identification system
CN111639640A (en) License plate recognition method, device and equipment based on artificial intelligence
CN113963329B (en) Digital traffic sign detection and identification method based on double-stage convolutional neural network

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