Movatterモバイル変換


[0]ホーム

URL:


CN114565747A - A kind of license plate intelligent recognition method, device, electronic equipment and medium - Google Patents

A kind of license plate intelligent recognition method, device, electronic equipment and medium
Download PDF

Info

Publication number
CN114565747A
CN114565747ACN202210046108.9ACN202210046108ACN114565747ACN 114565747 ACN114565747 ACN 114565747ACN 202210046108 ACN202210046108 ACN 202210046108ACN 114565747 ACN114565747 ACN 114565747A
Authority
CN
China
Prior art keywords
character
license plate
area
image
characters
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
CN202210046108.9A
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.)
Liaoning Huadun Safety Technology Co ltd
Original Assignee
Liaoning Huadun Safety 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 Liaoning Huadun Safety Technology Co ltdfiledCriticalLiaoning Huadun Safety Technology Co ltd
Priority to CN202210046108.9ApriorityCriticalpatent/CN114565747A/en
Publication of CN114565747ApublicationCriticalpatent/CN114565747A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

The invention relates to the field of artificial intelligence, and discloses a license plate intelligent identification method, a license plate intelligent identification device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring a vehicle picture, and detecting a license plate region of the vehicle picture by using a pre-trained license plate detection model; carrying out character region segmentation on the license plate region by using a pre-trained character segmentation model to obtain a character region of the license plate region; carrying out affine transformation on the character area to obtain the corrected character image; and recognizing license plate characters in the corrected character image by using a pre-trained character recognition model, checking the license plate characters, and taking the license plate characters which are successfully checked as final license plate characters of the vehicle image. The invention can improve the accuracy of license plate recognition.

Description

Translated fromChinese
一种车牌智能识别方法、装置、电子设备及介质A kind of license plate intelligent recognition method, device, electronic equipment and medium

技术领域technical field

本发明涉及人工智能领域,尤其涉及一种车牌智能识别方法、装置、电子设备以及计算机可读存储介质。The present invention relates to the field of artificial intelligence, and in particular, to a method, device, electronic device and computer-readable storage medium for intelligent license plate recognition.

背景技术Background technique

车牌识别是指对车辆进行信息认证的过程,通过所述车牌识别可以获取车辆信息是否预先注册,如在小区安防场景中,通过车牌识别可以快速定位出进出小区的车辆是否为本小区的车辆,从而可以很好的监控小区车辆进出的安全情况。License plate recognition refers to the process of information authentication of vehicles. Through the license plate recognition, it is possible to obtain whether the vehicle information is pre-registered. For example, in the community security scenario, the license plate recognition can quickly locate whether the vehicle entering or leaving the community is a vehicle in this community. Thereby, the safety situation of vehicles entering and leaving the community can be well monitored.

由于车牌识别通常包含车牌定位和字符识别两个过程,目前在车牌定位过程通常是采用边缘检测算法实现,这样容易混入无用信息,无法实现车牌字符的准确定位,从而会影响车牌识别的准确性,而在字符识别中通常是采用模板匹配的算法实现,这样容易出现字符识别错误的现象,如字符格式不正确,从而也会影响车牌识别的准确性。Since license plate recognition usually includes two processes of license plate positioning and character recognition, edge detection algorithm is usually used in the process of license plate positioning. In character recognition, a template matching algorithm is usually used, which is prone to character recognition errors, such as incorrect character format, which will also affect the accuracy of license plate recognition.

发明内容SUMMARY OF THE INVENTION

为了解决上述技术问题,本发明提供了一种车牌智能识别方法、装置、电子设备以及计算机可读存储介质,可以提高车牌识别的准确性。In order to solve the above technical problems, the present invention provides an intelligent license plate recognition method, device, electronic device and computer-readable storage medium, which can improve the accuracy of license plate recognition.

第一方面,本发明提供了一种车牌智能识别方法,包括:In a first aspect, the present invention provides an intelligent license plate recognition method, comprising:

获取车辆图片,利用预训练好的车牌检测模型检测所述车辆图片的车牌区域;Obtain a vehicle image, and use the pre-trained license plate detection model to detect the license plate area of the vehicle image;

利用预训练好的字符分割模型对所述车牌区域进行字符区域分割,得到所述车牌区域的字符区域;Use the pre-trained character segmentation model to perform character area segmentation on the license plate area to obtain the character area of the license plate area;

对所述字符区域进行仿射变换,得到所述校正字符图像;Perform affine transformation on the character area to obtain the corrected character image;

利用预训练好的字符识别模型识别所述校正字符图像中的车牌字符,并对所述车牌字符进行校验,将校验成功的所述车牌字符作为所述车辆图片的最终车牌字符。A pre-trained character recognition model is used to identify the license plate characters in the corrected character image, and the license plate characters are verified, and the license plate characters that have been verified successfully are used as the final license plate characters of the vehicle picture.

在第一方面的一种可能实现方式中,所述利用预训练好的车牌检测模型检测所述车牌图片的车牌区域,包括:In a possible implementation manner of the first aspect, the use of a pre-trained license plate detection model to detect the license plate area of the license plate picture includes:

利用所述车牌检测模型中的卷积层对所述车牌图片进行特征提取,得到特征车牌图片;Use the convolution layer in the license plate detection model to perform feature extraction on the license plate image to obtain a characteristic license plate image;

利用所述车牌检测模型中的交互层对所述特征车牌图片进行特征融合,得到融合特征图片;Use the interaction layer in the license plate detection model to perform feature fusion on the characteristic license plate picture to obtain a fusion feature picture;

利用所述车牌检测模型中的池化层对所述融合特征图片进行降维处理,得到降维特征图片;Use the pooling layer in the license plate detection model to perform dimensionality reduction processing on the fusion feature image to obtain a dimensionality reduction feature image;

利用所述车牌检测模型中的全连接层计算所述降维特征图片的车牌类别,根据所述车牌类别,利用所述车牌检测模型中的输出层输出所述车辆图片的车牌区域。The fully connected layer in the license plate detection model is used to calculate the license plate type of the dimensionality reduction feature image, and according to the license plate type, the license plate area of the vehicle image is output by using the output layer in the license plate detection model.

在第一方面的一种可能实现方式中,所述利用预训练好的字符分割模型对所述车牌区域进行字符区域分割,得到所述车牌区域的字符区域,包括:In a possible implementation manner of the first aspect, the character area segmentation is performed on the license plate area by using a pre-trained character segmentation model to obtain the character area of the license plate area, including:

利用所述字符分割模型中的卷积层对所述车牌区域进行特征提取,得到特征车牌区域;Use the convolution layer in the character segmentation model to perform feature extraction on the license plate area to obtain a characteristic license plate area;

利用所述字符分割模型中的决策层识别所述特征车牌区域中的字符位置序列;Utilize the decision-making layer in the character segmentation model to identify the character position sequence in the characteristic license plate area;

利用所述字符分割模型中的激活函数计算所述字符位置序列的字符置信度;Using the activation function in the character segmentation model to calculate the character confidence of the character position sequence;

根据所述字符置信度,利用所述字符分割模型中的前向网络输出所述车牌区域的字符区域。According to the character confidence, the forward network in the character segmentation model is used to output the character area of the license plate area.

在第一方面的一种可能实现方式中,所述利用所述字符分割模型中的决策层识别所述特征车牌区域中的字符位置序列,包括:In a possible implementation manner of the first aspect, the use of the decision layer in the character segmentation model to identify the character position sequence in the characteristic license plate area includes:

利用所述决策层中的输入门计算所述特征车牌区域的状态值,利用所述决策层中的遗忘门计算所述特征车牌区域的激活值;Use the input gate in the decision-making layer to calculate the state value of the characteristic license plate area, and use the forget gate in the decision-making layer to calculate the activation value of the characteristic license plate area;

根据所述状态值和激活值计算所述特征车牌区域的状态更新值;Calculate the state update value of the characteristic license plate area according to the state value and the activation value;

