Parking lot license plate detection method and system based on exclusive learning

By using a collaborative architecture of edge computing and central processing, and employing a teacher-student model architecture and hybrid loss function for specialized knowledge distillation, the problem of insufficient adaptability of parking lot license plate detection models in complex environments is solved, achieving efficient and low-cost model updates and accurate detection.

CN120808330AActive Publication Date: 2025-10-17SICHUAN UNIVERSITY OF SCIENCE AND ENGINEERING

Patent Information

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

AI Technical Summary

Technical Problem

The existing parking lot license plate detection model lacks adaptability in complex environments, resulting in low detection confidence, missed detection or false detection. In addition, the traditional update method consumes a lot of resources and has high update costs, and cannot 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 the storage and network bandwidth requirements of edge devices, and achieves low-cost model updates and real-time detection performance assurance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120808330A_ABST
    Figure CN120808330A_ABST
Patent Text Reader

Abstract

The invention provides a parking lot license plate detection method and system based on exclusive learning, and belongs to the technical field of computer vision and edge computing. The method comprises the following steps: deploying a lightweight detection main model at each entrance and exit edge device to carry out real-time detection and screen low-confidence difficult case samples; after the sample is uploaded, the central processing end generates a high-quality pseudo label by using a high-performance teacher model, and trains an exclusive student model by using a mixed loss function fusing detection loss, distillation loss and difficult case concentration loss; and finally, calculating a weight difference value and quantizing to generate a lightweight incremental update package, and directionally pushing the lightweight incremental update package to edge equipment to complete non-perception hot update. The system correspondingly comprises an edge processing unit and a central processing unit. According to the method, the problem that a general model cannot adapt to a multi-gateway differentiated scene is solved, unification of personalized accurate optimization and efficient lightweight updating of the model is realized, and the accuracy and reliability of license plate detection in a complex scene are remarkably improved.
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 traffic efficiency decline.

[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: The technical solution for achieving the purpose of the application is a dedicated learning parking lot license plate detection method, comprising the following steps: 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; 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 benchmarks; 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; 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; 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; 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; 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 a lightweight incremental update package exclusive to the exit / entrance after quantization compression, and pushes the incremental update package to the corresponding exit / entrance through the bidirectional data communication link; 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.

[0008] 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 detection confidence lower than the preset confidence threshold are deleted from the exclusive training library.

[0009] Further, in step three, the mixed loss function is: total loss = detection loss + λ x distillation loss + γ x hard example focus loss; 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.

[0010] Wherein, the teacher model maximum confidence and the student model maximum confidence 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.

[0011] 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.

[0012] 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 dequantization and weight merging without stopping the main detection process, generates a new model file, and then seamlessly switches to the new model through 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 other entrance and exit edge detection devices.

[0013] 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; The edge processing unit comprises: (1) a detection module: loading a lightweight pre-trained license plate detection main model, obtaining the vehicle image collected at the current entrance or exit, and using the main model to perform real-time license plate detection on the vehicle image collected at the current entrance or exit, and outputting the license plate detection frame and the corresponding confidence; (2) a screening and caching module: based on the screening conditions of low-confidence license plate samples, screening low-confidence license plate samples representing the hard examples of the current entrance or exit scene and independently caching them; 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; (3) Communication module: for transmitting sample data marked with the unique identifier of the exit / entrance to the central processing unit in batches when the cache sample amount meets the preset sample upload threshold; and for receiving and verifying the incremental update package marked with the unique identifier of itself; (4) Update module: 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; The central processing unit comprises: (1) Model management module: for loading and maintaining a unified high-performance teacher model, and automatically initializing an independent student model for each exit / entrance; (2) Sample storage module: 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; (3) Training scheduling module: 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: ① 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 excluded); ② calling the hybrid loss function to train the student model of the corresponding exit / entrance in a lightweight training mode; (4) Increment generation module: 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; (5) Distribution control module: 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; Further, the dedicated training library in the sample storage module is a dynamic sample library exclusive to a single exit / entrance, and each exit / entrance corresponds to an independent library and does not share data with each other; the preset training starting threshold in the training scheduling module has a value range of 100-300; the preset confidence threshold has a range of 0.8-0.9.

