License plate recognition method and device, electronic equipment and readable storage medium

By splitting license plate recognition into two processes—one for Chinese characters and one for non-Chinese characters—and utilizing a pre-trained neural network model, the problem of insufficient accuracy and robustness in existing license plate recognition technologies is solved, achieving higher recognition accuracy and cost-effectiveness.

CN113963360BActive Publication Date: 2026-01-02BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111054674.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-09
Publication Date
2026-01-02
Estimated Expiration
2041-09-09

AI Technical Summary

Technical Problem

Existing technologies for license plate recognition are easily affected by factors such as lighting, weather, and dirt, resulting in low recognition accuracy and poor robustness.

Method used

The license plate recognition process is divided into two steps: a first recognition model and a second recognition model are used to identify Chinese characters and non-Chinese characters in the license plate image, respectively. A pre-trained neural network model is used to extract the recognition results of Chinese characters and alphanumeric characters, and the results are combined to obtain the final license plate recognition result.

Benefits of technology

It improves the accuracy and robustness of license plate recognition, reduces the cost of acquiring training data, and increases recognition precision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113963360B_ABST
    Figure CN113963360B_ABST
Patent Text Reader

Abstract

The present disclosure provides a license plate recognition method and device, electronic equipment and readable storage medium, relating to artificial intelligence technology fields such as cloud service, image processing and deep learning. The license plate recognition method comprises: obtaining a to-be-detected image, and obtaining a license plate image in the to-be-detected image; obtaining a target image in the license plate image according to a height value of the license plate image; obtaining a first recognition result according to the target image, and obtaining a second recognition result according to the license plate image; combining the first recognition result and the second recognition result, and taking the combined result as a license plate recognition result of the to-be-detected image. The present disclosure can improve the accuracy and robustness of license plate recognition.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of data processing, and in particular to the technical field of cloud services, image processing, deep learning and other artificial intelligence technologies. A license plate recognition method and device, an electronic device and a readable storage medium are provided. BACKGROUND

[0002] The prior art is susceptible to the influence of factors such as light, weather, stains and vehicle speed when performing license plate recognition, resulting in low accuracy and poor robustness of license plate recognition. SUMMARY

[0003] According to a first aspect of the present disclosure, a license plate recognition method is provided, comprising: obtaining a to-be-detected image to obtain a license plate image in the to-be-detected image; obtaining a target image in the license plate image according to a height value of the license plate image; obtaining a first recognition result according to the target image and a second recognition result according to the license plate image; and combining the first recognition result and the second recognition result, and taking the combined result as a license plate recognition result of the to-be-detected image.

[0004] According to a second aspect of the present disclosure, a license plate recognition device is provided, comprising: an obtaining unit configured to obtain a to-be-detected image to obtain a license plate image in the to-be-detected image; a processing unit configured to obtain a target image in the license plate image according to a height value of the license plate image; an identification unit configured to obtain a first recognition result according to the target image and a second recognition result according to the license plate image; and a combination unit configured to combine the first recognition result and the second recognition result, and take the combined result as a license plate recognition result of the to-be-detected image.

[0005] According to a third aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described above.

[0006] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to perform the method described above.

[0007] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method described above.

[0008] From the above technical solutions, it can be seen that the embodiment can improve the accuracy and robustness of license plate recognition by splitting the license plate recognition into two recognition processes.

[0009] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0010] The accompanying drawings are used to better understand the present scheme and do not constitute a limitation on the present disclosure. Among them:

[0011] Figure 1 is a schematic diagram according to the first embodiment of the present disclosure;

[0012] Figure 2 is a schematic diagram according to the second embodiment of the present disclosure;

[0013] Figure 3 is a schematic diagram according to the third embodiment of the present disclosure;

[0014] Figure 4 is a schematic diagram according to the fourth embodiment of the present disclosure;

[0015] Figure 5 is a schematic diagram according to the fifth embodiment of the present disclosure;

[0016] Figure 6 is a block diagram of an electronic device for implementing the license plate recognition method according to the embodiments of the present disclosure. DETAILED DESCRIPTION

[0017] Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, which include various details of the embodiments of the present disclosure to help understanding, and should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Also, for the sake of clarity and conciseness, descriptions of well-known functions and mechanisms are omitted in the following description.