利用所述决策层中的输出门计算所述状态更新值的字符位置序列。A sequence of character positions for the state update value is computed using an output gate in the decision layer.

在第一方面的一种可能实现方式中,所述对所述字符区域进行仿射变换,得到所述校正字符图像,包括:In a possible implementation manner of the first aspect, performing affine transformation on the character region to obtain the corrected character image includes:

对所述字符区域进行裁剪,得到裁剪字符区域;Cropping the character area to obtain a cropped character area;

识别所述裁剪字符区域中的字符方向是否处于正方向;Identifying whether the character direction in the cropped character area is in the positive direction;

若所述字符方向不处于正方向,采用放射变换算法将所述裁剪字符区域进行方向校正,得到所述校正字符图像;If the character direction is not in the positive direction, use a radiation transformation algorithm to correct the direction of the cropped character area to obtain the corrected character image;

若所述字符方向处于正方向,则将所述裁剪字符区域作为所述校正字符图像。If the character direction is in the positive direction, the cropped character area is used as the corrected character image.

在第一方面的一种可能实现方式中,所述对所述字符区域进行裁剪,得到裁剪字符区域,包括:In a possible implementation manner of the first aspect, the cropping the character area to obtain the cropped character area includes:

对所述字符区域进行二值化处理,得到二值化字符区域;Perform binarization processing on the character area to obtain a binarized character area;

查询所述二值化字符区域中纵轴方向的字符起始位置和字符终止位置,及所述二值化字符区域的纵轴方向长度,根据所述纵轴方向的字符起始位置、字符终止位置以及纵轴方向长度,对所述二值化字符区域进行纵向裁剪,得到纵向裁剪字符框;Query the character start position and character end position in the vertical axis direction in the binarized character area, and the vertical axis length of the binarized character area, according to the character start position and character end position in the vertical axis direction the position and the length of the vertical axis, and the binarized character area is longitudinally cropped to obtain a longitudinally cropped character frame;

查询所述纵向裁剪字符框中横轴方向的字符起始位置和字符终止位置,及所述纵向裁剪字符框的横轴方向长度,根据所述横轴方向的字符起始位置和字符终止位置,及所述横轴方向长度,对所述纵向裁剪字符框进行横向裁剪,得到所述裁剪字符区域。Query the character start position and character end position in the horizontal axis direction in the vertical cropping character frame, and the length in the horizontal axis direction of the vertical cropping character frame, according to the character start position and character end position in the horizontal axis direction, and the length in the horizontal axis direction, and horizontally crop the vertical cropped character frame to obtain the cropped character area.

在第一方面的一种可能实现方式中,所述利用预训练好的字符识别模型识别所述校正字符图像中的车牌字符,包括:In a possible implementation manner of the first aspect, the use of a pre-trained character recognition model to recognize the license plate characters in the corrected character image includes:

利用所述字符识别模型中的卷积神经网络对所述校正字符图像进行特征提取,得到特征字符图像;Use the convolutional neural network in the character recognition model to perform feature extraction on the corrected character image to obtain a characteristic character image;

利用所述字符识别模型中的长短期记忆网络对所述特征字符图像进行文字位置序列识别,生成原始字符;Utilize the long-term and short-term memory network in the character recognition model to perform text position sequence recognition on the characteristic character image to generate original characters;

利用所述字符识别模型中的时序分类网络对所述原始字符进行字符对齐,生成所述校正字符图像中的车牌字符。Character alignment is performed on the original characters by using the time series classification network in the character recognition model to generate license plate characters in the corrected character image.

第二方面,本发明提供了一种车牌智能识别装置,所述装置包括:In a second aspect, the present invention provides an intelligent license plate recognition device, the device comprising:

车牌区域检测模块,用于获取车辆图片,利用预训练好的车牌检测模型检测所述车辆图片的车牌区域;The license plate area detection module is used to obtain the vehicle image, and use the pre-trained license plate detection model to detect the license plate area of the vehicle image;

字符区域分割模块,用于利用预训练好的字符分割模型对所述车牌区域进行字符区域分割,得到所述车牌区域的字符区域;a character area segmentation module, used for using a pre-trained character segmentation model to perform character area segmentation on the license plate area to obtain the character area of the license plate area;

字符仿射变换模块,用于对所述字符区域进行仿射变换,得到所述校正字符图像;A character affine transformation module, configured to perform affine transformation on the character region to obtain the corrected character image;

车牌字符识别模块,用于利用预训练好的字符识别模型识别所述校正字符图像中的车牌字符,并对所述车牌字符进行校验,将校验成功的所述车牌字符作为所述车辆图片的最终车牌字符。The license plate character recognition module is used to identify the license plate characters in the corrected character image by using the pre-trained character recognition model, and verify the license plate characters, and use the license plate characters that have been successfully verified as the vehicle picture The final license plate character.

第三方面,本发明提供一种电子设备,包括:In a third aspect, the present invention provides an 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, so that the at least one processor can execute the intelligent license plate recognition method according to any one of the above first aspects.

第四方面,本发明提供一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时实现如上述第一方面中任意一项所述的车牌智能识别方法。In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method for intelligently recognizing a license plate according to any one of the above-mentioned first aspect.

与现有技术相比,本方案的技术原理及有益效果在于:Compared with the prior art, the technical principle and beneficial effects of this scheme are:

本方案通过车牌检测模型和字符分割模型实现所述车牌图片的字符区域粗粒度和细粒度定位,可以避免在车牌字符定位中无用信息的混入,提高车牌字符的识别准确性,并结合对识别的字符区域进行仿射变换,可以保障所述字符区域中字符方向的一致性,提高后续车牌字符的检测效率和准确性,进一步地,本发明实施例通过字符识别模型识别仿射变换后字符区域中的车牌字符,并对所述车牌字符进行校验后生成车辆图片的最终车牌字符,可以避免字符识别错误的现象,进一步保障车牌字符的识别准确性。因此,本发明实施例提出的一种车牌智能识别方法、装置、电子设备以及存储介质,可以提高车牌识别的准确性。This scheme realizes the coarse-grained and fine-grained positioning of the character area of the license plate image through the license plate detection model and the character segmentation model, which can avoid the mixing of useless information in the license plate character positioning, improve the recognition accuracy of the license plate characters, and The affine transformation of the character area can ensure the consistency of the character directions in the character area, and improve the detection efficiency and accuracy of subsequent license plate characters. The characters of the license plate are verified, and the final license plate characters of the vehicle picture are generated after verifying the characters of the license plate, which can avoid the phenomenon of character recognition errors and further ensure the recognition accuracy of the characters of the license plate. Therefore, an intelligent license plate recognition method, device, electronic device and storage medium proposed by the embodiments of the present invention can improve the accuracy of license plate recognition.

附图说明Description of drawings

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description serve to explain the principles of the invention.

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. In other words, on the premise of no creative labor, other drawings can also be obtained from these drawings.

图1为本发明一实施例提供的一种车牌智能识别方法的流程示意图;1 is a schematic flowchart of a method for intelligently recognizing a license plate according to an embodiment of the present invention;

图2为本发明一实施例中图1提供的一种车牌智能识别方法的其中一个步骤的流程示意图;2 is a schematic flowchart of one of the steps of a method for intelligent license plate recognition provided in FIG. 1 according to an embodiment of the present invention;

图3为本发明一实施例中图1提供的一种车牌智能识别方法的另外一个步骤的流程示意图;3 is a schematic flowchart of another step of a method for intelligently recognizing a license plate provided in FIG. 1 according to an embodiment of the present invention;

图4为本发明一实施例提供的一种车牌智能识别装置的模块示意图;FIG. 4 is a schematic block diagram of an intelligent license plate recognition device according to an embodiment of the present invention;

