CN117994772A - License plate recognition method, license plate recognition model training method, device, electronic equipment and storage medium - Google Patents

License plate recognition method, license plate recognition model training method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117994772A
CN117994772A CN202410148539.5A CN202410148539A CN117994772A CN 117994772 A CN117994772 A CN 117994772A CN 202410148539 A CN202410148539 A CN 202410148539A CN 117994772 A CN117994772 A CN 117994772A
Authority
CN
China
Prior art keywords
license plate
plate recognition
recognition model
feature map
model
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
CN202410148539.5A
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.)
Beijing Shengzhe Science & Technology Co ltd
Original Assignee
Beijing Shengzhe Science & Technology 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 Beijing Shengzhe Science & Technology Co ltd filed Critical Beijing Shengzhe Science & Technology Co ltd
Priority to CN202410148539.5A priority Critical patent/CN117994772A/en
Publication of CN117994772A publication Critical patent/CN117994772A/en
Pending legal-status Critical Current

Links

Landscapes

  • Character Discrimination (AREA)

Abstract

The embodiment of the invention discloses a license plate recognition method, a license plate recognition model training method, a device, electronic equipment and a storage medium, wherein the license plate recognition method comprises the following steps: acquiring license plate detection image data; the license plate detection image data comprise license plates to be identified; classifying and judging the license plate to be identified in the license plate detection image data through a license plate type judgment model to obtain the license plate type of the license plate to be identified; determining a target license plate recognition model matched with the license plate to be recognized from a plurality of license plate recognition models according to the license plate type of the license plate to be recognized; and identifying the license plate detection image data through the target license plate identification model to obtain a license plate identification result. The technical scheme of the embodiment of the invention can improve the recognition accuracy of the license plate.

Description

