License plate generation method and device, and computer-readable storage medium

By performing position transformation and effect processing on standard license plates and real license plate images, simulated license plate images similar to real scenes are generated, which solves the problems of sparse license plate data and difficulty in labeling, and improves the diversity of license plate generation and the recognition accuracy of the detection model.

CN115082917BActive Publication Date: 2025-09-12BEIJING JINGDONG QIANSHITECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210827388.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-13
Publication Date
2025-09-12
Estimated Expiration
2042-07-13

AI Technical Summary

Technical Problem

The existing automatic license plate recognition system has sparse and unevenly distributed license plate data in real logistics scenarios, which makes data labeling time-consuming and labor-intensive, and the generated license plates are relatively simple and have poor labeling accuracy.

Method used

By obtaining standard license plate and real license plate images, cropping and expanding them, determining the position information transformation matrix, projecting the standard license plate to the real license plate position, performing multiple effect processing and category labeling, a simulated license plate image that is highly similar to the real scene is generated.

Benefits of technology

The diversity and representativeness of license plate generation are improved, the data labeling process is simplified, and the generated license plate images can better simulate real scenes, thereby improving the recognition accuracy of the license plate detection model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115082917B_ABST
    Figure CN115082917B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a license plate generation method and device, and a computer-readable storage medium. The method includes: obtaining standard license plate images and corresponding real license plate images corresponding to different types of license plates; performing cropping and expansion processing on the real license plate image corresponding to each type of license plate to obtain position information of the vertices of the real license plate corresponding to the different types of license plates; performing position information transformation operations based on the position information of the vertices of the standard license plate and the position information of the vertices of the real license plate to determine the position information transformation matrix corresponding to each type of license plate; projecting the standard license plate to the position of the real license plate through the position information transformation matrix to obtain first license plate images corresponding to different types of license plates; performing multiple effect processing on the first license plate image to obtain second license plate images corresponding to different types of license plates; and performing category labeling and position labeling on the second license plate image to obtain simulated license plate images corresponding to different types of license plates.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision, and in particular to a license plate generation method and device, and a computer-readable storage medium. Background Art

[0002] Currently, commonly used automatic license plate recognition systems are generally based on computer vision, using surveillance cameras to identify the location of license plates and the types of characters on them, typically through deep learning techniques. Training object detection models relies on large amounts of high-quality annotated data. However, in real-world logistics scenarios for license plate character recognition, license plate data exhibits significant sparsity and regional characteristics, making collecting real-world data extremely time-consuming and labor-intensive, and data distribution is extremely uneven across provinces. Object detection models must detect and recognize each character in a license plate. Most license plates have seven characters, while new energy vehicle license plates have eight. Therefore, the task of labeling training data is also arduous. Furthermore, manual capture of images of the license plate area is required before labeling the data, which is extremely time-consuming and labor-intensive. Current license plate generation models generate relatively simple license plates with poor labeling accuracy. Summary of the Invention

[0003] The embodiments of the present invention provide a license plate generation method and device, and a computer-readable storage medium, which can generate license plates that are highly similar to real scenes, thereby improving the diversity of generated license plates.

[0004] The technical solution of the present invention is achieved as follows:

[0005] An embodiment of the present invention provides a license plate generation method, which includes: obtaining standard license plate images and corresponding real license plate images corresponding to different types of license plates; the standard license plate images carry the position information of the vertices of the standard license plates; the real license plate images include multiple license plate images under different real scenes; cropping and expanding the real license plate images corresponding to each type of license plate to obtain the position information of the vertices of the real license plates corresponding to each type of license plate; determining the position information transformation matrix corresponding to each type of license plate by performing position information transformation operations on the position information of the vertices of the standard license plate corresponding to each type of license plate and the position information of the vertices of the corresponding real license plate; projecting the standard license plate to the position of the real license plate through the position information transformation matrix to obtain first license plate images corresponding to different types of license plates; performing multiple effect processing on the first license plate to obtain second license plate images corresponding to different types of license plates; and obtaining simulated license plate images corresponding to different types of license plates by class labeling and position labeling on the second license plate.

[0006] An embodiment of the present invention provides a license plate generation device, which includes a license plate generation module, a license plate region cropping module, a license plate projection module, an image enhancement module, and an automatic labeling module; wherein,

[0007] The license plate generation module is used to obtain standard license plate images and corresponding real license plate images corresponding to different types of license plates; the standard license plate images carry the position information of the vertices of the standard license plates; the real license plate images include multiple license plate images in different real scenes;

[0008] The license plate region cropping module is used to perform cropping and expansion processing on the real license plate image corresponding to each type of license plate, and obtain the position information of the vertices of the real license plates corresponding to the different types of license plates;

[0009] The license plate projection module is configured to determine a position information transformation matrix corresponding to each type of license plate by performing a position information transformation operation on the position information of the vertices of the standard license plate corresponding to each type of license plate and the position information of the vertices of the corresponding real license plate; project the standard license plate onto the position of the real license plate using the position information transformation matrix to obtain first license plate images corresponding to each type of license plate;

[0010] The image enhancement module is configured to obtain second license plate images corresponding to different types of license plates by performing various effects processing on the first license plate;

[0011] The automatic labeling module is used to obtain simulated license plate images corresponding to different types of license plates by labeling the second license plate by category and position.

[0012] An embodiment of the present invention provides a license plate generation device, comprising:

[0013] a memory for storing executable instructions;

[0014] The processor is used to execute the executable instructions stored in the memory. When the executable instructions are executed, the processor executes the license plate generation method.

[0015] An embodiment of the present invention provides a computer-readable storage medium, characterized in that executable instructions are stored therein. When the executable instructions are executed by one or more processors, the processors execute the license plate generation method.

