A parking lot license plate detection method and system for specialized learning

By employing a collaborative architecture between edge computing and central processing, and utilizing hybrid loss functions and lightweight differential update technology, the parking lot license plate detection model achieves accurate adaptation and efficient updating. This solves the problems of low detection accuracy and high update costs in complex environments, ensuring the reliability of intelligent parking lot management.

CN120808330BActive Publication Date: 2025-11-18SICHUAN UNIVERSITY OF SCIENCE AND ENGINEERING
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511315542.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-15
Publication Date
2025-11-18
Estimated Expiration
2045-09-15

AI Technical Summary

Technical Problem

Existing parking lot license plate detection models are not adaptable to complex environments, resulting in low detection accuracy, missed detections, or false detections. Furthermore, traditional update methods consume a lot of resources and have high update costs, making them unable to adapt to real-time scene changes.

Method used

By adopting a collaborative architecture of edge computing and central processing, low-confidence samples are filtered and cached through distributed edge devices to build a teacher-student model architecture. A hybrid loss function is used to perform personalized knowledge distillation and lightweight differential update to achieve accurate model adaptation for each entry and exit point.

Benefits of technology

It significantly improves the accuracy of license plate detection in complex environments, reduces model update costs, ensures real-time detection performance, and achieves seamless hot updates without affecting the detection of other entrances and exits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120808330B_ABST
    Figure CN120808330B_ABST
Patent Text Reader

Abstract

The application provides a parking lot license plate detection method and system for exclusive learning, and belongs to the technical field of computer vision and edge computing. The method comprises the following steps: deploying a lightweight detection master model on each entrance and exit edge device to perform real-time detection and screen low-confidence difficult example samples; after uploading the samples, the central processing end generates high-quality pseudo labels by using a high-performance teacher model, and trains an exclusive student model by using a hybrid loss function that fuses detection loss, distillation loss and difficult example focused loss; finally, the weight difference is calculated and a lightweight incremental update package is generated, which is directly pushed to the edge device to complete the non-perception hot update. The system correspondingly comprises an edge processing unit and a central processing unit. The application solves the problem that a general model cannot adapt to differentiated scenes of multiple entrances and exits, realizes the unification of model individualization, precise optimization and efficient lightweight update, and significantly improves the accuracy and reliability of license plate detection in complex scenes.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer vision and deep learning, and particularly relates to a parking lot license plate detection method and system based on exclusive learning, which is suitable for iterative optimization of a license plate detection model of a parking lot entrance / exit edge detection device, and can realize lightweight and exclusive upgrading of the model according to the scene characteristics of different entrances / exists. BACKGROUND

[0002] License plate detection is a core technology of intelligent management of a parking lot, and directly affects the reliability of functions such as vehicle identity recognition, automatic charging, and safety control. Existing solutions are mostly based on a deep learning model pre-trained in a general scene, which performs stably in a conventional road scene (such as a forward driving vehicle and a standard lighting condition), but in a specific parking lot scene, due to the particularity of the posture of the license plate and environmental interference, there are often problems of insufficient adaptability, such as when a vehicle is at a large angle of climbing / descending or at an oblique driving-in / driving-out posture, or when encountering backlight / weak light environmental interference, which easily leads to problems such as low detection confidence, missed detection or false detection of the general model, and further causes chain reactions such as charging abnormalities and decreased traffic efficiency.

[0003] To solve the above problems, existing technologies mainly adopt two types of solutions: one is offline retraining, that is, the model is updated as a whole after collecting a large amount of scene data, which has a long cycle (usually several days to several weeks) and large resource consumption, and cannot adapt to the real-time changing scene requirements of the parking lot; the other is cloud centralized learning, that is, all data are uploaded to the cloud for unified training, and then the complete model is pushed to the edge device, which relies on high-bandwidth networks and ignores the scene differences of each entrance / exit (such as the backlight problem of A entrance and the inclination angle problem of B entrance, which need to be optimized specifically), resulting in insufficient pertinence of model updating. In addition, the computing and storage resources of the edge device of the parking lot (such as the built-in chip of the entrance / exit camera) are limited, and it is difficult to support the deployment and full-parameter update of large-scale models. Therefore, there is an urgent need for a technical solution that can realize lightweight and exclusive iteration of the model according to the scene characteristics of each entrance / exit of the parking lot, to improve the scene adaptability of license plate detection while ensuring real-time detection performance through a low-cost and non-perception updating method. SUMMARY

[0004] The main purpose of the present application is to overcome the shortcomings of the prior art and provide an efficient, accurate and low-cost exclusive parking lot license plate detection method and system. The method and system are based on a collaborative architecture of edge computing and central processing, realize the screening and caching of low-confidence samples through distributed edge devices, construct a "teacher-student" model architecture to realize collaborative learning of the central processing end and the edge end, use an innovative hybrid loss function for exclusive knowledge distillation, and use a lightweight differential update mechanism to complete the exclusive iteration of the edge device model.

[0005] The application innovatively proposes a dedicated continuous learning mechanism and system framework for multi-entrance parking lots, through a model binding strategy of "one life one device" and a dynamic weighted difficult example focused learning mechanism, so that each edge detection model can accurately adapt to the unique scene characteristics of the corresponding entrance, significantly improving the license plate detection accuracy in complex environments, and effectively solving the problems of insufficient generalization ability and high update cost of traditional detection models.

