License plate recognition method and device based on AI, equipment and medium

By using AI -based methods in the license plate recognition system, first recognize the license plate type and then perform character recognition, solve the problem of low accuracy of special license plate recognition, and achieve higher identification accuracy and processing efficiency.

CN119380324APending Publication Date: 2025-01-28SAVABOON INTELLIGENT TECH(QINGDAO) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411462835.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-19
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The existing license plate detection and recognition technology cannot directly identify special license plates, resulting in low recognition accuracy.

Method used

Adopt AI -based license plate recognition methods, by identifying the license plate type, and then based on this type of character recognition and compliance verification, reduce the processing time of irrelevant information, focus on key information, and improve the accuracy of identification.

Benefits of technology

After identifying the type of license plate type, targeted identification characters have improved the accuracy of the identification of special license plates, filtering the results of error identification in time, and improving the processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119380324A_ABST
    Figure CN119380324A_ABST
Patent Text Reader

Abstract

The invention relates to the field of data processing, in particular to an AI-based license plate recognition method and device, equipment and a medium. According to the method, a step-by-step processing method is adopted, namely, the license plate type is identified firstly, and then character identification and compliance verification are carried out based on the type, so that the processing time of irrelevant information can be shortened, key information (namely the license plate type and characters) can be focused more quickly, and the accuracy of license plate identification is improved. And character recognition errors caused by vehicle type and region differences can be reduced. Due to the fact that the license plate formats, character types and arrangement modes of special license plates are often different, targeted character recognition is carried out after the license plate types are recognized, and the recognition accuracy can be greatly improved. Besides, character compliance verification is used as an intermediate step, so that wrong recognition results which do not accord with rules can be filtered out in time, unnecessary subsequent processing is avoided, and the processing efficiency is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to an AI-based license plate recognition method, device, equipment and medium. Background Art

[0002] License plate recognition refers to the technology that can detect vehicles on the monitored road and automatically extract the vehicle license plate information (including Chinese characters, English letters, Arabic numerals and license plate color) for processing. In scenes such as highway toll stations, parking lots, traffic checkpoints and electronic police, license plate recognition can realize functions such as automated vehicle management, traffic flow statistics, and automatic alarm for illegal vehicles, thereby improving traffic management efficiency.

[0003] With the increasingly stringent traffic management and the increasing demand for intelligence, the accurate detection and recognition of special license plates (such as new energy license plates, military and police license plates, personalized license plates, etc.) has become crucial. However, when facing special license plates, most special license plates cannot be directly recognized by the existing license plate detection and recognition technology. The license plate recognition system uses the license plate with the highest similarity to the special license plate as the recognized license plate number, resulting in a low accuracy rate of the recognized license plate number. Summary of the invention

[0004] In order to improve the accuracy of identifying special license plates, the present application provides an AI-based license plate recognition method, device, equipment and medium.

[0005] In the first aspect, the present application provides an AI-based license plate recognition method, which adopts the following technical solutions: A license plate recognition method based on AI, comprising: Receiving a first license plate image sent by an image acquisition device, wherein the first license plate image contains complete image information of a license plate to be identified; Recognize the first license plate image to determine the license plate type corresponding to the first license plate image; Recognizing character information on the first license plate image; Determining whether the character information meets the character requirements corresponding to the license plate type; If the character information meets the character requirements corresponding to the license plate type, the license plate number of the license plate to be identified is determined based on the character information.

[0006] By adopting the above technical solution and a step-by-step processing method, that is, by first identifying the license plate type and then performing character recognition and compliance verification based on the type, the processing time for irrelevant information can be reduced, and key information (i.e., license plate type and characters) can be focused more quickly, which helps to reduce character recognition errors caused by differences in vehicle models and regions. Because the license plate format, character types, and arrangements of special license plates are often different, identifying the license plate type and then performing targeted character recognition can greatly improve recognition accuracy. In addition, as an intermediate step, character compliance verification can promptly filter out erroneous recognition results that do not comply with the rules, avoid unnecessary subsequent processing, and further improve processing efficiency.

[0007] In a possible implementation, when the character information does not meet the character requirements corresponding to the license plate type, the method further includes: Generate an image acquisition instruction, and send the image acquisition instruction to the image acquisition device, wherein the image acquisition instruction is used to instruct the image acquisition device to move a certain shooting angle to perform image acquisition; Receiving a second license plate image sent by an image acquisition device, wherein the second license plate image contains complete image information of the license plate to be identified; Identify the spare character information corresponding to the second license plate image; Based on the character information and the backup character information, the license plate number of the license plate to be identified is determined.