[0016] An embodiment of the present invention provides a license plate generation method and device, and a computer-readable storage medium, wherein the method includes: obtaining standard license plate images and corresponding real license plate images corresponding to different types of license plates; the standard license plate images carry the position information of the vertices of the standard license plates; the real license plate images include multiple license plate images under different real scenes; the real license plate images corresponding to each type of license plate are cropped and expanded respectively to obtain the position information of the vertices of the real license plates corresponding to each type of license plate; by performing position information transformation operations on the position information of the vertices of the standard license plates corresponding to each type of license plate and the position information of the vertices of the corresponding real license plates, a position information transformation matrix corresponding to each type of license plate is determined; by using the position information transformation matrix, the standard license plate is projected to the position of the real license plate to obtain first license plate images corresponding to different types of license plates; by performing multiple effect processing on the first license plate images, second license plate images corresponding to different types of license plates are obtained; by performing category labeling and position labeling on the second license plate images, simulated license plate images corresponding to different types of license plates are obtained. In the above scheme, by projecting the standard license plate image onto the position of the real license plate in the real license plate image, a first license plate image that is highly similar to the real scene is generated. The generated first license plate image is diverse and representative. Then, the first license plate image is processed with multiple effects to obtain a second license plate image, and the second license plate image is labeled with categories and positions to generate a simulated license plate image, thereby improving the diversity of the generated license plates. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 An optional process diagram of a license plate generation method is provided for an embodiment of the present invention Figure 1 ;

[0018] Figure 2a An optional license plate type for a license plate generation method is provided in an embodiment of the present invention Figure 1 ;

[0019] Figure 2b FIG2 is an optional license plate type diagram of a license plate generation method provided in an embodiment of the present invention;

[0020] Figure 2c An optional license plate type for a license plate generation method is provided in an embodiment of the present invention Figure 3 ;

[0021] Figure 2d An optional license plate type for a license plate generation method is provided in an embodiment of the present invention Figure 4 ;

[0022] Figure 3 An optional flowchart diagram 2 of a license plate generation method is provided for an embodiment of the present invention;

[0023] Figure 4 An optional effect diagram of a license plate generation method provided by an embodiment of the present invention Figure 1 ;

[0024] Figure 5 An optional process diagram of a license plate generation method is provided for an embodiment of the present invention Figure 3 ;

[0025] Figure 6 A second schematic diagram of an optional effect of a license plate generation method is provided for an embodiment of the present invention;

[0026] Figure 7 An optional effect diagram of a license plate generation method provided by an embodiment of the present invention Figure 3 ;

[0027] Figure 8 An optional effect diagram of a license plate generation method provided by an embodiment of the present invention Figure 4 ;

[0028] Figure 9 An optional effect diagram of a license plate generation method provided by an embodiment of the present invention Figure 5 ;

[0029] Figure 10 An optional effect diagram of a license plate generation method provided by an embodiment of the present invention Figure 6 ;

[0030] Figure 11 An optional process diagram of a license plate generation method is provided for an embodiment of the present invention Figure 4 ;

[0031] Figure 12 A schematic diagram of a license plate generating device is provided for an embodiment of the present invention. Figure 1 ;

[0032] Figure 13 A second structural diagram of a license plate generating device is provided for an embodiment of the present invention. DETAILED DESCRIPTION

[0033] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.

[0034] In order to enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific implementation methods. Figure 1 This is an optional process diagram of a license plate generation method provided by an embodiment of the present invention. Figure 1 , will combine Figure 1 The steps shown are explained.

[0035] S101. Obtain standard license plate images and corresponding real license plate images corresponding to different types of license plates.

[0036] In some embodiments of the present invention, a standard license plate image carries the positional information of the standard license plate's vertices; a real license plate image includes multiple license plate images captured in different real-world scenarios; the standard license plate image complies with the provisions of the "Motor Vehicle License Plates of the People's Republic of China"; and a real license plate image is a license plate image captured in reality. This embodiment of the present invention primarily describes the process of generating a simulated license plate image from a single real license plate image in a single scenario; the process for generating multiple simulated license plate images is similar.

[0037] In some embodiments of the present invention, license plate types include blue plates, single-layer yellow plates, double-layer yellow plates, green plates and yellow-green plates for new energy vehicles.

[0038] In some embodiments of the present invention, the terminal may obtain standard license plate images corresponding to different types of license plates and real license plate images corresponding to different types of license plates.

[0039] In some embodiments of the present invention, generally, each type of license plate is marked with the positions of about 50-100 license plates in real scenes.

[0040] For example, Figure 2a It is a yellow-green license plate. Figure 2b It is a blue license plate. Figure 2c It is a double-layer yellow license plate. Figure 2d It is a green license plate.

[0041] S102 : performing cropping and expansion processing on the real license plate image corresponding to each type of license plate, respectively, to obtain position information of vertices of the real license plates corresponding to different types of license plates.

[0042] In some embodiments of the present invention, the terminal can crop the real license plate image corresponding to each type of license plate to obtain the local images corresponding to different types of license plates; expand the local images corresponding to different types of license plates to obtain target images corresponding to different types of license plates; and transform the second initial position information of the vertices in the target images corresponding to different types of license plates to obtain the position information of the vertices of the real license plates corresponding to different types of license plates.

[0043] In some embodiments of the present invention, Figure 3 An optional flow chart 2 of a license plate generation method is provided for an embodiment of the present invention, as shown in FIG. Figure 3 As shown, S102 can be implemented through S201-S203 as follows:

[0044] S201 : Crop the real license plate image corresponding to each type of license plate to obtain partial images corresponding to different types of license plates.

[0045] In some embodiments of the present invention, the partial image carries first initial position information of all points in the partial image; the first initial position information is determined based on the position of the partial image in the real license plate image.

