Training method and device of license plate recognition model and license plate recognition method and device

文档序号:1354691 发布日期:2020-07-24 浏览:21次 中文

阅读说明:本技术 车牌识别模型的训练方法及装置、车牌识别方法及装置 (Training method and device of license plate recognition model and license plate recognition method and device ) 是由 邓练兵 陈金鹿 薛剑 于 2019-12-13 设计创作,主要内容包括:本发明公开了一种车牌识别模型的训练方法及装置、车牌识别方法及装置,该车牌识别模型的训练方法包括:获取车辆图像训练样本,车辆图像训练样本中包含具有车牌图像的正样本图像及不具有车牌图像的负样本图像;根据车辆图像训练样本提取第一目标训练特征;根据第一目标训练特征对第一深度学习网络模型进行训练,得到车牌识别模型;对车牌识别模型输出的车牌图像进行分割,得到目标训练字符;根据目标训练字符提取第二目标训练特征;根据第二目标训练特征对深度可分离卷积神经网络模型进行训练,得到深度可分离卷积车牌识别模型。本发明通过采用可分离卷积神经网络模型,可以实现空间信息和深度信息解耦合,减少网络参数量,提高训练准确率。(The invention discloses a method and a device for training a license plate recognition model, and a method and a device for recognizing a license plate, wherein the method for training the license plate recognition model comprises the following steps: obtaining a vehicle image training sample, wherein the vehicle image training sample comprises a positive sample image with a license plate image and a negative sample image without the license plate image; extracting a first target training characteristic according to the vehicle image training sample; training the first deep learning network model according to the first target training characteristics to obtain a license plate recognition model; segmenting a license plate image output by the license plate recognition model to obtain target training characters; extracting a second target training characteristic according to the target training character; and training the depth separable convolution neural network model according to the second target training characteristics to obtain a depth separable convolution license plate recognition model. By adopting the separable convolutional neural network model, the invention can realize the decoupling of the spatial information and the depth information, reduce the network parameters and improve the training accuracy.)

1. A training method of a license plate recognition model is characterized by comprising the following steps:

obtaining a vehicle image training sample, wherein the vehicle image training sample comprises a positive sample image with a license plate image and a negative sample image without the license plate image;

extracting a first target training feature according to the vehicle image training sample;

training a first deep learning network model according to the first target training characteristics to obtain a license plate recognition model;

segmenting the license plate image output by the license plate recognition model to obtain target training characters;

extracting a second target training characteristic according to the target training character;

and training the depth separable convolution neural network model according to the second target training characteristics to obtain a depth separable convolution license plate recognition model.

2. The method of claim 1, wherein before the segmenting the license plate image output by the license plate recognition model to obtain the target training character, the method further comprises:

determining the inclination of the license plate in the license plate image;

and when the inclination of the license plate does not meet a first preset condition, performing inclination correction on the license plate image.

3. The method of claim 1, wherein after training the first deep learning network model according to the first target training features to obtain a license plate recognition model, the method further comprises:

obtaining a vehicle image test sample, wherein the vehicle image test sample comprises a positive sample image with a license plate image and a negative sample image without the license plate image;

extracting a first test feature according to the vehicle image test sample;

testing the license plate recognition model according to the first test characteristic to obtain a first test result;

and when the first test result meets a second preset condition, determining the license plate recognition model as an available license plate recognition model.

4. The method of claim 3, further comprising, after training the deep separable convolutional neural network model according to the second target training features to obtain a deep separable convolutional license plate recognition model:

obtaining a license plate image test sample, wherein the license plate image test sample is a license plate image test sample output by the license plate recognition model;

extracting a second test characteristic according to the license plate image test sample;

testing the depth separable convolution license plate recognition model according to the second test characteristic to obtain a second test result;

and when the second test result meets a third preset condition, determining the depth separable convolution license plate recognition model as an available depth separable convolution license plate recognition model.

5. A license plate recognition method is characterized by comprising the following steps:

acquiring a vehicle image to be identified;

carrying out license plate positioning recognition on the vehicle image to be recognized according to the license plate recognition model to obtain a target recognition license plate image;

segmenting the target recognition license plate image to obtain target recognition characters;

extracting target recognition characteristics according to the target recognition characters;

identifying the target identification characteristics according to a depth separable convolution license plate identification model to obtain a character identification result;

combining the character recognition results to obtain the license plate number of the license plate to be recognized;

the license plate recognition model obtained by the license plate recognition model training method and the depth separable convolution license plate recognition model are obtained by training according to the license plate recognition model training method of any one of claims 1-4.

6. The method of claim 5, wherein before the segmenting the target recognition license plate image to obtain target recognition characters, the method further comprises:

determining the inclination of the license plate in the target recognition license plate image;

and when the inclination of the license plate does not meet a first preset condition, performing inclination correction on the target recognition license plate image.

7. A training device for a license plate recognition model is characterized by comprising:

