License plate recognition method and device based on front and back license plate images, and medium

By installing video piles in front and back of the road parking lot to collect license plate images and perform feature fusion recognition, the problem of low accuracy in open scenarios is solved, the accuracy of license plate recognition is improved and the cost is reduced, and more efficient License plate recognition effect.

CN118898836APending Publication Date: 2024-11-05ROPEOK TECHNOLOGY GROUP CO LTD

Patent Information

Application Number
CN202410921139.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2024-11-05

AI Technical Summary

Technical Problem

In open scenarios, license plate recognition in road parking lots cannot be restricted from the angle of vehicle stopping when vehicles enter and exit, which makes it difficult to identify license plates, and the accuracy of the existing technology is low, especially when using high-level video piles, the recognition accuracy and cost are high.

Method used

Using the recognition method based on the front and rear license plate images, the license plate images are collected by installing median or low-position video piles in front and rear of the parking space, and then the license plate recognition model of the feature extraction module and the feature fusion module are used for identification. Combined with the LPRNet network structure, the identification is improved. accuracy.

Benefits of technology

It improves the accuracy of license plate recognition on road parking lots, reduces costs, and optimizes the algorithm capabilities of medium and low-level video piles, improving the overall performance of license plate recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118898836A_ABST
    Figure CN118898836A_ABST
Patent Text Reader

Abstract

The invention relates to a license plate recognition method and device based on front and rear license plate images and a medium. The method comprises the steps that the front license plate image and the rear license plate image of a vehicle parked in a parking space are collected through video piles installed on the front side and the rear side of the parking space respectively; performing license plate target detection on the front license plate image and the rear license plate image; constructing a license plate recognition model based on front and rear license plates, and training the model through the training set; a network structure of the model comprises two feature extraction modules, a feature fusion module and a feature recognition module, a front license plate target image and a rear license plate target image are input into the two feature extraction modules respectively, and image features extracted by the two feature extraction modules are input into the feature fusion module together. Fused features output by the feature fusion module are input into a feature recognition module for license plate recognition; and carrying out license plate recognition through the trained model. The accuracy of road parking lot license plate recognition is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of license plate recognition, and in particular to a license plate recognition method, device and medium based on front and rear license plate images. Background Art

[0002] License plate recognition is a relatively mature algorithm application and has been applied in various scenarios. Currently, license plate recognition is widely used in parking lots, road checkpoints, etc. These scenarios have relatively large constraints on license plates, making it easier to identify license plates. For example, there are only a few entrances and exits in a parking lot, and vehicles must enter in the indicated direction. Only when license plate recognition is triggered will the barrier be lifted to allow vehicles to enter. In these scenarios, license plates generally meet conditions such as angle and lighting, and the accuracy of license plate recognition can reach a very high standard.

[0003] At present, parking spaces on the road mainly rely on manual charging, which requires manual entry of license plates. Road parking spaces are open scenes, and vehicles cannot be sensed when entering or exiting. Therefore, it is impossible to constrain the angle at which the vehicle stops when entering or leaving the parking space. Therefore, it is very difficult to recognize the license plate of the vehicle. The current road parking solution mainly uses automatic shooting by installing high-position cameras or mid-position and low-position video poles. When a vehicle enters a parking space, the camera is triggered by geomagnetism or radar to shoot, and then the license plate is recognized. Summary of the invention

[0004] In order to solve the above problems, the present invention proposes a license plate recognition method, device and medium based on front and rear license plate images.

[0005] The specific plan is as follows:

[0006] A license plate recognition method based on front and rear license plate images comprises the following steps:

[0007] S1: The front license plate image and the rear license plate image of the vehicle parked in the parking space are respectively collected through the video poles installed at the front and rear sides of the parking space;

[0008] S2: perform license plate target detection on the front license plate image and the rear license plate image respectively;

[0009] S3: Construct a license plate recognition model based on front and rear license plates, and train the model through a training set; the network structure of the model includes two feature extraction modules, a feature fusion module and a feature recognition module. The front license plate target image and the rear license plate target image are respectively input into the two feature extraction modules, and the image features extracted by the two feature extraction modules are jointly input into the feature fusion module. The fused features output by the feature fusion module are input into the feature recognition module for license plate recognition;

[0010] S4: Perform license plate recognition using the trained model.

[0011] Furthermore, the feature extraction module in the license plate recognition model uses the torso and neck parts in the LPRNet network.

[0012] Furthermore, before inputting the license plate recognition model, perspective transformation is also performed on the license plate target image.

[0013] Furthermore, the video pole adopts a middle video pole or a low video pole.