[0014] Further, the hybrid loss function in the training scheduling module is: total loss = detection loss + λ × distillation loss + γ × difficult example focused loss; 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 lambda is a preset weight coefficient, 0.2<=lambda<=0.5; the hard example focused loss is alpha x distillation loss, and its dynamic weight coefficient alpha=(teacher model confidence-student model confidence) 2, and gamma is a preset global weight coefficient, the value range is 0.05<=gamma<=0.15; the training adopts a lightweight mode with a batch size of 8-32 and a training round of 3-10 rounds.

[0015] Further, in the increment generation module, 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.

[0016] Further, the hot switching mechanism in the updating module is configured to run the updating process in the background without stopping the main detection process, and after completing the dequantization and weight merging to generate a new model file, seamlessly switch 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.

[0017] The beneficial effects of the application are: a distributed exclusive learning framework is innovatively constructed according to 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 exclusive scene memory library established for each entrance, the system can deeply adapt to complex factors such as light conditions and shooting angles of specific scenes, and construct exclusive and refined edge-end customized models. This refinement 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 hard example focused learning mechanism, which significantly enhances the learning effect of low confidence difficult example samples, 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 increment updating", 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 updating technology, a continuous learning closed loop is realized, which balances the precision and efficiency, unifies the universality and exclusivity, and provides an efficient and reliable technical solution for the intelligent parking management system under the premise of ensuring the independence and privacy safety of data of each entrance. BRIEF DESCRIPTION OF DRAWINGS

[0018] 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 of the embodiments of the present application, and therefore should not be regarded as a limitation on the scope, and for those of ordinary skill in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.

[0019] Figure 1 is a flow chart of a parking lot license plate detection method provided by an embodiment of the present application; Figure 2 is a composition block diagram of a parking lot license plate detection system provided by an embodiment of the present application; Figure 3 is a system workflow and data interaction schematic diagram provided by an embodiment of the present application; Figure 4 is a mixed loss function calculation principle schematic diagram provided by an embodiment of the present application. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solutions and advantages of the embodiments of the present application more clear, the following will combine the implementation cases and drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor are within the scope of protection of the present application. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor are within the scope of protection of the present application.

[0021] The parking lot license plate detection method and system described in the present application will be described in detail below in combination with the drawings and specific embodiments.

[0022] As Figure 1 A parking lot license plate detection method of specialization learning, comprising the following steps: Step one: differential model initialization: for each parking lot entrance / exit, the following edge processing steps are performed respectively: load the 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; a bidirectional data communication link is established between all entrances / exits 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; 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 and generalization ability than the master model, and its larger network capacity enables it to provide more reliable knowledge supervision; and an independent student model is initialized for each entrance / exit to ensure the specificity of the model optimization direction and avoid the mutual interference of model performance caused by the difference between different entrance / exit scenes, and the model structure and parameters of the student model initialization are consistent with the master model associated with the entrance / exit; Step two: distributed edge sample screening and uploading: the edge processing step of each entrance / exit only performs real-time detection result analysis on the scene image collected by itself, screens low-confidence license plate samples representing difficult examples of the entrance / exit scene and independently buffers them; when the amount of buffered samples meets the preset sample upload threshold, the samples of the entrance / exit are transmitted in batches to the central processing end through the bidirectional data communication link and the buffer is emptied, and the transmission data only marks the unique identifier of the entrance / exit; The low-confidence license plate sample has the following screening conditions: 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, which can be dynamically adjusted according to the storage resources of the edge processing step and the transmission bandwidth of the bidirectional data communication link; Step three: central processing end parallel learning: the central processing end stores the samples uploaded by each entrance / exit into the corresponding exclusive training library; when the sample amount of the exclusive training library of a certain entrance / exit reaches the preset training start threshold, the teacher model is used to re-detect the samples in the exclusive training library, filter the samples based on the preset confidence threshold, and generate high-confidence exclusive pseudo-labels; based on the filtered samples containing exclusive pseudo-labels, the student model associated with the entrance / exit is trained through a hybrid loss function; Step four: lightweight differential incremental push: the central processing end calculates the weight difference between the trained student model and the corresponding entrance / exit master model, generates a lightweight incremental update package exclusive to the entrance / exit after quantization and compression, and pushes the incremental update package to the corresponding entrance / exit through the bidirectional data communication link; 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 unique identifier; after verification, the update process is started in the background, the dequantization processing of the incremental update package is completed, and the new model is generated by merging with the local master model weight; the non-perception iteration of the local master model is realized through the hot switching mechanism, and the detection service of other exits / entrances is not affected.