[0008] By adopting the above technical solution, when the character information recognized for the first time does not meet the character requirements corresponding to the license plate type (such as containing illegal characters, missing characters, recognition errors, etc.), by generating and sending an image acquisition instruction to the image acquisition device, instructing it to adjust the shooting angle and re-capture the image, it can effectively avoid the initial recognition error caused by external factors such as poor shooting angle, poor lighting conditions or changes in vehicle position, thereby significantly improving the accuracy of license plate recognition. At the same time, by identifying the character information corresponding to the license plate images collected for the first time and the second time (i.e., the original character information and the backup character information), the two can be comprehensively compared and verified, further reducing the possible errors in a single recognition result. This double verification method makes the final license plate number more accurate and reliable.

[0009] In a possible implementation, the license plate type includes a general license plate and a special license plate, the general license plate includes at least one general sub-license plate, and the special license plate includes at least one special sub-license plate, and the identifying the first license plate image to determine the license plate type corresponding to the first license plate image includes: identifying a license plate color in the first license plate image; Based on the color of the license plate, determining whether the license plate type of the license plate to be identified is a general license plate; If the license plate type of the license plate to be identified is not a general license plate, determining a special sub-license plate in the special license plate corresponding to the color of the license plate; The license plate type corresponding to the first license plate image is determined based on the special sub-license plate.

[0010] By adopting the above technical solution, the solution can quickly classify license plates into two categories: general license plates and special license plates by first identifying the color of the license plate. The initial screening based on color helps to narrow the processing scope of the subsequent recognition algorithm, reduce unnecessary calculations, and help avoid misjudging special license plates as general license plates, thereby improving the overall recognition accuracy. For non-general license plates, the solution further determines the corresponding special license plate type (such as military vehicles, police cars, diplomatic vehicles, etc.) based on the license plate color, and identifies its special sub-license plate, thereby ensuring that the special license plate is correctly classified and processed, avoiding recognition errors due to the particularity of the special license plate, and further improving the recognition accuracy.

[0011] In a possible implementation, determining the license plate type corresponding to the first license plate image based on the special sub-license plate includes: Obtaining the character arrangement rule corresponding to the special sub-license plate; Recognize character information on the first license plate image to obtain a character sequence corresponding to the first license plate image; Determining whether the character sorting satisfies a character sorting rule; If the character sequence satisfies the character sequence rule, the special sub-license plate is determined to be the license plate type corresponding to the first license plate image.

[0012] By adopting the above technical solution, not only the initial screening condition of the license plate color is considered, but also the license plate type is confirmed by verifying the character arrangement rules. The dual verification mechanism (i.e., color classification and character arrangement rule verification) complements each other and together constitutes a more rigorous and accurate recognition process, further improving the accuracy of recognition. By obtaining the character arrangement rules corresponding to the special sub-license plate and comparing them with the character order on the first license plate image, it can ensure that the recognition of the license plate type is based on strict rule matching, effectively reducing recognition errors caused by incorrect character position or irregular arrangement, thereby improving the accuracy of license plate recognition.

[0013] In a possible implementation, the character information includes the number of characters and the attribute of each character, and determining whether the character information meets the character requirements corresponding to the license plate type includes: Obtain the number of characters corresponding to the license plate characters corresponding to the license plate type and the attributes corresponding to each character to obtain the character requirements corresponding to the license plate type; Determine whether the number corresponding to the character information is consistent with the number of characters corresponding to the license plate type; If the number of characters corresponding to the character information is consistent with the number of characters corresponding to the license plate type, the attributes of each character in the character information are compared with the attributes of the corresponding license plate characters in sequence in order to determine whether the character information meets the character requirements corresponding to the license plate type.

[0014] By adopting the above technical solution, by obtaining the complete character requirements corresponding to the license plate type, including the number of characters and the attributes of each character, it is possible to fully verify whether the character information meets these requirements. This comprehensive verification process avoids recognition errors caused by omitting or ignoring certain character requirements, and further improves the recognition accuracy. At the same time, not only whether the number of characters is consistent is considered, but also the attributes of each character are further compared in detail to ensure the accuracy of the character information, including character type (such as letters, numbers, special symbols, etc.), character position (such as province abbreviations, serial numbers, etc.), etc., thereby reducing recognition errors caused by mismatched character attributes. This high-precision comparison mechanism helps to improve the accuracy of license plate recognition.

[0015] In a possible implementation, recognizing character information on the first license plate image includes: Recognize each character on the first license plate image, and segment each character on the first license plate image to obtain separate character image information; Performing feature extraction on each individual character image information to obtain a feature vector of each individual character image information; Based on the feature vector of each of the individual character image information, the character corresponding to each of the individual character image information is determined to obtain the character information on the first license plate image.

[0016] By adopting the above technical scheme, by performing feature extraction on each individual character image information to obtain its feature vector, and using these feature vectors to determine the characters, each character on the first license plate image can be accurately segmented to obtain individual character image information. Feature extraction can capture the essential features of the character image, and feature matching uses these features to identify the characters. Fine segmentation can ensure the independence and integrity of each character image information, providing high-quality input data for subsequent feature extraction and character recognition. Accurate character segmentation helps to reduce interference between characters and improve the accuracy of character recognition.

