License plate classification method, electronic device and storage medium

By generating character format auxiliary images of license plate images and combining them with classification network processing, the problem of low license plate classification accuracy is solved and more accurate license plate classification results are achieved.

CN112257764BActive Publication Date: 2024-09-27ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011104716.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-15
Publication Date
2024-09-27
Estimated Expiration
2040-10-15

AI Technical Summary

Technical Problem

The accuracy of existing license plate classification technology is not high enough, especially because the appearance of license plates in different countries and regions is similar, which affects the accuracy of the classification results.

Method used

By obtaining the license plate image and generating an auxiliary image representing the character format of the license plate image, the classification network is used to process the original license plate image and character format image, and classification is performed based on the external style and intrinsic format to improve the accuracy of the classification results.

Benefits of technology

By taking into account the character format in license plate images, the classification network is able to classify license plates more accurately, improving the accuracy of license plate classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112257764B
    Figure CN112257764B
Patent Text Reader

Abstract

The present application discloses a license plate classification method, electronic device and storage medium. The method comprises: obtaining a first license plate image; generating a second license plate image in a character format representing the first license plate image; processing the first license plate image and the second license plate image using a classification network to obtain a first license plate classification result corresponding to the first license plate image. By means of the above method, the accuracy of license plate classification can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing, and in particular to a license plate classification method, electronic equipment and storage medium. Background Art

[0002] License plate classification technology mainly classifies license plates according to certain characteristics of the license plate, such as the number of character layers, license plate color, and the region to which the license plate belongs. License plate classification technology can be used to know the type of license plate and then infer useful information about the vehicle corresponding to the license plate. Therefore, license plate classification technology is widely used in transportation, monitoring and other fields.

[0003] The current license plate classification technology is mainly divided into two categories, namely the license plate classification method based on traditional image processing methods and the license plate classification method based on deep learning. However, the accuracy of existing license plate classification is still not high enough. Summary of the invention

[0004] The present application provides a license plate classification method, electronic equipment and storage medium, which can solve the problem that the accuracy of existing license plate classification is not high enough.

[0005] In order to solve the above technical problems, a technical solution adopted by the present application is to provide a license plate classification method. The method includes: obtaining a first license plate image; generating a second license plate image in a character format representing the first license plate image; and processing the first license plate image and the second license plate image using a classification network to obtain a first license plate classification result corresponding to the first license plate image.

[0006] To solve the above technical problems, another technical solution adopted in the present application is: to provide an electronic device, which includes a processor and a memory connected to the processor, wherein the memory stores program instructions; the processor is used to execute the program instructions stored in the memory to implement the above method.

[0007] In order to solve the above technical problem, another technical solution adopted by the present application is: providing a storage medium storing program instructions, which can implement the above method when executed.

[0008] Through the above method, the present application takes into account the character format of the first license plate image when using the classification network to classify the first license plate image. Therefore, the classification network takes into account the character format of the license plate in the first license plate image when classifying the first license plate image, which can make the result of license plate classification more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 It is a flowchart of the first embodiment of the license plate classification method of the present application;

[0010] Figure 2It is Sweden's first license plate image diagram;

[0011] Figure 3 It is the first license plate image diagram in Estonia;

[0012] Figure 4 It is the first license plate image diagram in Belgium;

[0013] Figure 5 It is a flow chart of the second embodiment of the license plate classification method of the present application;

[0014] Figure 6 It is a flowchart of the third embodiment of the license plate classification method of the present application;

[0015] Figure 7 This application Figure 2 a corresponding schematic diagram of a second license plate image;

[0016] Figure 8 It is a flowchart of the fourth embodiment of the license plate classification method of the present application;

[0017] Fig. 9 It is a flowchart of the training method of the classification network of the present application;

[0018] Fig.10 It is a schematic diagram of the structure of the classification network of this application;

[0019] Fig.11 It is a structural schematic diagram of an embodiment of the electronic device of the present application;

[0020] Fig.12 It is a structural diagram of an embodiment of a storage medium of the present application. DETAILED DESCRIPTION