[0023] Further, in step three, the exclusive to-be-trained library is a dynamic sample library exclusive to a single exit / entrance, each exit / entrance corresponds to an independent exclusive to-be-trained library, and the data is not shared with each other; the preset training starting threshold value is 100-300; the preset confidence threshold value is 0.8-0.9; at the same time, the method for screening samples is: using a teacher model to re-detect low-confidence samples in the exclusive to-be-trained library, screening samples meeting the conditions by using a preset confidence threshold value, and taking the detection results of the samples as exclusive pseudo-labels of the samples; for samples with a detection confidence lower than the preset confidence threshold value, the samples are deleted from the exclusive to-be-trained library.

[0024] Among them, 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 prediction boxes output by the teacher model and the student model after forward inference on the same input image.

[0025] Further, in step three, the mixed loss function is: total loss = detection loss + λ x distillation loss + γ x hard example focus loss. Among them, the detection loss is the difference between the output of the student model 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 output of the student model and the teacher model, wherein λ is a preset weight coefficient, 0.2≤λ≤0.5; the hard example focus loss is α x distillation loss, and the 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.

[0026] The mixed loss function not only requires the output of the student model to approximate the high-quality exclusive pseudo-label (detection loss), but also forces it to imitate the output distribution of the teacher model (distillation loss), and further dynamically strengthens the learning intensity of typical hard examples through the hard example focus loss item. This triple constraint mechanism ensures that the student model not only inherits the generalization ability of the teacher model, but also deeply integrates the exclusive scene features, thereby realizing precise individual performance improvement.

[0027] 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 the inverse quantization scaling factor and zero point. This incremental update package only contains the model weight change, and is quantization compressed, with a data volume reduction of more than 85% compared to the full model update, greatly reducing the network transmission bandwidth pressure and the storage overhead of the edge device, making frequent and low-cost model iteration possible.

[0028] 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 inverse quantization and weight merging without stopping the main detection process, generates a new model file, and 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 access edge detection devices.

[0029] As Figure 2 A parking lot license plate detection system for exclusive learning includes edge processing units arranged at the entrances and exits of each parking lot, and a central processing unit in communication with all the edge processing units. The edge processing unit includes: (1) Detection module: loads a lightweight pre-trained license plate detection master model, obtains vehicle images collected at the current entrance or exit, and uses the master model to perform real-time license plate detection on the vehicle images collected at the current entrance or exit, and outputs license plate detection frames and corresponding confidence levels. (2) Screening and caching module: based on the screening conditions of low-confidence license plate samples, screening low-confidence license plate samples representing difficult examples of the current entrance or exit scene and independently caching them. In the screening and caching module, the screening condition is that the maximum confidence of the license plate detection frame is within 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. (3) Communication module: used to batch transfer sample data marked with the unique identifier of the current entrance or exit to the central processing unit when the amount of cached samples meets the preset sample upload threshold; and used to receive and verify incremental update packages marked with its own unique identifier. (4) Update module: used to complete inverse quantization and weight merging of the incremental update package in the background, and seamlessly update the local master model through the 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 entrance or exit. (2) Sample storage module: used for receiving sample data uploaded by each edge processing unit, storing into a dedicated training library according to the unique identification of the entrance and exit, and monitoring the sample amount in the library in real time; (3) Training scheduling module: used for triggering a training process when the sample amount in the dedicated training library of a certain entrance or exit reaches a preset training starting threshold: ① calling a teacher model to re-detect the samples in the library, screening the samples based on a preset confidence threshold, and generating high-confidence exclusive pseudo-labels (samples with confidence < threshold are automatically removed); ② calling a hybrid loss function, and training a student model corresponding to the entrance or exit in a lightweight training mode; (4) Increment generation module: used for calculating the weight difference between the student model after training and the corresponding master model, and generating a lightweight incremental update package through linear quantization method; (5) Distribution control module: used for pushing the incremental update package to the corresponding edge processing unit to ensure that the update package matches the unique identification of the target unit; Further, the exclusive training library in the sample storage module is a dynamic sample library exclusive to a single entrance or exit, and each entrance or exit corresponds to an independent library and does not share data with each other; the preset training starting threshold in the training scheduling module is in the range of 100-300; the preset confidence threshold is in the range of 0.8-0.9.

[0030] Further, the hybrid loss function in the training scheduling module is: total loss = detection loss + λ x distillation loss + γ x difficult example focused loss; 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 batch size of 8-32 and training rounds of 3-10 rounds.

[0031] Further, in the increment generation module, the quantization compression adopts a linear quantization method, converts the weight difference 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.

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