[0006] At the same time, the application proposes a collaborative learning framework of "edge perception-central processing end distillation-differential update". The edge devices of each entrance independently run a lightweight detection master model, which is responsible for real-time detection and difficult example sample screening; the central processing end maintains a high-performance teacher model, and assigns an independent student model and a dedicated scene memory bank to each entrance. Through a dedicated knowledge distillation mechanism based on difficult example samples, the student model is trained using an innovative hybrid loss function that combines detection loss, knowledge distillation loss, and dynamic weighted focused loss for exclusive difficult examples, which can efficiently utilize the knowledge of the teacher model to strengthen the weak links of the student model in specific scenarios; then, through differential weight quantization compression technology, a lightweight incremental update package is generated, and finally, the edge side model is updated without perception, providing reliable technical support for intelligent management of parking lots.

[0007] The application is implemented as follows:

[0008] The technical solution for achieving the purpose of the application is a dedicated learning parking lot license plate detection method, comprising the following steps:

[0009] Step 1: Differential model initialization: for each parking lot entrance / exit, the following edge processing steps are performed: load a lightweight pre-trained license plate detection master model, obtain the vehicle image of the current entrance / exit scene, and use the master model to perform real-time license plate detection on the vehicle image, output the license plate detection frame and the corresponding confidence; establish a bidirectional data communication link between all entrances / exists and a central processing end; the central processing end maintains a unified high-performance teacher model, and initializes an independent student model for each entrance / exit;

[0010] The communication link supports bidirectional data transmission, which can realize the transmission of filtered sample data from the entrance / exit to the central processing end, and the push of model incremental update package from the central processing end to the corresponding entrance / exit; the teacher model has higher detection accuracy than the master model, and its network size, parameter quantity or complexity is higher than that of the master model, which is used to generate high-confidence pseudo-labels for student models of each entrance / exit and provide knowledge distillation benchmark; each student model is uniquely associated with an entrance / exit, and the initialized model structure and parameters are consistent with the master model of the associated entrance / exit;

[0011] Step two: distributed edge sample screening and uploading: the edge processing step of each exit / entrance only performs real-time detection result analysis on the scene images collected by itself, screens low-confidence license plate samples representing difficult cases of the scene of the exit / entrance, and independently caches them; when the amount of cached samples meets the preset sample upload threshold, the sample batch of the exit / entrance is transmitted to the central processing end through the bidirectional data communication link and the cache is emptied, and the transmission data only marks the unique identifier of the exit / entrance;

[0012] The low-confidence license plate sample has a screening condition that the maximum confidence of the license plate detection frame is within the threshold range of 0.3 to 0.7; the preset sample upload threshold is between 50 and 200, and can be dynamically adjusted according to the storage resources of the edge processing step and the transmission bandwidth of the bidirectional data communication link;

[0013] Step three: central processing end parallel learning: the central processing end stores the samples uploaded by each exit / entrance into the corresponding exclusive training library, and when the sample amount of the exclusive training library of a certain exit / entrance reaches the preset training start threshold, the samples in the exclusive training library are re-detected by the teacher model, the samples are screened based on the preset confidence threshold, and high-confidence exclusive pseudo-labels are generated; based on the screened samples containing exclusive pseudo-labels, the student model associated with the exit / entrance is trained by a mixed loss function;

[0014] Step four: lightweight differential incremental pushing: the central processing end calculates the weight difference between the trained student model and the corresponding exit / entrance master model, generates the exclusive lightweight incremental update package of the exit / entrance after quantization compression, and pushes the incremental update package to the corresponding exit / entrance through the bidirectional data communication link;

[0015] Step five: edge side non-perception hot update: the edge processing step of each exit / entrance receives and verifies the incremental update package marked with its own unique identifier; after verification, an update process is started in the background to complete the inverse quantization of the incremental update package and merge it with the local master model weight to generate a new model; the local master model is iterated without perception through a hot switching mechanism, and the detection service of other exits / entrances is not affected.

[0016] Further, in step three, the exclusive training library is a dynamic sample library exclusive to a single exit / entrance, each exit / entrance has an independent exclusive training library, and the data is not shared with each other; the preset training start threshold is in the range of 100 to 300; the preset confidence threshold is in the range of 0.8 to 0.9; at the same time, the method of screening samples is as follows: the low-confidence samples in the exclusive training library are re-detected by the teacher model, and samples meeting the conditions are screened out based on the preset confidence threshold, and the detection results of the samples are used as exclusive pseudo-labels of the samples; samples with a detection confidence lower than the preset confidence threshold are deleted from the exclusive training library.

[0017] Further, in step three, the mixed loss function is: total loss = detection loss + λ x distillation loss + γ x hard example focus loss;

[0018] Wherein, the detection loss is the difference between the student model output and the exclusive pseudo label, the CIoU loss function is used to calculate the boundary box regression error, and the BCEWithLogitsLoss loss function is used to calculate the confidence error; the distillation loss is the MSE difference between the student model and the teacher model output, wherein λ is a preset weight coefficient, 0.2≤λ≤0.5; the hard example focus loss is α x distillation loss, and its dynamic weight coefficient α=(teacher model confidence-student model confidence) 2, γ is a preset global weight coefficient, and the value range is 0.05≤γ≤0.15; training adopts a lightweight mode with a batch size of 8-32 and a training round of 3-10 rounds.

[0019] Wherein, the maximum confidence of the teacher model and the maximum confidence of the student model respectively refer to the maximum value of the confidence in all the predicted frames output by the teacher model and the student model after forward inference on the same input image.

