CN-115713756-B - Method for improving accurate positioning of license plate
Abstract
The invention provides a method for improving license plate accurate positioning, which is characterized in that an OCR detection model is used for detecting license plates, a heat map is used as a network output result for detecting license plates, license plate positioning is determined through a license plate key point model, model quantization is carried out to low bit, and license plate detection and license plate positioning are realized. The method comprises the steps of obtaining data from the beginning, loading the data to a license plate detection model, further judging whether a license plate can be detected or not, ending detection if the license plate can not be detected, entering a license plate key point model if the license plate can be detected, conducting perspective transformation to correct the license plate, outputting the license plate, and ending detection finally. The license plate detection license plate is more accurate in positioning, and the quantization difficulty is reduced.
Inventors
- JIAO YARU
Assignees
- 北京君正集成电路股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20210820
Claims (5)
- 1. A method for improving license plate accurate positioning is characterized by adopting an OCR detection model to detect a license plate, adopting a heat map as a network output result to detect the license plate, determining the license plate positioning through a license plate key point model, quantifying the model to a low bit to realize the license plate detection license plate positioning, acquiring data from the beginning, loading the data into the license plate detection model, further judging whether the license plate can be detected, ending the detection if the license plate can not be detected, entering the license plate key point model, performing perspective transformation to correct the license plate and outputting, and ending the detection, wherein the method further comprises the following steps: S1, license plate data manufacturing: The license plate is marked as four corner points of the license plate, data enhancement is enhanced, perspective transformation is adopted, and angle rotation is respectively carried out on three axes of xyz at the same time, so that the condition that a road side camera shoots the license plate is achieved; S2, training a license plate detection model: firstly, detecting a license plate by adopting a segmentation method in OCR detection, namely firstly, passing through DBNet networks, wherein a backstone uses ResNet-18+FPN, outputting a text segmentation result heat map of a picture, converting the segmentation result map into a binary map by using a preset threshold value, wherein the threshold value is 0.3, finally, finding out the outline of the license plate, and leading the license plate to be framed; S3, license plate key point training: After the license plate is detected, a license plate key point model needs to be added, an 8-layer CNN convolution network is used for the model, four corner points of the license plate are output as a result, and the four corner points are positioned, so that perspective transformation is carried out on pictures through the 4 corner points, the license plate is corrected, and license plate identification is carried out.
- 2. The method for improving accurate positioning of license plates according to claim 1, wherein, The text of the output picture in the step S2 is a license plate, the segmentation result heat map is a probability map, and each pixel is the probability of whether a positive sample is obtained or not; The ResNet-18 is a classical network, the FPN is a network structure, and in the finding of the outline of the license plate, the finding of the outline adopts the existing function, and the cv2.findContours function is used here; The training license plate detection model is suitable for license plates under roadside cameras, license plates with serious exposure at night, license plates with dark brightness and inclined license plates.
- 3. The method for improving accurate positioning of license plates according to claim 1, wherein, The detection model used by the method is DBNet framework applied to OCR detection.
- 4. The method for improving accurate positioning of license plates according to claim 1, wherein, In the method, the application scene of license plate detection is a roadside scene, and the position of a camera for acquiring image data is low, so that the license plate shape deformation degree is large.
- 5. The method for improving accurate positioning of license plates of claim 1, further comprising: S4, model quantification: the license plate inspection vehicle model is quantized to 4 bits without loss of precision, and the key points are required to be accurately positioned, and then the key point model is quantized to 8 bits without loss.
Description
Method for improving accurate positioning of license plate Technical Field The invention relates to the technical field of intelligent image processing, in particular to a method for improving accurate positioning of license plates. Background With the development of computer technology and the widespread use of computer vision principles, it is becoming increasingly popular to detect tracking targets in real time using computer image processing techniques. The dynamic real-time tracking and positioning of targets are used in intelligent traffic systems, intelligent monitoring systems and military target detection, and the positioning of surgical instruments in medical navigation surgery has a wide application value. The task of object detection is to find all objects of interest in an image, determine their location and size, which is one of the core problems in the machine vision field. Because various objects have different appearances, shapes and postures, and the interference of factors such as illumination, shielding and the like during imaging is added, target detection is always the most challenging problem in the field of machine vision. In the prior art, a license plate recognition system is a technology capable of monitoring vehicles on a road surface and automatically extracting license plate information of the vehicles for processing, and when the vehicles enter a snapshot area of the license plate recognition system, a license plate recognition integrated machine is triggered to snapshot images of the vehicles and automatically recognize license plate numbers. The vehicle detector mainly plays a role in triggering, and the license plate recognition integrated machine is started to monitor and snapshot after triggering, so that the license plate recognition integrated machine is prevented from being in a starting state all the time. The license plate detection system is mainly used for a situation of a railing gate, and the scene of application of the license plate detection system is a parking scene at the roadside of a horse. In the scene, the camera is arranged on the road side, and the deformation degree of the license plate of the acquired picture is large. At present, the traditional license plate detection directly returns 4 coordinate points, the difficulty is higher, and the return points are inaccurate. In addition, the regression coordinate points are not easy to quantize (the model is from floating point to 8bit, 4bit and 2 bit), the precision of the low-bit model can be reduced, and the regression points are inaccurate. The difficulty of directly returning the coordinates of the model is increased, and the coordinates are not easy to quantify. Inaccurate regression points can affect the license plate recognition effect. In addition, the common terminology in the prior art is as follows: Ocr (Optical Character Recognition ) refers to the process of an electronic device (e.g., a scanner or digital camera) checking characters printed on paper, determining their shape by detecting dark and light patterns, and then translating the shape into computer text using a character recognition method. OCR detection, namely detecting the position of a word. Disclosure of Invention Aiming at the problems of inaccurate regression points and difficult quantification of the traditional license plate detection, the application aims to provide a method for accurately positioning the license plate in a license plate detection system, reducing the quantification difficulty and improving the accuracy of training license plate detection. Specifically, the invention provides a method for improving license plate accurate positioning, which is characterized in that an OCR detection model is applied to detect license plates, a heat map is used as a network output result to detect the license plates, the license plate positioning is determined through a license plate key point model, and the model is quantized to a low bit so as to realize license plate detection license plate positioning. The method comprises the steps of obtaining data from the beginning, loading the data to a license plate detection model, further judging whether a license plate can be detected or not, ending detection if the license plate can not be detected, entering a license plate key point model if the license plate can be detected, conducting perspective transformation to correct the license plate, outputting the license plate, and ending detection finally. The method further comprises the steps of: S1, license plate data manufacturing: The license plate is marked as four corner points of the license plate, the data enhancement is carried out, perspective transformation is adopted, the angle rotation is carried out on three axes of xyz respectively, the condition that a roadside camera shoots is achieved, namely, the camera is placed at one of four corners of a roadside parking space, the position of the camera is almost equal to the h