[0014] A license plate recognition terminal device based on front and rear license plate images includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method described above in the embodiment of the present invention are implemented.

[0015] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described above in an embodiment of the present invention are implemented.

[0016] The present invention adopts the above technical solution to improve the accuracy of license plate recognition in road parking lots. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 Shown is a flow chart of a method according to a first embodiment of the present invention.

[0018] Figure 2 Shown is a schematic diagram of the position of the video pile in this embodiment.

[0019] Figure 3 Shown is a schematic diagram of the installation of the video pile in this embodiment.

[0020] Figure 4 Shown is a flow chart of network structure identification of the model in this embodiment.

[0021] Figure 5 Shown is a network structure diagram of the model in this embodiment. DETAILED DESCRIPTION

[0022] To further illustrate various embodiments, the present invention provides drawings. These drawings are part of the disclosure of the present invention, which are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in this field should be able to understand other possible implementations and advantages of the present invention.

[0023] The present invention will now be further described with reference to the accompanying drawings and specific implementation methods.

[0024] Embodiment 1:

[0025] The embodiment of the present invention provides a license plate recognition method based on front and rear license plate images, such as Figure 1 As shown, the method comprises the following steps:

[0026] S1: The front license plate image and the rear license plate image of the vehicle parked in the parking space are respectively collected through the video poles installed at the front and rear sides of the parking space.

[0027] As the road parking scene is very complex, the common license plate recognition solutions are mainly divided into three types: high-position video poles, mid-position video poles, and low-position video poles. The high-position video poles look similar to video surveillance cameras. In most cases, a high-position video pole can manage about 8 parking spaces at the same time. Figure 2 and Figure 3 As shown, the medium and low position video posts are generally installed on the side of the road, located between two parking spaces, and most of them can simultaneously shoot the front and rear parking spaces through two cameras, or take turns shooting the front and rear parking spaces through a rotating camera. Generally speaking, the recognition accuracy of high position video posts is not as high as that of medium and low position video posts, and the cost is also relatively high. Therefore, in this embodiment, the algorithm capability is optimized based on the medium and low position video posts.

[0028] The conventional solution is to use a single camera to shoot the license plate in front of or behind the vehicle, and then perform license plate recognition. Considering that the median video pole is installed on the edge of the road, the license plate captured after the vehicle enters the site is tilted. Although key point detection and perspective transformation are performed during algorithm processing, it still affects the accuracy of license plate recognition. Since the inclination of the license plate captured from the front and rear is exactly opposite, the license plate recognition is optimized by fusing the features of both in this embodiment.

[0029] S2: Perform license plate target detection on the front license plate image and the rear license plate image respectively.

[0030] Conventional models can be used for license plate target detection, such as YOLO, retinaNET and other network models. In this embodiment, the HyperLPR network is preferably used, which can detect the license plate frame position (x1, y1, x2, y2), the four key points of the license plate (p1, p2, p3, p4) and the confidence of the license plate.

[0031] Furthermore, after the license plate target detection, the obtained license plate target image is often an inclined image, so it is also necessary to perform perspective transformation on it. In this embodiment, perspective transformation correction is performed based on the obtained four license plate key points, and the correction mapping coordinates can be [[0,0], [160,0], [0,48], [160,48]], and the license plate target image can be obtained according to the perspective transformation of opencv for subsequent license plate recognition.

[0032] S3: Build a license plate recognition model based on the front and rear license plates, and train the model using the training set.

[0033] The network structure of the model set in this embodiment includes two feature extraction modules, a feature fusion module and a feature recognition module. The front license plate target image and the rear license plate target image are respectively input into the two feature extraction modules, and the image features extracted by the two feature extraction modules are jointly input into the feature fusion module. The fused features output by the feature fusion module are input into the feature recognition module for license plate recognition. Figure 4 and 5 As shown, the network structure of the model in this embodiment is improved on the basis of the LPRNET network, that is, the feature extraction module uses the torso and neck parts in the LPRNet network, and the torso part is Figure 5 Step 1 in the main part is feature extraction, namely the neck part Figure 5 In step 2, the features of the 2nd, 6th, and 13th layers are extracted for data pooling. The feature fusion module concatenates the features of step 2 of the two images. The specific structure of the feature recognition module is shown in Figure 5 In Step 3, the feature is convolved to reduce the dimension and adjust the depth of the feature map to 68 character classes.

[0034] Furthermore, the license plate target image needs to be preprocessed before license plate recognition, which mainly includes several operations: data type conversion (int to float), channel conversion (RGB input), and resize operation (scaling the input dimension to the network input dimension). The license plate recognition network input dimension is [batch, 3, 24, 94].