图5为本发明一实施例提供的实现车牌智能识别方法的电子设备的内部结构示意图。FIG. 5 is a schematic diagram of an internal structure of an electronic device for implementing a method for intelligently recognizing a license plate according to an embodiment of the present invention.

具体实施方式Detailed ways

应当理解,此处所描述的具体实施方式仅仅用以解释本发明,并不用于限定本发明。It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.

本发明实施例提供一种车牌智能识别方法,所述车牌智能识别方法的执行主体包括但不限于服务端、终端等能够被配置为执行本发明实施例提供的该方法的电子设备中的至少一种。换言之,所述车牌智能识别方法可以由安装在终端设备或服务端设备的软件或硬件来执行,所述软件可以是区块链平台。所述服务端包括但不限于:单台服务器、服务器集群、云端服务器或云端服务器集群等。所述服务器可以是独立的服务器,也可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、内容分发网络(Content Delivery Network,CDN)、以及大数据和人工智能平台等基础云计算服务的云服务器。An embodiment of the present invention provides an intelligent license plate recognition method. The execution subject of the intelligent license plate recognition method includes, but is not limited to, at least one of the electronic devices that can be configured to execute the method provided by the embodiment of the present invention, such as a server and a terminal. kind. In other words, the intelligent license plate recognition method can be executed by software or hardware installed in a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like. The server can be an independent server, or can provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery network (Content Delivery Network) Network, CDN), and cloud servers for basic cloud computing services such as big data and artificial intelligence platforms.

参阅图1所示,是本发明一实施例提供的车牌智能识别方法的流程示意图。其中,图1中描述的车牌智能识别方法包括:Referring to FIG. 1 , it is a schematic flowchart of a method for intelligently recognizing a license plate provided by an embodiment of the present invention. Among them, the license plate intelligent recognition method described in Figure 1 includes:

S1、获取车辆图片,利用预训练好的车牌检测模型检测所述车辆图片的车牌区域。S1. Obtain a vehicle picture, and use a pre-trained license plate detection model to detect the license plate area of the vehicle picture.

本发明实施例中,所述是指包括车辆信息的图像,其通过高清摄像头采集得到,所述预训练好的车牌检测模型包括Retinanet网络,其用于检测所述车辆图片中车牌字符的位置,所述车牌区域是指包括车牌字符的图像。In the embodiment of the present invention, the term refers to an image including vehicle information, which is collected by a high-definition camera, and the pre-trained license plate detection model includes a Retinanet network, which is used to detect the position of the license plate characters in the vehicle image, The license plate area refers to an image including license plate characters.

进一步地,本发明实施例通过所述预训练好的车牌检测模型检测所述车辆图片的车牌区域,实现所述车辆图片的车牌字符的粗粒度定位,保障后续车牌字符的识别准确性。Further, the embodiment of the present invention detects the license plate area of the vehicle picture by using the pre-trained license plate detection model, so as to realize the coarse-grained positioning of the license plate characters of the vehicle picture, and ensure the recognition accuracy of the subsequent license plate characters.

作为本发明的一个实施例,参阅图2所示,所述利用预训练好的车牌检测模型检测所述车牌图片的车牌区域,包括:As an embodiment of the present invention, referring to FIG. 2 , the use of a pre-trained license plate detection model to detect the license plate area of the license plate picture includes:

S201、利用所述车牌检测模型中的卷积层对所述车牌图片进行特征提取,得到特征车牌图片;S201, using the convolution layer in the license plate detection model to perform feature extraction on the license plate image to obtain a characteristic license plate image;

S202、利用所述车牌检测模型中的交互层对所述特征车牌图片进行特征融合,得到融合特征图片;S202, using the interaction layer in the license plate detection model to perform feature fusion on the feature license plate picture to obtain a fused feature picture;

S203、利用所述车牌检测模型中的池化层对所述融合特征图片进行降维处理,得到降维特征图片;S203, using the pooling layer in the license plate detection model to perform dimensionality reduction processing on the fusion feature picture to obtain a dimensionality reduction feature picture;

S204、利用所述车牌检测模型中的全连接层计算所述降维特征图片的车牌类别,根据所述车牌类别,利用所述车牌检测模型中的输出层输出所述车辆图片的车牌区域。S204 , using the fully connected layer in the license plate detection model to calculate the license plate type of the dimensionality reduction feature image, and using the output layer in the license plate detection model to output the license plate area of the vehicle image according to the license plate type.

其中,所述卷积层用于提取所述车牌图片中的特征信息,以获取所述车牌图片中的特征区域,所述交互层用于将所述特征车牌图片与车牌图片的底层特征进行特征融合,以保障获取的特征车牌图片包含所述车牌图片的底层信息,从而可以减小对不同增益引起的图像灰度变化影响,所述底层特征指的是所述原始图像的基本特征,例如、颜色、长度、宽度等;所述池化层用于对所述融合特征图片进行降维处理,以删除所述融合特征图片中的冗余信息,提高后续数据的处理速度,所述全连接层用于汇总所述降维特征图片中所有特征信息,计算出所述降维特征图片中的车牌类别,从而输出所述车牌图片的车牌区域,所述车牌类别包括0和1,即0代表该区域图片不是车牌区域,1代表该区域图片是车牌区域。Wherein, the convolution layer is used to extract the feature information in the license plate image to obtain the feature area in the license plate image, and the interaction layer is used to characterize the feature license plate image and the underlying features of the license plate image. Fusion to ensure that the acquired characteristic license plate image contains the underlying information of the license plate image, so as to reduce the influence of image grayscale changes caused by different gains, and the underlying features refer to the basic features of the original image, such as, Color, length, width, etc.; the pooling layer is used to perform dimensionality reduction processing on the fusion feature picture to delete redundant information in the fusion feature picture and improve the processing speed of subsequent data. The fully connected layer It is used to summarize all the feature information in the dimensionality reduction feature picture, and calculate the license plate category in the dimensionality reduction feature picture, so as to output the license plate area of the license plate picture. The license plate category includes 0 and 1, that is, 0 represents the The area image is not the license plate area, and 1 means that the area image is the license plate area.

进一步地,本发明一可选实施例中,所述车牌图片的特征提取通过所述卷积层中的卷积核实现,所述特征车牌图片的特征融合通过所述交互层中全连接模块实现,所述融合特征图片的降维处理通过所述池化层中的激活函数实现,如relu函数,所述降维特征图片中的车牌类别通过所述全连接层中的激活函数实现,如softmax函数。Further, in an optional embodiment of the present invention, the feature extraction of the license plate picture is realized by the convolution kernel in the convolution layer, and the feature fusion of the feature license plate picture is realized by the fully connected module in the interaction layer. , the dimension reduction processing of the fusion feature picture is realized by the activation function in the pooling layer, such as the relu function, and the license plate category in the dimension reduction feature picture is realized by the activation function in the fully connected layer, such as softmax function.

S2、利用预训练好的字符分割模型对所述车牌区域进行字符区域分割,得到所述车牌区域的字符区域。S2. Use a pre-trained character segmentation model to perform character area segmentation on the license plate area to obtain a character area of the license plate area.

应该了解,所述车牌区域包括所述车牌图片中的车牌字符,因此,本发明实施例通过预训练好的字符分割模型对所述车牌区域进行字符区域分割,以获取所述车牌区域中的字符存在的图像区域,实现所述车牌图片的车牌字符的细粒度定位,进一步保障后续所述车牌字符的识别准确率。其中,所述字符分割模型包括Refinene网络,其用于检测所述车牌区域中的字符区域。It should be understood that the license plate area includes the license plate characters in the license plate picture. Therefore, in the embodiment of the present invention, the character area segmentation is performed on the license plate area by using a pre-trained character segmentation model to obtain the characters in the license plate area. The existing image area realizes the fine-grained positioning of the license plate characters of the license plate picture, and further guarantees the recognition accuracy of the license plate characters in the future. Wherein, the character segmentation model includes a Refinene network, which is used to detect character regions in the license plate region.