[0020] Further, in step four, the quantization compression adopts a linear quantization method to convert the weight difference value from a 32-bit floating point number to an 8-bit integer representation, and generates a header file containing a dequantization scaling factor and a zero point.

[0021] Further, in step five, the hot switching mechanism specifically includes: the edge device runs an update process in the background, verifies the incremental update package, and completes the dequantization and weight merging without stopping the main detection process, generates a new model file, and then seamlessly switches to the new model to perform real-time detection tasks through atomic replacement operation. This process does not interrupt the real-time detection service of the device, and does not affect other entrance and exit edge detection devices.

[0022] A parking lot license plate detection system based on exclusive learning, comprising edge processing units arranged at the entrances and exits of each parking lot, and a central processing unit in communication connection with all the edge processing units;

[0023] The edge processing unit comprises:

[0024] (1) Detection module: load a lightweight pre-trained license plate detection main model, obtain the vehicle images collected at the current entrance and exit, and use the main model to perform real-time license plate detection on the vehicle images collected at the current entrance and exit, and output the license plate detection frame and the corresponding confidence;

[0025] (2) Screening and caching module: based on the screening conditions of low-confidence license plate samples, screening and independently caching low-confidence license plate samples representing the hard examples of the current entrance and exit scene.

[0026] The screening condition is that the maximum confidence of the license plate detection frame is in the threshold range of 0.3-0.7; the sample upload threshold is between 50-200, which can be dynamically adjusted based on the storage resources of the edge processing unit and the communication bandwidth with the central processing unit;

[0027] (3) Communication module: used for batch transmitting sample data marked with the unique identifier of the exit / entrance to the central processing unit when the cache sample amount meets the preset sample upload threshold; and used for receiving and verifying the incremental update package marked with the unique identifier of itself;

[0028] (4) Update module: used for completing the inverse quantization and weight merging of the incremental update package in the background, and seamlessly updating the local master model through hot switching mechanism;

[0029] The central processing unit comprises:

[0030] (1) Model management module: used for loading and maintaining a unified high-performance teacher model, and automatically initializing an independent student model for each exit / entrance;

[0031] (2) Sample storage module: used for receiving sample data uploaded by each edge processing unit, storing the sample data into a dedicated training library according to the unique identifier of the exit / entrance, and monitoring the sample amount in the library in real time;

[0032] (3) Training scheduling module: used for triggering the training process when the sample amount in the dedicated training library of a certain exit / entrance reaches the preset training starting threshold:

[0033] ① calling the teacher model to re-detect the library samples, screening the samples based on the preset confidence threshold and generating high-confidence exclusive pseudo-labels (samples with confidence < threshold are automatically removed);

[0034] ② calling a hybrid loss function to train the student model of the corresponding exit / entrance in a lightweight training mode;

[0035] (4) Incremental generation module: used for calculating the weight difference between the trained student model and the corresponding master model, and generating a lightweight incremental update package through linear quantization method;

[0036] (5) Distribution control module: used for directing the incremental update package to the corresponding edge processing unit to ensure that the update package matches the unique identifier of the target unit;

[0037] Further, the exclusive training library in the sample storage module is a dynamic sample library exclusive to a single exit or entrance, each exit or entrance corresponds to an independent library and does not share data with each other; the preset training starting threshold value in the training scheduling module is between 100 and 300; the preset confidence threshold value is between 0.8 and 0.9.

[0038] Further, the mixed loss function in the training scheduling module is: total loss = detection loss + λ x distillation loss + γ x difficult example focused loss;

[0039] Wherein, the detection loss is the difference between the student model output and the exclusive pseudo label, the CIoU loss function is used to calculate the boundary box regression error, and the BCEWithLogitsLoss loss function is used to calculate the confidence error; the distillation loss is the MSE difference between the student model and the teacher model output, wherein λ is a preset weight coefficient, 0.2≤λ≤0.5; the difficult example focused loss is α x distillation loss, and its dynamic weight coefficient α=(teacher model confidence-student model confidence) 2, γ is a preset global weight coefficient, and the value range is 0.05≤γ≤0.15; the training adopts a lightweight mode with a batch size of 8-32 and a training round of 3-10 rounds.

[0040] Further, in the increment generation module, the quantization compression adopts a linear quantization method, converts the weight difference value from a 32-bit floating point number to an 8-bit integer representation, and generates a header file containing a dequantization scaling factor and a zero point.

[0041] Further, the hot switching mechanism in the updating module is configured to run an updating process in the background without stopping the main detection process, after completing the dequantization and weight merging to generate a new model file, seamlessly switching to the new model to perform real-time detection tasks through atomic replacement operation, and this process does not interrupt the real-time detection service.

[0042] The beneficial effects of the present application are: a distributed specialized learning framework is innovatively constructed for the unique environmental characteristics of different entrances of the parking lot. Through the teacher model of the central processing end and the independent student model and the exclusive scene memory bank established for each entrance, the system can deeply adapt to complex factors such as lighting conditions and shooting angles of specific scenes, and construct a specialized and refined edge-end customized model. This fine customization not only enables the model to recognize general license plate features, but also accurately captures subtle differences in specific scenes. Especially through the dynamic weighting difficult example focused learning mechanism, the learning effect of low confidence difficult example samples is significantly enhanced, thereby comprehensively improving the detection recall rate and accuracy in complex environments. At the same time, the system adopts a collaborative mechanism of "edge difficult example screening-central end knowledge distillation-differential incremental update", and the edge device only needs to deploy a lightweight model and receive a small update package after quantization compression, which greatly reduces the requirements for storage, computing power and network bandwidth of embedded terminals; through the non-perception hot update technology to realize the continuous learning closed loop, on the premise of ensuring the independence and privacy safety of the data of each entrance, the balance between precision and efficiency and the unity of generality and specialization are realized, which provides an efficient and reliable technical solution for the intelligent parking management system. BRIEF DESCRIPTION OF DRAWINGS