[0033] The various modules of the system work together to implement the method process. The core of the edge processing unit is 'perception' and 'execution', i.e., real-time detection and incremental update; the core of the central processing unit is 'thinking' and'scheduling', i.e., knowledge distillation and update package generation. The two form an organic whole through the communication link, realizing the perfect combination of centralized optimization and distributed execution.

[0034] For example, deploying the system in a parking lot of a certain community, the parking lot of the community includes three entrances, east gate, south gate, and west gate, each of which contains two independent detection points, "entrance" and "exit", a total of 6 detection points. The entrance and exit detection points have significant differences in scenes: the east gate entrance and exit are both flat terrain, and the road in front of the entrance and exit is straight; the south gate entrance is flat but vehicles need to turn right to enter (which is prone to license plate inclination), the south gate exit is a downhill straight section, the west gate entrance is flat and straight, and the west gate exit is an uphill straight section.

[0035] The specific implementation process is as follows: As Figure 1 A parking lot license plate detection method for exclusive learning, comprising the following steps: Step 1: Differentiated model initialization: At each entrance / exit, the edge processing unit deployed independently loads the YOLOv5s pre-trained license plate detection master model (the model has a fixed architecture, with 7.5M parameters, a model file size of 15MB, an input size of 640x640, and is suitable for edge device computing power), a total of 6 independent models for real-time license plate detection at different entrances / exits; In the central processing unit (in this example, a field server), a high-performance YOLOv5l teacher model (the model has a fixed architecture, with 37.5M parameters, a model file size of 90MB, and an input size of 640x640, which can provide high-precision detection benchmarks) is deployed, and an independent student model is initialized for each entrance / exit (a total of 6 student models), the initial structure of the student model is consistent with the master model of the corresponding entrance / exit edge device; Each student model and master model is bound to a unique device ID, such as device ID001 for the south gate entrance, which is only used for real-time detection at the corresponding detection point of the south gate entrance; Step two: distributed edge sample screening and uploading: each exit / entrance edge processing unit detects the real-time collected vehicle image, screens low-confidence license plate samples with confidence in the range of 0.3-0.7 and difficult sample samples with vehicle but no license plate detection result. Each device sets an independent cache area, and the sample upload threshold is set to 50. The batch of samples of the device are compressed (compression rate 60%) and uploaded to the central processing unit, and the data packet marks the unique identifier of the exit and entrance device; Step three: central processing unit parallelization of exclusive learning: after receiving the samples, the central processing unit stores the samples in the corresponding exclusive training library; the training start threshold value is in the range of 100, and when the number of samples of an exit and entrance reaches 100, the exclusive student model training of the exit / entrance is started: the confidence threshold is set to 0.85, and the teacher model is used to re-detect the low-confidence samples of the exit / entrance, and if the detection confidence is greater than or equal to 0.85, the detection result is taken as the high-quality pseudo-label of the sample; if the detection confidence is less than 0.85, the sample is discarded; then, the student model corresponding to the exit and entrance is trained based on the mixed loss function (total loss = detection loss + lambda x distillation loss + gamma x alpha x distillation loss), the training round is 5 rounds, and the batch size is 8; wherein, the detection loss calculates the boundary box regression error using the CIoU loss function, and the confidence error using the BCEWithLogitsLoss loss function; the distillation loss is the MSE difference between the output of the student model and the teacher model, wherein lambda = 0.4; the dynamic weight coefficient alpha = (maximum confidence of the teacher model - maximum confidence of the student model) 2, and the global weight coefficient gamma = 0.1; Step four: lightweight differential incremental pushing: the weight difference between the trained student model of the exit / entrance and the master model is calculated, the 32-bit floating-point weight difference is converted into 8-bit integer quantization representation using linear quantization method, an exclusive incremental update package is generated, including the inverse quantization scaling factor and the zero point parameter; the update package is only pushed to the edge detection device of the exit and entrance; Step five: edge side non-perception hot update: after the edge processing unit of an exit and entrance verifies the received incremental update package, an update process is run in the background, the inverse quantization scaling factor and the zero point parameter in the update package are used to perform inverse quantization operation, the 8-bit integer weight difference is restored to 32-bit floating-point number difference, and then the local master model weight is combined to generate a new model file and complete hot switching through atomic replacement operation; during the update, the license plate detection service of the exit and entrance is uninterrupted, and other exit and entrance detection is not affected.