作为本发明的一个实施例,参阅3所示,所述利用预训练好的字符分割模型对所述车牌区域进行字符区域分割,得到所述车牌区域的字符区域,包括:As an embodiment of the present invention, referring to 3, the character area segmentation of the license plate area by using a pre-trained character segmentation model to obtain the character area of the license plate area, including:

S301、利用所述字符分割模型中的卷积层对所述车牌区域进行特征提取,得到特征车牌区域;S301, using the convolution layer in the character segmentation model to perform feature extraction on the license plate area to obtain a characteristic license plate area;

S302、利用所述字符分割模型中的决策层识别所述特征车牌区域中的字符位置序列;S302, using the decision layer in the character segmentation model to identify the character position sequence in the characteristic license plate area;

S303、利用所述字符分割模型中的激活函数计算所述字符位置序列的字符置信度;S303, using the activation function in the character segmentation model to calculate the character confidence of the character position sequence;

S304、根据所述字符置信度,利用所述字符分割模型中的前向网络输出所述车牌区域的字符区域。S304. According to the character confidence, use the forward network in the character segmentation model to output the character area of the license plate area.

其中,所述车牌区域的特征提取与上述S1中车牌图片的特征提取原理相同,在此不做赘述,所述决策层用于定位所述特征车牌区域中存在字符的位置信息,所述字符置信度用于表征所述字符区域中为车牌字符的可信度。Wherein, the feature extraction principle of the license plate area is the same as the feature extraction principle of the license plate picture in the above-mentioned S1, which will not be repeated here. The degree is used to characterize the reliability of the license plate characters in the character area.

进一步地,本发明一可选实施例中,所述利用所述字符分割模型中的决策层识别所述特征车牌区域中的字符位置序列,包括:利用所述决策层中的输入门计算所述特征车牌区域的状态值,利用所述决策层中的遗忘门计算所述特征车牌区域的激活值,根据所述状态值和激活值计算所述特征车牌区域的状态更新值,利用所述决策层中的输出门计算所述状态更新值的字符位置序列。Further, in an optional embodiment of the present invention, the use of the decision layer in the character segmentation model to identify the character position sequence in the characteristic license plate area includes: using the input gate in the decision layer to calculate the The state value of the characteristic license plate area, use the forget gate in the decision-making layer to calculate the activation value of the characteristic license plate area, calculate the state update value of the characteristic license plate area according to the state value and the activation value, and use the decision-making layer. The output gate in computes the sequence of character positions for the state update value.

进一步地,本发明一可选实施例中,所述激活函数包括:Further, in an optional embodiment of the present invention, the activation function includes:

Figure BDA0003472357190000081
Figure BDA0003472357190000081

其中,s′表示字符置信度,s表示字符位置序列,e表示无限不循环小数。Among them, s' represents the character confidence, s represents the sequence of character positions, and e represents an infinite non-repeating decimal.

S3、对所述字符区域进行仿射变换,得到所述校正字符图像。S3. Perform affine transformation on the character area to obtain the corrected character image.

应该了解,在所述字符区域中会存在字符位置出现角度偏离的现象,如字符出现倒立的现象,因此,本发明实施例通过对所述字符区域进行仿射变换,以矫正所述字符区域中每个字符处于正方向的位置,提高后续字符识别的准确性。It should be understood that in the character area, there may be a phenomenon that the position of the character deviates from the angle, such as the phenomenon that the character is inverted. Therefore, in the embodiment of the present invention, the affine transformation is performed on the character area to correct the angle in the character area. The position of each character in the positive direction improves the accuracy of subsequent character recognition.

作为本发明的一个实施例,所述对所述字符区域进行仿射变换,得到所述校正字符图像,包括:对所述字符区域进行裁剪,得到裁剪字符区域,识别所述裁剪字符区域中的字符方向是否处于正方向,若所述字符方向不处于正方向,采用放射变换算法将所述裁剪字符区域进行方向校正,得到所述校正字符图像,若所述字符方向处于正方向,则将所述裁剪字符区域作为所述校正字符图像。As an embodiment of the present invention, performing affine transformation on the character area to obtain the corrected character image includes: cropping the character area to obtain a cropped character area, and identifying the character area in the cropped character area. Whether the character direction is in the positive direction, if the character direction is not in the positive direction, use the radiation transformation algorithm to correct the direction of the cropped character area to obtain the corrected character image, if the character direction is in the positive direction, then The cropped character area is used as the corrected character image.

其中,所述字符区域的裁剪用于筛选出所述字符区域中的背景区域,以提高后续字符识别的速度,进一步提高后续字符识别的准确率,所述字符方向的识别通过预先编译的字符方向识别脚本实现,所述字符方向识别脚本可以通过JavaScript脚本语言编译,所述放射变换算法包括图像旋转算法。The cropping of the character area is used to filter out the background area in the character area, so as to improve the speed of subsequent character recognition and further improve the accuracy of subsequent character recognition. The recognition script is implemented, the character orientation recognition script can be compiled by JavaScript script language, and the radiation transformation algorithm includes an image rotation algorithm.

进一步地,本发明一可选实施例中,所述对所述字符区域进行裁剪,得到裁剪字符区域,包括:所述字符区域进行二值化处理,得到二值化字符区域;查询所述二值化字符区域中纵轴方向的字符起始位置和字符终止位置,及所述二值化字符区域的纵轴方向长度,根据所述纵轴方向的字符起始位置、字符终止位置以及纵轴方向长度,对所述二值化字符区域进行纵向裁剪,得到纵向裁剪字符框;查询所述纵向裁剪字符框中横轴方向的字符起始位置和字符终止位置,及所述纵向裁剪字符框的横轴方向长度,根据所述横轴方向的字符起始位置和字符终止位置,及所述横轴方向长度,对所述纵向裁剪字符框进行横向裁剪,得到所述裁剪字符区域。Further, in an optional embodiment of the present invention, the cutting the character area to obtain the cropped character area includes: performing a binarization process on the character area to obtain a binarized character area; querying the two The character start position and character end position in the vertical axis direction in the valued character area, and the vertical axis length of the binarized character area, according to the character start position, character end position and vertical axis in the vertical axis direction direction length, the binarized character area is longitudinally cropped to obtain a longitudinally cropped character frame; query the character start position and character end position in the horizontal axis direction in the longitudinally cropped character frame, and the length of the longitudinally cropped character frame The length in the horizontal axis direction, according to the character starting position and the character ending position in the horizontal axis direction, and the horizontal axis direction length, the vertical cropping character frame is horizontally cropped to obtain the cropping character area.

其中,所述字符区域的二值化处理包括:将所述字符区域中的字符区域标记为1,背景区域标记为0,所述纵向裁剪和横向裁剪通过当前已知的字符裁剪工具实现,如Photoshop裁剪工具。Wherein, the binarization processing of the character area includes: marking the character area in the character area as 1, and marking the background area as 0, and the vertical cropping and horizontal cropping are implemented by currently known character cropping tools, such as Photoshop crop tool.

S4、利用预训练好的字符识别模型识别所述校正字符图像中的车牌字符,并对所述车牌字符进行校验,将校验成功的所述车牌字符作为所述车辆图片的最终车牌字符。S4. Recognize the license plate characters in the corrected character image by using the pre-trained character recognition model, verify the license plate characters, and use the license plate characters that are successfully verified as the final license plate characters of the vehicle picture.