[0017] In the second aspect, the present application provides an AI-based license plate recognition device, which adopts the following technical solution: A license plate recognition device based on AI, comprising: A first receiving module, used to receive a first license plate image sent by an image acquisition device, wherein the first license plate image contains complete image information of a license plate to be identified; A first recognition module, used to recognize the first license plate image to determine the license plate type corresponding to the first license plate image; A second recognition module, used for recognizing character information on the first license plate image; A requirement determination module, used to determine whether the character information meets the character requirements corresponding to the license plate type; The first determination module is used to determine the license plate number of the license plate to be identified based on the character information if the character information meets the character requirements corresponding to the license plate type.

[0018] In a third aspect, the present application provides an electronic device, which adopts the following technical solution: An electronic device, comprising: at least one processor; Memory; At least one application, wherein the at least one application is stored in a memory and configured to be executed by at least one processor, and the at least one application is configured to: execute the AI-based license plate recognition method described in the first aspect above.

[0019] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution: A computer-readable storage medium, comprising: storing a computer program that can be loaded by a processor and execute the AI-based license plate recognition method described in the first aspect above.

[0020] In summary, the present application includes the following beneficial technical effects: by adopting a step-by-step processing method, that is, by first identifying the license plate type, and then performing character recognition and compliance verification based on the type, the processing time for irrelevant information can be reduced, and key information (i.e., license plate type and characters) can be focused on more quickly, which helps to reduce character recognition errors caused by differences in vehicle models and regions. Because the license plate format, character type, and arrangement of special license plates are often different, identifying the license plate type and then performing targeted character recognition can greatly improve the accuracy of recognition. In addition, as an intermediate step, character compliance verification can promptly filter out erroneous recognition results that do not comply with the rules, avoid unnecessary subsequent processing, and further improve processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1It is a flowchart of an AI-based license plate recognition method provided in an embodiment of the present application; Figure 2 is a block diagram of an AI-based license plate recognition device provided in an embodiment of the present application; Figure 3 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0022] The following is combined with Figure 1 -Attached Figure 3 This application is described in further detail.

[0023] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are 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.

[0024] License plate recognition refers to the technology that can detect vehicles on the monitored road and automatically extract vehicle license plate information (including Chinese characters, English letters, Arabic numerals and license plate color) for processing. In scenes such as highway toll stations, parking lots, traffic checkpoints and electronic police, license plate recognition can realize functions such as automated vehicle management, traffic flow statistics, and automatic alarm of illegal vehicles, thereby improving traffic management efficiency. With the increasing stringency of traffic management and the increasing demand for intelligence, the accurate detection and recognition of special license plates (such as new energy license plates, military and police license plates, personalized license plates, etc.) has become crucial. However, when facing special license plates, most of the existing license plate detection and recognition technologies cannot be directly recognized. The license plate recognition system uses the license plate with the highest similarity to the special license plate as the recognized license plate number, resulting in a low accuracy rate of the recognized license plate number.

[0025] The present application embodiment provides a license plate recognition method based on AI, such as Figure 1 As shown, the method provided in the embodiment of the present application is performed by an electronic device, which can be a server or a terminal device, wherein the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal device can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., but is not limited thereto. The terminal device and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiment of the present application. The method includes steps S101 to S105, wherein: Step S101: receiving a first license plate image sent by an image acquisition device.

[0026] The first license plate image contains complete image information of the license plate to be identified.

[0027] When the image acquisition device recognizes a vehicle, it automatically captures a first license plate image and sends the first license plate image to an electronic device, which receives the first license plate image sent by the image acquisition device; or, the electronic device acquires the image sent by the image acquisition device in real time, and uses the image containing the complete license plate to be identified as the first license plate image.

[0028] Step S102: Identify the first license plate image to determine the license plate type corresponding to the first license plate image.

[0029] Among them, the license plate types may include common license plates and uncommon license plates. Common license plates are blue license plates or green license plates used on general vehicles, and uncommon license plates are license plates with specific meanings, uses or specific appearance characteristics. Uncommon license plates may include military and police license plates, foreign and diplomatic license plates, and special license plates, etc. Specifically, a license plate database is established based on the characteristics of each license plate type, and the license plate database includes the license plate color corresponding to each license plate type and the arrangement rules of the license plate characters.

[0030] After receiving the first license plate image sent by the image acquisition device, the received first license plate image is subjected to denoising to eliminate noise points in the image and improve image quality. Since the vehicle license plate may be affected by light, the received first license plate image may be converted from the RGB color space to a color space more suitable for color recognition, such as HSV or YCrCb, which are less sensitive to lighting changes and shadows and help to more accurately recognize colors.