[0018] Figure 1 is a schematic diagram according to the first embodiment of the present disclosure. As Figure 1 shown, the license plate recognition method of the present embodiment can specifically include the following steps:

[0019] S101, acquiring a to-be-detected image to obtain a license plate image in the to-be-detected image;

[0020] S102, obtaining a target image in the license plate image according to a height value of the license plate image;

[0021] S103, obtaining a first recognition result according to the target image, and obtaining a second recognition result according to the license plate image;

[0022] S104, combining the first recognition result and the second recognition result, and taking a combination result as a license plate recognition result of the to-be-detected image.

[0023] The license plate recognition method of the embodiment can improve the accuracy and robustness of license plate recognition by splitting the license plate recognition into two recognition processes.

[0024] When performing S101 to obtain the to-be-detected image, the embodiment can take an image input by a user as the to-be-detected image, or take a real-time captured image as the to-be-detected image.

[0025] When performing S101 to obtain the license plate image in the to-be-detected image, the embodiment can use a known license plate positioning method to position the license plate in the to-be-detected image, and then obtain the license plate image from the to-be-detected image according to a positioning result.

[0026] After performing S101 to obtain the license plate image in the to-be-detected image, the embodiment performs S102 to obtain a target image in the license plate image according to a height value of the license plate image.

[0027] Specifically, when performing S102 to obtain the target image in the license plate image according to the height value of the license plate image, the optional implementation manner that can be used by the embodiment is as follows: determining the height value of the license plate image; obtaining an image corresponding to the determined height value from the license plate image according to a preset position; and taking the obtained image as the target image.

[0028] To avoid the influence of the posture of the license plate image and improve the accuracy of the obtained target image, when performing S102 to determine the height value of the license plate image, the optional implementation manner that can be used by the embodiment is as follows: correcting the obtained license plate image; and determining the height value of the license plate image according to a correction result of the license plate image.

[0029] In the embodiment, when the image corresponding to the determined height value is cropped from the license plate image according to the preset position in S102, the upper left corner of the license plate image can be taken as the origin to crop the image corresponding to the determined height value from the license plate image; or the left boundary of the license plate image can be taken as the starting position to crop the image corresponding to the determined height value from the license plate image.

[0030] In the embodiment, when the image corresponding to the determined height value is cropped from the license plate image in S102, an image with a size of (height value x height value) can be cropped from the license plate image.

[0031] That is, the target image is obtained according to the height value of the license plate image and the preset position in the embodiment, so that the obtained target image contains Chinese characters in the license plate, and it is ensured that the first recognition result corresponding to the Chinese characters in the license plate can be obtained according to the target image.

[0032] After the target image in the license plate image is obtained in S102, the first recognition result is obtained according to the target image and the second recognition result is obtained according to the license plate image in S103.

[0033] The first recognition result obtained in S103 is the Chinese characters in the license plate, and the second recognition result is the letters and numbers in the license plate except the Chinese characters.

[0034] In the embodiment, when the first recognition result is obtained according to the target image in S103, an optional implementation manner can be used, that is, the target image is input into the first recognition model obtained by pre-training, and the output result of the first recognition model is taken as the first recognition result.

[0035] In the embodiment, the first recognition model obtained by pre-training can output Chinese characters in the input image, and the output Chinese characters correspond to different provinces.

[0036] In addition, when the first recognition result is obtained according to the target image in S103, the target image can also be matched with different Chinese character images, and the Chinese character corresponding to the Chinese character image with the highest matching degree is taken as the first recognition result.

[0037] In the embodiment, when the second recognition result is obtained according to the license plate image in S103, an optional implementation manner can be used, that is, the license plate image is input into the second recognition model obtained by pre-training, and the output result of the second recognition model is taken as the second recognition result.

[0038] In the embodiment, the second recognition model obtained by pre-training can output letters and numbers in the input image except Chinese characters.

[0039] After obtaining the first recognition result and the second recognition result in S103, the embodiment performs S104 to combine the first recognition result and the second recognition result, and takes the combination result as the license plate recognition result of the image to be detected.

[0040] When combining the first recognition result and the second recognition result in S104, the embodiment can combine them in a preset order, which is first recognition result-second recognition result.