本发明实施例中,所述字符识别模型包括Googlenet网络,其用于识别图像中字符信息,作为本发明的一个实施例,所述利用预训练好的字符识别模型识别所述校正字符图像中的车牌字符,包括:利用所述字符识别模型中的卷积神经网络对所述校正字符图像进行特征提取,得到特征字符图像;利用所述字符识别模型中的长短期记忆网络对所述特征字符图像进行文字位置序列识别,生成原始字符;利用所述字符识别模型中的时序分类网络对所述原始字符进行字符对齐,生成所述校正字符图像中的车牌字符。In the embodiment of the present invention, the character recognition model includes a Googlenet network, which is used to recognize character information in an image. As an embodiment of the present invention, the pre-trained character recognition model is used to recognize the characters in the corrected character image. License plate characters, comprising: using a convolutional neural network in the character recognition model to perform feature extraction on the corrected character image to obtain a characteristic character image; using a long short-term memory network in the character recognition model to extract the characteristic character image Perform character position sequence recognition to generate original characters; use the time series classification network in the character recognition model to perform character alignment on the original characters to generate license plate characters in the corrected character image.

其中,所述卷积神经网络用于识别所述校正字符图像的特征字符区域,所述长短期记忆网络用于提取特征字符区域中的字符序列,所述时序分类网络用于解决字符特征序列中字符无法对齐的问题。Wherein, the convolutional neural network is used to identify the characteristic character area of the corrected character image, the long short-term memory network is used to extract the character sequence in the characteristic character area, and the time series classification network is used to solve the problem in the character characteristic sequence. The problem that the characters cannot be aligned.

应该了解,在识别的车牌字符中会存在一些字符不符合车牌信息的字符或者车牌字符长度超过标准的车牌字符长度,因此本发明实施例对所述车牌字符进行校验,将校验成功的所述车牌字符作为所述车辆图片的最终车牌字符,以保障最终生成的车牌字符的准确性,可选的,所述车牌字符的校验通过预设的正则校验技术实现,所述正则校验技术包括:数字校验表达式(如^[0-9]*$)、汉字校验表达式(^[\u4e00-\u9fa5]{0,}$)以及特殊需求检验表达式(如日期格式:^\d{4}-\d{1,2}-\d{1,2})。It should be understood that in the recognized license plate characters, there may be some characters whose characters do not conform to the license plate information or the length of the license plate characters exceeds the standard license plate character length. Therefore, in the embodiment of the present invention, the license plate characters are verified, and all the characters that are successfully verified are verified. The license plate characters are used as the final license plate characters of the vehicle picture, so as to ensure the accuracy of the finally generated license plate characters. Techniques include: digital check expressions (such as ^[0-9]*$), Chinese character check expressions (^[\u4e00-\u9fa5]{0,}$) and special needs check expressions (such as date formats) : ^\d{4}-\d{1, 2}-\d{1, 2}).

本方案通过车牌检测模型和字符分割模型实现所述车牌图片的字符区域粗粒度和细粒度定位,可以避免在车牌字符定位中无用信息的混入,提高车牌字符的识别准确性,并结合对识别的字符区域进行仿射变换,可以保障所述字符区域中字符方向的一致性,提高后续车牌字符的检测效率和准确性,进一步地,本发明实施例通过字符识别模型识别仿射变换后字符区域中的车牌字符,并对所述车牌字符进行校验后生成车辆图片的最终车牌字符,可以避免字符识别错误的现象,进一步保障车牌字符的识别准确性。因此,本发明实施例提出的一种车牌智能识别方法可以提高车牌识别的准确性。This scheme realizes the coarse-grained and fine-grained positioning of the character area of the license plate image through the license plate detection model and the character segmentation model, which can avoid the mixing of useless information in the license plate character positioning, improve the recognition accuracy of the license plate characters, and The affine transformation of the character area can ensure the consistency of the character directions in the character area, and improve the detection efficiency and accuracy of subsequent license plate characters. The characters of the license plate are verified, and the final license plate characters of the vehicle picture are generated after verifying the characters of the license plate, which can avoid the phenomenon of character recognition errors and further ensure the recognition accuracy of the characters of the license plate. Therefore, the intelligent license plate recognition method proposed in the embodiment of the present invention can improve the accuracy of license plate recognition.

如图4所示,是本发明车牌智能识别装置的功能模块图。As shown in FIG. 4 , it is a functional block diagram of the intelligent license plate recognition device of the present invention.

本发明所述车牌智能识别装置400可以安装于电子设备中。根据实现的功能,所述车牌智能识别装置可以包括车牌区域检测模块401、字符区域分割模块402、字符仿射变换模块403以及车牌字符识别模型404。本发明所述模块也可以称之为单元,是指一种能够被电子设备处理器所执行,并且能够完成固定功能的一系列计算机程序段,其存储在电子设备的存储器中。The license plateintelligent recognition device 400 of the present invention can be installed in an electronic device. According to the realized functions, the license plate intelligent recognition device may include a license platearea detection module 401 , a characterarea segmentation module 402 , a characteraffine transformation module 403 and a license platecharacter recognition model 404 . The modules in the present invention can also be called units, which refer to a series of computer program segments that can be executed by the electronic device processor and can perform fixed functions, and are stored in the memory of the electronic device.

在本发明实施例中,关于各模块/单元的功能如下:In this embodiment of the present invention, the functions of each module/unit are as follows:

所述车牌区域检测模块401,用于获取车辆图片,利用预训练好的车牌检测模型检测所述车辆图片的车牌区域;The license platearea detection module 401 is used to obtain a vehicle picture, and use a pre-trained license plate detection model to detect the license plate area of the vehicle image;

所述字符区域分割模块402,用于利用预训练好的字符分割模型对所述车牌区域进行字符区域分割,得到所述车牌区域的字符区域;The characterarea segmentation module 402 is configured to perform character area segmentation on the license plate area by using a pre-trained character segmentation model to obtain the character area of the license plate area;

所述字符仿射变换模块403,用于对所述字符区域进行仿射变换,得到所述校正字符图像;The characteraffine transformation module 403 is configured to perform affine transformation on the character region to obtain the corrected character image;

所述车牌字符识别模块404,用于利用预训练好的字符识别模型识别所述校正字符图像中的车牌字符,并对所述车牌字符进行校验,将校验成功的所述车牌字符作为所述车辆图片的最终车牌字符。The license platecharacter recognition module 404 is used to recognize the license plate characters in the corrected character image by using the pre-trained character recognition model, and verify the license plate characters, and use the license plate characters that have been successfully verified as all the license plate characters. The final license plate character for the picture of the vehicle described.

详细地,本发明实施例中所述车牌智能识别装置400中的所述各模块在使用时采用与上述的图1至图3中所述的车牌智能识别方法一样的技术手段,并能够产生相同的技术效果,这里不再赘述。In detail, the modules in the intelligent licenseplate recognition device 400 in the embodiment of the present invention use the same technical means as the intelligent license plate recognition methods described in the above-mentioned FIGS. 1 to 3 , and can generate the same The technical effect will not be repeated here.

如图5所示,是本发明实现车牌智能识别方法的电子设备的结构示意图。As shown in FIG. 5 , it is a schematic structural diagram of an electronic device for realizing the method for intelligent license plate recognition according to the present invention.

所述电子设备可以包括处理器50、存储器51、通信总线52以及通信接口53,还可以包括存储在所述存储器51中并可在所述处理器50上运行的计算机程序,如车牌智能识别程序。The electronic device can include aprocessor 50, amemory 51, acommunication bus 52 and acommunication interface 53, and can also include a computer program that is stored in thememory 51 and can run on theprocessor 50, such as an intelligent license plate recognition program. .

其中,所述处理器50在一些实施例中可以由集成电路组成,例如可以由单个封装的集成电路所组成,也可以是由多个相同功能或不同功能封装的集成电路所组成,包括一个或者多个中央处理器(Central Processing unit,CPU)、微处理器、数字处理芯片、图形处理器及各种控制芯片的组合等。所述处理器50是所述电子设备的控制核心(ControlUnit),利用各种接口和线路连接整个电子设备的各个部件,通过运行或执行存储在所述存储器51内的程序或者模块(例如执行车牌智能识别程序等),以及调用存储在所述存储器51内的数据,以执行电子设备的各种功能和处理数据。Theprocessor 50 may be composed of integrated circuits in some embodiments, for example, may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits packaged with the same function or different functions, including one or A combination of multiple central processing units (Central Processing Units, CPUs), microprocessors, digital processing chips, graphics processors, and various control chips, etc. Theprocessor 50 is the control core (ControlUnit) of the electronic device, and uses various interfaces and lines to connect the various components of the entire electronic device, by running or executing the program or module stored in the memory 51 (for example, executing the license plate). intelligent identification program, etc.), and call the data stored in thememory 51 to execute various functions of the electronic device and process data.