the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring vehicle image training samples, and the vehicle image training samples comprise positive sample images with license plate images and negative sample images without license plate images;

the first extraction module is used for extracting a first target training feature according to the vehicle image training sample;

the first training module is used for training a first deep learning network model according to the first target training characteristics to obtain a license plate recognition model;

the first segmentation module is used for segmenting the license plate image output by the license plate recognition model to obtain target training characters;

the second extraction module is used for extracting second target training characteristics according to the target training characters;

and the second training module is used for training the depth separable convolution neural network model according to the second target training characteristics to obtain a depth separable convolution license plate recognition model.

8. A license plate recognition device, comprising:

the second acquisition module is used for acquiring the image of the vehicle to be identified;

the first recognition module is used for carrying out license plate positioning recognition on the vehicle image to be recognized according to the license plate recognition model to obtain a target recognition license plate image;

the second segmentation module is used for segmenting the target recognition license plate image to obtain target recognition characters;

the third extraction module is used for extracting target identification characteristics according to the target identification characters;

the second recognition module is used for recognizing the target recognition characteristics according to the depth separable convolution license plate recognition model to obtain a character recognition result;

the combination module is used for combining the character recognition results to obtain the license plate number of the license plate to be recognized;

the license plate recognition model obtained by the license plate recognition model training method and the depth separable convolution license plate recognition model are obtained by training according to the license plate recognition model training method of any one of claims 1-4.

9. An electronic device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the method for training the license plate recognition model according to any one of claims 1 to 4 or the method for recognizing the license plate according to any one of claims 5 to 6.

10. A computer-readable storage medium having stored thereon computer instructions, wherein the instructions, when executed by a processor, implement the method for training the license plate recognition model according to any one of claims 1 to 4 or the method for recognizing the license plate according to any one of claims 5 to 6.

Technical Field

The invention relates to the technical field of recognition, in particular to a method and a device for training a license plate recognition model and a license plate recognition method and a license plate recognition device.

Background

The license plate recognition system is an application of computer video image recognition technology in vehicle license plate recognition. License plate recognition is widely applied to highway vehicle management, and in parking lot management, the license plate recognition technology is also a main means for recognizing vehicle identities. However, the ever-increasing amount of data poses new challenges for quickly and accurately recognizing license plate content.

The traditional license plate recognition algorithm comprises a large number of manual feature extraction processes, the extraction process is complex and slow, the feature extraction based on the convolutional neural network can be used for directly processing images and automatically extracting features, but the network parameter amount in the extraction process is huge, the training process is complex, the training speed is slow, and the training accuracy is low.

Disclosure of Invention

Therefore, the technical problem to be solved by the invention is to overcome the defect of large network parameter quantity during feature extraction based on the convolutional neural network in the prior art, so that a license plate recognition model training method and device, and a license plate recognition method and device are provided.

According to a first aspect, the embodiment of the invention discloses a training method of a license plate recognition model, which comprises the following steps: obtaining a vehicle image training sample, wherein the vehicle image training sample comprises a positive sample image with a license plate image and a negative sample image without the license plate image; extracting a first target training feature according to the vehicle image training sample; training a first deep learning network model according to the first target training characteristics to obtain a license plate recognition model; segmenting the license plate image output by the license plate recognition model to obtain target training characters; extracting a second target training characteristic according to the target training character; and training the depth separable convolution neural network model according to the second target training characteristics to obtain a depth separable convolution license plate recognition model.

With reference to the first aspect, in a first implementation manner of the first aspect, before the license plate image output by the license plate recognition model is segmented to obtain a target training character, the method further includes: determining the inclination of the license plate in the license plate image; and when the inclination of the license plate does not meet a first preset condition, performing inclination correction on the license plate image.

With reference to the first aspect, in a second implementation manner of the first aspect, after the first deep learning network model is trained according to the first target training feature to obtain a license plate recognition model, the method further includes: obtaining a vehicle image test sample, wherein the vehicle image test sample comprises a positive sample image with a license plate image and a negative sample image without the license plate image; extracting a first test feature according to the vehicle image test sample; testing the license plate recognition model according to the first test characteristic to obtain a first test result; and when the first test result meets a second preset condition, determining the license plate recognition model as an available license plate recognition model.

With reference to the second implementation manner of the first aspect, in a third implementation manner of the first aspect, after the deep separable convolutional neural network model is trained according to the second target training feature to obtain a deep separable convolutional license plate recognition model, the method further includes: obtaining a license plate image test sample, wherein the license plate image test sample is a license plate image test sample output by the license plate recognition model; extracting a second test characteristic according to the license plate image test sample; testing the depth separable convolution license plate recognition model according to the second test characteristic to obtain a second test result; and when the second test result meets a third preset condition, determining the depth separable convolution license plate recognition model as an available depth separable convolution license plate recognition model.