[0046] In some embodiments of the present invention, the terminal can select a real license plate image corresponding to each type of license plate from multiple real license plate images, crop the image of its license plate area, and obtain local images corresponding to different types of license plates. The local images include main information such as the license plate number. Due to cropping, the outline of the license plate may be incomplete.

[0047] S202 : Expand the local images corresponding to the different types of license plates to obtain target images corresponding to the different types of license plates.

[0048] In some embodiments of the present invention, the target image carries second initial position information of all points in the target image; the second initial position information is determined based on the first initial position information.

[0049] In some embodiments of the present invention, the terminal can, based on the real license plate images corresponding to different types of license plates, connect the local images of different types of license plates by performing connection processing on the first initial position information corresponding to the vertices of the local images to obtain the minimum circumscribed rectangle images corresponding to different types of license plates; and obtain the target images corresponding to different types of license plates by expanding the minimum circumscribed rectangle images corresponding to different types of license plates according to a preset ratio; the target images not only include the main license plate information such as the license plate number, but also include the complete license plate outline.

[0050] In some embodiments of the present invention, S202 may be implemented through S2021 and S2022 as follows:

[0051] S2021. For the partial images of different types of license plates, a connection process is performed on the first initial position information corresponding to the vertices of the partial images to obtain the minimum circumscribed rectangle images corresponding to the different types of license plates.

[0052] In some embodiments of the present invention, the terminal can calculate the first initial position information corresponding to the vertices of the local image of each type of license plate, determine the vertex positions of the minimum enclosing rectangle, connect the vertex positions of the minimum enclosing rectangle, and obtain the minimum enclosing rectangle images corresponding to different types of license plates.

[0053] For example, Figure 4 As shown, the irregular quadrilateral represents a local image, and the rectangle containing point P is the minimum circumscribed rectangle. The length of the minimum circumscribed rectangle image is W and the width is H. The preset ratio is dim, so the position information of point P can be expressed as: P((dim-1)*W, (dim-1)*H).

[0054] S2022. Expand the minimum circumscribed rectangle images corresponding to the different types of license plates according to a preset ratio to obtain target images corresponding to the different types of license plates.

[0055] In some embodiments of the present invention, the terminal can expand a part of the surrounding area of ​​the minimum circumscribed rectangular image corresponding to each type of license plate according to a preset ratio to obtain the target image corresponding to each type of license plate; here, the preset ratio is different for different types of license plates.

[0056] For example, Figure 4 As shown, the largest rectangular frame is expanded to a certain area around it according to a certain ratio of the length and width of the smallest circumscribed rectangle to obtain the target image.

[0057] It is understandable that the local image may cause the license plate boundary to be incomplete due to cropping. Through expansion processing, the target image is obtained, which improves the integrity of the license plate image.

[0058] S203 , performing position information transformation processing on the second initial position information of the vertices in the target image corresponding to each of the different types of license plates, to obtain the position information of the vertices of the real license plates corresponding to each of the different types of license plates.

[0059] In some embodiments of the present invention, the terminal can initialize the second initial position information of the vertices in the target image corresponding to each of the different types of license plates, and determine the third initial position information of the vertices of the target image corresponding to each of the different types of license plates; by performing position information transformation processing on the third initial position information of the vertices of the target image corresponding to each of the different types of license plates according to a preset ratio, the position information of the vertices of the real license plates corresponding to each of the different types of license plates can be obtained.

[0060] It is understandable that the terminal crops and expands the real license plate image corresponding to each type of license plate respectively, obtains the position information of the vertices of the real license plates corresponding to different types of license plates, and improves the accuracy of the position information of the vertices of the real license plates.

[0061] In some embodiments of the present invention, Figure 5 An optional process diagram of a license plate generation method is provided for an embodiment of the present invention Figure 3 ,like Figure 5 As shown, S203 can be implemented through S2031 and S2032 as follows:

[0062] S2031 , for each target image corresponding to each license plate of a different type, initializing the second initial position information of the vertices in the target image, and determining the third initial position information of the vertices in the target image corresponding to each license plate of a different type.

[0063] In some embodiments of the present invention, the terminal can use the second initial position information corresponding to any vertex of the target image as the origin position information of the target image corresponding to each type of license plate; and determine the third initial position information corresponding to the remaining vertices of the target image corresponding to each type of license plate through the positional relationship between the origin position information and the vertex.

[0064] In some embodiments of the present invention, S2031 may be implemented through S20311 and S20312 as follows:

[0065] S20311. For target images corresponding to different types of license plates, use second initial position information corresponding to any vertex of the target image as origin position information of the target images corresponding to different types of license plates.

[0066] In some embodiments of the present invention, the terminal may use the second initial position information corresponding to any vertex of the target image as the origin position information of the target image corresponding to each type of license plate.

[0067] It should be noted that, if different vertices of the target image are selected, the origin position of the target image will be different; accordingly, the origin position information of the target image will be different.

[0068] S20312. Determine third initial position information corresponding to the remaining vertices of the target image corresponding to the different types of license plates based on the positional relationship between the origin position information and the vertices.

[0069] In some embodiments of the present invention, the terminal can calculate the third initial position information corresponding to the remaining vertices of the target images corresponding to different types of license plates based on the positional relationship between the vertices of the target images corresponding to different types of license plates through the origin position information, and determine the third initial position information corresponding to the remaining vertices of the target images corresponding to different types of license plates.

[0070] It can be understood that the terminal initializes the second initial position information of the vertices in the target image corresponding to each of the different types of license plates, and determines the third initial position information of the vertices of the target image corresponding to each of the different types of license plates, so as to facilitate the subsequent determination of the position information of the vertices of the real license plates corresponding to each of the different types of license plates.

[0071] S2032. Perform position information transformation processing on the third initial position information of the vertices of the target image corresponding to each of the different types of license plates according to a preset ratio to obtain the position information of the vertices of the real license plates corresponding to each of the different types of license plates.