所述存储器51至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、移动硬盘、多媒体卡、卡型存储器(例如:SD或DX存储器等)、磁性存储器、磁盘、光盘等。所述存储器51在一些实施例中可以是电子设备的内部存储单元,例如该电子设备的移动硬盘。所述存储器51在另一些实施例中也可以是电子设备的外部存储设备,例如电子设备上配备的插接式移动硬盘、智能存储卡(Smart Media Card,SMC)、安全数字(Secure Digital,SD)卡、闪存卡(Flash Card)等。进一步地,所述存储器51还可以既包括电子设备的内部存储单元也包括外部存储设备。所述存储器51不仅可以用于存储安装于电子设备的应用软件及各类数据,例如车牌智能识别程序的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。Thememory 51 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. . In some embodiments, thememory 51 may be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, thememory 51 may also be an external storage device of the electronic device, such as a pluggable mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) equipped on the electronic device. ) card, flash card (Flash Card) and so on. Further, thememory 51 may also include both an internal storage unit of an electronic device and an external storage device. Thememory 51 can not only be used to store application software installed in the electronic device and various data, such as the code of the license plate intelligent recognition program, etc., but also can be used to temporarily store the data that has been output or will be output.

所述通信总线52可以是外设部件互连标准(peripheral componentinterconnect,简称PCI)总线或扩展工业标准结构(extended industry standardarchitecture,简称EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。所述总线被设置为实现所述存储器51以及至少一个处理器50等之间的连接通信。Thecommunication bus 52 may be a peripheral component interconnect (PCI for short) bus or an extended industry standard architecture (EISA for short) bus or the like. The bus can be divided into address bus, data bus, control bus and so on. The bus is configured to implement connection communication between thememory 51 and at least oneprocessor 50 and the like.

所述通信接口53用于上述电子设备与其他设备之间的通信,包括网络接口和用户接口。可选地,所述网络接口可以包括有线接口和/或无线接口(如WI-FI接口、蓝牙接口等),通常用于在该电子设备与其他电子设备之间建立通信连接。所述用户接口可以是显示器(Display)、输入单元(比如键盘(Keyboard)),可选地,所述用户接口还可以是标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在电子设备中处理的信息以及用于显示可视化的用户界面。Thecommunication interface 53 is used for communication between the above electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (eg, a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, and the like. The display may also be appropriately called a display screen or a display unit, which is used for displaying information processed in the electronic device and for displaying a visual user interface.

图5仅示出了具有部件的电子设备,本领域技术人员可以理解的是,图5示出的结构并不构成对所述电子设备的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。FIG. 5 only shows an electronic device with components. Those skilled in the art can understand that the structure shown in FIG. 5 does not constitute a limitation on the electronic device, and may include fewer or more components than those shown in the drawings. , or a combination of certain components, or a different arrangement of components.

例如,尽管未示出,所述电子设备还可以包括给各个部件供电的电源(比如电池),优选地,电源可以通过电源管理装置与所述至少一个处理器50逻辑相连,从而通过电源管理装置实现充电管理、放电管理、以及功耗管理等功能。电源还可以包括一个或一个以上的直流或交流电源、再充电装置、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。所述电子设备还可以包括多种传感器、蓝牙模块、Wi-Fi模块等,在此不再赘述。For example, although not shown, the electronic device may also include a power source (such as a battery) for powering the various components, preferably, the power source may be logically connected to the at least oneprocessor 50 through a power management device, so that the power source can be logically connected to the at least oneprocessor 50 through a power management device. Implement functions such as charge management, discharge management, and power management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and any other components. The electronic device may further include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

应该了解,所述实施例仅为说明之用,在专利发明范围上并不受此结构的限制。It should be understood that the embodiments are only used for illustration, and are not limited by this structure in the scope of the patented invention.

所述电子设备中的所述存储器51存储的车牌智能识别程序是多个计算机程序的组合,在所述处理器50中运行时,可以实现:The license plate intelligent recognition program stored in thememory 51 in the electronic device is a combination of multiple computer programs. When running in theprocessor 50, it can realize:

获取车辆图片,利用预训练好的车牌检测模型检测所述车辆图片的车牌区域;Obtain a vehicle image, and use the pre-trained license plate detection model to detect the license plate area of the vehicle image;

利用预训练好的字符分割模型对所述车牌区域进行字符区域分割,得到所述车牌区域的字符区域;Use the pre-trained character segmentation model to perform character area segmentation on the license plate area to obtain the character area of the license plate area;

对所述字符区域进行仿射变换,得到所述校正字符图像;Perform affine transformation on the character area to obtain the corrected character image;

利用预训练好的字符识别模型识别所述校正字符图像中的车牌字符,并对所述车牌字符进行校验,将校验成功的所述车牌字符作为所述车辆图片的最终车牌字符。A pre-trained character recognition model is used to identify the license plate characters in the corrected character image, and the license plate characters are verified, and the license plate characters that have been verified successfully are used as the final license plate characters of the vehicle picture.

具体地,所述处理器50对上述计算机程序的具体实现方法可参考图1对应实施例中相关步骤的描述,在此不赘述。Specifically, for the specific implementation method of the above-mentioned computer program by theprocessor 50, reference may be made to the description of the relevant steps in the corresponding embodiment of FIG. 1, and details are not described herein.

进一步地,所述电子设备集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个非易失性计算机可读取存储介质中。所述计算机可读存储介质可以是易失性的,也可以是非易失性的。例如,所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)。Further, if the modules/units integrated in the electronic device are implemented in the form of software functional units and sold or used as independent products, they may be stored in a non-volatile computer-readable storage medium. The computer-readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a removable hard disk, a magnetic disk, an optical disc, a computer memory, a read-only memory (ROM, Read-Only). Memory).

本发明还提供一种计算机可读存储介质,所述可读存储介质存储有计算机程序,所述计算机程序在被电子设备的处理器所执行时,可以实现:The present invention also provides a computer-readable storage medium, where the readable storage medium stores a computer program, and when executed by a processor of an electronic device, the computer program can realize:

获取车辆图片,利用预训练好的车牌检测模型检测所述车辆图片的车牌区域;Obtain a vehicle image, and use the pre-trained license plate detection model to detect the license plate area of the vehicle image;

利用预训练好的字符分割模型对所述车牌区域进行字符区域分割,得到所述车牌区域的字符区域;Use the pre-trained character segmentation model to perform character area segmentation on the license plate area to obtain the character area of the license plate area;

对所述字符区域进行仿射变换,得到所述校正字符图像;Perform affine transformation on the character area to obtain the corrected character image;

利用预训练好的字符识别模型识别所述校正字符图像中的车牌字符,并对所述车牌字符进行校验,将校验成功的所述车牌字符作为所述车辆图片的最终车牌字符。A pre-trained character recognition model is used to identify the license plate characters in the corrected character image, and the license plate characters are verified, and the license plate characters that have been verified successfully are used as the final license plate characters of the vehicle picture.

在本发明所提供的几个实施例中,应该理解到,所揭露的设备,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the modules is only a logical function division, and there may be other division manners in actual implementation.

所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and components shown as modules may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

另外,在本发明各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of hardware plus software function modules.