[0041] According to the above method provided by the embodiment, the license plate recognition is divided into two recognition processes by obtaining the first recognition result and the second recognition result from the target image and the license plate image, which can improve the accuracy and robustness of license plate recognition.

[0042] Figure 2 is a schematic diagram according to the second embodiment of the disclosure. As shown in Figure 2 The embodiment adopts the following method to pre-train the first recognition model:

[0043] S201, obtain a first training set, and the first training set contains a plurality of first license plate images and Chinese character annotation results of the plurality of first license plate images;

[0044] S202, obtain target images in the plurality of first license plate images according to height values of the plurality of first license plate images, respectively;

[0045] S203, train a neural network model using the target images in the plurality of first images and the Chinese character annotation results of the plurality of first images to obtain the first recognition model.

[0046] In the first training set obtained in S201, the plurality of first license plate images are license plate images corresponding to different provinces, and the Chinese character annotation result of the first license plate image is the Chinese character of the province to which the license plate belongs.

[0047] When obtaining the target images in the plurality of first license plate images according to the height values of the plurality of first license plate images in S202, an optional implementation manner that can be adopted by the embodiment is: for each first license plate image, according to a preset position, an image corresponding to the height value is intercepted from the first license plate image; the intercepted image is taken as the target image. The preset position in the embodiment can be the upper left corner of the first license plate image, or the left boundary of the first license plate image.

[0048] The optional implementation manner that can be adopted when the first recognition model is obtained by training the neural network model using the target image in the plurality of first images and the Chinese character annotation result of the plurality of first images in the execution of S203 of the embodiment is as follows: the target image in the plurality of first license plate images is input into the neural network model respectively, and the Chinese character prediction result output by the neural network model for each first license plate image is obtained; the loss function value calculated according to the Chinese character prediction result of the plurality of first license plate images and the Chinese character annotation result is used to adjust the parameters of the neural network model, until the neural network model converges, and the first recognition model is obtained.

[0049] The first recognition model can be obtained by training only the first license plate images corresponding to different provinces, and the Chinese characters in the license plate image can be extracted more accurately by using the first recognition model.

[0050] Figure 3 is a schematic diagram according to the third embodiment of the present disclosure. As shown in Figure 3 The second recognition model is obtained by pre-training in the following manner:

[0051] S301, a second training set is obtained, and the second training set contains a plurality of second license plate images and non-Chinese character annotation results of the plurality of second license plate images;

[0052] S302, a neural network model is trained using the plurality of second images and the non-Chinese character annotation results of the plurality of first images, and the second recognition model is obtained.

[0053] The plurality of second license plate images in the second training set obtained in the execution of S301 of the embodiment can be license plate images of any province, and the non-Chinese character annotation result of the second license plate image is the letter and number in the license plate except the Chinese character.

[0054] The optional implementation manner that can be adopted when the second recognition model is obtained by training the neural network model using the plurality of second images and the non-Chinese character annotation results of the plurality of second images in the execution of S302 of the embodiment is as follows: the plurality of second license plate images are input into the neural network model respectively, and the non-Chinese character prediction result output by the neural network model for each second license plate image is obtained; the loss function value calculated according to the non-Chinese character prediction result of the plurality of second license plate images and the non-Chinese character annotation result is used to adjust the parameters of the neural network model, until the neural network model converges, and the second recognition model is obtained.

[0055] The second recognition model can be obtained by training only the second license plate images of any province, and the letter and number in the license plate image can be extracted more accurately by using the second recognition model.

[0056] The first recognition model and the second recognition model separate the Chinese characters of the license plate and the non-Chinese characters (letters and numbers) of the license plate for identification, which can reduce the cost of obtaining training data, improve the accuracy of license plate recognition without obtaining a large number of license plate images of different provinces.

[0057] Figure 4 is a schematic diagram according to the fourth embodiment of the present disclosure. Figure 4 The flowchart of the license plate recognition of the present embodiment is shown: obtaining a target image from the license plate image; "A" in the license plate image represents Chinese characters corresponding to the province in the license plate, "Y" in the license plate image represents letters in the license plate, and "X" in the license plate image represents numbers in the license plate; inputting the target image into the first recognition model and the license plate image into the second recognition model; combining the first recognition result "A" output by the first recognition model and the second recognition result "YXXXYX" output by the second recognition model, and taking the combination result "AYXXXYX" as the license plate recognition result.