[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.

[0044] Figure 1 is a flowchart of a specialized learning parking lot license plate detection method provided by an embodiment of the present application;

[0045] Figure 2 is a composition block diagram of a specialized learning parking lot license plate detection system provided by an embodiment of the present application;

[0046] Figure 3 is a system workflow and data interaction schematic diagram provided by an embodiment of the present application;

[0047] Figure 4 is a mixed loss function calculation principle schematic diagram provided by an embodiment of the present application. DETAILED DESCRIPTION

[0048] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the implementation examples and accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to represent selected embodiments of the invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0049] The parking lot license plate detection method and system of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0050] like Figure 1 A parking lot license plate detection method based on personalized learning includes the following steps:

[0051] Step 1: Differentiated Model Initialization: For each parking lot entrance / exit, perform the following edge processing steps: Load a lightweight pre-trained license plate detection master model, acquire vehicle images of the current entrance / exit scene, and use the master model to perform real-time license plate detection on the vehicle images, outputting license plate detection boxes and corresponding confidence scores; establish a bidirectional data communication link between all entrances / exits and a central processing unit; the central processing unit maintains a unified high-performance teacher model and initializes an independent student model for each entrance / exit.

[0052] The communication link supports bidirectional data transmission, enabling the transmission of filtered sample data from the entry / exit to the central processing unit, and the central processing unit to push incremental model update packages to the corresponding entry / exit. The teacher model has higher detection accuracy and generalization ability than the main model, and its larger network capacity enables it to provide more reliable knowledge supervision. The initialization of an independent student model for each entry / exit ensures the specificity of the model optimization direction, avoids mutual interference of model performance caused by differences in different entry / exit scenarios, and the model structure and parameters of the student model initialization are consistent with the main model of the associated entry / exit.

[0053] Step 2: Distributed edge sample screening and uploading: Each edge processing step at each entrance / exit performs real-time detection result analysis only on the scene images it collects, screens low-confidence license plate samples that represent difficult cases in the scene of this entrance / exit, and caches them independently; when the number of cached samples meets the preset sample uploading threshold, the samples of this entrance / exit are transmitted in batches to the central processing end through the bidirectional data communication link and the cache is cleared, and the transmitted data is only marked with the unique identifier of this entrance / exit;

[0054] The low-confidence license plate samples are selected based on the following criteria: the maximum confidence of the license plate detection frame is within the threshold range of 0.3 to 0.7; the preset sample upload threshold is between 50 and 200 images, which can be dynamically adjusted according to the storage resources of the edge processing steps and the transmission bandwidth of the bidirectional data communication link.

[0055] Step 3: Parallelized Dedicated Learning at the Central Processing Unit: The central processing unit stores the samples uploaded from each entry and exit point into their corresponding dedicated training libraries. When the number of samples in the dedicated training library for a certain entry and exit point reaches the preset training start threshold, the teacher model re-detects the samples in that dedicated training library, filters the samples based on a preset confidence threshold, and generates high-confidence dedicated pseudo-labels. Based on the filtered samples with dedicated pseudo-labels, the student model associated with that entry and exit point is trained using a hybrid loss function.

[0056] Step 4: Lightweight Differential Incremental Push: The central processing unit calculates the weight difference between the trained student model and the corresponding entry / exit main model, and generates a lightweight incremental update package specific to the entry / exit after quantization and compression. The incremental update package is pushed only to the corresponding entry / exit through the bidirectional data communication link.

[0057] Step 5: Edge-side seamless hot update: Each ingress / exgress edge processing step receives and verifies the incremental update package marked with its own unique identifier; after verification, the update process is started in the background, the inverse quantization processing of the incremental update package is completed and merged with the weights of the local master model to generate a new model; the local master model is seamlessly iterated through the hot switching mechanism, without affecting the detection services of other ingress / exgress points.

[0058] Furthermore, in step three, the dedicated training library is a dynamic sample library dedicated to each entry and exit point. Each entry and exit point corresponds to an independent dedicated training library, and they do not share data with each other. The preset training start threshold ranges from 100 to 300 images. The preset reliability threshold ranges from 0.8 to 0.9. Meanwhile, the sample screening method specifically involves: using a teacher model to re-detect low-confidence samples in the dedicated training library, and using the preset reliability threshold to screen out samples that meet the conditions and use their detection results as the dedicated pseudo-labels of those samples. Samples with detection confidence lower than the preset reliability threshold are deleted from the dedicated training library.

[0059] Wherein, the maximum confidence of the teacher model and the maximum confidence of the student model refer to the maximum confidence of all predicted bounding boxes output by the teacher model and the student model after performing forward inference on the same input image, respectively.

[0060] Furthermore, in step three, the hybrid loss function is: Total loss = Detection loss + λ × Distillation loss + γ × Difficult case focus loss;