对于本领域技术人员而言,显然本发明不限于上述示范性实施例的细节,而且在不背离本发明的精神或基本特征的情况下,能够以其他的具体形式实现本发明。It will be apparent to those skilled in the art that the present invention is not limited to the details of the above-described exemplary embodiments, but that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics of the invention.

因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本发明的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本发明内。不应将权利要求中的任何附关联图标记视为限制所涉及的权利要求。Therefore, the embodiments are to be regarded in all respects as illustrative and not restrictive, the scope of the invention being defined by the appended claims rather than the foregoing description, which are therefore intended to fall within the scope of the claims. All changes within the meaning and range of the equivalents of , are included in the present invention. Any reference signs in the claims shall not be construed as limiting the involved claim.

需要说明的是,在本文中,诸如“第一”和“第二”等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that, in this document, relational terms such as "first" and "second" etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these Any such actual relationship or sequence exists between entities or operations. Moreover, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device comprising a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

以上所述仅是本发明的具体实施方式,使本领域技术人员能够理解或实现本发明。对这些实施例的多种修改对本领域的技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所发明的原理和新颖特点相一致的最宽的范围。The above descriptions are only specific embodiments of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

Translated fromChinese
1.一种车牌智能识别方法,其特征在于,所述方法包括:1. a license plate intelligent identification method, is characterized in that, described method comprises:获取车辆图片,利用预训练好的车牌检测模型检测所述车辆图片的车牌区域;Obtain a vehicle image, and use the pre-trained license plate detection model to detect the license plate area of the vehicle image;利用预训练好的字符分割模型对所述车牌区域进行字符区域分割,得到所述车牌区域的字符区域;Use the pre-trained character segmentation model to perform character area segmentation on the license plate area to obtain the character area of the license plate area;对所述字符区域进行仿射变换,得到所述校正字符图像;Perform affine transformation on the character area to obtain the corrected character image;利用预训练好的字符识别模型识别所述校正字符图像中的车牌字符,并对所述车牌字符进行校验,将校验成功的所述车牌字符作为所述车辆图片的最终车牌字符。A pre-trained character recognition model is used to identify the license plate characters in the corrected character image, and the license plate characters are verified, and the license plate characters that have been verified successfully are used as the final license plate characters of the vehicle picture.2.如权利要求1所述的车牌智能识别方法,其特征在于,所述利用预训练好的车牌检测模型检测所述车牌图片的车牌区域,包括:2. the license plate intelligent identification method as claimed in claim 1, is characterized in that, described utilizing the license plate detection model that pre-trained to detect the license plate area of described license plate picture, comprising:利用所述车牌检测模型中的卷积层对所述车牌图片进行特征提取,得到特征车牌图片;Use the convolution layer in the license plate detection model to perform feature extraction on the license plate image to obtain a characteristic license plate image;利用所述车牌检测模型中的交互层对所述特征车牌图片进行特征融合,得到融合特征图片;Use the interaction layer in the license plate detection model to perform feature fusion on the characteristic license plate picture to obtain a fusion feature picture;利用所述车牌检测模型中的池化层对所述融合特征图片进行降维处理,得到降维特征图片;Use the pooling layer in the license plate detection model to perform dimensionality reduction processing on the fusion feature image to obtain a dimensionality reduction feature image;利用所述车牌检测模型中的全连接层计算所述降维特征图片的车牌类别,根据所述车牌类别,利用所述车牌检测模型中的输出层输出所述车辆图片的车牌区域。The fully connected layer in the license plate detection model is used to calculate the license plate type of the dimensionality reduction feature image, and according to the license plate type, the license plate area of the vehicle image is output by using the output layer in the license plate detection model.3.如权利要求1所述的车牌智能识别方法,其特征在于,所述利用预训练好的字符分割模型对所述车牌区域进行字符区域分割,得到所述车牌区域的字符区域,包括:3. The method for intelligent identification of license plates as claimed in claim 1, wherein the character segmentation model is performed on the license plate area by using a pre-trained character segmentation model to obtain the character area of the license plate area, comprising:利用所述字符分割模型中的卷积层对所述车牌区域进行特征提取,得到特征车牌区域;Use the convolution layer in the character segmentation model to perform feature extraction on the license plate area to obtain a characteristic license plate area;利用所述字符分割模型中的决策层识别所述特征车牌区域中的字符位置序列;Utilize the decision-making layer in the character segmentation model to identify the character position sequence in the characteristic license plate area;利用所述字符分割模型中的激活函数计算所述字符位置序列的字符置信度;Using the activation function in the character segmentation model to calculate the character confidence of the character position sequence;根据所述字符置信度,利用所述字符分割模型中的前向网络输出所述车牌区域的字符区域。According to the character confidence, the forward network in the character segmentation model is used to output the character area of the license plate area.4.如权利要求3所述的车牌智能识别方法,其特征在于,所述利用所述字符分割模型中的决策层识别所述特征车牌区域中的字符位置序列,包括:4. The method for intelligent license plate recognition according to claim 3, wherein the character position sequence in the feature license plate area is identified by the decision layer in the character segmentation model, comprising:利用所述决策层中的输入门计算所述特征车牌区域的状态值,利用所述决策层中的遗忘门计算所述特征车牌区域的激活值;Use the input gate in the decision-making layer to calculate the state value of the characteristic license plate area, and use the forget gate in the decision-making layer to calculate the activation value of the characteristic license plate area;根据所述状态值和激活值计算所述特征车牌区域的状态更新值;Calculate the state update value of the characteristic license plate area according to the state value and the activation value;利用所述决策层中的输出门计算所述状态更新值的字符位置序列。A sequence of character positions for the state update value is computed using an output gate in the decision layer.5.如权利要求1所述的车牌智能识别方法,其特征在于,所述对所述字符区域进行仿射变换,得到所述校正字符图像,包括:5. The method for intelligent license plate recognition according to claim 1, wherein the affine transformation is performed on the character region to obtain the corrected character image, comprising:对所述字符区域进行裁剪,得到裁剪字符区域;Cropping the character area to obtain a cropped character area;识别所述裁剪字符区域中的字符方向是否处于正方向;Identifying whether the character direction in the cropped character area is in the positive direction;若所述字符方向不处于正方向,采用放射变换算法将所述裁剪字符区域进行方向校正,得到所述校正字符图像;If the direction of the character is not in the positive direction, use a radiation transformation algorithm to correct the direction of the cropped character area to obtain the corrected character image;若所述字符方向处于正方向,则将所述裁剪字符区域作为所述校正字符图像。If the character direction is in the positive direction, the cropped character area is used as the corrected character image.6.如权利要求5所述的车牌智能识别方法,其特征在于,所述对所述字符区域进行裁剪,得到裁剪字符区域,包括:6. The method for intelligent license plate recognition as claimed in claim 5, wherein said character area is cut to obtain a cut character area, comprising:对所述字符区域进行二值化处理,得到二值化字符区域;Perform binarization processing on the character area to obtain a binarized character area;查询所述二值化字符区域中纵轴方向的字符起始位置和字符终止位置,及所述二值化字符区域的纵轴方向长度,根据所述纵轴方向的字符起始位置、字符终止位置以及纵轴方向长度,对所述二值化字符区域进行纵向裁剪,得到纵向裁剪字符框;Query the character start position and character end position in the vertical axis direction in the binarized character area, and the vertical axis length of the binarized character area, according to the character start position and character end position in the vertical axis direction the position and the length of the vertical axis, and the binarized character area is longitudinally cropped to obtain a longitudinally cropped character frame;查询所述纵向裁剪字符框中横轴方向的字符起始位置和字符终止位置,及所述纵向裁剪字符框的横轴方向长度,根据所述横轴方向的字符起始位置和字符终止位置,及所述横轴方向长度,对所述纵向裁剪字符框进行横向裁剪,得到所述裁剪字符区域。Query the character start position and character end position in the horizontal axis direction in the vertical cropping character frame, and the length in the horizontal axis direction of the vertical cropping character frame, according to the character start position and character end position in the horizontal axis direction, and the length in the horizontal axis direction, and horizontally crop the vertical cropped character frame to obtain the cropped character area.7.如权利要求1至6中任意一项所述的车牌智能识别方法,其特征在于,所述利用预训练好的字符识别模型识别所述校正字符图像中的车牌字符,包括:7. The license plate intelligent recognition method according to any one of claims 1 to 6, wherein the use of a pre-trained character recognition model to identify the license plate characters in the corrected character image, comprising:利用所述字符识别模型中的卷积神经网络对所述校正字符图像进行特征提取,得到特征字符图像;Use the convolutional neural network in the character recognition model to perform feature extraction on the corrected character image to obtain a characteristic character image;利用所述字符识别模型中的长短期记忆网络对所述特征字符图像进行文字位置序列识别,生成原始字符;Utilize the long-term and short-term memory network in the character recognition model to perform text position sequence recognition on the characteristic character image to generate original characters;利用所述字符识别模型中的时序分类网络对所述原始字符进行字符对齐,生成所述校正字符图像中的车牌字符。Character alignment is performed on the original characters by using the time series classification network in the character recognition model to generate license plate characters in the corrected character image.8.一种车牌智能识别装置,其特征在于,所述装置包括:8. A license plate intelligent recognition device, wherein the device comprises:车牌区域检测模块,用于获取车辆图片,利用预训练好的车牌检测模型检测所述车辆图片的车牌区域;The license plate area detection module is used to obtain the vehicle image, and use the pre-trained license plate detection model to detect the license plate area of the vehicle image;字符区域分割模块,用于利用预训练好的字符分割模型对所述车牌区域进行字符区域分割,得到所述车牌区域的字符区域;a character area segmentation module, used for using a pre-trained character segmentation model to perform character area segmentation on the license plate area to obtain the character area of the license plate area;字符仿射变换模块,用于对所述字符区域进行仿射变换,得到所述校正字符图像;A character affine transformation module, configured to perform affine transformation on the character region to obtain the corrected character image;车牌字符识别模块,用于利用预训练好的字符识别模型识别所述校正字符图像中的车牌字符,并对所述车牌字符进行校验,将校验成功的所述车牌字符作为所述车辆图片的最终车牌字符。The license plate character recognition module is used to identify the license plate characters in the corrected character image by using the pre-trained character recognition model, and verify the license plate characters, and use the license plate characters that have been successfully verified as the vehicle picture The final license plate character.9.一种电子设备,其特征在于,所述电子设备包括:9. An electronic device, characterized in that the electronic device comprises:至少一个处理器;以及,at least one processor; and,与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,所述存储器存储有可被所述至少一个处理器执行的计算机程序,所述计算机程序被所述至少一个处理器执行,以使所述至少一个处理器能够执行如权利要求1至7中任意一项所述的车牌智能识别方法。The memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform any one of claims 1 to 7 The intelligent license plate recognition method described in item.10.一种计算机可读存储介质,存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至7中任意一项所述的车牌智能识别方法。10 . A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the intelligent license plate recognition method according to any one of claims 1 to 7 is implemented. 11 .
CN202210046108.9A2022-01-172022-01-17 A kind of license plate intelligent recognition method, device, electronic equipment and mediumPendingCN114565747A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202210046108.9ACN114565747A (en)2022-01-172022-01-17 A kind of license plate intelligent recognition method, device, electronic equipment and medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202210046108.9ACN114565747A (en)2022-01-172022-01-17 A kind of license plate intelligent recognition method, device, electronic equipment and medium