According to a second aspect, the embodiment of the invention also discloses a license plate recognition method, which comprises the following steps: acquiring a vehicle image to be identified; carrying out license plate positioning recognition on the vehicle image to be recognized according to the license plate recognition model to obtain a target recognition license plate image; segmenting the target recognition license plate image to obtain target recognition characters; extracting target recognition characteristics according to the target recognition characters; identifying the target identification characteristics according to a depth separable convolution license plate identification model to obtain a character identification result; combining the character recognition results to obtain the license plate number of the license plate to be recognized; the license plate recognition model obtained by the license plate recognition model training method and the depth separable convolution license plate recognition model are obtained by training according to the license plate recognition model training method described in the first aspect or any one of the embodiments of the first aspect.

With reference to the second aspect, in a first implementation manner of the second aspect, before the segmenting the target recognition license plate image to obtain target recognition characters, the method further includes: determining the inclination of the license plate in the target recognition license plate image; and when the inclination of the license plate does not meet a first preset condition, performing inclination correction on the target recognition license plate image.

According to a third aspect, an embodiment of the present invention further discloses a training device for a license plate recognition model, including: the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring vehicle image training samples, and the vehicle image training samples comprise positive sample images with license plate images and negative sample images without license plate images; the first extraction module is used for extracting a first target training feature according to the vehicle image training sample; the first training module is used for training a first deep learning network model according to the first target training characteristics to obtain a license plate recognition model; the first segmentation module is used for segmenting the license plate image output by the license plate recognition model to obtain target training characters; the second extraction module is used for extracting second target training characteristics according to the target training characters; and the second training module is used for training the depth separable convolution neural network model according to the second target training characteristics to obtain a depth separable convolution license plate recognition model.

According to a fourth aspect, an embodiment of the present invention further discloses a license plate recognition apparatus, including: the second acquisition module is used for acquiring the image of the vehicle to be identified; the first recognition module is used for carrying out license plate positioning recognition on the vehicle image to be recognized according to the license plate recognition model to obtain a target recognition license plate image; the second segmentation module is used for segmenting the target recognition license plate image to obtain target recognition characters; the third extraction module is used for extracting target identification characteristics according to the target identification characters; the second recognition module is used for recognizing the target recognition characteristics according to the depth separable convolution license plate recognition model to obtain a character recognition result; the combination module is used for combining the character recognition results to obtain the license plate number of the license plate to be recognized; the license plate recognition model obtained by the license plate recognition model training method and the depth separable convolution license plate recognition model are obtained by training according to the license plate recognition model training method described in the first aspect or any one of the embodiments of the first aspect.

According to a fifth aspect, an embodiment of the present invention further discloses an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the processor to cause the processor to perform a method for training a license plate recognition model according to the first aspect or any embodiment of the first aspect, or a method for recognizing a license plate according to the second aspect or any embodiment of the second aspect.

According to a sixth aspect, the present invention further discloses a computer-readable storage medium, on which computer instructions are stored, and the computer instructions, when executed by a processor, implement the method for training the license plate recognition model according to the first aspect or any embodiment of the first aspect, or the method for recognizing the license plate according to any embodiment of the second aspect or any embodiment of the second aspect.

The technical scheme of the invention has the following advantages:

1. according to the training method and device for the license plate recognition model, vehicle image training samples are obtained, wherein the vehicle image training samples comprise positive sample images with license plate images and negative sample images without license plate images; extracting a first target training characteristic according to the vehicle image training sample; training the first deep learning network model according to the first target training characteristics to obtain a license plate recognition model; segmenting a license plate image output by the license plate recognition model to obtain target training characters; extracting a second target training characteristic according to the target training character; and training the depth separable convolution neural network model according to the second target training characteristics to obtain the depth separable convolution license plate recognition model, so that the decoupling of the spatial information and the depth information can be realized, the network parameters are reduced, and the training accuracy is improved.

2. According to the license plate recognition method and device provided by the invention, the image of the vehicle to be recognized is obtained; carrying out license plate positioning recognition on a vehicle image to be recognized according to a license plate recognition model to obtain a target recognition license plate image; segmenting the target recognition license plate image to obtain target recognition characters; extracting target identification characteristics according to the target identification characters; identifying target identification characteristics according to the depth separable convolution license plate identification model to obtain a character identification result; and combining the character recognition results to obtain the license plate number of the license plate to be recognized, so that the parameter quantity of a network is reduced, and the vehicle recognition accuracy is improved.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.

Fig. 1 is a flowchart of a specific example of a training method of a license plate recognition model according to embodiment 1 of the present invention;

fig. 2 is a schematic block diagram of a specific example of the training apparatus for the license plate recognition model according to embodiment 1 of the present invention;

fig. 3 is a flowchart of a specific example of a license plate recognition method in embodiment 3 of the present invention;

fig. 4 is a functional block diagram of a specific example of the license plate recognition apparatus according to embodiment 4 of the present invention;

fig. 5 is a diagram of an embodiment of an electronic terminal in embodiments 5 and 6 of the present invention.

Detailed Description

The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

The terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.

In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种票据图像文字识别方法及装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!