[0031] Furthermore, in the converted color space, the license plate area is segmented according to a preset color threshold to identify the main color of the license plate. After the license plate color of the license plate to be identified is obtained, the license plate type of the license plate to be identified can be determined based on the license plate color corresponding to each license plate in the license plate database.

[0032] Step S103: Recognize character information on the first license plate image.

[0033] The character information includes characters and the position of each character, and the position of each character is the position of each character on the license plate to be identified.

[0034] Specifically, according to the character layout of the license plate (such as character spacing, height, etc.), the license plate image is segmented into separate character images, and each character image is recognized using OCR (optical character recognition) technology to obtain the character information on the first license plate image.

[0035] Step S104: Determine whether the character information meets the character requirements corresponding to the license plate type.

[0036] After obtaining the character information on the first license plate image, each character is compared with the character corresponding to the arrangement rule of the license plate characters corresponding to the license plate type in the license plate data according to the position of each character. That is, based on the position and arrangement rule of the characters, the regular character corresponding to the arrangement rule corresponding to each character is determined, and each character is compared with the corresponding regular character to determine whether the recognized character information meets the character requirements corresponding to the license plate type.

[0037] Further, if each character is consistent with the category of the corresponding regular character, it is determined that the character information of the license plate to be identified meets the character requirements corresponding to the license plate type; if there is a character that is inconsistent with the category of the corresponding regular character, it is determined that the character information of the license plate to be identified does not meet the character requirements corresponding to the license plate type. The category of the regular character is a text category or a number category.

[0038] Step S105: If the character information meets the character requirements corresponding to the license plate type, determine the license plate number of the license plate to be identified based on the character information.

[0039] If the character information of the license plate to be identified meets the character requirements corresponding to the license plate type, the identified character information is used as the license plate number of the license plate to be identified.

[0040] Furthermore, if the character information of the license plate to be recognized obtained by character recognition does not meet the character requirements corresponding to the license plate type, an error alarm is generated.

[0041] The embodiment of the present application provides an AI-based license plate recognition method. By adopting a step-by-step processing method, that is, by first identifying the license plate type, and then performing character recognition and compliance verification based on the type, the processing time for irrelevant information can be reduced, and key information (i.e., license plate type and characters) can be focused more quickly, which helps to reduce character recognition errors caused by differences in vehicle models and regions. Because the license plate format, character type and arrangement of special license plates are often different, targeted character recognition after identifying the license plate type can greatly improve the accuracy of recognition. In addition, as an intermediate step, character compliance verification can promptly filter out erroneous recognition results that do not comply with the rules, avoid unnecessary subsequent processing, and further improve processing efficiency.

[0042] In a possible implementation of the embodiment of the present application, in the above step S102, identifying the first license plate image to determine the license plate type corresponding to the first license plate image may specifically include: identifying a license plate color in the first license plate image; Based on the color of the license plate, determining whether the license plate type of the license plate to be identified is a general license plate; If the license plate type of the license plate to be identified is not a general license plate, determining a special sub-license plate in a special license plate corresponding to the license plate color; The license plate type corresponding to the first license plate image is determined based on the special sub-license plate.

[0043] Among them, the license plate types include general license plates and special license plates. General license plates include at least one general sub-license plate, and special license plates include at least one special sub-license plate. Exemplarily, the license plate corresponding to a conventional oil-powered motor vehicle is a general sub-license plate, the license plate corresponding to a conventional hybrid motor vehicle is a general sub-license plate, the license plate corresponding to an electric motor vehicle is a general sub-license plate, the license plate corresponding to a military and police license plate is a special sub-license plate, the license plate corresponding to a foreign-funded and diplomatic license plate is a special sub-license plate, and the license plate corresponding to a special license plate is a special sub-license plate. Based on the license plate color corresponding to each general sub-license plate, a general license plate color set corresponding to the general license plate is obtained, and based on the license plate color corresponding to each special sub-license plate, a special license plate color set corresponding to the special license plate is obtained.

[0044] Specifically, the received first license plate image is converted from the RGB color space to a color space more suitable for color recognition, and in the converted color space, the license plate area is segmented according to a preset color threshold to identify the main color of the license plate. The color threshold may be a common license plate color (such as blue, yellow, white, black, etc.).

[0045] Furthermore, the identified license plate color is compared with the predefined general license plate color range. If the license plate color belongs to the general license plate color range (such as the common blue or green used for private cars), the license plate is initially judged to be a general license plate; if the license plate color does not belong to the general license plate color range, it is further checked whether the color corresponds to the color of any special license plate. Among them, the color of special license plates may vary depending on the region or purpose, such as military vehicles, police cars, diplomatic vehicles, etc. usually use specific colors.