Publications (1)

Publication NumberPublication Date
CN114565747Atrue CN114565747A (en)2022-05-31

Family

ID=81711184

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202210046108.9APendingCN114565747A (en)2022-01-172022-01-17 A kind of license plate intelligent recognition method, device, electronic equipment and medium

Country Status (1)

CountryLink
CN (1)CN114565747A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN116740689A (en)*2023-05-042023-09-12云控智行科技有限公司License plate number recognition method and device, electronic equipment and readable storage medium
CN116912836A (en)*2023-06-052023-10-20中联重科建筑起重机械有限责任公司Method and system for identifying structural member identification, processor and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2016127545A1 (en)*2015-02-132016-08-18广州广电运通金融电子股份有限公司Character segmentation and recognition method
CN109145900A (en)*2018-07-302019-01-04中国科学技术大学苏州研究院A kind of licence plate recognition method based on deep learning
CN112434700A (en)*2020-11-252021-03-02创新奇智(上海)科技有限公司License plate recognition method, device, equipment and storage medium
CN112861648A (en)*2021-01-192021-05-28平安科技(深圳)有限公司Character recognition method and device, electronic equipment and storage medium
CN113780278A (en)*2021-09-102021-12-10北京精英路通科技有限公司Method and device for identifying license plate content, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2016127545A1 (en)*2015-02-132016-08-18广州广电运通金融电子股份有限公司Character segmentation and recognition method
CN109145900A (en)*2018-07-302019-01-04中国科学技术大学苏州研究院A kind of licence plate recognition method based on deep learning
CN112434700A (en)*2020-11-252021-03-02创新奇智(上海)科技有限公司License plate recognition method, device, equipment and storage medium
CN112861648A (en)*2021-01-192021-05-28平安科技(深圳)有限公司Character recognition method and device, electronic equipment and storage medium
CN113780278A (en)*2021-09-102021-12-10北京精英路通科技有限公司Method and device for identifying license plate content, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN116740689A (en)*2023-05-042023-09-12云控智行科技有限公司License plate number recognition method and device, electronic equipment and readable storage medium
CN116912836A (en)*2023-06-052023-10-20中联重科建筑起重机械有限责任公司Method and system for identifying structural member identification, processor and storage medium

Similar Documents

PublicationPublication DateTitle
CN112861648B (en)Character recognition method, character recognition device, electronic equipment and storage medium
CN112699775B (en)Certificate identification method, device, equipment and storage medium based on deep learning
CN113781485B (en) A kind of intelligent detection method, device, electronic device and medium for PCB defect category
CN111639648B (en)Certificate identification method, device, computing equipment and storage medium
WO2018205467A1 (en)Automobile damage part recognition method, system and electronic device and storage medium
CN108491866B (en)Pornographic picture identification method, electronic device and readable storage medium
WO2022105179A1 (en)Biological feature image recognition method and apparatus, and electronic device and readable storage medium
US20200265304A1 (en)System and method for identifying misclassifications by a neural network
CN114565747A (en) A kind of license plate intelligent recognition method, device, electronic equipment and medium
US11869072B2 (en)System for facilitating mobile home purchase transactions
US11386499B2 (en)Car damage picture angle correction method, electronic device, and readable storage medium
CN114267064B (en) Face recognition method, device, electronic device and storage medium
CN110008997A (en) Image texture similarity recognition method, device and computer readable storage medium
CN112506931B (en)Data query method, device, electronic equipment and storage medium
CN114708461A (en)Multi-modal learning model-based classification method, device, equipment and storage medium
WO2022105120A1 (en)Text detection method and apparatus from image, computer device and storage medium
US10896339B2 (en)Detecting magnetic ink character recognition codes
CN114639087B (en) Traffic sign detection method and device
CN113536782B (en)Sensitive word recognition method and device, electronic equipment and storage medium
WO2023134080A1 (en)Method and apparatus for identifying camera spoofing, device, and storage medium
CN114495146A (en) Image text detection method, device, computer equipment and storage medium
CN112085063A (en) A target identification method, device, terminal device and storage medium
CN117115819A (en)Target field extraction method, system, terminal and medium
CN110334586A (en) A car identification method, device, computer system and readable storage medium
WO2023124565A1 (en)Methods, apparatuses, and computer-readable storage media for image-based sensitive-text detection

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination

[8]ページ先頭

©2009-2025 Movatter.jp