[0061] The detection loss is the difference between the student model output and the dedicated pseudo-label. The CIoU loss function is used to calculate the bounding box regression error, and the BCEWithLogitsLoss loss function is used to calculate the confidence error. The distillation loss is the difference between the MSE outputs of the student model and the teacher model, where λ is a preset weight coefficient, 0.2≤λ≤0.5. The hard example focus loss is α×distillation loss, and its dynamic weight coefficient α=(teacher model confidence - student model confidence)², γ is a preset global weight coefficient, with a value range of 0.05≤γ≤0.15. The training adopts a lightweight mode with a batch size of 8-32 and a training epoch of 3-10 epochs.

[0062] This hybrid loss function not only requires the student model's output to approximate high-quality, proprietary pseudo-labels (detection loss), but also forces it to mimic the output distribution of the teacher model (distillation loss). Furthermore, it dynamically strengthens the learning intensity of typical difficult examples through a hard-example-focused loss term. This triple constraint mechanism ensures that the student model can both inherit the generalization ability of the teacher model and deeply integrate proprietary scene features, thereby achieving precise and personalized performance improvements.

[0063] Furthermore, in step four, the quantization compression employs a linear quantization method to convert the weight difference from a 32-bit floating-point number to an 8-bit integer representation, and generates a header file containing an inverse quantization scaling factor and zero points. This incremental update package only contains the model weight changes and is quantized and compressed, reducing its data volume by more than 85% compared to a full model update. This significantly alleviates network transmission bandwidth pressure and storage overhead on edge devices, making frequent, low-cost model iterations possible.

[0064] Furthermore, in step five, the hot-switching mechanism specifically includes: the edge device runs an update process in the background, and after verifying the incremental update package, it completes dequantization and weight merging without interrupting the main detection process. After generating a new model file, it seamlessly switches to the new model through an atomic replacement operation to perform real-time detection tasks. This process does not interrupt the real-time detection service of the device and does not affect edge detection devices at other entrances and exits.

[0065] like Figure 2A parking lot license plate detection system with specialized learning includes edge processing units set at the entrances / exits of each parking lot, and a central processing unit that is communicatively connected to all the edge processing units.

[0066] The edge processing unit includes:

[0067] (1) Detection module: Load a lightweight pre-trained license plate detection main model, acquire vehicle images collected at the current entrance / exit, and use the main model to perform real-time license plate detection on the vehicle images collected at the current entrance / exit, and output license plate detection boxes and corresponding confidence scores;

[0068] (2) Filtering and caching module: Based on the filtering conditions of low-confidence license plate samples, filter low-confidence license plate samples that represent the difficulty of this entrance / exit scenario and cache them independently;

[0069] In the filtering and caching module, the filtering condition is that the maximum confidence of the license plate detection frame is in the threshold range of 0.3 to 0.7; the sample upload threshold is between 50 and 200 images, which can be dynamically adjusted based on the storage resources of the edge processing unit and the communication bandwidth with the central processing unit.

[0070] (3) Communication module: When the number of cached samples meets the preset sample upload threshold, it transmits sample data marked with the unique identifier of this entry / exit to the central processing unit in batches; and is used to receive and verify incremental update packets marked with their own unique identifier;

[0071] (4) Update module: used to complete the inverse quantization and weight merging of incremental update packages in the background, and seamlessly update the local main model through a hot-switching mechanism;

[0072] The central processing unit includes:

[0073] (1) Model management module: used to load and maintain a unified high-performance teacher model, and automatically initialize an independent student model for each entry / exit;

[0074] (2) Sample storage module: used to receive sample data uploaded by each edge processing unit, classify and store it into a dedicated training library according to the unique identifier of the entrance and exit, and monitor the sample quantity in the library in real time;

[0075] (3) Training scheduling module: used to trigger the training process when the number of samples in a specific input / output training library reaches a preset training start threshold.

[0076] ① Call the teacher model to re-detect the samples in the database, filter the samples based on the preset confidence threshold and generate high-confidence exclusive pseudo-labels (samples with confidence < threshold are automatically removed).

[0077] ②Use the hybrid loss function and the lightweight training mode to train the student model for the corresponding entrance / exit;

[0078] (4) Incremental generation module: used to calculate the weight difference between the student model and the corresponding main model after training, and generate a lightweight incremental update package through linear quantization;

[0079] (5) Distribution control module: used to push incremental update packages to the corresponding edge processing units in a targeted manner, ensuring that the update package matches the unique identifier of the target unit;

[0080] Furthermore, the dedicated training library in the sample storage module is a dynamic sample library dedicated to a single entry and exit point, with each entry and exit point corresponding to an independent library and not sharing data with each other; the preset training start threshold in the training scheduling module ranges from 100 to 300 samples; the preset reliability threshold ranges from 0.8 to 0.9.

[0081] Furthermore, the hybrid loss function in the training scheduling module is: Total loss = Detection loss + λ × Distillation loss + γ × Hard example focus loss;

[0082] The detection loss is the difference between the student model output and the dedicated pseudo-label. The CIoU loss function is used to calculate the bounding box regression error, and the BCEWithLogitsLoss loss function is used to calculate the confidence error. The distillation loss is the difference between the MSE outputs of the student model and the teacher model, where λ is a preset weight coefficient, 0.2≤λ≤0.5. The hard example focus loss is α×distillation loss, and its dynamic weight coefficient α=(teacher model confidence - student model confidence)², γ is a preset global weight coefficient, with a value range of 0.05≤γ≤0.15. The training adopts a lightweight mode with a batch size of 8-32 and a training epoch of 3-10 epochs.