[0072] In some embodiments of the present invention, the terminal can perform position information transformation processing on the third initial position information of the vertices of the target image corresponding to each type of license plate according to a preset ratio, and determine the fourth initial position information corresponding to the vertices of the minimum circumscribed rectangle image corresponding to each type of license plate; perform position information transformation processing based on the fourth initial position information corresponding to the vertices of the minimum circumscribed rectangle image corresponding to each type of license plate and the positional relationship between the vertices of the minimum circumscribed rectangle image and the vertices of the local image, and obtain the fifth initial position information corresponding to the vertices of the local image corresponding to each type of license plate; and use the fifth initial position information corresponding to the vertices of the local image as the position information of the vertices of the real license plate corresponding to each type of license plate.

[0073] In some embodiments of the present invention, S2032 may be implemented by S20321, S20322, and S20323 as follows:

[0074] S20321. Perform position information transformation processing on the third initial position information of the vertices of the target image corresponding to each of the different types of license plates using a preset ratio to determine the fourth initial position information corresponding to the vertices of the minimum circumscribed rectangle image corresponding to each of the different types of license plates.

[0075] In some embodiments of the present invention, the terminal can perform position information transformation processing on the third initial position information of the vertices of the target image corresponding to each type of license plate according to the corresponding preset ratios, and determine the fourth initial position information corresponding to the vertices of the minimum circumscribed rectangle image corresponding to each type of license plate.

[0076] S20322. Perform position information transformation processing based on the fourth initial position information corresponding to the vertices of the minimum circumscribed rectangular image corresponding to each of the different types of license plates and the positional relationship between the vertices of the minimum circumscribed rectangular image and the vertices of the local image to obtain the fifth initial position information corresponding to the vertices of the local image corresponding to each of the different types of license plates.

[0077] In some embodiments of the present invention, the terminal can perform position information transformation processing on the fourth initial position information corresponding to the vertices of the minimum circumscribed rectangular image corresponding to each of the different types of license plates based on the positional relationship between the vertices of the minimum circumscribed rectangular image and the vertices of the local image, and obtain the fifth initial position information corresponding to the vertices of the local image corresponding to each of the different types of license plates.

[0078] S20323. Use the fifth initial position information corresponding to the vertices of the partial image as the position information of the vertices of the real license plates corresponding to the different types of license plates.

[0079] In some embodiments of the present invention, the terminal may use the fifth initial position information corresponding to the vertices of the partial image as the position information of the vertices of the real license plates corresponding to different types of license plates.

[0080] It can be understood that the terminal can obtain the position information of the vertices of the real license plates corresponding to different types of license plates by performing position information transformation processing on the third initial position information of the vertices of the target images corresponding to different types of license plates according to a preset ratio, thereby improving the accuracy of the position information and facilitating subsequent projection processing.

[0081] S103. Determine the position information transformation matrix corresponding to each type of license plate by performing position information transformation operations on the position information of the vertices of the standard license plate corresponding to each type of license plate and the position information of the vertices of the corresponding real license plate; project the standard license plate to the position of the real license plate through the position information transformation matrix to obtain the first license plate images corresponding to each type of license plate.

[0082] In some embodiments of the present invention, the terminal can perform position information transformation operations on the position information of the vertices of the standard license plate corresponding to each type of license plate and the position information of the vertices of the corresponding real license plate to obtain a position information transformation matrix corresponding to each type of license plate; for the standard license plates corresponding to different types of license plates, the position information of all points of the standard license plate is multiplied by the position information transformation matrix corresponding to each type of license plate to obtain the position information corresponding to all points of each type of license plate in the real license plate; for different types of license plates, based on the position information corresponding to all points of the standard license plate and the position information corresponding to all points in the real license plate, the standard license plate is projected to the position of the real license plate to obtain the first license plate image corresponding to each type of license plate.

[0083] In some embodiments of the present invention, projecting the standard license plate to the position of the real license plate through the position information transformation matrix to obtain the first license plate images corresponding to different types of license plates can be achieved by S301 and S302 as follows:

[0084] S301. For standard license plates corresponding to different types of license plates, multiply the position information of all points of the standard license plates by the position information transformation matrix corresponding to each type of license plate to obtain the position information of all points corresponding to each type of license plate in the real license plate.

[0085] In some embodiments of the present invention, the terminal can multiply the position information of all points on the standard license plate corresponding to different types of license plates, and the position information transformation matrix corresponding to the standard license plate and the real license plate in different types of license plates to obtain the position information corresponding to all points of each type of license plate in the real license plate.

[0086] S302. For different types of license plates, based on the position information corresponding to all points of the standard license plate and the position information corresponding to all points in the real license plate, the standard license plate is projected to the position of the real license plate to obtain first license plate images corresponding to different types of license plates.

[0087] In some embodiments of the present invention, for each type of license plate, the terminal can project the position information corresponding to all points of the standard license plate to the corresponding position in the real license plate to obtain the first license plate image corresponding to each type of license plate.

[0088] For example, the first license plate images corresponding to different types of license plates are as follows: Figure 6 As shown, from left to right, the first license plate image and the second license plate image are blue license plates; the third license plate image is a green license plate; the fourth license plate image is a yellow-green license plate; and the fifth license plate image is a double-layer yellow license plate.

[0089] It can be understood that the terminal determines the position information transformation matrix corresponding to each type of license plate by performing position information transformation operations on the position information of the vertices of the standard license plate corresponding to each type of license plate and the position information of the vertices of the corresponding real license plate; through the position information transformation matrix, the standard license plate is projected to the position of the real license plate to obtain the first license plate images corresponding to different types of license plates. The generated first license plate images can simulate the images in real scenes and have certain representativeness and diversity.

