License plate recognition method and system, server and medium based on deep learning
Through the license plate recognition method based on deep learning, combined with the convolutional neural network and the recurrent decoding network, the problems of low license plate recognition accuracy and insufficient robustness in the existing technology are solved, and the recognition of multiple types of license plates and poor quality images is achieved. efficient identification.
Patent Information
- Application Number
- CN202110971633.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-24
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-08-24
AI Technical Summary
Existing license plate recognition technology has low recognition accuracy in real scenes. It is especially not robust to multiple types of license plates and license plate images of poor quality, and is difficult to adapt to complex environmental conditions.
Using a license plate recognition method based on deep learning, by constructing an odd and double license plate classification network and a license plate information recognition network, combined with a convolutional neural network and a cyclic decoding network, it can realize the recognition of multiple types of license plates and the recognition of indefinite-length characters, improving Lu Great sex.
It improves the recognition ability of multiple types of license plates, enhances the robustness of recognition of poor-quality license plate images, and meets the needs of license plate recognition in real scenes.
Smart Images

Figure CN113850253B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, and in particular to a license plate recognition method and system, a server and a medium based on deep learning. Background Art
[0002] Nowadays, license plate recognition technology plays an important role in smart transportation, smart security, smart parking and other fields.
[0003] There are many types of existing license plates. According to the number of layers, there are single-layer and double-layer types; according to the color, there are yellow, blue, green, black, etc.; according to the character length, there are 7-character length, 8-character length, etc. Therefore, license plate recognition technology should have a certain robustness for various types of license plates. At the same time, in the access control system, since the camera height is similar to the license plate and the distance to the license plate is relatively close, a clear image can be obtained for recognition. However, in real scenes, most of the cameras are outdoors at a high height, which are easily disturbed by weather factors such as rain and fog, resulting in a relatively blurred license plate image. Therefore, license plate recognition technology should also have a certain robustness for license plate images of poor quality.
[0004] Existing license plate recognition technologies can be divided into traditional recognition technologies based on character segmentation and end-to-end recognition technologies based on deep neural networks. The traditional method first uses edge extraction technology to segment characters, and then sends the image features of individual characters to classifiers such as support vector machines for classification to obtain the overall license plate information. Its recognition accuracy is highly dependent on the effect of character segmentation, and its recognition robustness in real scenarios is not high.
[0005] In the process of research and practice of existing technologies, technicians have found that in license plate recognition tasks in real scenarios, license plate images are prone to poor quality and the coexistence of multiple types of license plates, so a more robust license plate recognition method is needed. Summary of the invention
[0006] The present invention proposes a license plate recognition method and system, server and medium based on deep learning to overcome the above technical deficiencies.
[0007] In order to achieve the above technical objectives, the technical solution of the present invention provides a license plate recognition method based on deep learning in the first aspect, which comprises the following steps:
[0008] Capturing license plate images from vehicle video information in real scenes, and annotating the license plate images to create a data set, the data set includes a training set and a test set;
[0009] The convolutional neural network is trained using the labeled training set to obtain a single-row and double-row license plate classification network;
[0010] Construct a codec deep neural network, and use the labeled training set to train the codec deep neural network to obtain a license plate information recognition network;
[0011] The trained single and double row license plate classification network and license plate information recognition network are connected in series to obtain the license plate deep recognition network, and the license plate deep recognition network is tested using the test set;
[0012] The trained license plate deep recognition network is used to identify the license plate image to be detected and obtain the recognition result of the license plate image.
[0013] A second aspect of the present invention provides a license plate recognition system based on deep learning, which includes the following functional modules:
[0014] A data acquisition module is used to capture license plate images from vehicle video information in real scenes, and to annotate the license plate images to create a data set, wherein the data set includes a training set and a test set;
[0015] The license plate classification module is used to train the convolutional neural network using the labeled training set to obtain a single-row and double-row license plate classification network;
[0016] The license plate information recognition module is used to build a codec deep neural network, and train the codec deep neural network using the labeled training set to obtain a license plate information recognition network;
[0017] The deep recognition module is used to connect the trained single-row and double-row license plate classification network and the license plate information recognition network in series to obtain a license plate deep recognition network, and use the test set to test the license plate deep recognition network;
[0018] The detection and recognition module is used to use the trained license plate deep recognition network to recognize the license plate image to be detected and obtain the recognition result of the license plate image.
[0019] The third aspect of the present invention provides a server, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned deep learning-based license plate recognition method when executing the computer program.
[0020] A fourth aspect of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the above-mentioned deep learning-based license plate recognition method.
[0021] Compared with the prior art, the present invention discloses a license plate recognition method and system, server and medium based on deep learning, which recognizes license plate images through a license plate deep recognition network obtained by combining a single-row and double-row license plate classification network and a license plate information recognition network, wherein the license plate information recognition network in the license plate deep recognition network is a deep neural network composed of a coding network and a decoding network, the coding network can encode two-dimensional image information into sequence information, the decoding network can convert the coding information into character information of the license plate, and use cyclic decoding to realize character recognition of license plates of variable length, thereby utilizing the characteristics of deep neural networks, not only being able to adapt to the recognition of various types of license plates in real scenes, but also having a certain recognition robustness for license plate images of poor quality, and being able to better meet the needs of license plate recognition in real scenes. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a flowchart of a license plate recognition method based on deep learning according to an embodiment of the present invention;
[0023] Figure 2 is a schematic diagram of the specific structure of the license plate information recognition network according to an embodiment of the present invention;
[0024] Figure 3 yes Figure 1 The step-by-step flowchart of step S5;
[0025] Figure 4 It is a module block diagram of a license plate recognition system based on deep learning described in an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0027] Based on the above content, the embodiment of the present invention provides a license plate recognition method based on deep learning, such as Figure 1 As shown, it includes the following steps:
[0028] S1. Capture license plate images from vehicle video information in real scenes, and annotate the license plate images to create a data set, wherein the data set includes a training set and a test set.
[0029] Specifically, vehicle video information is obtained from monitoring equipment in real scenes, and the license plate image is captured. The obtained license plate image data is enhanced by adding random noise and inclination to the license plate image to expand the capacity of the data set, thereby improving the robustness of the entire license plate recognition network, and then the data set is divided into a training set and a test set in a ratio of 3:1.
[0030] The obtained training set and test set are labeled, and the labeling information includes the classification information of single-line and double-line of each license plate image, as well as the number information of each license plate image; the labeling files are saved in txt format, and one line in the labeling file is the labeling information of a license plate image, which is stored in the form of picture path + space + (single-line and double-line, license plate number).
[0031] S2. Use the labeled training set to train the convolutional neural network to obtain the single and double license plate classification network.
[0032] The single-row and double-row license plate classification network includes two convolutional layers and a fully connected layer, and is finally connected to a Softmax layer for classification; the loss function of the single-row and double-row license plate classification network is a cross entropy loss function.
[0033] S3. Construct a codec deep neural network, and use the labeled training set to train the codec deep neural network to obtain a license plate information recognition network.
[0034] The license plate information recognition network includes an encoding network and a decoding network, which realizes the recognition of indefinite length license plate characters through a cyclic decoding structure. The encoding network uses a neural network to convert the two-dimensional information of the image into sequence information, where each element in the sequence is a high-dimensional vector, and the decoding network decodes the sequence information into character information, where the specific form of the character information is the index value of the character in the character dictionary. The specific structure of the license plate information recognition network is as follows: Figure 2 shown.
[0035] Specifically, the structure of the encoding network is a combination of a CNN convolutional network and a BiLSTM network, wherein the specific parameters of the CNN convolutional network are shown in Table 1:
[0036] Table 1 Detailed parameters of CNN convolutional network
[0037]
[0038] The structure of the decoding network is Transformer Decoder. Currently, the application of Transformer Decoder is limited to the field of speech recognition. The present invention applies it to the field of image information recognition, and can use its excellent sensitivity and robustness to improve the accuracy of image information recognition. The head parameter of the multi-head attention layer in the decoding network is set to 8, and the number of network layers is 6; and the loss function of the license plate information recognition network is the cross entropy loss function.
[0039] In addition, before using the labeled training set to train the encoder-decoder deep neural network, all license plate images need to be split into single-row images, that is, single-row license plates remain unchanged, and double-row license plates need to be split and spliced into single-row images.
[0040] S4. Connect the trained single-row and double-row license plate classification network and license plate information recognition network in series to obtain a license plate deep recognition network, and use the test set to test the license plate deep recognition network.
[0041] The order in which the single-row and double-row license plate classification network and the license plate information recognition network are connected in series is: the single-row and double-row license plate classification network is in front, used to first classify the single-row and double-row information of the license plate image, and the license plate information recognition network is in the back, used to recognize the license plate information in the classified license plate image.
[0042] S5. Use the trained license plate deep recognition network to recognize the license plate image to be detected, and obtain the recognition result of the license plate image.
[0043] like Figure 3 As shown, step S5 includes the following sub-steps:
[0044] S51, using a single-row and double-row license plate classification network to classify and identify the license plate image into single-row and double-row types;
[0045] S52, dividing all license plate images into single-row images, and sending the divided images into a CNN convolutional network for unified compression to obtain an image tensor;
[0046] S53, treating the generated image tensor as sequence information, sending the sequence information into the BiLSTM network to learn the context relationship of the sequence, and obtaining the final encoding information;
[0047] S54, input the set start identifier and the generated encoding information into the decoding network, and then connect the Linear layer and the Softmax layer to obtain the first recognized character;
[0048] S55, sending the recognized character and the generated coding information to the decoding network again to obtain the second recognized character, and repeating this cycle until the set termination character is output or the maximum number of cycles is reached, to obtain the license plate information recognition result.
[0049] The present invention discloses a method for license plate recognition based on deep learning, which recognizes license plate images through a license plate deep recognition network obtained by combining a single-row and double-row license plate classification network and a license plate information recognition network, wherein the license plate information recognition network in the license plate deep recognition network is a deep neural network composed of a coding network and a decoding network, the coding network can encode two-dimensional image information into sequence information, the decoding network can convert the coding information into character information of the license plate, and use a cyclic decoding method to realize character recognition of license plates of variable length, thereby utilizing the characteristics of deep neural networks, not only being able to adapt to the recognition of various types of license plates in real scenes, but also having a certain recognition robustness for license plate images of poor quality, and being able to better meet the needs of license plate recognition in real scenes.
[0050] like Figure 4 As shown, the embodiment of the present invention also provides a license plate recognition system based on deep learning, which includes the following functional modules:
[0051] The data acquisition module 10 is used to capture license plate images from vehicle video information in real scenes, and to annotate the license plate images to produce a data set, wherein the data set includes a training set and a test set;
[0052] The license plate classification module 20 is used to train the convolutional neural network using the labeled training set to obtain a single-row and double-row license plate classification network;
[0053] The license plate information recognition module 30 is used to construct a codec deep neural network, and train the codec deep neural network using a labeled training set to obtain a license plate information recognition network;
[0054] A deep recognition module 40 is used to connect the trained single-row and double-row license plate classification network and the license plate information recognition network in series to obtain a license plate deep recognition network, and to test the license plate deep recognition network using a test set;
[0055] The detection and recognition module 50 is used to use the trained license plate deep recognition network to recognize the license plate image to be detected and obtain the recognition result of the license plate image.
[0056] The execution method of the deep learning-based license plate recognition system in this embodiment is basically the same as the above-mentioned deep learning-based license plate recognition method, so it is not described in detail.
[0057] The server of this embodiment is a device that provides computing services, generally referring to a computer with high computing power that is provided to multiple consumers through a network. The server of this embodiment includes: a memory, a processor, and a system bus, wherein the memory includes executable programs stored thereon. It can be understood by those skilled in the art that the terminal device structure of this embodiment does not constitute a limitation on the terminal device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange components differently.
[0058] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing of the terminal by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the terminal (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0059] An executable program of a license plate recognition method based on deep learning is included in the memory, and the executable program can be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the information acquisition and implementation process. The one or more modules / units can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the server. For example, the computer program can be divided into a data acquisition module 10, a license plate classification module 20, a license plate information recognition module 30, a depth recognition module 40, and a detection and recognition module 50.
[0060] The processor is the control center of the server, which uses various interfaces and lines to connect various parts of the entire terminal device, and executes various functions of the terminal and processes data by running or executing software programs and / or modules stored in the memory, and calling data stored in the memory, so as to monitor the terminal as a whole. Optionally, the processor may include one or more processing units; preferably, the processor may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor.
[0061] The system bus is used to connect the various functional components inside the computer. It can transmit data information, address information, and control information. Its types can be, for example, PCI bus, ISA bus, VESA bus, etc. The processor's instructions are transmitted to the memory through the bus, and the memory feeds back data to the processor. The system bus is responsible for the data and instruction exchange between the processor and the memory. Of course, the system bus can also be connected to other devices, such as network interfaces, display devices, etc.
[0062] The server should at least include a CPU, a chipset, a memory, a disk system, etc., and other components will not be described in detail here.
[0063] In an embodiment of the present invention, the executable program executed by the processor included in the terminal is specifically: a license plate recognition method based on deep learning, which includes the following steps:
[0064] Capturing license plate images from vehicle video information in real scenes, and annotating the license plate images to create a data set, the data set includes a training set and a test set;
[0065] The convolutional neural network is trained using the labeled training set to obtain a single-row and double-row license plate classification network;
[0066] Construct a codec deep neural network, and use the labeled training set to train the codec deep neural network to obtain a license plate information recognition network;
[0067] The trained single and double row license plate classification network and license plate information recognition network are connected in series to obtain the license plate deep recognition network, and the license plate deep recognition network is tested using the test set;
[0068] The trained license plate deep recognition network is used to identify the license plate image to be detected and obtain the recognition result of the license plate image.
[0069] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0070] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A license plate recognition method based on deep learning, characterized in that: The steps include: Capturing license plate images from vehicle video information in real scenes, and annotating the license plate images to create a data set, the data set includes a training set and a test set; The convolutional neural network is trained using the labeled training set to obtain a single-row and double-row license plate classification network; Construct a codec deep neural network, and use the labeled training set to train the codec deep neural network to obtain a license plate information recognition network; The trained single and double row license plate classification network and license plate information recognition network are connected in series to obtain the license plate deep recognition network, and the license plate deep recognition network is tested using the test set; Use the trained license plate deep recognition network to recognize the license plate image to be detected and obtain the recognition result of the license plate image; The license plate information recognition network includes an encoding network and a decoding network, the structure of the encoding network is a combination of a CNN convolutional network and a BiLSTM network, and the structure of the decoding network is a Transformer Decoder; The license plate information recognition network is used to recognize the license plate image to be detected, which specifically includes the following contents: Use the single-row and double-row license plate classification network to classify and recognize single-row and double-row license plate images; All license plate images are divided into single-row images, and the divided images are sent to the CNN convolutional network for unified compression to obtain image tensors; The generated image tensor is regarded as sequence information, and the sequence information is sent to the BiLSTM network to learn the contextual relationship of the sequence to obtain the final encoding information; Input the set start identifier and the generated encoding information into the decoding network, and then connect the Linear layer and the Softmax layer to get the first character recognized; The recognized character and the generated encoding information are sent to the decoding network again to obtain the second recognized character, and the cycle is repeated until the set termination character is output to obtain the license plate information recognition result.
2. The license plate recognition method based on deep learning according to claim 1 is characterized in that: The annotation information includes the classification information of single-line and double-line of each license plate image, and the number information of each license plate image.
3. The license plate recognition method based on deep learning according to claim 1 is characterized in that: The single and double license plate classification network includes two convolutional layers and one fully connected layer, and is finally connected to a Softmax layer for classification.
4. The license plate recognition method based on deep learning according to claim 1 is characterized in that: Before using the labeled training set to train the encoder-decoder deep neural network, all license plate images need to be segmented into single-row images.
5. The license plate recognition method based on deep learning according to claim 1 is characterized in that: The head parameter of the multi-head attention layer in the decoding network is set to 8, and the number of network layers is 6.
6. A license plate recognition system based on deep learning, characterized in that: Includes the following functional modules: A data acquisition module is used to capture license plate images from vehicle video information in real scenes, and to annotate the license plate images to create a data set, wherein the data set includes a training set and a test set; The license plate classification module is used to train the convolutional neural network using the labeled training set to obtain a single-row and double-row license plate classification network; The license plate information recognition module is used to build a codec deep neural network, and train the codec deep neural network using the labeled training set to obtain a license plate information recognition network; The deep recognition module is used to connect the trained single-row and double-row license plate classification network and the license plate information recognition network in series to obtain a license plate deep recognition network, and use the test set to test the license plate deep recognition network; The detection and recognition module is used to use the trained license plate deep recognition network to recognize the license plate image to be detected and obtain the recognition result of the license plate image; The license plate information recognition network includes an encoding network and a decoding network, the structure of the encoding network is a combination of a CNN convolutional network and a BiLSTM network, and the structure of the decoding network is a Transformer Decoder; The license plate information recognition network is used to recognize the license plate image to be detected, which specifically includes the following contents: Use the single-row and double-row license plate classification network to classify and recognize single-row and double-row license plate images; All license plate images are divided into single-row images, and the divided images are sent to the CNN convolutional network for unified compression to obtain image tensors; The generated image tensor is regarded as sequence information, and the sequence information is sent to the BiLSTM network to learn the contextual relationship of the sequence to obtain the final encoding information; Input the set start identifier and the generated encoding information into the decoding network, and then connect the Linear layer and the Softmax layer to get the first character recognized; The recognized character and the generated encoding information are sent to the decoding network again to obtain the second recognized character, and the cycle is repeated until the set termination character is output to obtain the license plate information recognition result.
7. A server comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the deep learning-based license plate recognition method as described in any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the deep learning-based license plate recognition method as described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
License plate recognition method based on license plate classification and LSTM
CN110942071A
License plate recognition method and device and storage medium
CN112508018A
Text recognition method and device, equipment and medium
CN113283427A