[0083] Furthermore, in the incremental generation module, the quantization compression adopts a linear quantization method to convert the weight difference from a 32-bit floating-point number to an 8-bit integer representation, and generates a header file containing an inverse quantization scaling factor and zero points.

[0084] Furthermore, the hot-switching mechanism in the update module is configured as follows: without interrupting the main detection process, the update process runs in the background, and after completing the dequantization and weight merging to generate a new model file, it seamlessly switches to the new model through atomic replacement operations to perform real-time detection tasks. This process does not interrupt the real-time detection service.

[0085] The various modules of this system work collaboratively to implement the described method. The core of the edge processing unit lies in 'perception' and 'execution,' namely, real-time detection and incremental updates; the core of the central processing unit lies in 'thinking' and 'scheduling,' namely, knowledge distillation and update package generation. The two form an organic whole through a communication link, achieving a perfect combination of centralized optimization and distributed execution.

[0086] Taking a parking lot system in a residential community as an example, the parking lot has three entrances and exits: the east gate, the south gate, and the west gate. Each entrance and exit has two independent detection points: "entrance" and "exit", for a total of 6 detection points. The scenarios of the detection points at each entrance and exit are significantly different: the east gate entrance and exit are both on flat terrain, and the road in front of the entrance and exit is straight. The south gate entrance is on a flat road, but vehicles need to turn right to enter (which may cause license plate tilting). The south gate exit is a downhill straight road. The west gate entrance is flat and straight, and the west gate exit is uphill and straight.

[0087] The specific implementation process is as follows:

[0088] like Figure 1 A parking lot license plate detection method based on personalized learning includes the following steps:

[0089] Step 1: Differentiated Model Initialization: At each entrance / exit, the deployed edge processing unit independently loads the YOLOv5s pre-trained license plate detection master model (this model has a fixed architecture, 7.5M parameters, 15MB model file size, and 640×640 input size, adapted to the computing power of edge devices), totaling 6 independent models for real-time license plate detection at different entrances / exits; in the central processing unit (implemented by a field server in this example), a high-performance YOLOv5l teacher model is deployed (this model has a fixed architecture, 37.5M parameters, 90MB model file size, and 640×640 input size, providing a high-precision detection benchmark), and independent student models are initialized for each entrance / exit (totaling 6 student models). The initial structure of the student models is consistent with the master model of the corresponding entrance / exit edge device;

[0090] Each student model and the main model are bound to a unique device ID. For example, the South Gate entrance is bound to device ID 001, which is only used for real-time detection of the corresponding detection point at the South Gate entrance.

[0091] Step 2: Distributed Edge Sample Screening and Upload: Each entrance / exit edge processing unit detects the real-time acquired vehicle images, screening low-confidence license plate samples with a confidence level in the range of 0.3 to 0.7, as well as difficult samples where there are vehicles but no license plate detection results. Each device has an independent buffer, and the sample upload threshold is set to 50. The batch of samples from that device is compressed (compression rate 60%) and uploaded to the central processing unit. The data packet is marked with a unique identifier for that entrance / exit device.

[0092] Step 3: Parallelized Dedicated Learning by the Central Processing Unit: After receiving samples, the central processing unit stores them in the corresponding dedicated training library. The training start threshold ranges from 100. When the number of samples at a certain entry / exit reaches 100, the dedicated student model training for that entry / exit is started. The confidence threshold range is set to 0.85, and the teacher model is used to re-detect low-confidence samples at that entry / exit. If the detection confidence is ≥0.85, the detection result is used as the high-quality pseudo-label for that sample; if the detection confidence is <0.85, the sample is discarded. Subsequently, based on the mixed loss... The function (total loss = detection loss + λ × distillation loss + γ × α × distillation loss) is used to train the student model corresponding to the inlet and outlet, with 5 training rounds and a batch size of 8. The detection loss uses the CIoU loss function to calculate the bounding box regression error, and the BCEWithLogitsLoss loss function to calculate the confidence error. The distillation loss is the difference in MSE output between the student model and the teacher model, where λ = 0.4. The dynamic weight coefficient α = (maximum confidence of the teacher model - maximum confidence of the student model)², and the global weight coefficient γ = 0.1.

[0093] Step 4: Lightweight Differential Incremental Push: Calculate the weight difference between the student model and the main model at the training point / exit, and use linear quantization to convert the 32-bit floating-point weight difference into an 8-bit integer quantization representation to generate a dedicated incremental update package, which includes an inverse quantization scaling factor and zero-point parameters; this update package is pushed only to the edge detection device at the point / exit.

[0094] Step 5: Edge-side imperceptible hot update: After the edge processing unit of a certain entrance or exit verifies and receives the incremental update packet, it runs the update process in the background. It performs dequantization operation through the dequantization scaling factor and zero-point parameter in the update packet, restores the 8-bit integer weight difference to a 32-bit floating-point difference, and then merges it with the weight of the local main model to generate a new model file and completes the hot switch through atomic replacement operation. During the update, the license plate detection service of the entrance or exit is uninterrupted, and the detection of other entrances and exits is not affected.

[0095] The system composition block diagram of this invention is as follows: Figure 2 As shown; the system workflow and data interaction diagram of the present invention are as follows. Figure 3 As shown; Figure 2 In this context, the 'image processing unit' represents the function of acquiring image data and is a prerequisite for implementing the 'detection module' function.