[0046] Furthermore, if the license plate is determined to be a special license plate, the corresponding special sub-license plate type is searched according to the license plate color, and the special sub-license plate type is determined as the license plate type corresponding to the first license plate image; if the license plate is determined to be a general license plate, the corresponding general sub-license plate type is searched according to the license plate color, and the general sub-license plate type is determined as the license plate type corresponding to the first license plate image.

[0047] Furthermore, if the license plate color of the license plate to be identified in the first license plate image corresponds to multiple sub-license plate types, the multiple sub-license plate types are all used as the license plate type corresponding to the first license plate image.

[0048] A possible implementation of the embodiment of the present application, in the above embodiment, determining the license plate type corresponding to the first license plate image based on the special sub-license plate includes: Get the character arrangement rules corresponding to the special sub-license plate; Recognize character information on the first license plate image to obtain a character sequence corresponding to the first license plate image; Determine whether the character sorting satisfies the character sorting rules; If the character sequence satisfies the character sequence rule, the special sub-license plate is determined to be the license plate type corresponding to the first license plate image.

[0049] The license plate database includes various special sub-license plates and their corresponding character arrangement rules. The character arrangement rules include the number, type (such as letters, numbers, special symbols), position and relative order of characters in the special sub-license plates. Specifically, when the license plate type corresponding to the first license plate image is a special sub-license plate, the corresponding character arrangement rule is queried from the license plate database according to the identified special sub-license plate type.

[0050] Use image processing techniques (such as edge detection, morphological operations, etc.) to segment the characters in the license plate image into separate parts, recognize each segmented character image, and usually use OCR (optical character recognition) technology to convert it into readable text characters. Character sorting: According to the position of the characters on the license plate, sort the recognized characters from left to right (depending on the layout of the license plate) to obtain the character sorting corresponding to the first license plate image.

[0051] Furthermore, the obtained character order is compared with the character arrangement rule of the special sub-license plate queried from the database, including checking whether the number, type, position and relative order of the characters are consistent with the rule. If the character order meets the character order rule, it can be determined that the license plate type corresponding to the first license plate image is the special sub-license plate type.

[0052] A possible implementation of the embodiment of the present application, in the above embodiment, when the character information includes the number of characters and the attributes of each character, determining whether the character information meets the character requirements corresponding to the license plate type may specifically include: Obtain the number of characters corresponding to the license plate characters corresponding to the license plate type and the attributes corresponding to each character to obtain the character requirements corresponding to the license plate type; Determine whether the number of characters corresponding to the character information is consistent with the number of characters corresponding to the license plate type; If the number of characters corresponding to the character information is the same as the number of characters corresponding to the license plate type, then, in the order of the characters, the attributes of each character in the character information are compared with the attributes of the corresponding license plate characters one by one to determine whether the character information meets the character requirements corresponding to the license plate type.

[0053] Among them, the attributes of the characters include letters, numbers, special symbols, etc.

[0054] Specifically, obtain the number of license plate characters corresponding to the license plate type and the attributes of each character (such as letters, numbers, special symbols) from the license plate data, so as to obtain the character quantity requirements corresponding to the license plate type and the character attribute requirements corresponding to each character. Determine the character quantity requirements and the character attribute requirements corresponding to each character as the character requirements corresponding to the license plate type.

[0055] Furthermore, obtain the corresponding license plate character quantity requirements from the requirements of the license plate type, and compare this number of characters with the number of characters in the recognized character information. If the numbers are inconsistent, it is directly determined that the character information does not meet the character requirements of this license plate type, and the process ends. If the number of characters is the same, then the character attributes are compared. Further, traverse each character in the input character information. For each character, obtain the character attribute requirements for the corresponding position from the requirements of the license plate type according to its position. Compare whether the attributes of the current character (such as type, whether it is allowed to be a letter, whether it is allowed to be a number, etc.) are consistent with the requirements. If the attributes of any one character do not meet the requirements, it is determined that the character information does not meet the character requirements of this license plate type, and the process ends. If the attributes of all characters meet the requirements, it is determined that the character information meets the character requirements of this license plate type. Exemplarily, assume that there is a license plate type of "general sub-license plate", and its requirements are "province abbreviation (1 digit) + letter (1 digit) + 5 digits". The character information recognized from the first license plate image is: "Jing A12345". First, check the number of characters, which should be 7, and it is the same as the requirement. Then compare in order: the first character "Jing" is a province abbreviation, which meets the requirements; the second character "A" is a letter, which meets the requirements; the next five characters "12345" are all numbers, which meet the requirements; therefore, it is determined that the input character information "Jing A12345" meets the character requirements of the "small car" license plate type.

[0056] In a possible implementation manner of the embodiments of the present application, in the above embodiment, recognizing the character information on the first license plate image may specifically include: Recognize each character on the first license plate image, and segment each character on the first license plate image to obtain separate character image information; Extract features from each separate character image information to obtain the feature vector of each separate character image information; Based on the feature vector of each individual character image information, the character corresponding to each individual character image information is determined to obtain the character information on the first license plate image.