[0058] Figure 5 is a schematic diagram according to the fifth embodiment of the present disclosure. As shown in Figure 5 , the license plate recognition device 500 of the present embodiment comprises:

[0059] an acquisition unit 501 configured to acquire a to-be-detected image and obtain a license plate image in the to-be-detected image;

[0060] a processing unit 502 configured to obtain a target image in the license plate image according to a height value of the license plate image;

[0061] an identification unit 503 configured to obtain a first recognition result according to the target image and a second recognition result according to the license plate image;

[0062] a combination unit 504 configured to combine the first recognition result and the second recognition result and take the combination result as a license plate recognition result of the to-be-detected image.

[0063] The acquisition unit 501 can take the image input by the user as the to-be-detected image or take the real-time captured image as the to-be-detected image when acquiring the to-be-detected image.

[0064] The acquisition unit 501 can use a known license plate positioning method to obtain the license plate image from the to-be-detected image according to the positioning result after positioning the license plate in the to-be-detected image. It can be understood that the license plate in the present embodiment is a motor vehicle license plate containing Chinese characters (corresponding to the province), letters and numbers.

[0065] The embodiment obtains the target image in the license plate image according to the height value of the license plate image after the acquisition unit 501 obtains the license plate image in the image to be detected. The target image obtained by the processing unit 502 contains at least Chinese characters in the license plate.

[0066] Specifically, when obtaining the target image in the license plate image according to the height value of the license plate image, the processing unit 502 can use an optional implementation manner: determining the height value of the license plate image; cutting the image corresponding to the determined height value from the license plate image according to the preset position; and taking the cut image as the target image.

[0067] In order to avoid the influence of the posture of the license plate image and improve the accuracy of the obtained target image, when determining the height value of the license plate image, the processing unit 502 can use an optional implementation manner: correcting the license plate image; and determining the height value of the license plate image according to the correction result of the license plate image.

[0068] When cutting the image corresponding to the determined height value from the license plate image according to the preset position, the processing unit 502 can take the upper left corner of the license plate image as the origin and cut the image corresponding to the determined height value from the license plate image; or the processing unit 502 can take the left boundary of the license plate image as the starting position and cut the image corresponding to the determined height value from the license plate image.

[0069] When cutting the image corresponding to the determined height value from the license plate image, the processing unit 502 can cut an image with a size of (height value x height value) from the license plate image.

[0070] That is, the processing unit 502 obtains the target image according to the height value of the license plate image and the preset position, so that the obtained target image contains Chinese characters of the license plate, and ensures that the first recognition result corresponding to the Chinese characters in the license plate can be obtained according to the target image.

[0071] The embodiment obtains the target image in the license plate image by the processing unit 502, and then obtains the first recognition result according to the target image and the second recognition result according to the license plate image by the identification unit 503.

[0072] The first recognition result obtained by the identification unit 503 is Chinese characters in the license plate, and the second recognition result is letters and numbers in the license plate except the Chinese characters.

[0073] When obtaining the first recognition result according to the target image, the identification unit 503 can use an optional implementation manner: inputting the target image into a first recognition model trained in advance, and taking the output result of the first recognition model as the first recognition result.

[0074] The first recognition model used by the recognition unit 503 can output Chinese characters in the image according to the input image, and the output Chinese characters correspond to different provinces.

[0075] In addition, when obtaining the first recognition result according to the target image, the recognition unit 503 can also match the target image with different Chinese character images, and take the Chinese character corresponding to the Chinese character image with the highest matching degree as the first recognition result.

[0076] When obtaining the second recognition result according to the license plate image, the recognition unit 503 can adopt an optional implementation manner: inputting the license plate image into the second recognition model pre-trained, and taking the output result of the second recognition model as the second recognition result.

[0077] The second recognition model used by the recognition unit 503 can output letters and numbers other than Chinese characters in the image according to the input image.

[0078] After obtaining the first recognition result and the second recognition result by the recognition unit 503, the combination unit 504 combines the obtained first recognition result and the second recognition result, and takes the combination result as the license plate recognition result of the to-be-detected image.