License plate recognition method, license plate recognition model training method, device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of license plate recognition, in particular to a license plate recognition method, a license plate recognition model training method, a license plate recognition device, electronic equipment and a storage medium.
Background
License plate recognition technology is a relatively common technical application in the field of computer vision, and is widely used in scenes such as traffic roads, community parks and the like at present. The license plate recognition is to recognize various license plates by utilizing an OCR (Optical character recognition ) character recognition technology, and the license plates can still be recognized at the same time if a plurality of photos appear in the detected image at the same time.
At present, the license plate is mostly identified based on a deep learning method, a license plate identification model is obtained by training a large number of rich sample images, and the license plate is identified with high identification rate.
The inventors have found that the following drawbacks exist in the prior art in the process of implementing the present invention: the current license plate recognition model generally has higher recognition rate only for a certain type of license plate. For example, it has a higher recognition rate for only a single row of license plate types, or only for a specific type of license plate in a certain region or country. However, with the continuous evolution of technologies and policies, the number of license plates of different types allowed to pass in the same region is increasing, and it is difficult for a license plate recognition model with a higher recognition rate only for a license plate of a certain type to effectively recognize a plurality of license plates of different types, so that the recognition accuracy of the license plates is reduced.
Disclosure of Invention
The embodiment of the invention provides a license plate recognition method, a license plate recognition model training method, a license plate recognition device, electronic equipment and a storage medium, which can improve the recognition accuracy of a license plate.
According to an aspect of the present invention, there is provided a license plate recognition method including:
acquiring license plate detection image data; the license plate detection image data comprise license plates to be identified;
classifying and judging the license plate to be identified in the license plate detection image data through a license plate type judgment model to obtain the license plate type of the license plate to be identified;
Determining a target license plate recognition model matched with the license plate to be recognized from a plurality of license plate recognition models according to the license plate type of the license plate to be recognized;
and identifying the license plate detection image data through the target license plate identification model to obtain a license plate identification result.
According to another aspect of the present invention, there is provided a license plate recognition model training method including:
Acquiring license plate sample image data;
Determining a license plate recognition model to be trained, wherein the license plate sample image data of the license plate recognition model is matched with the license plate sample image data;
extracting features of the license plate sample image data through the license plate recognition model to be trained to obtain an initial sample feature map;
converting the initial sample feature map through the license plate recognition model to be trained to obtain a converted sample feature map; the license plate recognition models to be trained are of a plurality of types;
identifying the license plate identification model to be trained according to the converted sample feature diagram to obtain a license plate identification result so as to train the license plate identification model to be trained;
The license plate recognition method is characterized in that a plurality of license plate recognition models obtained after training of the license plate recognition models to be trained is applied to the license plate recognition method in any embodiment of the invention.
According to another aspect of the present invention, there is provided a license plate recognition apparatus including:
The license plate detection image data acquisition module is used for acquiring license plate detection image data; the license plate detection image data comprise license plates to be identified;
The license plate type classification module is used for classifying and judging the license plate to be identified in the license plate detection image data through a license plate type judgment model to obtain the license plate type of the license plate to be identified;
the target license plate recognition model determining module is used for determining a target license plate recognition model matched with the license plate to be recognized from a plurality of license plate recognition models according to the license plate type of the license plate to be recognized;
The first license plate recognition result acquisition module is used for recognizing the license plate detection image data through the target license plate recognition model to obtain a license plate recognition result.
According to another aspect of the present invention, there is provided a license plate recognition model training apparatus including:
the license plate sample image data acquisition module is used for acquiring license plate sample image data;
the license plate recognition model to be trained determining module is used for determining a license plate recognition model to be trained, which is matched with the license plate sample image data;
The initial sample feature map extracting module is used for extracting features of the license plate sample image data through the license plate recognition model to be trained to obtain an initial sample feature map;
the conversion sample feature map acquisition module is used for converting the initial sample feature map through the license plate recognition model to be trained to obtain a conversion sample feature map; the license plate recognition models to be trained are of a plurality of types;
the second license plate recognition result acquisition module is used for recognizing the to-be-trained license plate recognition model according to the conversion sample feature diagram to obtain a license plate recognition result so as to train the to-be-trained license plate recognition model;
The license plate recognition method is characterized in that a plurality of license plate recognition models obtained after training of the license plate recognition models to be trained is applied to the license plate recognition method in any embodiment of the invention.
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 license plate recognition method or the license plate recognition model training 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 license plate recognition method or the license plate recognition model training method according to any one of the embodiments of the present invention when executed.
According to the embodiment of the invention, after license plate detection image data comprising the license plate to be identified is obtained, the license plate to be identified in the license plate detection image data is classified and judged through the license plate type judgment model, so that the license plate type of the license plate to be identified is obtained. After the license plate type is determined, a target license plate recognition model matched with the license plate to be recognized is determined from a plurality of license plate recognition models according to the license plate type of the license plate to be recognized, and then the license plate detection image data is recognized through the target license plate recognition model, so that a license plate recognition result is obtained, the problem that the existing single license plate recognition is difficult to effectively recognize a plurality of different types of license plates is solved, and therefore the recognition accuracy of the license plate is improved.
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 license plate recognition method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of license plate recognition according to an embodiment of the invention;
FIG. 3 is a schematic flow chart of identifying a target license plate identification model according to a conversion feature map according to an embodiment of the present invention;
Fig. 4 is a flowchart of a license plate recognition model training method according to a second embodiment of the present invention;
fig. 5 is a schematic diagram of a license plate recognition device according to a third embodiment of the present invention;
Fig. 6 is a schematic diagram of a license plate recognition model training device according to a fourth embodiment of the present invention;
Fig. 7 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 license plate recognition method provided in an embodiment of the present invention, where the present embodiment is applicable to a license plate recognition situation performed by a plurality of license plate recognition models of different types, and the method may be performed by a license plate 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, so long as the electronic device may be used to perform license plate recognition, and the embodiment of the present invention does not limit a specific device type of the electronic device. Accordingly, as shown in fig. 1, the method includes the following operations:
s110, acquiring license plate detection image data; the license plate detection image data comprise license plates to be identified.
The license plate detection image data can be image data which is acquired in real time and needs license plate recognition. Alternatively, the license plate detection image data can be generated by an image acquired by a monitoring system on a road, or by an image acquired by a license plate recognition system applied to a garage, as long as the license plate detection recognition requirement exists, the embodiment of the invention does not limit the specific acquisition mode of the license plate detection image data.
In the embodiment of the invention, before license plate recognition, license plate detection image data needing license plate recognition can be acquired first. Alternatively, the license plate detection image data may be originally acquired data, or may also be data obtained by preprocessing an image of the originally acquired data, which is not limited in the embodiment of the present invention.
In an optional embodiment of the present invention, the acquiring license plate detection image data may include: acquiring original image acquisition data; carrying out license plate detection on the original image acquisition data through a license plate detection model to obtain an initial license plate detection result; performing key point detection on the initial license plate detection result through a license plate key point model to obtain license plate key points; and carrying out license plate correction according to the license plate key points through the license plate detection model to obtain the license plate detection image data.
Wherein the raw image acquisition data may be raw acquired, non-preprocessed image data. The license plate detection model may be a model for license plate detection of an image. The initial license plate detection result may be a detection result obtained by license plate detection of the original image acquisition data through a license plate detection model. The license plate key point model may be a model that extracts key points for the detected license plate. The license plate key points may be key points of the detected license plate, for example, may include, but are not limited to, a vertex and a center point of the vehicle, and the embodiment of the present invention does not limit the specific position and type of the license plate key points in the license plate.
Specifically, after the original image acquisition data is obtained, license plate detection can be performed on the original image acquisition data through a license plate detection model, so that an initial license plate detection result is obtained. Alternatively, the license plate detection model may label a rectangular frame for the license plate in the original image acquisition data, where the rectangular frame is labeled in a form of being attached to the target license plate. License plate Detection models can employ FASTER RCNN (Region-based Convolutional Neural Networks, region-based fast convolutional neural network), SDD (SEPARATE DIFFERENTIAL Detection ), RETINANET (a novel object Detection framework), and YOLO (You Only Look Once, a target Detection algorithm) models, etc. The embodiment of the invention can use yolov models as license plate detection models, the detection categories of the models mainly comprise 1 license plate category, and the license plate detection models can be trained by using a pre-marked data set. The model detection capability can be enhanced by using a multi-scale training strategy when the license plate detection model is trained, and the accuracy of small target license plate detection in a monitoring scene is further improved by using a relatively large input scale (960 x 960) during prediction.
Correspondingly, after detecting the license plate through the license plate detection model, further carrying out key point detection on an initial license plate detection result through the license plate key point model to obtain license plate key points. Optionally, the license plate key point model may extract 4 key points for the license plate detected initially, and label license plate corner points in the image, where the labeling order may be: 0: the upper left corner coordinates (x 1, y 1) of the license plate; 1: the upper right corner coordinates (x 2, y 2) of the license plate; 2: lower right corner coordinates (x 3, y 3) of license plate; 3: lower left corner coordinates (x 4, y 4) of license plate. In the training process, the training data of the license plate key point model can perform 0.15 times of expansion processing on the detected license plate small images up, down, left and right respectively so as to improve the positioning detection accuracy of the key points. The Loss function of the license plate key point model can use MSE Loss (Mean Squared Error Loss, MSE mean square error Loss), and data enhancement is performed in a random clipping mode in the training process. Different from other models, when data is enhanced, license plate key point labeling coordinates can change along with random cutting, so that the relative coordinates of license plates after images are randomly cut can be synchronously changed when the data is enhanced.
Further, after obtaining the license plate key points, the license plate key points can be mapped back to the original image through a license plate detection model. After the mapping is completed, the license plate is rectified to a fixed format, such as a size of 200 x 50. The correction map coordinates may be [ [0,0], [200,0], [0,50], [200,50] ]. And calling openv (Open Source Computer Vision Library ) functions to perform perspective transformation according to license plate key point coordinates and correction mapping coordinates obtained by license plate key point detection, so that corrected license plate small images can be obtained and used as license plate detection image data.
S120, classifying and judging the license plate to be identified in the license plate detection image data through a license plate type judgment model to obtain the license plate type of the license plate to be identified.
The license plate type judgment model can be used for classifying and judging the license plate to be identified in the license plate detection image data based on the license plate detection result.
Optionally, according to license plate recognition requirements, the license plate type judgment model can recognize and classify a plurality of license plates of different types. For example, when single-row and multi-row license plates need to be identified, the license plate type judgment model can classify and identify single-row license plates, double-row license plates, three-row license plates, more rows of license plates and the like. When the license plates of different countries need to be identified, the license plate type judgment model can classify and identify the license plates of the A country, the B country, the C country, the license plates of other countries, and the like. Or the license plate type judgment model can also simultaneously recognize single-row license plates, multi-row license plates, license plate types of different countries or regions and the like, and the embodiment of the invention does not limit the classification recognition capability of the license plate type judgment model.
Optionally, after license plate detection, key point extraction and correction are performed on the acquired image by adopting the license plate detection model and the license plate key point model, license plate detection image data obtained by correction can be input into the license plate type judgment model, so that the license plate to be identified in the license plate detection image data is classified and judged by the license plate type judgment model, and the license plate type of the license plate to be identified is obtained. By way of example, license plate types may be, for example, single-row license plates, double-row license plates, three-row license plates, four-row license plates, and the like.
In order to improve the classification accuracy of the license plate type judgment model, the license plate type judgment model can be trained in advance by taking the corrected license plate small image as sample data. Alternatively, the license plate type judgment model may use sofmax (flexible maximum transfer function) cross entropy loss function, the optimizer may use SGD (Stochastic GRADIENT DESCENT, random gradient descent) during training, the initial learning rate (LEARNING RATE) may be set to 0.01, and the weight attenuation parameter may be set to 0.0005. The data amplification mode can be as follows: random rotation, random scaling, random gaussian noise, left-right mirroring, etc.
S130, determining a target license plate recognition model matched with the license plate to be recognized from a plurality of license plate recognition models according to the license plate type of the license plate to be recognized.
And S140, recognizing the license plate detection image data through the target license plate recognition model to obtain a license plate recognition result.
Each license plate recognition model can recognize a certain type of license plate, for example, the license plate recognition model 1 can recognize a single-row license plate, the license plate recognition model 2 can recognize double-row license plates, the license plate recognition model 3 can recognize three-row license plates, the license plate recognition model 4 can recognize a region license plate of country a, the license plate recognition model 5 can recognize B region license plate of country a, the license plate recognition model 6 can recognize B region license plate of country a, and the like. The target license plate recognition model may be one or more license plate recognition models capable of accurately recognizing the license plate to be recognized.
Accordingly, after the license plate type of the license plate to be identified is determined, a target license plate identification model matched with the license plate to be identified can be determined from a plurality of license plate identification models according to the license plate type of the license plate to be identified. Optionally, if the number of license plates to be identified is multiple, the number of target license plate identification models may also be multiple, and one target license plate identification model may identify license plate detection image data corresponding to one license plate to be identified, so as to obtain license plate identification results corresponding to each license plate to be identified.
In an optional embodiment of the present invention, the license plate types of the license plate to be identified may include a single-row license plate, a double-row license plate and three-row license plate; the determining, according to the license plate type of the license plate to be identified, a target license plate identification model matched with the license plate to be identified from a plurality of license plate identification models may include: under the condition that the license plate type of the license plate to be identified is determined to be a single-row license plate, taking a single-row license plate identification model as the target license plate identification model; under the condition that the license plate type of the license plate to be identified is determined to be a double-row license plate, taking a double-row license plate identification model as the target license plate identification model; and under the condition that the license plate type of the license plate to be identified is three rows of license plates, taking the three-row license plate identification model as the target license plate identification model.
Fig. 2 is a schematic flow chart of license plate recognition according to an embodiment of the invention. In a specific example, as shown in fig. 2, a single-row license plate, a double-row license plate and three-row license plate are taken as an illustration, an original large image is firstly acquired through an image acquisition device such as a camera and the like, then a license plate detection model is called to detect the position of the license plate in the image, and under the condition that the license plate is detected, a license plate key point model is called to locate the positions of four corner points of the upper left corner, the upper right corner, the lower right corner and the lower left corner of the license plate, so that license plate key points are obtained, and the license plate is corrected through a license plate correction module by utilizing the license plate key points. After the license plate is corrected, the corrected license plate small image is sent to a license plate type judging module, and the license plate is judged to have a plurality of rows of characters. If the license plate is a single-row license plate, the corrected license plate small image is input into a single-row license plate recognition model for recognition, and the recognized license plate number is output. If the license plate is a double-row license plate, the corrected license plate small image is input into a double-row license plate recognition model for recognition, and the recognized license plate number is output. If the license plate is three rows of license plates, the corrected license plate small image is input into a three-row license plate recognition model for recognition, and the recognized license plate number is output.
In an optional embodiment of the present invention, the identifying the license plate detection image data by the target license plate identification model to obtain a license plate identification result may include: extracting features of the license plate detection image data through the target license plate recognition model to obtain an initial feature map; converting the initial feature map through the target license plate recognition model to obtain a conversion feature map; and identifying the target license plate identification model according to the conversion feature map to obtain the license plate identification result.
The initial feature map may be a feature map obtained by initially performing feature extraction on license plate detection image data through a target license plate recognition model. The conversion feature map may be a feature map obtained by converting the initial feature map.
Alternatively, the license plate recognition model may include a feature extraction network. When the license plate recognition model is determined to be the target license plate recognition model, the target license plate recognition model can perform feature extraction on license plate detection image data through an internal feature extraction network to obtain an initial feature map. The feature extraction networks corresponding to the license plate recognition models may be the same or different, and the embodiment of the invention is not limited thereto.
By way of example, feature extraction networks may include, but are not limited to, vgg (Visual Geometry Group ), resnet (Residual Neural Network, residual network), etc., CNN (Convolutional Neural Network ) backbone networks such as mobilenet (lightweight neural network).
It can be understood that, since license plate types that can be identified by the license plate identification model are different, the dimension information requirements on the feature map corresponding to the license plate image are also different. Therefore, when the license plate detection image data is identified through the target license plate identification model, the license plate detection image data can be firstly subjected to feature extraction through the feature extraction network to obtain an initial feature map, then the initial feature map is converted through the target license plate identification model according to the identification requirement of the model to obtain a conversion feature map, and finally the license plate identification result is obtained according to the target license plate identification model and the conversion feature map obtained after conversion. The initial feature map is converted into a conversion feature map suitable for the target license plate recognition model, so that the recognition accuracy of the target license plate recognition model can be improved.
In an optional embodiment of the present invention, the converting the initial feature map by the target license plate recognition model to obtain a converted feature map may include: determining characteristic conversion association parameters; the feature conversion association parameters comprise feature diagram length, feature diagram height and license plate character dimension; converting the initial feature map according to the feature conversion association parameters to obtain a conversion feature map;
The feature map height corresponding to the single-row license plate recognition model is a first feature map height value; the height of the feature map corresponding to the double-row license plate recognition model is a second feature map height value; and the height of the feature map corresponding to the three-driving-license-plate recognition model is a third feature map height value. The first feature map height value may be 1, the second feature map height value may be 2, and the third feature map height value may be 3.
The dimension of the license plate characters can be set according to license plate recognition requirements. Alternatively, the marked license plate character result can be converted into numbers, and each character is represented by a number to form a license plate character template. In a specific example, assuming that the number of license plate rows in the training sample is at most 3, and the number of license plate characters is at most 9, including license plates of the A country, the B country, the C country, and the like, and 82 character templates in total, including Chinese characters, english letters, numbers, and the like, the dimension of the license plate characters can be set to 82.
Specifically, feature conversion association parameters such as feature map length, feature map height, license plate character dimension and the like applicable to the target license plate recognition model can be determined according to the type of the target license plate recognition model, and then the initial feature map is converted according to the determined feature conversion association parameters, so that a converted feature map is obtained.
In an optional embodiment of the present invention, if the target license plate recognition model is the two-row license plate recognition model and/or the three-row license plate recognition model, the method may further include: performing horizontal segmentation on the conversion feature map through a segmentation operator of the target license plate recognition model to obtain a segmentation feature map; splicing the segmentation feature graphs through a splicing operator of the target license plate recognition model to obtain splicing feature graphs; the identifying, by the target license plate identifying model, according to the conversion feature map, to obtain the license plate identifying result may include: and identifying the spliced feature images through the target license plate identification model to obtain the license plate identification result.
The segmentation operator may be an operator for performing horizontal segmentation on the conversion feature map. The segmentation feature map may be a feature map obtained by performing a horizontal segmentation process on the conversion feature map. The stitching operator may be an operator for stitching the cut feature graphs. The spliced feature map may be a feature map obtained after the split feature map is spliced.
In the embodiment of the invention, if the license plate recognition model comprises a double-row license plate recognition model and/or a three-row license plate recognition model, the height of a feature map applicable to the double-row license plate recognition model can be 2, and the height of a feature map applicable to the three-row license plate recognition model can be 3. Therefore, in order to improve the recognition accuracy of the multi-row license plate recognition model, after the conversion feature map is obtained, the conversion feature map can be further segmented in the horizontal direction by a segmentation operator of the multi-row target license plate recognition model to obtain a segmentation feature map, and each segmentation feature map is spliced by a splicing operator of the target license plate recognition model to obtain a spliced feature map. Finally, the multi-row target license plate recognition model can be recognized by taking the spliced feature images as the reference, and a license plate recognition result is obtained.
Fig. 3 is a schematic flow chart of recognition of a target license plate recognition model according to a conversion feature map according to an embodiment of the present invention. In one specific example, as shown in fig. 3, a license plate including a single row and a plurality of rows is specifically described. Firstly, feature extraction is carried out on license plate detection image data through a feature extraction network, and an initial feature map is obtained. If multiple rows of license plates need to be identified, the height of the initial feature map must be greater than the maximum number of rows of license plates identified. The convolved initial feature map is then processed, typically by pooling (pooling) operations, which may be max pool (max pooling) or globalavg pool (global pooling), for example. The license plates with different numbers of rows are also different in the mode of processing the characteristic images after convolution.
Specifically, for the license plate recognition model of M rows, the initial feature map may be converted into n×m×v by adjusting feature conversion related parameters such as a pooling core, a pooling step length, a pooling pad (the number of pixels for expanding the feature map size), and a license plate character dimension. Wherein N represents the length of the feature map, M represents the height of the feature map, and V represents the dimension of license plate characters. Or the license plate character dimension V can be ignored, and the initial feature map is directly converted into N. For example, the single-row license plate recognition model can force the initial feature map to be a conversion feature map of N1 by changing parameters such as the size of a pooling kernel or the pooling step size. Wherein N is the length of the feature map, which is generally not lower than the maximum length of license plate characters, and 1 is the height of the feature map. The double-row license plate recognition model can forcedly change an initial feature map into a conversion feature map of N x 2 by changing parameters such as the size of a pooling core or pooling step length, wherein N is the length of the feature map and is generally not lower than the maximum length of license plate characters, and 2 is the height of the feature map. The three-driving license plate recognition model can forcedly change an initial feature map into a conversion feature map of N.3 by changing parameters such as the size of a pooling core or pooling step length, wherein N is the length of the feature map and is generally not lower than the maximum length of license plate characters, and 3 is the height of the feature map.
After the converted feature images are obtained, a slice operator is used as a segmentation operator, the converted feature images are segmented in the horizontal direction for M-1 times to obtain M segmented feature images with N being 1*V or M being 1, and then the segmented feature images are spliced for M-1 times by using a concat operator as a splicing operator to obtain a spliced feature image with (M being 1*V) or (M being N) being 1. After the spliced feature map is obtained, the spliced feature map can be accessed into a loss function of a corresponding target license plate recognition model to perform model training. Alternatively, the loss function of each license plate recognition model may employ a CTC (Connectionist Temporal Classification, sequential time series classification) function.
In one specific example, the feature extraction network is assumed to include a total of 10 convolutional layers, 3 pooling layers. The size of the final feature map is 30 x 5, wherein 30 is the length of the feature map and is larger than the maximum length 9 of license plate characters; the height of the feature map is 5 and is larger than the number 3 of license plate rows.
After an initial feature map is obtained through a feature extraction network, a maximum pooling layer is used for a single-row license plate recognition model, and parameters such as pooling cores, pooling step sizes, pooling pad, license plate character dimensions and the like are adjusted to convert the initial feature map into a 25 x 1 x 82 conversion feature map, wherein 25 is the length of the feature map, 1 is the height of the feature map, and 82 is the license plate character dimensions.
For the double-row license plate recognition model, a maximum pooling layer is used, and an initial feature map is converted into a 12 x 2 x 82 conversion feature map by adjusting parameters such as pooling core, pooling step length, pooling pad, license plate character dimension and the like, wherein 12 is the length of the feature map, 2 is the height of the feature map, and 82 is the license plate character dimension. And then, using a slice operator to segment the conversion feature map in the horizontal direction to obtain two 12 x1 x 82 segmentation feature maps. And then splicing the two segmentation feature graphs in sequence by using a concat operator to obtain a 24 x1 x 82 splicing feature graph.
For the three-driving license plate recognition model, a maximum pooling layer is used, and an initial feature map is converted into a conversion feature map of 8 x 3 x 82 by adjusting parameters such as pooling core, pooling step length, pooling pad and license plate character dimension, wherein 8 is the length of the feature map, 3 is the height of the feature map, and 82 is the license plate character dimension. And then using a slice operator to split the conversion feature map twice in the horizontal direction to obtain three 8 x 1 x 82 split feature maps, and then using a concat operator to splice the three split feature maps twice in sequence to obtain a 24 x 1 x 82 split feature map. The license plates with more rows can be identified by analogy.
According to the embodiment of the invention, after license plate detection image data comprising the license plate to be identified is obtained, the license plate to be identified in the license plate detection image data is classified and judged through the license plate type judgment model, so that the license plate type of the license plate to be identified is obtained. After the license plate type is determined, a target license plate recognition model matched with the license plate to be recognized is determined from a plurality of license plate recognition models according to the license plate type of the license plate to be recognized, and then the license plate detection image data is recognized through the target license plate recognition model, so that a license plate recognition result is obtained, the problem that the existing single license plate recognition is difficult to effectively recognize a plurality of different types of license plates is solved, and therefore the recognition accuracy of the license plate is improved.
Example two
Fig. 4 is a flowchart of a license plate recognition model training method provided in a second embodiment of the present invention, where the present embodiment may be adapted to train a plurality of license plate recognition models of different types to jointly perform license plate recognition, and the method may be performed by a license plate recognition model training apparatus, where 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, so long as the electronic device may be used to train the license plate recognition model, and the embodiment of the present invention does not limit a specific device type of the electronic device. Accordingly, as shown in fig. 4, the method includes the following operations:
S210, license plate sample image data are obtained.
The license plate sample image data may be sample image data for training each license plate recognition model.
Optionally, the license plate sample image data may include sample image data of a plurality of different types of license plates, such as sample image data of a single-row license plate, a double-row license plate, a three-row license plate, or more rows of license plates, or sample image data of a country license plate, and other country types, which are not limited by the license plate types included in the license plate sample image data. The license plate sample image data corresponding to each type of license plate can be correspondingly trained to obtain a license plate recognition model.
Optionally, the license plate sample image data may not limit the length of the license plate, whether the license plate is complete or not, the number of the license plates, and the region to which the license plate belongs. License plate sample image data can be marked by license plate characters.
S220, determining a license plate recognition model to be trained, wherein the license plate sample image data of the license plate recognition model is matched with the license plate sample image data.
The license plate recognition model to be trained can be matched with the license plate sample image data, and model training is required to be carried out by utilizing the license plate sample image data.
And S230, extracting features of the license plate sample image data through the license plate recognition model to be trained, and obtaining an initial sample feature map.
The initial sample feature map may be a feature map obtained by extracting features from license plate sample image data.
Optionally, each license plate recognition model to be trained can perform feature extraction on the license plate sample image data by the feature extraction network to obtain an initial sample feature map. The feature extraction networks of the license plate recognition models to be trained can be the same or different. By way of example, the feature extraction network may include, but is not limited to, CNN backbone networks such as vgg, resnet, mobilenet, and the like.
In order to improve the recognition accuracy of the model, license plate detection can be carried out on the original sample image acquisition data through a license plate detection model to obtain an initial license plate detection result, and key point detection is carried out on the initial license plate detection result through a license plate key point model to obtain license plate key points. Further, license plate correction is carried out according to license plate key points through a license plate detection model, after license plate sample image data are obtained, corrected license plate sample image data are input into a feature extraction network of the license plate recognition model to be trained, so that feature extraction is carried out on the license plate sample image data through the feature extraction network, and an initial sample feature map is obtained.
S240, converting the initial sample feature map through the license plate recognition model to be trained to obtain a converted sample feature map; the license plate recognition models to be trained are of multiple types.
The transformed sample feature map may be a feature map obtained by transforming the initial sample feature map.
S250, recognizing the license plate recognition model to be trained according to the converted sample feature diagram to obtain a license plate recognition result so as to train the license plate recognition model to be trained.
The license plate recognition models obtained after the training of the license plate recognition models to be trained is applied to the license plate recognition method according to any one of the embodiments of the invention.
Alternatively, the license plate recognition model to be trained may adopt a cnn+ctc mode, the CNN is used to extract text features, CTC is used as a loss function, network inputs are 200×50, and the license plate recognition model to be trained includes the same feature extraction network from data input, such as common Resnet, vgg, mobilenet and the like. It should be noted that after the extraction of the initial sample feature map is completed, the initial sample feature map needs to be converted, typically through pooling operations, which may be max pool or globalavg pool. If license plates with different numbers of rows are identified, the mode of converting the initial sample feature map is also different.
In a specific example, when the license plate recognition model to be trained is trained by adopting license plates with different rows, if a single-row license plate recognition model is required to be trained, a maximum pooling layer can be used for the license plate recognition model to be trained, and an initial sample feature map is converted into a conversion sample feature map with N1 x 1*V or N1 x 1 by adjusting parameters such as pooling kernel, pooling step length, pooling pad, license plate character dimension and the like, wherein N1 is the feature map length, 1 is the feature map height, and V is the license plate character dimension. After the conversion sample feature map is obtained, the conversion sample feature map can be connected into a CTC loss function to carry out the training process of the single-row license plate recognition model.
If the double-row license plate recognition model is required to be obtained through training, a maximum pooling layer can be used for the license plate recognition model to be trained, and the initial sample feature map is converted into a conversion sample feature map of N2 x 2*V or N2 x 2 by adjusting parameters such as pooling core, pooling step length, pooling pad, license plate character dimension and the like, wherein N2 is the feature map length, 2 is the feature map height, and V is the license plate character dimension. After the converted sample feature map is obtained, the converted sample feature map is segmented in the horizontal direction by using a slice operator to obtain two segmented feature maps of N2 x 1*V or N2 x 1, and then the segmented feature maps are spliced by using a concat operator to obtain a spliced feature map of 2 x N2 x 1 x V or 2 x N2 x 1. Furthermore, the spliced feature map is accessed into a CTC loss function to carry out the training process of the double-row license plate recognition model.
If the three-driving license plate recognition model is required to be trained, a maximum pooling layer can be used for the license plate recognition model to be trained, and the initial sample feature map is converted into a conversion sample feature map of N3 x 3*V or N3 x 3 by adjusting parameters such as pooling core, pooling step length, pooling pad, license plate character dimension and the like, wherein N3 is the feature map length, 2 is the feature map height, and V is the license plate character dimension. After the converted sample feature map is obtained, the converted sample feature map is segmented in the horizontal direction by using a slice operator to obtain three segmented feature maps of N3 x 1*V or N3 x 1, and then the segmented feature maps are spliced twice by using a concat operator to obtain a spliced feature map of 3 x N3 x 1 x V or 3 x N3 x 1. And further, accessing the spliced characteristic map into a CTC loss function to perform a training process of the three-driving-license-plate recognition model.
It should be noted that, each license plate recognition model obtained by training the license plate recognition model training method provided by the embodiment of the present invention may be applied to the license plate recognition method described in any embodiment of the present invention. Namely, after license plate detection image data are obtained, the license plate to be identified in the license plate detection image data can be classified and judged through a license plate type judgment model, and the license plate type of the license plate to be identified is obtained. Further determining a target license plate recognition model matched with the license plate to be recognized from a plurality of trained license plate recognition models according to the license plate type of the license plate to be recognized, and recognizing license plate detection image data through the target license plate recognition model to obtain a license plate recognition result.
According to the embodiment of the invention, after the license plate sample image data is obtained, the license plate recognition model to be trained, which is matched with the license plate sample image data, is determined, so that the feature extraction is carried out on the license plate sample image data through the license plate recognition model to be trained, an initial sample feature map is obtained, and the initial sample feature map is converted through the license plate recognition model to be trained, so that a converted sample feature map is obtained. Finally, the license plate recognition model to be trained is used for recognizing according to the converted sample feature diagram, so that a license plate recognition result is obtained, and the license plate recognition model to be trained is trained, so that a plurality of license plate recognition models are obtained. After the license plate recognition model is trained, license plate detection image data comprising the license plate to be recognized can be obtained, and the license plate to be recognized in the license plate detection image data is classified and judged through the license plate type judgment model, so that the license plate type of the license plate to be recognized is obtained. After the license plate type is determined, a target license plate recognition model matched with the license plate to be recognized is determined from a plurality of license plate recognition models obtained through training according to the license plate type of the license plate to be recognized, and then license plate detection image data are recognized through the target license plate recognition model, so that a license plate recognition result is obtained, the problem that the existing single license plate recognition is difficult to effectively recognize a plurality of different types of license plates is solved, and therefore the recognition accuracy of the license plate is improved.
In the technical scheme of the disclosure, the related processes of collecting, storing, using, processing, transmitting, providing, disclosing and the like of the user personal information (such as license plate information and the like) all accord with the regulations of related laws and regulations, and the public order is not violated.
It should be noted that any permutation and combination of the technical features in the above embodiments also belong to the protection scope of the present invention.
Example III
Fig. 5 is a schematic diagram of a license plate recognition device according to a third embodiment of the present invention, as shown in fig. 5, where the device includes: license plate detection image data acquisition module 310, license plate type classification module 320, target license plate recognition model determination module 330 and first license plate recognition result acquisition module 340, wherein:
A license plate detection image data acquisition module 310, configured to acquire license plate detection image data; the license plate detection image data comprise license plates to be identified;
The license plate type classification module 320 is configured to classify and judge a license plate to be identified in the license plate detection image data according to a license plate type judgment model, so as to obtain a license plate type of the license plate to be identified;
The target license plate recognition model determining module 330 is configured to determine a target license plate recognition model matched with the license plate to be recognized from a plurality of license plate recognition models according to the license plate type of the license plate to be recognized;
the first license plate recognition result obtaining module 340 is configured to identify the license plate detection image data through the target license plate recognition model, so as to obtain a license plate recognition result.
According to the embodiment of the invention, after license plate detection image data comprising the license plate to be identified is obtained, the license plate to be identified in the license plate detection image data is classified and judged through the license plate type judgment model, so that the license plate type of the license plate to be identified is obtained. After the license plate type is determined, a target license plate recognition model matched with the license plate to be recognized is determined from a plurality of license plate recognition models according to the license plate type of the license plate to be recognized, and then the license plate detection image data is recognized through the target license plate recognition model, so that a license plate recognition result is obtained, the problem that the existing single license plate recognition is difficult to effectively recognize a plurality of different types of license plates is solved, and therefore the recognition accuracy of the license plate is improved.
Optionally, the license plate type of the license plate to be identified comprises a single-row license plate, a double-row license plate and three-row license plate; the target license plate recognition model determination module 330 is specifically configured to: under the condition that the license plate type of the license plate to be identified is determined to be a single-row license plate, taking a single-row license plate identification model as the target license plate identification model; under the condition that the license plate type of the license plate to be identified is determined to be a double-row license plate, taking a double-row license plate identification model as the target license plate identification model; and under the condition that the license plate type of the license plate to be identified is three rows of license plates, taking the three-row license plate identification model as the target license plate identification model.
Optionally, the first vehicle board recognition result obtaining module 340 is specifically configured to: extracting features of the license plate detection image data through the target license plate recognition model to obtain an initial feature map; converting the initial feature map through the target license plate recognition model to obtain a conversion feature map; and identifying the target license plate identification model according to the conversion feature map to obtain the license plate identification result.
Optionally, the first vehicle board recognition result obtaining module 340 is specifically configured to: determining characteristic conversion association parameters; the feature conversion association parameters comprise feature diagram length, feature diagram height and license plate character dimension; converting the initial feature map according to the feature conversion association parameters to obtain a conversion feature map; the feature map height corresponding to the single-row license plate recognition model is a first feature map height value; the height of the feature map corresponding to the double-row license plate recognition model is a second feature map height value; and the height of the feature map corresponding to the three-driving-license-plate recognition model is a third feature map height value.
Optionally, if the target license plate recognition model is the two-row license plate recognition model and/or the three-row license plate recognition model, the first license plate recognition result obtaining module 340 is specifically configured to: performing horizontal segmentation on the conversion feature map through a segmentation operator of the target license plate recognition model to obtain a segmentation feature map; splicing the segmentation feature graphs through a splicing operator of the target license plate recognition model to obtain splicing feature graphs; and identifying the spliced feature images through the target license plate identification model to obtain the license plate identification result.
Optionally, the license plate detection image data acquisition module 310 is specifically configured to: acquiring original image acquisition data; carrying out license plate detection on the original image acquisition data through a license plate detection model to obtain an initial license plate detection result; performing key point detection on the initial license plate detection result through a license plate key point model to obtain license plate key points; and carrying out license plate correction according to the license plate key points through the license plate detection model to obtain the license plate detection image data.
The license plate recognition device can execute the license plate recognition 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 can be referred to the license plate recognition method provided in any embodiment of the present invention.
Since the license plate recognition device described above is a device capable of executing the license plate recognition method in the embodiment of the present application, based on the license plate recognition method described in the embodiment of the present application, those skilled in the art can understand the specific implementation of the license plate recognition device in the embodiment of the present application and various modifications thereof, so how the license plate recognition device implements the license plate recognition method in the embodiment of the present application will not be described in detail herein. As long as the person skilled in the art implements the device for recognizing the license plate in the embodiment of the present application, the device is within the scope of the present application.
Example IV
Fig. 6 is a schematic diagram of a license plate recognition model training device according to a fourth embodiment of the present invention, as shown in fig. 6, where the device includes: license plate sample image data acquisition module 410, wait to train license plate recognition model determination module 420, initial sample feature map extraction module 430, conversion sample feature map acquisition module 440 and second license plate recognition result acquisition module 450, wherein:
a license plate sample image data obtaining module 410, configured to obtain license plate sample image data;
The license plate recognition model to be trained determining module 420 is configured to determine a license plate recognition model to be trained that is matched with the license plate sample image data;
the initial sample feature map extracting module 430 is configured to perform feature extraction on the license plate sample image data through the license plate recognition model to be trained, so as to obtain an initial sample feature map;
The conversion sample feature map obtaining module 440 is configured to convert the initial sample feature map through the license plate recognition model to be trained to obtain a conversion sample feature map; the license plate recognition models to be trained are of a plurality of types;
The second license plate recognition result obtaining module 450 is configured to identify, according to the converted sample feature diagram, the license plate recognition model to be trained, thereby obtaining a license plate recognition result, so as to train the license plate recognition model to be trained;
The license plate recognition method is characterized in that a plurality of license plate recognition models obtained after training of the license plate recognition models to be trained is applied to the license plate recognition method in any embodiment of the invention.
According to the embodiment of the invention, after the license plate sample image data is obtained, the license plate recognition model to be trained, which is matched with the license plate sample image data, is determined, so that the feature extraction is carried out on the license plate sample image data through the license plate recognition model to be trained, an initial sample feature map is obtained, and the initial sample feature map is converted through the license plate recognition model to be trained, so that a converted sample feature map is obtained. Finally, the license plate recognition model to be trained is used for recognizing according to the converted sample feature diagram, so that a license plate recognition result is obtained, and the license plate recognition model to be trained is trained, so that a plurality of license plate recognition models are obtained. After the license plate recognition model is trained, license plate detection image data comprising the license plate to be recognized can be obtained, and the license plate to be recognized in the license plate detection image data is classified and judged through the license plate type judgment model, so that the license plate type of the license plate to be recognized is obtained. After the license plate type is determined, a target license plate recognition model matched with the license plate to be recognized is determined from a plurality of license plate recognition models obtained through training according to the license plate type of the license plate to be recognized, and then license plate detection image data are recognized through the target license plate recognition model, so that a license plate recognition result is obtained, the problem that the existing single license plate recognition is difficult to effectively recognize a plurality of different types of license plates is solved, and therefore the recognition accuracy of the license plate is improved.
The license plate recognition model training device can execute the license plate 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 can be referred to the license plate recognition model training method provided in any embodiment of the present invention.
Since the license plate recognition model training device described above is a device capable of executing the license plate recognition model training method in the embodiment of the present application, based on the license plate recognition model training method described in the embodiment of the present application, those skilled in the art can understand the specific implementation of the license plate recognition model training device in the embodiment of the present application and various modifications thereof, so how the license plate recognition model training device implements the license plate recognition model training method in the embodiment of the present application will not be described in detail herein. As long as the person skilled in the art implements the device used in the license plate recognition model training method in the embodiment of the application, the device belongs to the scope of protection of the application.
Example five
Fig. 7 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. 7, 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 a license plate recognition method or a license plate recognition model training method.
Optionally, the license plate recognition method may include: acquiring license plate detection image data; the license plate detection image data comprise license plates to be identified; classifying and judging the license plate to be identified in the license plate detection image data through a license plate type judgment model to obtain the license plate type of the license plate to be identified; determining a target license plate recognition model matched with the license plate to be recognized from a plurality of license plate recognition models according to the license plate type of the license plate to be recognized; and identifying the license plate detection image data through the target license plate identification model to obtain a license plate identification result.
Optionally, the license plate recognition model training method may include: acquiring license plate sample image data; determining a license plate recognition model to be trained, wherein the license plate sample image data of the license plate recognition model is matched with the license plate sample image data; extracting features of the license plate sample image data through the license plate recognition model to be trained to obtain an initial sample feature map; converting the initial sample feature map through the license plate recognition model to be trained to obtain a converted sample feature map; the license plate recognition models to be trained are of a plurality of types; identifying the license plate identification model to be trained according to the converted sample feature diagram to obtain a license plate identification result so as to train the license plate identification model to be trained; the license plate recognition method is characterized in that a plurality of license plate recognition models obtained after training of the license plate recognition models to be trained is applied to the license plate recognition method in any embodiment of the invention.
In some embodiments, the license plate recognition method or license plate recognition model training method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as 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 RAM 13 and executed by processor 11, one or more steps of the license plate recognition method or license plate recognition model training method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the license plate recognition method or the license plate recognition model training 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 (11)