[0090] S104 , performing various effect processing on the first license plate image to obtain second license plate images corresponding to different types of license plates.

[0091] In some embodiments of the present invention, the first license plate image is processed by at least one of brightness change, contrast change, motion blur, focus blur, Gaussian noise, and character expansion and corrosion to obtain second license plate images corresponding to different types of license plates.

[0092] For example, the second license plate images corresponding to the same type of license plates are as follows: Figure 7 As shown, the first row is the second license plate image of the blue license plate type; the second row is the second license plate image of the yellow-green license plate type; the third row is the second license plate image of the green license plate type; and the fourth row is the second license plate image of the double-layer yellow license plate type.

[0093] S105 , performing category labeling and position labeling on the second license plate image to obtain simulated license plate images corresponding to different types of license plates.

[0094] In some embodiments of the present invention, the terminal can use the category of the standard license plate corresponding to the second license plate image as the category of the second license plate image for the second license plate image corresponding to different types of license plates; multiply the position information of the vertex of each character in the standard license plate corresponding to different types of license plates by the position information change matrix corresponding to each type of license plate to determine the position information of the vertex of each character in the second license plate image corresponding to the different types of license plates; perform category labeling and position labeling according to the category of the second license plate image and the position information of the vertex of each character in the second license plate image to obtain simulated license plate images corresponding to different types of license plates.

[0095] It can be understood that the terminal generates a first license plate image that is highly similar to the real scene by projecting the standard license plate image onto the position of the real license plate in the real license plate image. The generated first license plate image is diverse and representative. The first license plate image is then processed with various effects to obtain a second license plate image, which is then labeled with categories and positions to generate a simulated license plate image with diversity.

[0096] In some embodiments of the present invention, S105 may be implemented by S1051, S1052, and S1053 as follows:

[0097] S1051. For second license plate images corresponding to different types of license plates, use the category of the standard license plate corresponding to the second license plate image as the category of the second license plate image.

[0098] In some embodiments of the present invention, for second license plate images corresponding to different types of license plates, the terminal uses the category corresponding to the standard image corresponding to the second license plate image as the category of the second license plate image.

[0099] S1052. Multiply the vertex position information of each character of the standard license plate corresponding to the different types of license plates by the position information change matrix corresponding to the different types of license plates to determine the vertex position information of each character in the second license plate image corresponding to the different types of license plates.

[0100] In some embodiments of the present invention, for different types of license plates, the terminal multiplies the vertex position information of each character on the standard license plate corresponding to each type of license plate by the corresponding position information change matrix to obtain the vertex position information of each character in the second license plate image corresponding to the different types of license plates.

[0101] S1053. Perform category labeling and position labeling according to the category of the second license plate image and the position information of the vertices of each character in the second license plate image to obtain simulated license plate images corresponding to different types of license plates.

[0102] In some embodiments of the present invention, the terminal can perform category labeling and position labeling according to the category of the second license plate image and the position information of the vertices of each character in the second license plate image to obtain simulated license plate images corresponding to different types of license plates.

[0103] For example, the simulated license plate images corresponding to different types of license plates are as follows: Figure 8 As shown, the rectangular boxes in all simulated license plate images are used for location marking. Here, the abbreviation of the province is represented by X, and 12345 or other combinations of numbers and letters are the license plate numbers.

[0104] It can be understood that by performing position and category labeling on the second license plate image to generate a simulated license plate image, it is convenient for subsequent training of the license plate detection model and can improve the recognition accuracy of the license plate detection model.

[0105] In some embodiments of the present invention, S106-S108 are further executed before S101 as follows:

[0106] S106. Obtain standard formats corresponding to various types of license plates.

[0107] In some embodiments of the present invention, the terminal may obtain standard formats corresponding to various types of license plates.

[0108] S107 . Generate corresponding initial standard license plate images according to the standard formats corresponding to various types of license plates.

[0109] In some embodiments of the present invention, the terminal may generate corresponding initial standard license plate images according to standard formats corresponding to various types of license plates.

[0110] S108 , obtaining a standard license plate image by adding the license plate number and performing dilation processing on the initial standard license plate image.

[0111] In some embodiments of the present invention, the terminal can add the license plate number to the initial standard license plate image to obtain a first standard license plate image. The terminal can then perform a dilation process on each character in the first standard license plate with a certain probability to obtain a standard license plate image. Furthermore, the terminal can also generate a license plate image containing only the province character.

[0112] It should be noted that dilation is the process of expanding the boundary points of a binary object, merging all background points in contact with the object into the object, and expanding the boundary outward; the standard license plate used to generate the simulated license plate image is generally the expanded standard license plate image.

[0113] For example, a license plate image containing only province characters is as follows Figure 9 As shown, the expanded standard license plate image is as follows Figure 10 shown.

[0114] It can be understood that by generating a standard license plate through different types of license plates and license plate numbers, and performing expansion processing on the standard license plate, the license plate image is closer to the real license plate image.

[0115] In some embodiments of the present invention, S109 and S1010 are further executed after S105, as follows:

[0116] S109: Use the simulated license plate image and the real license plate image as training sample images.

[0117] In some embodiments of the present invention, the terminal may use the generated simulated license plate image and the real license plate image collected in real life as training sample images.

[0118] S1010: Train the target detection model based on the training sample images.

[0119] In some embodiments of the present invention, the terminal may input a training sample image into a target detection model to train the target detection model.

[0120] It can be understood that by training the target detection model with simulated license plate images and real license plate images, the recognition accuracy of the target detection model can be improved.