[0096] After 8 weeks of operational optimization, the detection accuracy of each entrance and exit has changed to some extent, as shown in Table 1:

[0097] Table 1 Comparison of Detection Performance Improvements at Each Entrance / Exit

[0098]

[0099] As shown in Table 1, the detection accuracy at the East Gate entrance, East Gate exit, and West Gate entrance is already very high (close to 100%) due to the flat terrain and lack of vehicle turns, so the improvement is not significant. However, the initial accuracy at the South Gate entrance, South Gate exit, and West Gate exit is unsatisfactory due to turns, downhill slopes, and uphill slopes. After training the model with a customized approach, the accuracy of these locations all increased significantly, achieving satisfactory results. Meanwhile, Figure 4 The changes in detection accuracy at each detection location with the number of main model updates are shown. It can be seen that as the main model is updated step by step, its detection accuracy also increases, indicating that the results of this invention can effectively improve the vehicle detection accuracy in parking lots.

[0100] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the invention by those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the invention should be included within the scope of protection of the invention.

Claims

1. A parking lot license plate detection method with dedicated learning, characterized in that, Includes the following steps: Step 1: Differentiated Model Initialization: For each parking lot entrance / exit, perform the following edge processing steps: Load a lightweight pre-trained license plate detection master model, acquire vehicle images of the current entrance / exit scene, and use the master model to perform real-time license plate detection on the vehicle images, outputting license plate detection boxes and corresponding confidence scores; establish a bidirectional data communication link between all entrances / exits and a central processing unit; the central processing unit maintains a unified high-performance teacher model and initializes an independent student model for each entrance / exit. The communication link supports bidirectional data transmission, enabling the transmission of filtered sample data from the entry / exit points to the central processing unit, and the central processing unit to push incremental model update packages to the corresponding entry / exit points. The teacher model has higher detection accuracy than the main model, and its network size, number of parameters, or complexity are higher than the main model. It is used to generate high-confidence pseudo-labels for student models at each entry / exit point and provide a knowledge distillation benchmark. Each student model is uniquely associated with one entry / exit point, and its initialized model structure and parameters are consistent with the main model associated with the entry / exit point. Step 2: Distributed edge sample screening and uploading: Each edge processing step at each entrance / exit performs real-time detection result analysis only on the scene images it collects, screens low-confidence license plate samples that represent difficult cases in the scene of this entrance / exit, and caches them independently; when the number of cached samples meets the preset sample uploading threshold, the samples of this entrance / exit are transmitted in batches to the central processing end through the bidirectional data communication link and the cache is cleared, and the transmitted data is only marked with the unique identifier of this entrance / exit; The low-confidence license plate samples are selected based on the following criteria: the maximum confidence of the license plate detection frame is within the threshold range of 0.3 to 0.7; the preset sample upload threshold is between 50 and 200 images, which can be dynamically adjusted according to the storage resources of the edge processing steps and the transmission bandwidth of the bidirectional data communication link. Step 3: Parallelized Dedicated Learning at the Central Processing Unit: The central processing unit stores the samples uploaded from each entry and exit point into their corresponding dedicated training libraries. When the number of samples in the dedicated training library for a certain entry and exit point reaches the preset training start threshold, the teacher model re-detects the samples in that dedicated training library, filters the samples based on a preset confidence threshold, and generates high-confidence dedicated pseudo-labels. Based on the filtered samples with dedicated pseudo-labels, the student model associated with that entry and exit point is trained using a hybrid loss function. Step 4: Lightweight Differential Incremental Push: The central processing unit calculates the weight difference between the trained student model and the corresponding entry / exit main model, and generates a lightweight incremental update package specific to the entry / exit after quantization and compression. The incremental update package is pushed only to the corresponding entry / exit through the bidirectional data communication link. Step 5: Edge-side non-perceptible hot update: Each edge processing step at the inlet / outlet receives and verifies the incremental update packet that uniquely identifies itself; After verification, the update process is started in the background to complete the dequantization of the incremental update package and merge it with the weights of the local main model to generate a new model; The hot-switching mechanism enables seamless iteration of the local master model without affecting the detection services of other entry / exit points.

2. The parking lot license plate detection method based on specialized learning as described in claim 1, characterized in that, In step three, the dedicated training library is a dynamic sample library dedicated to each entry and exit point. Each entry and exit point corresponds to an independent dedicated training library and does not share data with each other. The preset training start threshold ranges from 100 to 300 images. The preset confidence threshold ranges from 0.8 to 0.

9. Meanwhile, the sample screening method is as follows: the teacher model is used to re-detect the low-confidence samples in the dedicated training library. Based on the preset confidence threshold, samples that meet the conditions are screened out and their detection results are used as the dedicated pseudo-labels of the samples. Samples with detection confidence lower than the preset confidence threshold are deleted from the dedicated training library.

3. The parking lot license plate detection method based on specialized learning as described in claim 1, characterized in that, In step three, the hybrid loss function is: Total loss = Detection loss + λ × Distillation loss + γ × Difficult case focus loss; The detection loss is the difference between the student model output and the dedicated pseudo-label. The CIoU loss function is used to calculate the bounding box regression error, and the BCEWithLogitsLoss loss function is used to calculate the confidence error. The distillation loss is the difference between the MSE outputs of the student model and the teacher model, where λ is a preset weight coefficient, 0.2≤λ≤0.

5. The hard example focus loss is α×distillation loss, and its dynamic weight coefficient α=(teacher model confidence - student model confidence)², γ is a preset global weight coefficient, with a value range of 0.05≤γ≤0.