[0036] The system composition block diagram of the application is shown in Figure 2 The system workflow and data interaction schematic diagram of the application is shown in Figure 3 Figure 2 Among them, the 'image processing unit' is used to represent the acquisition function of image data, which is a pre-step to realize the function of the 'detection module'.​

[0037] After 8 weeks of operation optimization, the detection accuracy of each entrance and exit has changed to a certain extent, as shown in Table 1: Table 1 Comparison table of detection performance improvement of each entrance and exit

[0038] As shown in Table 1, the detection accuracy of the east gate entrance, the east gate exit and the west gate entrance is already very high (close to 100%) due to the flat terrain and no vehicle turning, so the improvement is not obvious; but the initial accuracy of the south gate entrance, the south gate exit and the west gate exit is not satisfactory due to the turning, downhill and uphill, and after the exclusive training model, the accuracy is greatly improved, and satisfactory results are obtained. At the same time, Figure 3 The change rule of the detection accuracy of each detection position with the number of main model updates is given, and it can be seen that the detection accuracy is improved with the gradual updating of the main model, which shows that the results of the present application can effectively improve the vehicle detection precision of the parking lot.

[0039] The above only describes the preferred embodiments of the present application and is not used to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A parking lot license plate detection method based on specialized learning, characterized in that: The following steps are involved: 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, obtain a vehicle image of the current entrance / exit scene, and use the master model to perform real-time license plate detection on the vehicle image, outputting the license plate detection box and corresponding confidence score; establish a two-way data communication link between all entrances / exits and a central processing terminal; the central processing terminal 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 output / entry to transmit filtered sample data to the central processing end, and the central processing end to push model incremental update packages to the corresponding output / entry. The teacher model has higher detection accuracy than the main model, and its network scale, number of parameters, or complexity are higher than the main model. It is used to generate high-confidence pseudo-labels for the student models of each output / entry and provide a knowledge distillation benchmark. Each student model is uniquely associated with one output / entry, and the initialized model structure and parameters are consistent with the main model of the associated output / entry. Step 2: Distributed edge sample screening and uploading: The edge processing step of each entrance / exit only performs real-time detection result analysis on the scene images collected by itself, screening low-confidence license plate samples that represent difficult examples of the scene at this entrance / exit and independently caching them; when the cached sample volume meets the preset sample upload threshold, the samples of the entrance / exit are batch transmitted to the central processing end via the bidirectional data communication link and the cache is cleared. The transmitted data is only marked with the unique identifier of the entrance / exit; The low-confidence license plate samples are screened for the following conditions: the maximum confidence of the license plate detection frame is within a threshold range of 0.3 to 0.7; the preset sample upload threshold is between 50 and 200, which can be dynamically adjusted based on the storage resources of the edge processing step and the transmission bandwidth of the two-way data communication link; Step 3: Parallelized dedicated learning on the central processing end: The central processing end stores the samples uploaded by each inlet and outlet into the corresponding dedicated training library. When the number of samples in the dedicated training library of a certain inlet and outlet reaches the preset training start threshold, the teacher model re-tests the samples in the dedicated training library, filters the samples based on the preset confidence threshold, and generates high-confidence dedicated pseudo-labels. Based on the filtered samples with dedicated pseudo-labels, the student model associated with the inlet and outlet is trained using a hybrid loss function. Step 4: Lightweight differential incremental push: The central processing end calculates the weight difference between the trained student model and the corresponding output / entry master model, and generates a lightweight incremental update package dedicated to the output / entry after quantization and compression. The incremental update package is only pushed to the corresponding output / entry through the bidirectional data communication link; Step 5: Edge-side non-perceptual hot update: The edge processing steps at each ingress / egress receive and verify the incremental update package marked with its own unique identifier; After verification, the update process is started in the background to complete the dequantization of the incremental update package and merge it with the local main model weights to generate a new model; The hot switching mechanism enables imperceptible iteration of the local main model without affecting the detection services of other exits / entrances.

2. The method for detecting parking lot license plates using specialized learning as claimed in claim 1, wherein: In step three, the exclusive library to be trained is a dynamic sample library exclusive to a single exit and entrance. Each exit and entrance corresponds to an independent exclusive library to be trained, and data is not shared with each other; the preset training start threshold value range is 100~300 images; the preset confidence threshold range is 0.8~0.9; at the same time, the screening sample method is specifically as follows: use the teacher model to re-test the low-confidence samples in the exclusive library to be trained, and use the preset confidence threshold to screen out qualified samples and use the detection results as the exclusive pseudo-label of the sample. For samples with detection confidence lower than the preset confidence threshold, they are deleted from the exclusive library to be trained.