[0121] An optional process diagram of a license plate generation method provided by an embodiment of the present invention Figure 4 ,like Figure 11 As shown, the terminal can obtain the license plate type and license plate number; in the license plate generation module, the corresponding license plate can be obtained according to the license plate type (equivalent to different types of license plates) and license plate number, and the characters are expanded with a certain probability to obtain a standard license plate image; in the license plate area cropping module, the real license plate image is cropped to obtain a partial image; based on the partial image, the minimum bounding rectangle image is determined; the area after the minimum bounding rectangle of the license plate (equivalent to the minimum bounding rectangle image) is expanded by a certain proportion (equivalent to a preset proportion) is cropped, and the cropped image (equivalent to the target image) is calculated. The method comprises the following steps: determining the position of the license plate in the target image); outputting a license plate area image (equivalent to a target image); in the license plate projection module, projecting the generated license plate (standard license plate image) to the position of the real license plate after feeding changes, and obtaining a first license plate image; in the image enhancement module, performing brightness and contrast changes, motion blur, focus blur and Gaussian noise processing on the first license plate image, and obtaining a second license plate image; in the automatic annotation module, using the change matrix of the projection module to calculate the position of each character on the image, performing position annotation, and obtaining a simulated license plate image; and outputting the simulated license plate image.

[0122] It can be understood that the terminal generates a first license plate image that is highly similar to the real scene by projecting the standard license plate image onto the position of the real license plate in the real license plate image. The generated first license plate image is diverse and representative. The first license plate image is then processed with various effects to obtain a second license plate image and its position is marked to generate a simulated license plate image with diversity.

[0123] Based on the license plate generation method of the above embodiment, the embodiment of the present invention also provides a license plate generation device, such as Figure 12 As shown, Figure 12 A schematic diagram of the structure of a license plate generating device provided by an embodiment of the present invention Figure 1 The device 12 includes: a license plate generation module 1201, a license plate region cropping module 1202, a license plate projection module 1203, an image enhancement module 1204 and an automatic labeling module 1205; wherein,

[0124] The license plate generation module 1201 is used to obtain standard license plate images and corresponding real license plate images corresponding to different types of license plates; the standard license plate images carry the position information of the vertices of the standard license plates; the real license plate images include multiple license plate images in different real scenes;

[0125] The license plate region cropping module 1202 is configured to perform cropping and expansion processing on the real license plate image corresponding to each type of license plate, and obtain position information of the vertices of the real license plates corresponding to the different types of license plates;

[0126] The license plate projection module 1203 is configured to determine a position information transformation matrix corresponding to each type of license plate by performing a position information transformation operation on the position information of the vertices of the standard license plate corresponding to each type of license plate and the position information of the vertices of the corresponding real license plate; project the standard license plate onto the position of the real license plate using the position information transformation matrix to obtain first license plate images corresponding to each type of license plate;

[0127] The image enhancement module 1204 is configured to obtain second license plate images corresponding to different types of license plates by performing various effects processing on the first license plate image;

[0128] The automatic labeling module 1205 is used to obtain simulated license plate images corresponding to different types of license plates by labeling the second license plate image with categories and positions.

[0129] In some embodiments of the present invention, the license plate area cropping module 1202 is also used to crop the real license plate image corresponding to each type of license plate to obtain local images corresponding to different types of license plates; the local image carries the first initial position information of all points in the local image; the first initial position information is determined by the local image based on the position of the real license plate image; the target image corresponding to different types of license plates is obtained by expanding the local image corresponding to each type of license plate; the target image carries the second initial position information of all points in the target image; the second initial position information is determined based on the first initial position information; the position information of the vertices of the real license plates corresponding to different types of license plates is obtained by performing position information transformation processing on the second initial position information of the vertices in the target image corresponding to each type of license plate.

[0130] In some embodiments of the present invention, the license plate area cropping module 1202 is also used to connect the local images of different types of license plates by performing connection processing on the first initial position information corresponding to the vertices of the local images to obtain the minimum circumscribed rectangular images corresponding to the different types of license plates; and to expand the minimum circumscribed rectangular images corresponding to the different types of license plates according to a preset ratio to obtain the target images corresponding to the different types of license plates.

[0131] In some embodiments of the present invention, the license plate area cropping module 1202 is also used to initialize the second initial position information of the vertices in the target image corresponding to each of the different types of license plates, and determine the third initial position information of the vertices of the target image corresponding to each of the different types of license plates; by performing position information transformation processing on the third initial position information of the vertices of the target image corresponding to each of the different types of license plates according to a preset ratio, the position information of the vertices of the real license plates corresponding to each of the different types of license plates is obtained.

[0132] In some embodiments of the present invention, the license plate area cropping module 1202 is also used to use the second initial position information corresponding to any vertex of the target image as the origin position information of the target image corresponding to each type of license plate; and determine the third initial position information corresponding to the remaining vertices of the target image corresponding to each type of license plate through the positional relationship between the origin position information and the vertex.

[0133] In some embodiments of the present invention, the license plate area cropping module 1202 is also used to perform position information transformation processing on the third initial position information of the vertices of the target image corresponding to each of the different types of license plates according to the preset ratio, and determine the fourth initial position information corresponding to the vertices of the minimum circumscribed rectangle image corresponding to each of the different types of license plates; perform position information transformation processing based on the fourth initial position information corresponding to the vertices of the minimum circumscribed rectangle image corresponding to each of the different types of license plates and the positional relationship between the vertices of the minimum circumscribed rectangle image and the vertices of the local image, and obtain the fifth initial position information corresponding to the vertices of the local image corresponding to each of the different types of license plates; and use the fifth initial position information corresponding to the vertices of the local image as the position information of the vertices of the real license plates corresponding to each of the different types of license plates.

[0134] In some embodiments of the present invention, the license plate projection module 1203 is also used to multiply the position information of all points of the standard license plate corresponding to different types of license plates by the position information transformation matrix corresponding to each type of license plate to obtain the position information corresponding to all points of each type of license plate in the real license plate; for different types of license plates, based on the position information corresponding to all points of the standard license plate and the position information corresponding to all points in the real license plate, the standard license plate is projected to the position of the real license plate to obtain the first license plate images corresponding to each type of license plate.