15. The training adopts a lightweight mode with a batch size of 8-32 and a training epoch of 3-10 epochs.

4. The parking lot license plate detection method based on specialized learning as described in claim 1, characterized in that, In step four, the quantization compression uses a linear quantization method to convert the weight difference from a 32-bit floating-point number to an 8-bit integer representation, and generates a header file containing the inverse quantization scaling factor and zero points.

5. The parking lot license plate detection method based on specialized learning as described in claim 1, characterized in that, In step five, the hot-switching mechanism specifically includes: the edge device runs an update process in the background, and after verifying the incremental update package, it completes dequantization and weight merging without interrupting the main detection process. After generating a new model file, it seamlessly switches to the new model through an atomic replacement operation to perform real-time detection tasks. This process does not interrupt the real-time detection service of the device and does not affect edge detection devices at other entrances and exits.

6. A parking lot license plate detection system with customized learning capabilities, characterized in that, It includes edge processing units installed at each parking lot entrance / exit, and a central processing unit that is communicatively connected to all of the edge processing units; The edge processing unit includes: (1) Detection module: Load a lightweight pre-trained license plate detection main model, acquire vehicle images collected at the current entrance / exit, and use the main model to perform real-time license plate detection on the vehicle images collected at the current entrance / exit, and output license plate detection boxes and corresponding confidence scores; (2) Filtering and caching module: Based on the filtering conditions of low-confidence license plate samples, filter low-confidence license plate samples that represent the difficulty of this entrance / exit scenario and cache them independently; In the filtering and caching module, the filtering condition is that the maximum confidence of the license plate detection frame is in the threshold range of 0.3 to 0.7; the sample upload threshold is between 50 and 200 images, which can be dynamically adjusted based on the storage resources of the edge processing unit and the communication bandwidth with the central processing unit. (3) Communication module: When the number of cached samples meets the preset sample upload threshold, it transmits sample data marked with the unique identifier of this entry / exit to the central processing unit in batches; and is used to receive and verify incremental update packets marked with their own unique identifier; (4) Update module: used to complete the inverse quantization and weight merging of incremental update packages in the background, and seamlessly update the local main model through a hot-switching mechanism; The central processing unit includes: (1) Model management module: used to load and maintain a unified high-performance teacher model, and automatically initialize an independent student model for each entry / exit; (2) Sample storage module: used to receive sample data uploaded by each edge processing unit, classify and store it into a dedicated training library according to the unique identifier of the entrance and exit, and monitor the sample quantity in the library in real time; (3) Training scheduling module: used to trigger the training process when the number of samples in a specific input / output training library reaches a preset training start threshold. ① Call the teacher model to re-detect the samples in the library, filter the samples based on the preset confidence threshold and generate high-confidence exclusive pseudo-labels, and automatically remove samples with confidence < threshold; ②Use the hybrid loss function and the lightweight training mode to train the student model for the corresponding entrance / exit; (4) Incremental generation module: used to calculate the weight difference between the student model and the corresponding main model after training, and generate a lightweight incremental update package through linear quantization; (5) Distribution control module: used to push incremental update packages to the corresponding edge processing units in a targeted manner, ensuring that the update package matches the unique identifier of the target unit.

7. The parking lot license plate detection system with dedicated learning as described in claim 6, characterized in that, The dedicated training library in the sample storage module is a dynamic sample library dedicated to a single entry and exit point. Each entry and exit point corresponds to an independent library and does not share data with each other. The preset training start threshold in the training scheduling module is between 100 and 300 samples. The preset reliability threshold is between 0.8 and 0.

9.

8. The parking lot license plate detection system with customized learning as described in claim 6, characterized in that, The hybrid loss function in the training scheduling module is: Total loss = Detection loss + λ × Distillation loss + γ × Difficult example focus loss; The detection loss is the difference between the student model output and the dedicated pseudo-label. The CIoU loss function is used to calculate the bounding box regression error, and the BCEWithLogitsLoss loss function is used to calculate the confidence error. The distillation loss is the difference between the MSE outputs of the student model and the teacher model, where λ is a preset weight coefficient, 0.2≤λ≤0.

5. The hard example focus loss is α×distillation loss, and its dynamic weight coefficient α=(teacher model confidence - student model confidence)², γ is a preset global weight coefficient, with a value range of 0.05≤γ≤0.

15. The training adopts a lightweight mode with a batch size of 8-32 and a training epoch of 3-10 epochs.

9. A parking lot license plate detection system with customized learning as described in claim 6, characterized in that, In the incremental generation module, the quantization compression adopts a linear quantization method to convert the weight difference from a 32-bit floating-point number to an 8-bit integer representation, and generates a header file containing an inverse quantization scaling factor and zero points.

10. A parking lot license plate detection system with customized learning as described in claim 6, characterized in that, The hot-switching mechanism in the update module is configured as follows: without interrupting the main detection process, the edge device runs the update process in the background. After completing the inverse quantization and weight merging to generate a new model file, it seamlessly switches to the new model through atomic replacement operations to perform real-time detection tasks. This process does not interrupt the real-time detection service of the device and does not affect the edge detection devices at other entrances and exits.

Citation Information

Patent Citations

  • Semi-supervised anchor-frame-free license plate detection method based on arbitration

    CN118799849A

  • Engineering machinery distributed edge computing system based on multi-heterogeneous teacher distillation method

    CN120179404A