[0021] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0022] The terms "first", "second", and "third" in this application are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first", "second", and "third" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0023] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments without conflict.

[0024] Figure 1 is a flow chart of the first embodiment of the license plate classification method of the present application. It should be noted that if there are substantially the same results, this embodiment does not Figure 1 The process sequence shown is limited. Figure 1 As shown, this embodiment may include:

[0025] S11: Acquire a first license plate image.

[0026] The first license plate image can be obtained by an image acquisition device. The image acquisition device can be a camera or a device with a camera. The image acquisition device can be set on the vehicle or exist independently of the vehicle.

[0027] The scene image acquired by the image acquisition device (considered as an image containing a vehicle with a license plate) can be directly used as the first license plate image, or the area corresponding to the license plate in the scene image can be used as the first license plate image. The method of using the area corresponding to the license plate in the scene image as the first license plate image can make the subsequent processing of the first license plate image more effective.

[0028] Wherein, in the manner of using the area corresponding to the license plate in the scene image as the first license plate image, the scene image may be directly subjected to license plate detection to obtain the area corresponding to the license plate in the scene image. In order to improve the accuracy of the area corresponding to the license plate detected, the scene image may be first subjected to vehicle detection to obtain the area corresponding to the vehicle in the scene image, and then license plate detection may be performed on the basis of the area corresponding to the vehicle to obtain the area corresponding to the license plate in the scene image. For a specific description, please refer to the following embodiment description.

[0029] S12: Generate a second license plate image in a character format representing the first license plate image.

[0030] Considering that the external styles of the first license plate images of some countries or regions are very similar, the external styles referred to here may include the number of characters, the number of character layers and arrangement of the license plate, the color of the license plate, the region to which the license plate belongs, etc. The license plates of Sweden, Estonia and Belgium are used as examples for explanation. Figure 2 The first license plate image for Sweden. Figure 3 The first license plate image for Estonia, Figure 4The first license plate image for Belgium. Figure 2-4 It can be seen that the first license plate images of Sweden, Estonia and Belgium (especially the Swedish and Estonian license plates) have a high similarity in external style. In order to increase the accuracy of the first license plate classification result obtained by the classification network, a second license plate image representing the internal format (character format) of the first license plate image can be generated to assist the classification of the first license plate image of the classification network.

[0031] The character format of the first license plate image may include the character type to which each character in the first license plate image belongs. Therefore, the character format of the first license plate image may be used to reflect the regularity of the types of characters included in the first license plate image. In other embodiments, the character format of the first license plate image may also include the size, font, etc. of each character in the first license plate image.

[0032] The type of characters may include numbers and letters. Of course, the type of characters may also be other, depending on the actual situation.

[0033] To simplify the description, the following text of this application only describes the types of characters in character format, and the types of characters include numbers and letters.

[0034] S13: Process the first license plate image and the second license plate image using a classification network to obtain a first license plate classification result corresponding to the first license plate image.

[0035] The classification network can classify the first license plate image in combination with the second license plate image, that is, the classification network can classify the first license plate image in combination with the character format and external style in the first license plate image. In other words, the character format in the first license plate image plays an auxiliary role in the classification network's classification of the first license plate image.

[0036] The first license plate classification result may be the probability that the first license plate image belongs to each preset license plate category, and the license plate category corresponding to the maximum probability among the probabilities that the first license plate image belongs to each preset license plate category is the category corresponding to the first license plate image.

[0037] Through the implementation of this embodiment, the present application takes into account the character format of the first license plate image when using the classification network to classify the first license plate image. Therefore, when the classification network classifies the first license plate image, the character format of the license plate in the first license plate image is considered, which can make the result of the license plate classification more accurate.

[0038] Figure 5 is a flow chart of the second embodiment of the license plate classification method of the present application. It should be noted that if there are substantially the same results, this embodiment does not Figure 5 The process sequence shown is limited. This embodiment is a further extension of the above S11. Figure 5 As shown, this embodiment may include:

[0039] S111: Acquire a scene image.

[0040] The scene image is an image directly acquired by the image acquisition device. The scene image is an image containing a vehicle, and the vehicle contained in the scene is regarded as an image with a license plate in this application.