[0079] When combining the first recognition result and the second recognition result, the combination unit 504 can combine them in a preset order, and the preset order is first recognition result-second recognition result.

[0080] The license plate recognition device 500 of the embodiment can also include a first training unit 505 configured to pre-train the first recognition model in the following manner: obtaining a first training set, the first training set including a plurality of first license plate images and Chinese character annotation results of the plurality of first license plate images; obtaining target images in the plurality of first license plate images according to height values of the plurality of first license plate images; and training a neural network model using the target images in the plurality of first images and the Chinese character annotation results of the plurality of first images to obtain the first recognition model.

[0081] The plurality of first license plate images included in the first training set obtained by the first training unit 505 are license plate images corresponding to different provinces, and the Chinese character annotation result of the first license plate image is the Chinese character of the province to which the license plate belongs.

[0082] When obtaining the target images of the plurality of first license plate images according to the height values of the plurality of first license plate images, the first training unit 505 can adopt an optional implementation manner: for each first license plate image, according to a preset position, cutting an image corresponding to the height value from the first license plate image; and taking the cut image as the target image. The preset position in the embodiment can be the upper left corner of the first license plate image, or the left boundary of the first license plate image.

[0083] The first training unit 505 can use the following optional implementation manner when training the neural network model using the target images in the plurality of first images and the Chinese character annotation results in the plurality of first images to obtain the first recognition model: inputting the target images in the plurality of first license plate images into the neural network model respectively to obtain Chinese character prediction results output by the neural network model for each first license plate image; adjusting the parameters of the neural network model according to the loss function values calculated from the Chinese character prediction results of the plurality of first license plate images and the Chinese character annotation results, until the neural network model converges, and obtaining the first recognition model.

[0084] The first training unit 505 only needs to obtain the first license plate images corresponding to different provinces to train the first recognition model, and the first recognition model can be used to more accurately extract Chinese characters in the license plate image.

[0085] The license plate recognition device 500 of the embodiment can further include a second training unit 506 configured to pre-train a second recognition model in the following manner: obtaining a second training set including a plurality of second license plate images and non-Chinese character annotation results of the plurality of second license plate images; and training a neural network model using the plurality of second images and the non-Chinese character annotation results of the plurality of first images to obtain the second recognition model.

[0086] The plurality of second license plate images included in the second training set obtained by the second training unit 506 can be license plate images of any province, and the non-Chinese character annotation results of the second license plate images are letters and numbers in the license plate other than Chinese characters.

[0087] The second training unit 506 can use the following optional implementation manner when training the neural network model using the plurality of second images and the letter and character annotation results of the plurality of second images to obtain the second recognition model: inputting the plurality of second license plate images into the neural network model respectively to obtain non-Chinese character prediction results output by the neural network model for each second license plate image; adjusting the parameters of the neural network model according to the loss function values calculated from the non-Chinese character prediction results of the plurality of second license plate images and the non-Chinese character annotation results, until the neural network model converges, and obtaining the second recognition model.

[0088] The second training unit 506 only needs to obtain the second license plate images of any province to train the second recognition model, and the second recognition model can be used to more accurately extract letters and numbers in the license plate image.

[0089] In the technical solution of the present disclosure, the acquisition, storage and application of user personal information comply with relevant laws and regulations and do not violate public order and good customs.

[0090] According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0091] As Figure 6 shown is a block diagram of an electronic device for a license plate recognition method according to embodiments of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices such as personal digital processors, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present disclosure described and / or claimed in this document.

[0092] As Figure 6 shown, the device 600 includes a computing unit 601 that can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded into a random access memory (RAM) 603 from a storage unit 608. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0093] Various components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a magnetic disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.

[0094] The computing unit 601 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 601 performs various methods and processes described above, such as the license plate recognition method. For example, in some embodiments, the license plate recognition method can be implemented as a computer software program that is tangibly embodied in a machine-readable medium, such as the storage unit 608.

[0095] In some embodiments, portions or all of the computer program can be loaded onto the apparatus 600 via the ROM 602 and / or the communications unit 609. When the computer program is loaded onto the RAM 603 and executed by the computer unit 601, one or more steps of the above-described license plate recognition method can be performed. Alternatively, in other embodiments, the computer unit 601 can be configured, by any other suitable means (for example, by means of firmware), to perform the license plate recognition method.