[0057] Specifically, after determining the license plate type corresponding to the first license plate image, the first license plate image can be converted from a color (such as RGB) image to a grayscale image to simplify subsequent processing. Specifically, by setting a suitable threshold, the grayscale image is converted into a binary image (black and white image) so that the license plate characters are in sharp contrast with the background. Morphological operations (such as corrosion, expansion, opening operation, and closing operation) are used to remove noise and interference elements in the image. Edge detection algorithms (such as Canny edge detection) are used to highlight the edges of license plate characters, which is helpful for subsequent character segmentation.

[0058] Further, on the first license plate image after binarization, projection analysis is performed in the horizontal direction and the vertical direction to find the intervals between characters. The characters on the license plate are segmented into separate character images using a connected region labeling algorithm (such as an algorithm based on depth-first search or breadth-first search). The segmented character images are adjusted to a uniform size and position.

[0059] Furthermore, according to the characteristics of the character image, a feature extraction method is used to extract features from individual character image information, and the feature vector is calculated for each individual character image information. The feature vector is a numerical array that contains the key feature information of the character image. A large number of known character images and their corresponding character labels are used to train a classifier (such as a support vector machine, a neural network, a decision tree, etc.). The feature vector of each individual character image information is input into the trained classifier, and the classifier will output one or more possible character labels. Post-processing is performed based on the output of the classifier and the contextual information of the license plate characters (such as character positions, logical relationships between characters, etc.) to determine the final character information.

[0060] All recognized characters are sorted according to their original order on the license plate to obtain complete character information on the first license plate image.

[0061] In a possible implementation of the embodiment of the present application, after step S105, when the character information does not meet the character requirements corresponding to the license plate type, the method may further include: Generate an image acquisition instruction and send the image acquisition instruction to the image acquisition device, the image acquisition instruction is used to instruct the image acquisition device to move a certain shooting angle to perform image acquisition; Receiving a second license plate image sent by the image acquisition device, the second license plate image containing complete license plate image information to be identified; Identify the spare character information corresponding to the second license plate image; Based on the character information and the backup character information, the license plate number of the license plate to be recognized is determined.

[0062] Specifically, the character information obtained by recognition is input into the trained model to obtain the reason label output by the model, wherein the reason label can be fuzzy characters, missing characters or recognition errors. The model is trained with a large number of character information samples and reason label samples.

[0063] When the reason label is that the characters are blurred or some characters are missing, adjust the shooting angle of the image acquisition device so that the image acquisition device re-captures the image of the license plate to be identified. Specifically, according to the adjustment strategy, generate an image acquisition instruction, and send the image acquisition instruction to the image acquisition device, instructing it to adjust the shooting parameters according to the instruction and re-capture the image. Among them, the image acquisition instruction includes the adjustment amount of the shooting angle (such as rotating 10 degrees to the left). More specifically, obtain the position of the characters corresponding to the blurred characters or missing characters on the license plate to be identified, and based on the position The straight lines in the first license plate image are detected by methods such as Hough transform. These straight lines usually represent the edges or separators of the license plate characters. These straight lines are analyzed to calculate the tilt angle of the license plate. Specifically, the tilt angle of the license plate is obtained by finding the average direction of a set of main straight lines and calculating the angle between them and the horizontal line. Model training: A model is trained using a labeled data sample set. The goal of the model is to predict the tilt angle based on the input license plate image. The new license plate image to be analyzed is input into the trained model to obtain the predicted tilt angle of the model output license plate. Based on the predicted tilt angle, the shooting angle that needs to be adjusted (i.e., the opposite of the rotation angle) is calculated.

[0064] Further, when the second license plate image is received, the second license plate image is subjected to the same preprocessing steps as the first license plate image, including grayscale, binarization, denoising, edge detection, etc. The preprocessed image is subjected to character segmentation to obtain separate character image information. Feature extraction is performed on each separate character image information, and the same classifier or recognition algorithm is used to determine each character. The recognized characters are sorted according to the original order on the license plate to obtain the spare character information of the second license plate image.

[0065] Furthermore, the character information of the first license plate image is compared with the spare character information of the second license plate image. If some characters in the spare character information are inconsistent with the original character information but are more consistent with the character requirements of the license plate type, these characters in the spare character information are used to correct the errors in the original character information. The valid parts of the original character information and the spare character information are combined to determine the final license plate number of the license plate to be identified.

[0066] The above embodiment introduces an AI-based license plate recognition method from the perspective of method flow, and the following embodiment introduces an AI-based license plate recognition device from the perspective of a virtual module or a virtual unit. For details, please refer to the following embodiment.