[0135] In some embodiments of the present invention, the image enhancement module 1204 is also used to perform at least one of brightness changes, contrast changes, motion blur, focus blur, Gaussian noise, and character expansion and corrosion on the first license plate to obtain the second license plate images corresponding to different types of license plates.

[0136] In some embodiments of the present invention, the automatic labeling module 1205 is also used to, for the second license plate images corresponding to different types of license plates, use the category of the standard license plate corresponding to the second license plate image as the category of the second license plate image; multiply the position information of the vertex of each character of the standard license plate corresponding to different types of license plates by the position information change matrix corresponding to each type of license plate to determine the position information of the vertex of each character in the second license plate image corresponding to different types of license plates; perform category labeling and position labeling according to the category of the second license plate image and the position information of the vertex of each character in the second license plate image to obtain the simulated license plate images corresponding to each type of license plate.

[0137] In some embodiments of the present invention, the license plate generation module 1201 is also used to obtain the standard formats corresponding to various types of license plates; generate corresponding initial standard license plate images based on the standard formats corresponding to the various types of license plates; and obtain the standard license plate image by adding the license plate number and performing expansion processing on the initial standard license plate image.

[0138] In some embodiments of the present invention, the license plate generation device also includes a training module 1206; the training module 1206 is used to obtain simulated license plate images corresponding to different types of license plates by labeling the second license plate by category and position, and then use the simulated license plate images and the real license plate images as training sample images; and train the target detection model based on the training sample images.

[0139] It should be noted that, when performing license plate generation, the division of the above-mentioned program modules is only used as an example to illustrate. In actual applications, the above-mentioned processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the above-described processing. In addition, the license plate generation device and the license plate generation method embodiment provided in the above embodiment are based on the same concept. The specific implementation process and beneficial effects are detailed in the method embodiment and will not be repeated here. For technical details not disclosed in the embodiment of this device, please refer to the description of the method embodiment of the present invention for understanding.

[0140] Based on the license plate generation method of the above embodiment, the embodiment of the present invention also provides a license plate generation device, such as Figure 13 As shown, Figure 13Schematic diagram 2 of the structure of a license plate recognition device provided in an embodiment of the present invention, the device 13 includes: a processor 1301 and a memory 1302; the memory 1302 stores one or more programs executable by the processor, and when one or more programs are executed, any one of the license plate generation methods in the embodiments described above is executed by the processor 1301.

[0141] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage and optical storage, etc.) containing computer-usable program code.

[0142] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0143] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0144] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0145] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention.

Claims

1. A license plate generation method, characterized in that: include: Obtain standard license plate images and corresponding real license plate images corresponding to different types of license plates; The standard license plate image carries the position information of the vertices of the standard license plate; The real license plate image includes multiple license plate images in different real scenes; Performing cropping and expansion processing on the real license plate image corresponding to each type of license plate to obtain position information of the vertices of the real license plates corresponding to the different types of license plates; Determine a position information transformation matrix corresponding to each type of license plate by performing a position information transformation operation on the position information of the vertices of the standard license plate corresponding to each type of license plate and the position information of the vertices of the corresponding real license plate; Projecting the standard license plate to the position of the real license plate through the position information transformation matrix to obtain first license plate images corresponding to different types of license plates; By performing various effects processing on the first license plate image, second license plate images corresponding to different types of license plates are obtained; By performing category labeling and position labeling on the second license plate image, simulated license plate images corresponding to different types of license plates are obtained; The real license plate image corresponding to each type of license plate is subjected to cropping and expansion processing respectively to obtain position information of vertices of the real license plates corresponding to the different types of license plates, including: Performing cropping on the real license plate image corresponding to each type of license plate to obtain partial images corresponding to different types of license plates; The partial image carries first initial position information of all points in the partial image; the first initial position information is determined based on the position of the partial image in the real license plate image; By performing expansion processing on the partial images corresponding to the different types of license plates, target images corresponding to the different types of license plates are obtained; the target images carry second initial position information of all points in the target images; the second initial position information is determined based on the first initial position information; By performing position information transformation processing on the second initial position information of the vertices in the target image corresponding to each of the different types of license plates, the position information of the vertices of the real license plates corresponding to each of the different types of license plates can be obtained.

2. The method according to claim 1, characterized in that The method of performing expansion processing on the partial images corresponding to the different types of license plates to obtain target images corresponding to the different types of license plates includes: For the partial images of different types of license plates, the first initial position information corresponding to the vertices of the partial images is connected to obtain the minimum circumscribed rectangle images corresponding to the different types of license plates; The target images corresponding to the different types of license plates are obtained by expanding the minimum circumscribed rectangle images corresponding to the different types of license plates according to a preset ratio.

3. The method according to claim 1, characterized in that The method of performing position information transformation on the second initial position information of the vertices in the target image corresponding to each of the different types of license plates to obtain the position information of the vertices of the real license plates corresponding to each of the different types of license plates includes: For each target image corresponding to each license plate of a different type, initializing the second initial position information of the vertices in the target image, and determining each third initial position information of the vertices in the target image corresponding to each license plate of a different type; The position information of the vertices of the real license plates corresponding to the different types of license plates is obtained by performing position information transformation processing on the third initial position information of the vertices of the target image corresponding to the different types of license plates according to a preset ratio.

4. The method according to claim 3, characterized in that Initializing the second initial position information of the vertices in the target image for each of the different types of license plates, and determining the third initial position information of the vertices in the target image for each of the different types of license plates, includes: For each target image corresponding to each license plate of a different type, the second initial position information corresponding to any vertex of the target image is used as the origin position information of each target image corresponding to each license plate of a different type; The third initial position information corresponding to the remaining vertices of the target image corresponding to different types of license plates is determined based on the positional relationship between the origin position information and the vertices.

