Search

CN-117132970-B - License plate recognition method, electronic device and readable storage medium

CN117132970BCN 117132970 BCN117132970 BCN 117132970BCN-117132970-B

Abstract

The application discloses a license plate recognition method, electronic equipment and a readable storage medium, wherein the method comprises the steps of generating a license plate feature map comprising character layers with specific layers for a license plate image, wherein the specific layers are more than or equal to two; the license plate recognition method and the license plate recognition device based on the character recognition result, can avoid the influence of the segmentation accuracy of the character region on the license plate recognition and improve the accuracy of the license plate recognition.

Inventors

  • XU SHANSHAN
  • MA ZIANG
  • ZHANG HAITAO

Assignees

  • 杭州华橙软件技术有限公司

Dates

Publication Date
20260508
Application Date
20230804

Claims (10)

  1. 1. A license plate recognition method, the method comprising: generating a license plate feature map comprising character layers with specific layer numbers for a license plate image, wherein the specific layer numbers are greater than or equal to two; Respectively carrying out character recognition on each layer of corresponding license plate feature map to obtain character recognition results corresponding to each layer of the license plate feature map; obtaining license plate recognition results of the license plate images based on the character recognition results corresponding to the layers; The character recognition of each layer is respectively carried out on the license plate feature map, and before the character recognition results corresponding to each layer in the license plate feature map are obtained, the method further comprises: Respectively adjusting the attention degree of the self-adaptive region corresponding to each layer of the license plate feature map to obtain a self-adaptive region attention feature map corresponding to each layer, wherein the features of the corresponding layer in the self-adaptive region attention feature map are relatively enhanced, the self-adaptive region attention feature map is used for character recognition of the corresponding layer, and the adjustment of the attention degree of the self-adaptive region refers to adjustment of attention degrees of features with different heights in the license plate feature map of each layer; the character recognition of each layer corresponding to the license plate feature map is respectively carried out, and the obtained character recognition results corresponding to each layer in the license plate feature map comprise: Extracting local features of each layer of corresponding license plate feature map to obtain first layer features corresponding to each layer of license plate feature map; Respectively carrying out character decoding on the first layer characteristics corresponding to each layer to obtain character recognition results corresponding to each layer; The step of extracting the local features of the corresponding layers of the license plate feature map, and the step of obtaining the first layer features corresponding to the layers of the license plate feature map comprises the following steps: Respectively extracting features of each layer of corresponding license plate feature map to obtain second layer features corresponding to each layer of corresponding license plate feature map; and for each layer, carrying out feature compression on the second layer features corresponding to the layer in the height dimension to obtain the first layer features corresponding to the layer.
  2. 2. The method of claim 1, wherein the adjusting the attention degree of the adaptive region corresponding to each layer to the license plate feature map, respectively, to obtain the adaptive region attention feature map corresponding to each layer includes: Extracting attention adjustment vectors corresponding to all layers based on the license plate feature map, wherein the attention adjustment vectors comprise attention adjustment coefficients corresponding to all heights of the license plate feature map respectively; And respectively adjusting the characteristic values contained in the license plate characteristic map based on the attention adjustment vectors of each layer to obtain the self-adaptive regional attention characteristic map of each layer.
  3. 3. The method according to claim 2, wherein the extracting, based on the license plate feature map, a attention adjustment vector corresponding to each layer includes: global pooling processing is respectively carried out on the feature images under each height in the license plate feature images to obtain pooled feature vectors, wherein the pooled feature vectors comprise pooled feature values respectively corresponding to each height of the license plate feature images; respectively carrying out convolution processing on the pooled feature vectors corresponding to each layer to obtain the attention adjustment vectors of each layer corresponding to the license plate feature map; the adjusting the feature value contained in the license plate feature map based on the attention adjustment vector of each layer to obtain the self-adaptive region attention feature map of each layer includes: And for each layer, respectively fusing the attention degree adjustment coefficient corresponding to each height in the attention degree adjustment vector of the layer with the characteristic value of the corresponding height in the license plate characteristic map to obtain the self-adaptive regional attention characteristic map of the layer.
  4. 4. The method of claim 1, wherein the license plate image comprises at least one character layer, and wherein the generating a license plate feature map for the license plate image comprising a specific number of character layers comprises: filling the license plate image to obtain a license plate image containing character layers with specific number of layers; And extracting features of the filled license plate image to obtain the license plate feature map.
  5. 5. The method of claim 4, further comprising, prior to feature extraction of the license plate image: correcting the license plate image, and/or adjusting the filled license plate image to a preset size, and/or, The filling the license plate image to obtain the license plate image containing the character layer with the specific number of layers comprises the following steps: filling the license plate image in a preset direction by utilizing preset parameters to obtain the license plate image containing the character layer with the specific number of layers, and The generating the license plate feature map comprising the character layers with the specific number of layers for the license plate image further comprises the step of directly extracting features of the license plate image in response to the license plate image meeting the preset aspect ratio condition to obtain the license plate feature map.
  6. 6. The method of claim 5, wherein the predetermined aspect ratio condition is that the aspect ratio of the license plate image is a predetermined aspect ratio, and the filling the license plate image in a predetermined direction with predetermined parameters to obtain the license plate image including the character layer with the specific number of layers includes: filling the license plate image with the aspect ratio smaller than the preset aspect ratio in the width direction of the license plate image by utilizing the preset parameters to obtain the license plate image containing the character layers with the specific number of layers; And filling the license plate image with the aspect ratio larger than the preset aspect ratio in the height direction of the license plate image by utilizing the preset parameters to obtain the license plate image containing the character layers with the specific number of layers.
  7. 7. The method of claim 1, wherein the specific number of layers is two, and/or, The license plate recognition result obtained based on the character recognition results corresponding to the layers comprises the following steps: And splicing the character recognition results corresponding to the layers according to the sequence of the layers to obtain the license plate recognition result.
  8. 8. The method of claim 1, wherein the character recognition results for each layer are obtained based on a license plate recognition model, the license plate recognition model comprising a plurality of character recognition modules, the method further comprising the step of training the license plate recognition model: Acquiring a sample license plate image; Generating a sample license plate feature map comprising character layers with specific layers for the sample license plate image, wherein the specific layers are more than or equal to two, and the sample license plate image is marked with real characters respectively contained in each layer in the specific layers; the character recognition modules are used for respectively carrying out character recognition on the corresponding layers of the sample license plate feature map, so that sample character recognition results corresponding to the layers in the sample license plate feature map are obtained; and adjusting model parameters of the character recognition module of the corresponding layer by utilizing the difference between the sample character recognition result corresponding to each layer and the real character.
  9. 9. An electronic device comprising a memory and a processor coupled to each other, the processor configured to execute program instructions stored in the memory to implement the license plate recognition method of any one of claims 1 to 8.
  10. 10. A computer readable storage medium having stored thereon program instructions, which when executed by a processor, implement the license plate recognition method of any one of claims 1 to 8.