[0041] S112: Perform vehicle detection on the scene image to obtain a vehicle area in the scene image.

[0042] The position of the vehicle in the scene image can be located by a vehicle detection algorithm, and the position of the vehicle can be expressed as (center coordinates, width, height), or can be expressed as (upper left corner coordinates, lower left corner coordinates, lower right corner coordinates, upper right corner coordinates), etc. The vehicle position representation method here is only an example and is not intended to be limiting.

[0043] The area corresponding to the position of the vehicle in the scene image can be used as the vehicle area. The area corresponding to the position of the vehicle in the scene image can be directly used as the vehicle area; or the area corresponding to the position of the vehicle can be expanded first, and then the expanded area can be used as the vehicle area to reduce the deviation caused by inaccurate vehicle positioning.

[0044] S113: Perform license plate detection on the vehicle area to obtain a license plate area in the vehicle area.

[0045] The license plate in the vehicle area can be detected by a license plate detection algorithm to obtain the position of the license plate in the vehicle area. Similarly, the area corresponding to the position of the license plate in the vehicle area can be directly used as the license plate area; or the area corresponding to the position of the license plate can be expanded first, and then the expanded area is used as the license plate area to reduce the deviation caused by inaccurate license plate positioning.

[0046] S114: Extracting the license plate area from the scene image to obtain a first license plate image.

[0047] The license plate area in the scene image may be cut out as the first license plate image. In other implementations, the license plate area in the scene image may be marked, and then the marked scene image may be used as the first license plate image.

[0048] It should be noted that, when the marked scene image is used as the first license plate image, it means that the subsequent processing is performed on the marked area.

[0049] Figure 6 is a flow chart of the third embodiment of the license plate classification method of the present application. It should be noted that if there are substantially the same results, this embodiment does not Figure 6The process sequence shown is limited. This embodiment is a further extension of the above S12. Figure 6 As shown, this embodiment may include:

[0050] S121: Recognize characters in the first license plate image to obtain a character recognition result.

[0051] The character recognition result may include a character row in the first license plate image, where the character row includes each character in the license plate and the arrangement order of each character.

[0052] S122: Determine the character type of each character in the first license plate image using the character recognition result.

[0053] For example, if the character is 0 to 9, it is determined that the character type to which the character belongs is a number; if the character is A to Z, it is determined that the character type to which the character belongs is a letter.

[0054] S123: Determine, for each character, an identifier that matches the character type to which it belongs, and generate a second license plate image containing the identifier corresponding to each character.

[0055] Different character types match different identifiers.

[0056] In order to distinguish the types of different characters in the first license plate image, an identifier matching the character type to which each character in the character row belongs may be determined. Optionally, the identifier matching the number is the first identifier, and the identifier matching the letter is the second identifier.

[0057] According to a preset mapping rule, the character row can be mapped to a corresponding identification row, and the identification in the identification row corresponds to the characters in the character row one by one. The identification row can be used to reflect the regularity of the type of characters in the first license plate image. The specific mapping rule used can be as follows:

[0058]

[0059] Among them, ψ represents the set of characters other than [0,9] and [A,Z], x i represents the i-th character in the first license plate image, α represents the identifier that matches the character type [0,9], and β represents the identifier that matches the character type [A,Z] or ψ.

[0060] Among them, α and β can be set to patterns corresponding to characters that will not appear in the license plate. For example:

[0061] α→&

[0062] β→#

[0063] A single-channel canvas having the same size as the first license plate can be initialized, and a second license plate image including the identification line can be generated on the canvas. Figure 7 for Figure 2 Example of a second license plate image corresponding to the first license plate image in Sweden.

[0064] Figure 8 is a flowchart of the fourth embodiment of the license plate classification method of the present application. It should be noted that if there are substantially the same results, this embodiment does not Figure 8 The process sequence shown is limited. This embodiment is a further extension of the above S13. Figure 8 As shown, this embodiment may include:

[0065] S131: Using a classification network to extract features of the first license plate image and the second license plate image respectively.