1. A license plate recognition method, comprising:
acquiring license plate detection image data; the license plate detection image data comprise license plates to be identified;
classifying and judging the license plate to be identified in the license plate detection image data through a license plate type judgment model to obtain the license plate type of the license plate to be identified;
Determining a target license plate recognition model matched with the license plate to be recognized from a plurality of license plate recognition models according to the license plate type of the license plate to be recognized;
and identifying the license plate detection image data through the target license plate identification model to obtain a license plate identification result.
2. The method of claim 1, wherein the license plate types of the license plates to be identified include a single row license plate, a double row license plate, and three rows of license plates;
The determining a target license plate recognition model matched with the license plate to be recognized from a plurality of license plate recognition models according to the license plate type of the license plate to be recognized comprises the following steps:
Under the condition that the license plate type of the license plate to be identified is determined to be a single-row license plate, taking a single-row license plate identification model as the target license plate identification model;
Under the condition that the license plate type of the license plate to be identified is determined to be a double-row license plate, taking a double-row license plate identification model as the target license plate identification model;
and under the condition that the license plate type of the license plate to be identified is three rows of license plates, taking the three-row license plate identification model as the target license plate identification model.
3. The method according to claim 2, wherein the identifying the license plate detection image data by the target license plate identification model to obtain a license plate identification result includes:
Extracting features of the license plate detection image data through the target license plate recognition model to obtain an initial feature map;
Converting the initial feature map through the target license plate recognition model to obtain a conversion feature map;
And identifying the target license plate identification model according to the conversion feature map to obtain the license plate identification result.
4. The method of claim 3, wherein said converting the initial signature by the target license plate recognition model to obtain a converted signature comprises:
determining characteristic conversion association parameters; the feature conversion association parameters comprise feature diagram length, feature diagram height and license plate character dimension;
Converting the initial feature map according to the feature conversion association parameters to obtain a conversion feature map;
The feature map height corresponding to the single-row license plate recognition model is a first feature map height value; the height of the feature map corresponding to the double-row license plate recognition model is a second feature map height value; and the height of the feature map corresponding to the three-driving-license-plate recognition model is a third feature map height value.
5. The method according to claim 3 or 4, wherein if the target license plate recognition model is the two-row license plate recognition model and/or the three-row license plate recognition model, the method further comprises:
performing horizontal segmentation on the conversion feature map through a segmentation operator of the target license plate recognition model to obtain a segmentation feature map;
splicing the segmentation feature graphs through a splicing operator of the target license plate recognition model to obtain splicing feature graphs;
The license plate recognition result is obtained by recognizing the target license plate recognition model according to the conversion feature diagram, and the method comprises the following steps:
And identifying the spliced feature images through the target license plate identification model to obtain the license plate identification result.
6. The method of claim 1, wherein the acquiring license plate detection image data comprises:
Acquiring original image acquisition data;
Carrying out license plate detection on the original image acquisition data through a license plate detection model to obtain an initial license plate detection result;
Performing key point detection on the initial license plate detection result through a license plate key point model to obtain license plate key points;
And carrying out license plate correction according to the license plate key points through the license plate detection model to obtain the license plate detection image data.
7. The license plate recognition model training method is characterized by comprising the following steps of:
Acquiring license plate sample image data;
Determining a license plate recognition model to be trained, wherein the license plate sample image data of the license plate recognition model is matched with the license plate sample image data;
extracting features of the license plate sample image data through the license plate recognition model to be trained to obtain an initial sample feature map;
converting the initial sample feature map through the license plate recognition model to be trained to obtain a converted sample feature map; the license plate recognition models to be trained are of a plurality of types;
identifying the license plate identification model to be trained according to the converted sample feature diagram to obtain a license plate identification result so as to train the license plate identification model to be trained;
Wherein a plurality of license plate recognition models obtained after the training of each license plate recognition model to be trained is applied to the license plate recognition method of any one of claims 1 to 6.
8. A license plate recognition device, comprising:
The license plate detection image data acquisition module is used for acquiring license plate detection image data; the license plate detection image data comprise license plates to be identified;
The license plate type classification module is used for classifying and judging the license plate to be identified in the license plate detection image data through a license plate type judgment model to obtain the license plate type of the license plate to be identified;
the target license plate recognition model determining module is used for determining a target license plate recognition model matched with the license plate to be recognized from a plurality of license plate recognition models according to the license plate type of the license plate to be recognized;
The first license plate recognition result acquisition module is used for recognizing the license plate detection image data through the target license plate recognition model to obtain a license plate recognition result.
9. A license plate recognition model training device, characterized by comprising:
the license plate sample image data acquisition module is used for acquiring license plate sample image data;
the license plate recognition model to be trained determining module is used for determining a license plate recognition model to be trained, which is matched with the license plate sample image data;
The initial sample feature map extracting module is used for extracting features of the license plate sample image data through the license plate recognition model to be trained to obtain an initial sample feature map;
the conversion sample feature map acquisition module is used for converting the initial sample feature map through the license plate recognition model to be trained to obtain a conversion sample feature map; the license plate recognition models to be trained are of a plurality of types;
the second license plate recognition result acquisition module is used for recognizing the to-be-trained license plate recognition model according to the conversion sample feature diagram to obtain a license plate recognition result so as to train the to-be-trained license plate recognition model;
Wherein a plurality of license plate recognition models obtained after the training of each license plate recognition model to be trained is applied to the license plate recognition method of any one of claims 1 to 6.
10. 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 license plate recognition method of any one of claims 1-6 or the license plate recognition model training method of claim 7.
11. A computer readable storage medium storing computer instructions for causing a processor to perform the license plate recognition method of any one of claims 1-6 or to perform the license plate recognition model training method of claim 7.
CN202410148539.5A 2024-02-02 2024-02-02 License plate recognition method, license plate recognition model training method, device, electronic equipment and storage medium Pending CN117994772A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410148539.5A CN117994772A (en) 2024-02-02 2024-02-02 License plate recognition method, license plate recognition model training method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410148539.5A CN117994772A (en) 2024-02-02 2024-02-02 License plate recognition method, license plate recognition model training method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117994772A true CN117994772A (en) 2024-05-07