5. The method according to claim 3, characterized in that The step of performing position information transformation processing on the third initial position information of the vertices of the target image corresponding to each of the different types of license plates according to a preset ratio to obtain the position information of the vertices of the real license plates corresponding to each of the different types of license plates includes: Performing position information transformation processing on the third initial position information of the vertices of the target image corresponding to each of the different types of license plates using the preset ratio to determine fourth initial position information corresponding to the vertices of the minimum circumscribed rectangle image corresponding to each of the different types of license plates; Performing position information transformation processing based on fourth initial position information corresponding to the vertices of the minimum circumscribed rectangle image corresponding to each of the different types of license plates and positional relationships between the vertices of the minimum circumscribed rectangle image and the vertices of the partial image to obtain fifth initial position information corresponding to the vertices of the partial image corresponding to each of the different types of license plates; The fifth initial position information corresponding to the vertices of the partial image is used as the position information of the vertices of the real license plates corresponding to different types of license plates.

6. The method according to any one of claims 1 to 5, characterized in that The standard license plate image carries the position information corresponding to all points of the standard license plate; The method of projecting the standard license plate to the position of the real license plate through the position information transformation matrix to obtain first license plate images corresponding to different types of license plates includes: For the standard license plates corresponding to different types of license plates, multiply the position information of all points of the standard license plates by the position information transformation matrix corresponding to each of the different types of license plates to obtain the position information of all points corresponding to each of the different types of license plates in the real license plates; For different types of license plates, the standard license plate is projected to the position of the real license plate based on the position information corresponding to all points of the standard license plate and the position information corresponding to all points in the real license plate to obtain the first license plate images corresponding to different types of license plates.

7. The method according to any one of claims 1 to 5, characterized in that The method of performing multiple effect processing on the first license plate image to obtain second license plate images corresponding to different types of license plates includes: The first license plate image is processed by at least one of brightness change, contrast change, motion blur, focus blur, Gaussian noise, and character expansion and corrosion to obtain the second license plate images corresponding to different types of license plates.

8. The method according to any one of claims 1 to 5, characterized in that The standard license plate image carries the position information of the vertices of each character of the standard license plate; The method of obtaining simulated license plate images corresponding to different types of license plates by performing category labeling and position labeling on the second license plate image includes: For the second license plate images corresponding to different types of license plates, the category of the standard license plate corresponding to the second license plate image is used as the category of the second license plate image; Multiplying the vertex position information of each character of the standard license plate corresponding to different types of license plates by the position information change matrix corresponding to each type of license plate to determine the vertex position information of each character in the second license plate image corresponding to different types of license plates; According to the category of the second license plate image and the position information of the vertices of each character in the second license plate image, category labeling and position labeling are performed to obtain the simulated license plate images corresponding to different types of license plates.

9. The method according to any one of claims 1 to 5, characterized in that Before obtaining the standard license plate images and the corresponding real license plate images corresponding to different types of license plates, the method further includes: Get the standard formats corresponding to various types of license plates; Generate corresponding initial standard license plate images according to the standard formats corresponding to the various types of license plates; The standard license plate image is obtained by adding the license plate number and performing expansion processing on the initial standard license plate image.

10. The method according to any one of claims 1 to 5, characterized in that After obtaining the simulated license plate images corresponding to different types of license plates by performing category and position labeling on the second license plate, the method further includes: Using the simulated license plate image and the real license plate image as training sample images; The target detection model is trained based on the training sample images.

11. A license plate generating device, characterized in that: It includes license plate generation module, license plate area cropping module, license plate projection module, image enhancement module and automatic labeling module; among them, The license plate generation module is used to obtain standard license plate images and corresponding real license plate images corresponding to different types of license plates; the standard license plate images carry the position information of the vertices of the standard license plates; the real license plate images include multiple license plate images in different real scenes; The license plate area cropping module is used to perform cropping and expansion processing on the real license plate image corresponding to each type of license plate, respectively, to obtain the position information of the vertices of the real license plates corresponding to different types of license plates; cropping the real license plate image corresponding to each type of license plate to obtain the local images corresponding to different types of license plates; the local images carry the first initial position information of all points in the local images; the first initial position information is determined by the local image based on the position of the real license plate image; by expanding the local images corresponding to different types of license plates, the target images corresponding to different types of license plates are obtained; the target images carry the second initial position information of all points in the target image; the second initial position information is determined based on the first initial position information; by performing position information transformation processing on the second initial position information of the vertices in the target images corresponding to different types of license plates, the position information of the vertices of the real license plates corresponding to different types of license plates are obtained; The license plate projection module is configured to determine a position information transformation matrix corresponding to each type of license plate by performing a position information transformation operation on the position information of the vertices of the standard license plate corresponding to each type of license plate and the position information of the vertices of the corresponding real license plate; project the standard license plate onto the position of the real license plate using the position information transformation matrix to obtain first license plate images corresponding to each type of license plate; The image enhancement module is configured to obtain second license plate images corresponding to different types of license plates by performing various effects processing on the first license plate; The automatic labeling module is used to obtain simulated license plate images corresponding to different types of license plates by labeling the second license plate by category and position.

12. A license plate generating device, characterized in that: include: a memory for storing executable instructions; The processor is configured to implement the license plate generation method according to any one of claims 1 to 10 when executing the executable instructions stored in the memory.

13. A computer-readable storage medium, characterized in that The storage medium stores executable instructions, which, when executed, cause the processor to execute the license plate generation method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • License plate character recognition method based on data enhancement and data generation

    CN111382743A

  • License plate sample generation method and device

    CN112101349A