[0066] The classification network may include a first convolutional layer and a second convolutional layer. The number of the first convolutional layer and the second convolutional layer is greater than or equal to 1, and the number of the first convolutional layer is equal to the number of the second convolutional layer. The first convolutional layer may be used to extract features of the first license plate image, and the second convolutional layer may be used to extract features of the second license plate image.

[0067] Among them, the number of convolution kernels of the first convolution layer is greater than the number of convolution kernels of the second convolution layer. When the number of the first / second convolution layer is greater than 1, the number of convolution kernels of the first convolution layer is greater than the number of convolution kernels of the second convolution layer, which means that the number of convolution kernels of the first convolution layer is greater than the number of convolution kernels of the corresponding second convolution layer. When the number of convolution kernels of the first convolution layer is greater than the number of convolution kernels of the second convolution layer, the number of features of the first vehicle image extracted can be greater than the number of features of the second vehicle image.

[0068] In a specific implementation, the number of convolution kernels of the first convolution layer may be the product of a preset factor and the number of convolution kernels of the second convolution layer, and the preset factor is greater than 1, for example, the preset factor may be 2. Specifically, it may be expressed as:

[0069] N o =k*N c

[0070] N o Represents the number of convolution kernels in the first convolution layer, N c Represents the number of convolution kernels in the second convolution layer, k Indicates the preset factor.

[0071] The preset factor is the ratio of the number of features of the first vehicle image extracted by the first convolution layer to the number of features of the second vehicle image extracted by the second convolution layer. The larger the preset factor is, the more features the first vehicle image has compared to the second vehicle image. In other words, the preset factor can be used to balance the attention of the subsequent classification network to the external style and internal character format of the first license plate image, so the preset factor can also be called an attention factor.

[0072] S132: Using a classification network, the features of the first license plate image and the second license plate image are fused to obtain fused features.

[0073] Since the number of features of the first license plate image is greater than the number of features of the second license plate image, the proportion of features of the first vehicle image in the fused features is greater than the proportion of features of the second vehicle image.

[0074] S133: Classify the fused features using a classification network to obtain a first license plate classification result.

[0075] Since the proportion of the features of the first vehicle image in the fused features is greater than that of the features of the second vehicle image, when the fused features are classified using the classification network, the features of the first vehicle image have a greater impact on the first license plate classification result than the features of the second vehicle image.

[0076] On the basis of the above embodiment, in order to further improve the accuracy of the first license plate classification result obtained by the classification result, the classification network can also be trained before using the classification network in S13. Fig. 9 Specifically, the classification network can be trained by the following steps:

[0077] S21: Obtain a training image set.

[0078] The training image set includes a plurality of third license plate images. The third license plate image may be obtained in the same manner as the first license plate image.

[0079] S22: Generate a fourth license plate image in a character format representing the third license plate image.

[0080] S23: Processing the third license plate image and the fourth license plate image using a classification network to obtain a second license plate classification result corresponding to the third license plate image.

[0081] S24: Adjusting parameters of the classification network based on the second license plate classification result.

[0082] The detailed description of this embodiment can be found in the previous embodiments, which will not be repeated here.

[0083] The following is a detailed description of the classification network processing process in the form of an example. Fig.10 As shown, the first convolutional layer 1 (Conv1 / Nc1), the first convolutional layer 2 (Conv2 / Nc2), the maximum pooling layer (Maxpooling), and the first convolutional layer 3 (Conv3 / Nc3) are used in sequence to process the first license plate image (containing the characters "ABD 507") to obtain the features of the first vehicle image; and the second convolutional layer 1 (Conv1 / No1), the second convolutional layer 2 (Conv2 / No2), the maximum pooling layer (Maxpooling), and the second convolutional layer 3 (Conv3 / No3) are used in sequence to process the second license plate image (containing the logo "###&&&") to obtain the features of the second vehicle image.

[0084] The features of the first vehicle image and the features of the second vehicle image are fused (Concat), and then the fused features are processed in sequence using the third convolutional layer (Conv4), the backbone network (Backbone), the fourth convolutional layer (Conv_final), and the average pooling layer (Average pooling) to obtain the final first license plate classification result (Prob).