[0067] See also Figure 2 The AI-based license plate recognition device 20 may specifically include: a first receiving module 201, a first recognition module 202, a second recognition module 203, a requirement determination module 204 and a first determination module 205. Specifically: An AI-based license plate recognition device 20, comprising: The first receiving module 201 is used to receive a first license plate image sent by an image acquisition device, where the first license plate image contains complete image information of the license plate to be identified; A first recognition module 202, used to recognize the first license plate image to determine the license plate type corresponding to the first license plate image; The second recognition module 203 is used to recognize character information on the first license plate image; A requirement determination module 204 is used to determine whether the character information meets the character requirements corresponding to the license plate type; The first determination module 205 is configured to determine the license plate number of the to-be-identified license plate based on the character information if the character information meets the character requirements corresponding to the license plate type.

[0068] In a possible implementation of the embodiment of the present application, when the character information does not meet the character requirements corresponding to the license plate type, the AI-based license plate recognition device 20 may further include: A generating module, used for generating an image acquisition instruction and sending the image acquisition instruction to an image acquisition device, wherein the image acquisition instruction is used for instructing the image acquisition device to move to a certain shooting angle to perform image acquisition; A second receiving module is used to receive a second license plate image sent by the image acquisition device, where the second license plate image contains complete license plate image information to be identified; A third recognition module, used for recognizing the spare character information corresponding to the second license plate image; The second determination module is used to determine the license plate number of the license plate to be identified based on the character information and the spare character information.

[0069] In a possible implementation of the embodiment of the present application, the license plate type includes a general license plate and a special license plate, the general license plate includes at least one general sub-license plate, and the special license plate includes at least one special sub-license plate. When the first recognition module 202 recognizes the first license plate image to determine the license plate type corresponding to the first license plate image, it is specifically used to: identifying a license plate color in the first license plate image; Based on the color of the license plate, determining whether the license plate type of the license plate to be identified is a general license plate; If the license plate type of the license plate to be identified is not a general license plate, determining a special sub-license plate in a special license plate corresponding to the license plate color; The license plate type corresponding to the first license plate image is determined based on the special sub-license plate.

[0070] In a possible implementation of the embodiment of the present application, when the first recognition module 202 determines the license plate type corresponding to the first license plate image based on the special sub-license plate, it is specifically used to: Get the character arrangement rules corresponding to the special sub-license plate; Recognize character information on the first license plate image to obtain a character sequence corresponding to the first license plate image; Determine whether the character sorting satisfies the character sorting rules; If the character sequence satisfies the character sequence rule, the special sub-license plate is determined to be the license plate type corresponding to the first license plate image.

[0071] In a possible implementation of the embodiment of the present application, the character information includes the number of characters and the attributes of each character, and the requirement determination module 204 can be specifically used to determine whether the character information meets the character requirements corresponding to the license plate type: Obtain the number of characters corresponding to the license plate characters corresponding to the license plate type and the attributes corresponding to each character to obtain the character requirements corresponding to the license plate type; Determine whether the number of characters corresponding to the character information is consistent with the number of characters corresponding to the license plate type; If the number of characters corresponding to the character information is consistent with the number of characters corresponding to the license plate type, the attributes of each character in the character information are compared with the attributes of the corresponding license plate characters in order to determine whether the character information meets the character requirements corresponding to the license plate type.

[0072] In a possible implementation of the embodiment of the present application, when the second recognition module 203 recognizes the character information on the first license plate image, it can be specifically used to: Recognize each character on the first license plate image, and segment each character on the first license plate image to obtain separate character image information; Performing feature extraction on each individual character image information to obtain a feature vector of each individual character image information; Based on the feature vector of each individual character image information, the character corresponding to each individual character image information is determined to obtain the character information on the first license plate image.

[0073] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0074] See also Figure 3 , the embodiment of the present application also introduces an electronic device from the perspective of a physical device, such as Figure 3 As shown, Figure 3 The electronic device 30 shown includes: a processor 301 and a memory 303. The processor 301 and the memory 303 are connected, such as through a bus 302. Optionally, the electronic device 30 may also include a transceiver 304. It should be noted that in actual applications, the transceiver 304 is not limited to one, and the structure of the electronic device 30 does not constitute a limitation on the embodiments of the present application.

[0075] The processor 301 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor 301 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0076] The bus 302 may include a path to transmit information between the above components. The bus 302 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 302 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0077] The memory 303 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0078] The memory 303 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 301. The processor 301 is used to execute the application code stored in the memory 303 to implement the contents shown in the above method embodiment.

[0079] The electronic devices include but are not limited to: mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc., and can also be servers, etc. Figure 3 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0080] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer can execute the corresponding content in the aforementioned method embodiment.