3. The method for detecting parking lot license plates by specialized learning as claimed in claim 1, characterized in that: In step 3, the hybrid loss function is: total loss = detection loss + λ × distillation loss + γ × hard example focus loss; Among them, the detection loss is the difference between the output of the student model and the exclusive 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 MSE difference between the output of the student model and the teacher model, where λ is the 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 the 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.

4. The method for detecting parking lot license plates using specialized learning as claimed in claim 1, wherein: In step 4, 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 a zero point.

5. The method for detecting parking lot license plates by specialized learning as claimed in claim 1, characterized in that: In step five, the hot switching mechanism specifically includes: the edge device runs the update process in the background, verifies the incremental update package, completes the dequantization and weight merging without deactivating the main detection process, generates a new model file, and 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.

6. A specialized learning parking lot license plate detection system, characterized by: It includes edge processing units located at the entrances and exits of each parking lot, and a central processing unit that is in communication with all of the edge processing units; The edge processing unit includes: (1) Detection module: Loads a lightweight pre-trained license plate detection master model, obtains the vehicle image collected at the current exit / entrance, and uses the master model to perform real-time license plate detection on the vehicle image collected at the current exit / entrance, outputting the license plate detection frame and the corresponding confidence level; (2) Screening and caching module: Based on the screening conditions of low-confidence license plate samples, low-confidence license plate samples that represent difficult examples in this exit / entrance scenario are screened and cached independently; In the screening cache module, the screening condition is that the maximum confidence of the license plate detection frame is within the threshold range of 0.3 to 0.7; the sample upload threshold is between 50 and 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; (3) Communication module: used to transmit the sample data marked with the unique identifier of the current entry / exit to the central processing unit in batches when the cached sample volume meets the preset sample upload threshold; and used to receive and verify the incremental update package marked with its own unique identifier; (4) Update module: used to complete the dequantization and weight merging of the incremental update package in the background, and seamlessly update the local main model through the hot switching mechanism; The central processing unit comprises: (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 it into a dedicated training library according to the unique entry and exit identifiers, and monitor the sample volume in the library in real time; (3) Training scheduling module: used to trigger the training process when the number of samples in the dedicated training library for a certain entrance / exit reaches the preset training start threshold: ① Call the teacher model to retest the samples in the library, filter the samples based on the preset confidence threshold and generate high-confidence exclusive pseudo labels (samples with confidence less than the threshold are automatically eliminated); ②Call the mixed loss function and use the lightweight training mode to train the student model of the corresponding entrance and exit; (4) Incremental generation module: used to calculate the weight difference between the trained student model and the corresponding master model, and generate a lightweight incremental update package through a linear quantization method; (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 specialized learning as claimed in claim 6, characterized in that: The exclusive library to be trained in the sample storage module is a dynamic sample library dedicated to a single exit and entrance. Each exit and entrance corresponds to an independent library and does not share data with each other; the preset training start threshold in the training scheduling module ranges from 100 to 300 images; the preset confidence threshold range is 0.8 to 0.

9.

8. The parking lot license plate detection system with specialized learning as claimed in claim 6, characterized in that: The hybrid loss function in the training scheduling module is: total loss = detection loss + λ × distillation loss + γ × hard example focus loss; Among them, the detection loss is the difference between the output of the student model and the exclusive 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 MSE difference between the output of the student model and the teacher model, where λ is the 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 the 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.

9. The parking lot license plate detection system with specialized learning as claimed 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 a zero point.

10. The parking lot license plate detection system with specialized learning as claimed in claim 6, characterized in that: The hot switching mechanism in the update module is configured as follows: without deactivating the main detection process, the update process is run in the background. After completing the inverse quantization and weight merging to generate a new model file, the new model is seamlessly switched to through the atomic replacement operation to perform the real-time detection task. 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

  • Machine vision model training method and system based on end side computing power

    CN120543948A

  • Lightweight intelligent landslide displacement prediction method

    CN120632326A

  • Multi-domain object detection method and apparatus

    US20250245954A1

Cited By

  • End-cloud collaborative optimization method and device, computer equipment and storage medium

    CN122157069A

  • Remote sensing irregular small target segmentation detection and closed loop iteration method and device

    CN122289257A

  • A substation defect detection autonomous optimization method and system based on size model cooperation

    CN122368067A