[0035] according to Figure 5 The network structure of the license plate recognition has a feature dimension of [batch,68,18], where batch is the batch size, 68 is the total character set length, and 18 is the predicted output length. The output sequence length should be considered when designing the model, which is the longest sequence that the model needs to predict. The loss function of the license plate recognition model in this embodiment uses CTCLoss. In the most extreme case, each true label is separated by at least one blank label before and after to partition the duplicate items. Therefore, if the sequence length to be predicted is T, the sequence length that needs to be set in theory is 2*T+1.

[0036] In the training of the model, this embodiment first uses the open source dataset CCPD for pre-training. Considering that the license plate target image input is a pair of license plates, the original dataset is copied, and then each pair of license plate target images is randomly slightly perturbed before entering the network. The perturbation is mainly perspective transformation. After the same license plate target image is transformed with different parameters, the same license plate taken from different angles in similar scenes can be obtained. Then use it as input to pre-train the license plate recognition model. After that, the license plate target images of the actual scene of the project are collected to fine-tune the model to obtain the final license plate recognition model. After comparing the single license plate recognition effect, the accuracy of license plate recognition can be improved.

[0037] S4: Perform license plate recognition using the trained model.

[0038] The embodiment of the present invention performs feature fusion based on license plate images of the front license plate and the rear license plate based on the shooting conditions of the road parking pile, thereby improving the accuracy of license plate recognition in the road parking lot.

[0039] Embodiment 2:

[0040] The present invention also provides a license plate recognition terminal device based on front and rear license plate images, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the above method embodiment of embodiment 1 of the present invention are implemented.

[0041] Further, as an executable solution, the license plate recognition terminal device based on front and rear license plate images can be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The license plate recognition terminal device based on front and rear license plate images can include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the composition structure of the license plate recognition terminal device based on front and rear license plate images is only an example of a license plate recognition terminal device based on front and rear license plate images, and does not constitute a limitation on the license plate recognition terminal device based on front and rear license plate images. It can include more or less components than the above, or combine certain components, or different components. For example, the license plate recognition terminal device based on front and rear license plate images can also include input and output devices, network access devices, buses, etc., and the embodiments of the present invention do not limit this.

[0042] Further, as an executable solution, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the license plate recognition terminal device based on front and rear license plate images, and uses various interfaces and lines to connect various parts of the entire license plate recognition terminal device based on front and rear license plate images.

[0043] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the license plate recognition terminal device based on front and rear license plate images by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required for a function; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0044] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method in the embodiment of the present invention are implemented.

[0045] If the module / unit integrated in the license plate recognition terminal device based on the front and rear license plate images is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory) and software distribution medium, etc.

[0046] Although the present invention has been specifically shown and described in conjunction with the preferred embodiments, it should be understood by those skilled in the art that various changes may be made to the present invention in form and details without departing from the spirit and scope of the present invention as defined by the appended claims, all of which are within the scope of protection of the present invention.

Claims

1. A license plate recognition method based on front and rear license plate images, characterized in that: The following steps are involved: S1: The front license plate image and the rear license plate image of the vehicle parked in the parking space are respectively collected through the video poles installed at the front and rear sides of the parking space; S2: perform license plate target detection on the front license plate image and the rear license plate image respectively; S3: Construct a license plate recognition model based on front and rear license plates, and train the model through a training set; the network structure of the model includes two feature extraction modules, a feature fusion module and a feature recognition module. The front license plate target image and the rear license plate target image are respectively input into the two feature extraction modules, and the image features extracted by the two feature extraction modules are jointly input into the feature fusion module. The fused features output by the feature fusion module are input into the feature recognition module for license plate recognition; S4: Perform license plate recognition using the trained model.

2. The license plate recognition method based on front and rear license plate images according to claim 1, characterized in that: The feature extraction module in the license plate recognition model uses the torso and neck parts in the LPRNet network.

3. The license plate recognition method based on front and rear license plate images according to claim 1, characterized in that: Before inputting the license plate recognition model, the license plate target image is also subjected to perspective transformation.

4. The license plate recognition method based on front and rear license plate images according to claim 1, characterized in that: The video pile adopts a medium video pile or a low video pile.

5. A license plate recognition terminal device based on front and rear license plate images, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 4 when executing the computer program.

6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Front and rear license plate detection and recognition method based on deep learning

    CN105740855A

  • License plate recognition method, device and equipment and readable medium

    CN110796052A

  • License plate recognition method and device

    CN113343985A

  • Real-time license plate detection and recognition method and device based on color augmentation

    US20240046668A1

Cited By

  • Engineering machinery vehicle multi-device collaborative identification method and device and storage medium

    CN121121902A