Description

License plate recognition method, electronic device and readable storage medium Technical Field The present application relates to the field of artificial intelligence, and in particular, to a license plate recognition method, an electronic device, and a readable storage medium. Background Artificial intelligence technology is becoming more and more widely used in the field of modern traffic, with license plate recognition technology being one of the typical applications. The main purpose of license plate recognition is to recognize characters on a license plate in an image. Currently, there are a plurality of license plates with different formats, for example, the license plates can be divided into a single-layer license plate, a double-layer license plate and the like according to the arrangement form of characters contained in the license plates. In the existing license plate recognition mode, the area of each character on the license plate is usually obtained by dividing, and then the characters in the area are recognized. In the mode, the accuracy of license plate recognition is affected by the segmentation accuracy of the character region. Disclosure of Invention The application provides at least a license plate recognition method, electronic equipment and a readable storage medium. The application provides a license plate recognition method, which comprises the steps of generating a license plate feature map comprising character layers with specific layers for a license plate image, wherein the specific layers are larger than or equal to two, respectively carrying out character recognition on the license plate feature map corresponding to each layer to obtain character recognition results corresponding to each layer in the license plate feature map, and obtaining the license plate recognition results of the license plate image based on the character recognition results corresponding to each layer. The method comprises the steps of respectively carrying out character recognition on each layer of corresponding license plate feature map to obtain character recognition results corresponding to each layer of the license plate feature map, respectively carrying out local feature extraction on each layer of corresponding license plate feature map to obtain first layer features corresponding to each layer of corresponding license plate feature map, respectively carrying out character decoding on the first layer features corresponding to each layer to obtain character recognition results corresponding to each layer. The method comprises the steps of respectively carrying out local feature extraction on each layer of corresponding license plate feature map to obtain first layer features corresponding to each layer in the license plate feature map, respectively carrying out feature extraction on each layer of corresponding license plate feature map to obtain second layer features corresponding to each layer, and carrying out feature compression on the second layer features corresponding to each layer in the height dimension to obtain first layer features corresponding to each layer. Before character recognition of each layer is performed on the license plate feature map to obtain a character recognition result corresponding to each layer in the license plate feature map, the method further comprises the step of adjusting attention of an adaptive area corresponding to each layer on the license plate feature map to obtain an adaptive area attention feature map corresponding to each layer, wherein features of the corresponding layer in the adaptive area feature map are relatively enhanced, and the adaptive area feature map is used for character recognition of the corresponding layer. The method comprises the steps of respectively carrying out adjustment on the attention degree of the self-adaptive area corresponding to each layer on the license plate feature map to obtain the attention degree adjustment vector corresponding to each layer on the basis of the license plate feature map, wherein the attention degree adjustment vector comprises attention degree adjustment coefficients respectively corresponding to each height of the license plate feature map, and respectively carrying out adjustment on the feature values contained in the license plate feature map on the basis of the attention degree adjustment vectors of each layer to obtain the self-adaptive area attention feature map of each layer. The method comprises the steps of carrying out global pooling processing on feature images under each height in a license plate feature image to obtain pooled feature vectors, carrying out convolution processing on the pooled feature vectors to obtain attention adjustment vectors of each layer corresponding to the license plate feature image, and adjusting feature values contained in the license plate feature image to obtain self-adaptive region attention feature images of each layer based on the attention adjustment vecto