[0081] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0082] The above are only some implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A license plate recognition method based on AI, characterized in that: include: Receiving a first license plate image sent by an image acquisition device, wherein the first license plate image contains complete image information of a license plate to be identified; Recognize the first license plate image to determine the license plate type corresponding to the first license plate image; Recognizing character information on the first license plate image; Determining whether the character information meets the character requirements corresponding to the license plate type; If the character information meets the character requirements corresponding to the license plate type, the license plate number of the license plate to be identified is determined based on the character information.

2. The AI-based license plate recognition method according to claim 1, characterized in that: When the character information does not meet the character requirements corresponding to the license plate type, the method further includes: Generate an image acquisition instruction, and send the image acquisition instruction to the image acquisition device, wherein the image acquisition instruction is used to instruct the image acquisition device to move a certain shooting angle to perform image acquisition; Receiving a second license plate image sent by an image acquisition device, wherein the second license plate image contains complete image information of the license plate to be identified; Identify the spare character information corresponding to the second license plate image; Based on the character information and the backup character information, the license plate number of the license plate to be identified is determined.

3. The AI-based license plate recognition method according to claim 1, characterized in that: The license plate types include general license plates and special license plates, the general license plate includes at least one general sub-license plate, and the special license plate includes at least one special sub-license plate, and the identifying the first license plate image to determine the license plate type corresponding to the first license plate image includes: identifying a license plate color in the first license plate image; Based on the color of the license plate, determining whether the license plate type of the license plate to be identified is a general license plate; If the license plate type of the license plate to be identified is not a general license plate, determining a special sub-license plate in the special license plate corresponding to the color of the license plate; The license plate type corresponding to the first license plate image is determined based on the special sub-license plate.

4. The AI-based license plate recognition method according to claim 3 is characterized in that: The determining the license plate type corresponding to the first license plate image based on the special sub-license plate includes: Obtaining the character arrangement rule corresponding to the special sub-license plate; Recognize character information on the first license plate image to obtain a character sequence corresponding to the first license plate image; Determining whether the character sorting satisfies a character sorting rule; If the character sequence satisfies the character sequence rule, the special sub-license plate is determined to be the license plate type corresponding to the first license plate image.

5. The AI-based license plate recognition method according to claim 3, characterized in that: The character information includes the number of characters and the attributes of each character, and the determining whether the character information meets the character requirements corresponding to the license plate type includes: Obtain the number of characters corresponding to the license plate characters corresponding to the license plate type and the attributes corresponding to each character to obtain the character requirements corresponding to the license plate type; Determine whether the number corresponding to the character information is consistent with the number of characters corresponding to the license plate type; If the number of characters corresponding to the character information is consistent with the number of characters corresponding to the license plate type, the attributes of each character in the character information are compared with the attributes of the corresponding license plate characters in sequence in order to determine whether the character information meets the character requirements corresponding to the license plate type.

6. The AI-based license plate recognition method according to claim 1 or 4, characterized in that: The identifying character information on the first license plate image includes: Recognize each character on the first license plate image, and segment each character on the first license plate image to obtain separate character image information; Performing feature extraction on each individual character image information to obtain a feature vector of each individual character image information; Based on the feature vector of each of the individual character image information, the character corresponding to each of the individual character image information is determined to obtain the character information on the first license plate image.

7. An AI-based license plate recognition device, characterized in that: include: A first receiving module, used to receive a first license plate image sent by an image acquisition device, wherein the first license plate image contains complete image information of a license plate to be identified; A first recognition module, used to recognize the first license plate image to determine the license plate type corresponding to the first license plate image; A second recognition module, used for recognizing character information on the first license plate image; A requirement determination module, used to determine whether the character information meets the character requirements corresponding to the license plate type; The first determination module is used to determine the license plate number of the license plate to be identified based on the character information if the character information meets the character requirements corresponding to the license plate type.

8. The AI-based license plate recognition device according to claim 7, characterized in that: When the character information does not meet the character requirements corresponding to the license plate type, the AI-based license plate recognition device further includes: A generating module, used for generating an image acquisition instruction and sending the image acquisition instruction to the image acquisition device, wherein the image acquisition instruction is used for instructing the image acquisition device to move a certain shooting angle to perform image acquisition; A second receiving module is used to receive a second license plate image sent by an image acquisition device, wherein the second license plate image contains complete image information of the license plate to be identified; A third recognition module, used for recognizing the spare character information corresponding to the second license plate image; The second determination module is used to determine the license plate number of the license plate to be identified based on the character information and the spare character information.

9. An electronic device, characterized in that: The electronic device includes: at least one processor; Memory; At least one application, wherein the at least one application is stored in a memory and configured to be executed by at least one processor, and the at least one application is configured to: execute the AI-based license plate recognition method according to any one of claims 1 to 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed in a computer, the computer is caused to execute the AI-based license plate recognition method according to any one of claims 1 to 6.