[0085] Fig.11 Schematic diagram of the structure of an embodiment of the electronic device of the present application. Fig.11 As shown, the electronic device includes a processor 31 and a memory 32 coupled to the processor.

[0086] The memory 32 stores program instructions for implementing the method of any of the above embodiments; the processor 31 is used to execute the program instructions stored in the memory 32 to implement the steps of the above method embodiments. The processor 31 may also be called a CPU (Central Processing Unit). The processor 31 may be an integrated circuit chip with signal processing capabilities. The processor 31 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0087] Fig.12 Schematic diagram of the structure of an embodiment of the storage medium of the present application. Fig.12As shown, the computer-readable storage medium 40 of the embodiment of the present application stores program instructions 41, and the program instructions 41 are executed to implement the method provided in the above embodiment of the present application. Among them, the program instructions 41 can form a program file and be stored in the above computer-readable storage medium 40 in the form of a software product, so that a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) executes all or part of the steps of each implementation method of the present application. The aforementioned computer-readable storage medium 40 includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes, or terminal devices such as computers, servers, mobile phones, and tablets.

[0088] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0089] In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. The above is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the description and drawings of this application, or directly or indirectly used in other related technical fields, is also included in the patent protection scope of the present application.

Claims

1. A license plate classification method, characterized in that: include: Get the first license plate image; Generating a second license plate image representing the character format of the first license plate image; the second license plate image includes an identifier matching the character type to which each character in the first license plate image belongs; Using a classification network to extract features of the first license plate image and the second license plate image respectively; Using the classification network to fuse features of the first license plate image and the second license plate image to obtain fused features; The fusion features are classified using the classification network to obtain the first license plate classification result.

2. The method according to claim 1, characterized in that The character format of the first license plate image includes the character type to which each character in the first license plate image belongs.

3. The method according to claim 2, characterized in that The step of generating a second license plate image in a character format representing the first license plate image comprises: Recognizing characters in the first license plate image to obtain a character recognition result; The character recognition result is used to determine the character type to which each character in the first license plate image belongs; wherein different character types match different identifiers.

4. The method according to claim 3, characterized in that The character types include numbers and letters, the identifier matched by the numbers is the first identifier, and the identifier matched by the letters is the second identifier.

5. The method according to claim 1, characterized in that The classification network includes a first convolutional layer and a second convolutional layer, and the step of using the classification network to extract features of the first license plate image and the second license plate image respectively includes: The first convolution layer is used to extract features of the first license plate image, and the second convolution layer is used to extract features of the second license plate image, wherein the number of convolution kernels of the first convolution layer is greater than the number of convolution kernels of the second convolution layer.

6. The method according to claim 5, characterized in that The number of convolution kernels of the first convolution layer is the product of a preset factor and the number of convolution kernels of the second convolution layer, and the preset factor is greater than 1.

7. The method according to claim 1, characterized in that The step of obtaining the first license plate image comprises: Get scene image; Performing vehicle detection on the scene image to obtain a vehicle region in the scene image; Performing license plate detection on the vehicle area to obtain a license plate area in the vehicle area; The license plate area is extracted from the scene image to obtain the first license plate image.

8. The method according to claim 1, characterized in that Before the first license plate image and the second license plate image are processed by the classification network to obtain a first license plate classification result corresponding to the first license plate image, the following steps are included to train the classification network: Acquire a training image set, wherein the training image set includes a plurality of third license plate images; generating a fourth license plate image in a character format representing the third license plate image; Processing the third license plate image and the fourth license plate image using the classification network to obtain a second license plate classification result corresponding to the third license plate image; Adjust parameters of the classification network based on the second license plate classification result.

9. An electronic device, characterized in that: The method comprises a processor and a memory connected to the processor, wherein: The memory stores program instructions; The processor is configured to execute the program instructions stored in the memory to implement the method according to any one of claims 1 to 8.

10. A storage medium, characterized in that: The storage medium stores program instructions, and when the program instructions are executed, the method according to any one of claims 1 to 9 is implemented.