Family

ID=90890155

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410148539.5A Pending CN117994772A (en) 2024-02-02 2024-02-02 License plate recognition method, license plate recognition model training method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117994772A (en)

Similar Documents

Publication Publication Date Title
CN110060237B (en) Fault detection method, device, equipment and system
CN107944450B (en) License plate recognition method and device
US11455805B2 (en) Method and apparatus for detecting parking space usage condition, electronic device, and storage medium
CN110378297B (en) Remote sensing image target detection method and device based on deep learning and storage medium
CN111709420A (en) Text detection method, electronic device and computer readable medium
TW201732651A (en) Word segmentation method and apparatus
CN113139543B (en) Training method of target object detection model, target object detection method and equipment
CN113723377B (en) Traffic sign detection method based on LD-SSD network
CN112560862B (en) Text recognition method and device and electronic equipment
CN110751154B (en) Complex environment multi-shape text detection method based on pixel-level segmentation
CN111259878A (en) Method and equipment for detecting text
CN112989995B (en) Text detection method and device and electronic equipment
CN113487610B (en) Herpes image recognition method and device, computer equipment and storage medium
CN111435446A (en) License plate identification method and device based on L eNet
CN113240623A (en) Pavement disease detection method and device
CN109241893B (en) Road selection method and device based on artificial intelligence technology and readable storage medium
CN112597996B (en) Method for detecting traffic sign significance in natural scene based on task driving
CN113537017A (en) Optical remote sensing image airplane detection method and device based on cascade regression correction
CN113378837A (en) License plate shielding identification method and device, electronic equipment and storage medium
CN114724113B (en) Road sign recognition method, automatic driving method, device and equipment
CN115761698A (en) Target detection method, device, equipment and storage medium
CN114612971A (en) Face detection method, model training method, electronic device, and program product
CN117994772A (en) License plate recognition method, license plate recognition model training method, device, electronic equipment and storage medium
CN115063826A (en) Mobile terminal driver license identification method and system based on deep learning
CN113989300A (en) Lane line segmentation method and device, electronic equipment and storage medium

Legal Events

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