[0096] Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, specially designed application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0097] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general or special purpose computer, or other programmable data processing apparatus, to produce a machine, such that the program code, when executed by the processor or controller, produces a means for implementing the functions / operations specified in the flowchart diagrams and / or block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, partially on a machine and partially on a remote machine or entirely on a remote machine or server.

[0098] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0099] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0100] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0101] The computer system can include clients and servers. This relationship can be. remote, where each server is stored on a remote computer from a client. The clients and the servers can be connected through a communication network. The relationship can be a client-server relationship over a network. A server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, and solves the defects of large management difficulty and weak business scalability in traditional physical hosts and VPS services (Virtual Private Server, or VPS for short). The server can also be a server of a distributed system, or a server combined with a blockchain.

[0102] It should be understood that the steps shown above can be reordered, added to, or deleted from. For example, the steps described in the present disclosure can be executed in parallel, in sequence, or in a different order, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.

[0103] The above detailed description does not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A license plate recognition method, comprising: obtaining a to-be-detected image to obtain a license plate image in the to-be-detected image; obtaining a target image in the license plate image according to a height value of the license plate image; inputting the target image into a first recognition model to obtain a first recognition result, and inputting the license plate image into a second recognition model to obtain a second recognition result, the first recognition result being Chinese characters in the license plate image, and the second recognition result being letters and numbers in the license plate image; combining the first recognition result and the second recognition result, and taking a combination result as a license plate recognition result of the to-be-detected image; wherein the obtaining of the target image in the license plate image according to the height value of the license plate image comprises: determining the height value of the license plate image; cutting an image with a size of (the height value x the height value) from the license plate image according to a preset position; taking the cut image as the target image; the first recognition model is obtained by pre-training in the following manner: obtaining a first training set, the first training set containing a plurality of first license plate images and Chinese character annotation results of the plurality of first license plate images, the plurality of first license plate images being license plate images corresponding to different provinces; obtaining target images in the plurality of first license plate images according to height values of the plurality of first license plate images; training a neural network model using the target images in the plurality of first images and the Chinese character annotation results of the plurality of first images to obtain the first recognition model.

2. The method of claim 1, wherein, the second recognition model is obtained by pre-training in the following manner: obtaining a second training set, the second training set containing a plurality of second license plate images and non-Chinese character annotation results of the plurality of second license plate images; training a neural network model using the plurality of second images and the non-Chinese character annotation results of the plurality of first images to obtain the second recognition model.

3. A license plate recognition device, comprising: an obtaining unit configured to obtain a to-be-detected image to obtain a license plate image in the to-be-detected image; a processing unit configured to obtain a target image in the license plate image according to a height value of the license plate image; a recognition unit configured to input the target image into a first recognition model to obtain a first recognition result, and input the license plate image into a second recognition model to obtain a second recognition result, the first recognition result being Chinese characters in the license plate image, and the second recognition result being letters and numbers in the license plate image; a combining unit configured to combine the first recognition result and the second recognition result, and take a combination result as a license plate recognition result of the to-be-detected image; wherein when the processing unit obtains the target image in the license plate image according to the height value of the license plate image, it specifically performs: determining the height value of the license plate image; cutting an image with a size of (the height value x the height value) from the license plate image according to a preset position; taking the cut image as the target image; and further comprising a first training unit configured to obtain the first recognition model by pre-training in the following manner: obtain a first training set, the first training set containing a plurality of first license plate images and a plurality of first license plate image Chinese character annotation results, the plurality of first license plate images being license plate images corresponding to different provinces; obtain target images in the plurality of first license plate images according to height values of the plurality of first license plate images; train a neural network model using the target images in the plurality of first images and the Chinese character annotation results of the plurality of first images to obtain the first recognition model.

4. The apparatus of claim 3, further comprising a second training unit configured to pre-train the second recognition model in the following manner: obtain a second training set, the second training set containing a plurality of second license plate images and a plurality of second license plate image non-Chinese character annotation results; train a neural network model using the plurality of second images and the non-Chinese character annotation results of the plurality of first images to obtain the second recognition model.

5. An electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-2.

6. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to make the computer perform the method of any one of claims 1-2.

7. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1-2.