Sealant detection model incremental learning system and method for industrial environment
By constructing an incremental training dataset, knowledge distillation updates, balancing stability and plasticity, and constraining feature invariance, the problems of catastrophic forgetting and insufficient stability of models in industrial production environments are solved, enabling continuous learning and improved stability performance of the sealant detection model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU SMART ROBOVISION TECH CO LTD
- Filing Date
- 2026-01-16
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies struggle to continuously learn new defect patterns in industrial production environments, suffer from catastrophic forgetting problems, and lack stability across production batches, failing to effectively cope with dynamic changes in the production environment.
An incremental training dataset is constructed using an NG sample collection module. The known defect pattern recognition capability is maintained through a knowledge distillation update module. The learning strategy is dynamically adjusted to ensure model stability by combining a stability and plasticity balancing module and a feature invariance constraint module. Security and traceability are achieved through a model evolution management module.
This enables the model to continuously learn new defect patterns without interrupting production, while maintaining the ability to recognize known defect patterns. This improves detection performance, reduces false alarm rates, and enhances the model's cross-batch stability and update security.
Smart Images

Figure CN122155548A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of industrial inspection and machine learning technology, specifically relating to an incremental learning system and method for sealant detection models in industrial environments. Background Technology
[0002] In industries such as automotive manufacturing, electronic packaging, and building sealing, the coating quality of sealants directly affects the sealing performance and service life of products. Traditional sealant inspection mainly relies on manual visual inspection or image processing methods based on simple rules, which suffers from low inspection efficiency, high subjectivity, and susceptibility to fatigue. With the development of deep learning technology, visual inspection models based on convolutional neural networks have made significant progress in the field of sealant defect detection, enabling high-precision automated inspection.
[0003] However, the industrial production environment is dynamic and subject to change. New defect types may emerge due to factors such as adjustments in production processes, changes in raw material batches, and equipment aging. Existing deep learning detection models typically employ offline training and online deployment. When encountering new defect types not seen during the training phase, the detection model often fails to identify them correctly, leading to missed detections.
[0004] Chinese patent CN118626981A discloses a method and apparatus for dynamically optimizing a defect detection model. This method adjusts the initial structural parameters of a basic defect detection model based on the computing resources and network bandwidth of the edge device to obtain a model structure adapted to the edge device. It performs multimodal fusion processing on data collected from multiple sensors based on a self-attention mechanism. After training the model using the fused feature data, the model is distributed to the edge device based on differential privacy and data encryption technologies. The method also mentions that the edge device can periodically collect incremental data and perform regular incremental updates to the model.
[0005] However, the aforementioned existing technologies have the following problems: First, the prior art only mentions incremental updates by edge devices, but does not provide specific incremental learning algorithm designs, making it difficult to effectively solve the catastrophic forgetting problem commonly faced by deep learning models during incremental learning, i.e., the ability to retain existing knowledge is severely impaired during the learning of new knowledge. Second, the prior art does not consider the batch variation characteristics of industrial production environments. When environmental factors such as lighting conditions on the production line and batches of sealant materials change, the detection performance of the model may fluctuate. Furthermore, the prior art lacks systematic management of the model evolution process, failing to guarantee the security and traceability of model updates.
[0006] Therefore, how to design an incremental learning system that can continuously learn new defect patterns without interrupting production, while maintaining the ability to recognize known defect patterns, has become an urgent technical problem to be solved. Summary of the Invention
[0007] The purpose of this invention is to provide an incremental learning system and method for sealant detection models in industrial environments, in order to solve the technical problems in the prior art, such as the difficulty in continuously updating the detection model, catastrophic forgetting during the incremental learning process, and insufficient stability across production batches.
[0008] To achieve the above objectives, this invention provides an incremental learning system for sealant detection models in industrial environments, comprising: an NG sample acquisition module, used to receive NG sample images of sealant defects collected from the production line via an industrial cloud platform, obtain defect type and location annotation information from experts on the NG sample images, associate and pair the NG sample images with the corresponding annotation information, and construct an incremental training dataset; a knowledge distillation update module, used to receive the incremental training dataset, input the incremental training dataset into the currently deployed original sealant detection model to obtain the original model's soft label output, calculate the distillation loss of the new model for known defect patterns and the classification loss for new defect patterns based on a selective knowledge distillation strategy, and update the network parameters of the new sealant detection model based on the distillation loss and classification loss; and a stability and plasticity balance module, used to receive the new model features output by the knowledge distillation update module, calculate the relationship between the new model features and the original model features. The feature distance between features is dynamically adjusted based on the current incremental learning stage, and the stability and plasticity weights are dynamically adjusted. A stability-plasticity balance loss is generated based on the stability and plasticity weights, and the stability-plasticity balance loss is fed back to the knowledge distillation update module to constrain the parameter update direction. The feature invariance constraint module is used to collect sealant image samples from the current production batch to extract the batch feature distribution, calculate the distribution difference value between the batch feature distribution and the historical batch feature distribution, and generate a feature alignment constraint gradient when the distribution difference value exceeds the preset feature difference threshold. The feature alignment constraint gradient is passed to the knowledge distillation update module to enhance the model's cross-batch stability. The model evolution management module is used to receive the detection performance indexes from the production line verification. When the detection performance indexes meet the preset evolution trigger conditions, the updated new sealant detection model replaces the original sealant detection model and records the model version information, and synchronizes the model version information to the industrial cloud platform.
[0009] This invention also provides an incremental learning method for sealant detection models in industrial environments, including: an NG sample acquisition step, a knowledge distillation and update step, a stability and plasticity balancing step, a feature invariance constraint step, and a model evolution management step.
[0010] The beneficial effects of this invention include: a selective knowledge distillation strategy enables the model to retain the ability to recognize known defect patterns while learning new defect patterns, effectively solving the problem of catastrophic forgetting; a stable plasticity balance framework dynamically adjusts the learning strategy according to the incremental learning stage, achieving a balance between rapidly adapting to new defects and consolidating existing knowledge; feature invariance constraints ensure the stability of the model across different production batches, reducing the impact of environmental changes on detection performance; and model evolution management ensures the security and traceability of model updates, supporting version rollback. In six months of actual operation verification, this invention increased the detection rate of the sealant detection model from the initial 89% to 96.3%, while reducing the false alarm rate by 43%. Attached Figure Description
[0011] Figure 1 This is a schematic diagram of the system structure of the present invention;
[0012] Figure 2 This is a flowchart illustrating the method of the present invention. Detailed Implementation
[0013] The technical solution of the present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. It should be noted that the following embodiments are only used to illustrate the technical solution of the present invention and do not limit the scope of protection of the present invention.
[0014] See Figure 1 The incremental learning system for sealant detection models in industrial environments provided by this invention includes an NG sample acquisition module 1, a knowledge distillation and update module 2, a stability and plasticity balancing module 3, a feature invariance constraint module 4, and a model evolution management module 5. These five modules form a deeply coupled closed-loop collaborative structure, jointly realizing online incremental learning and continuous evolution of the sealant detection model.
[0015] The main function of the NG sample acquisition module 1 is to collect sealant samples deemed unqualified from the industrial production environment and generate a high-quality incremental training dataset through expert annotation. In one embodiment of the present invention, this module mainly includes three functional units: a cloud data receiving unit, an expert annotation collaboration unit, and a sample quality evaluation unit.
[0016] The cloud-based data receiving unit is responsible for establishing a secure connection with the industrial cloud platform and receiving NG sample images uploaded from each inspection station on the production line. In practical applications, when the primary inspection system on the production line determines that a sealant coating area has a potential defect, it automatically captures a high-resolution image of that area and uploads it to the industrial cloud platform. Preferably, the uploaded image resolution is no less than 1920×1080 pixels, and a lossless compression format is used to preserve defect details. The cloud-based data receiving unit uses a message queue mechanism to handle concurrent upload requests from multiple production lines, ensuring the real-time nature and reliability of data reception. In a typical automotive sealant coating production line, the average daily number of NG samples generated is approximately 200 to 500, requiring the cloud-based data receiving unit to handle peak loads.
[0017] The expert annotation collaboration unit provides an annotation interface for domain experts, supporting defect type and location annotation for out-of-process (NG) sample images. Defect type annotation uses a predefined defect classification system; in sealant inspection scenarios, common defect types include adhesive breakage, adhesive overflow, air bubbles, impurity contamination, adhesive strip misalignment, and uneven adhesive width. Defect location annotation uses bounding box annotation, where experts select the location and extent of the defect area on the image. To ensure annotation quality, the expert annotation collaboration unit supports a multi-expert cross-annotation mechanism. When the same sample is annotated by two or more experts and the annotation results differ, an arbitration process is triggered to ensure annotation consistency.
[0018] The sample quality assessment unit performs quality screening on the collected NG sample images, filtering out low-quality samples that do not meet the training requirements. The quality assessment dimensions include image sharpness, exposure uniformity, annotation completeness, and annotation consistency. Image sharpness is calculated using the Laplacian operator to determine the image gradient energy; images with gradient energy values below a preset sharpness threshold are considered blurry and are discarded. Preferably, the preset sharpness threshold is set to a gradient energy value between 100 and 200. Exposure uniformity is assessed by calculating the distribution uniformity of the image brightness histogram; severely overexposed or underexposed images are filtered out. Annotation completeness checks ensure that each NG sample has complete defect type and defect location annotation information. Annotation consistency checks calculate the annotation consistency score by comparing the intersection-union ratio (IUU) of multiple expert annotation results; samples with consistency scores below a preset consistency threshold need to be re-annotated. Preferably, the preset consistency threshold is set between 0.7 and 0.85.
[0019] Through the above processing flow, NG sample acquisition module 1 finally outputs a structured incremental training dataset. Each data record contains fields such as the storage path of the NG sample image, defect type label, defect bounding box coordinates, annotation timestamp, and annotation expert identifier. The incremental training dataset is organized in chronological order, which facilitates subsequent modules to load training samples in chronological order during incremental learning.
[0020] The knowledge distillation update module 2 is the core module of this invention. It is responsible for enabling the model to quickly learn new defect patterns while maintaining the original model's ability to identify known defects. The design of this module fully draws on the latest research results of knowledge distillation technology in the field of incremental learning, and has made innovative improvements to meet the special needs of industrial sealant testing.
[0021] In one embodiment of the present invention, the knowledge distillation update module 2 includes a soft tag generation unit, a selective distillation calculation unit, a classification loss calculation unit, an importance-aware distillation unit, and a parameter update execution unit.
[0022] The soft label generation unit inputs out-of-the-box (NG) sample images from the incremental training dataset into the currently deployed original sealant detection model to obtain the original model's prediction output for each sample. Unlike traditional hard labels, soft labels retain the complete probability distribution information of the model's output layer, reflecting the original model's confidence judgment for each defect category. Technically, soft labels are obtained by applying the softmax function to the logistic value output of the last layer of the original model and combining it with a temperature parameter for softening. Let the original model's logistic value output for a sample be a vector. The soft tag is calculated as follows:
[0023] ,
[0024] in, For the first The probability value of soft labels for each category, For the original model, the first Output logical values for each category. For distillation temperature parameters, Total number of defect categories. Distillation temperature parameter. Controlling the smoothness of the soft-label probability distribution, higher temperature values make the probability distribution smoother, which is beneficial for the new model to learn the similarity relationship between categories. Preferably, the distillation temperature parameter ranges from 2 to 10, and in the practical application of this invention, a value of 4 is preferred.
[0025] The selective distillation computation unit is an innovative design of this invention. Its core idea is to employ different loss calculation strategies based on the novelty or sophistication of the defect type to which the sample belongs. For samples belonging to known defect types, distillation loss is used to align the output of the new model with the soft labels of the original model, thus maintaining the ability to identify known defects. For samples belonging to new defect types, standard classification loss is used to allow the new model to learn directly from the true labels, thereby quickly adapting to the new defect patterns. The formula for calculating selective distillation loss is:
[0026] ,
[0027] in, This is the set of samples belonging to known defect types in the incremental training dataset. This is a sample set belonging to the new defect type. The Kullback-Leibler divergence function, Let cross-entropy be the loss function. The soft label output is for the original model. The predicted output of the new model, This is a real label. The factor is used to compensate for the effect of temperature softening on the gradient magnitude.
[0028] The importance-aware distillation unit further improves the distillation strategy by assigning differentiated distillation weights based on the original model's confidence level in identifying each defect type. Its design principle is as follows: for defect types with high confidence levels identified by the original model, stronger distillation constraints should be applied to maintain their discriminative ability; for defect types with low confidence levels identified by the original model, the distillation constraints can be appropriately reduced, allowing the new model to be corrected and improved during incremental learning. The formula for calculating the importance weights is:
[0029] ,
[0030] in, For the first Distillation weights for each known defect category For the original model on the validation set, the first Average prediction confidence for each category The number of known defect categories.
[0031] The parameter update execution unit calculates the gradient based on the comprehensive loss and updates the network parameters of the new model. In this embodiment of the invention, the Adam optimizer is used for parameter updates, the learning rate is set to 0.0001, and a cosine annealing learning rate scheduling strategy is used to gradually reduce the learning rate during training. The batch size is set according to the GPU memory capacity, preferably 16 to 32. The number of iterations per incremental learning cycle is dynamically adjusted according to the number of new samples, preferably 10 to 50 iterations.
[0032] The Stability-Plasticity Balance Module 3 addresses the stability-plasticity dilemma in incremental learning, a core challenge in the field of neural network incremental learning. Stability refers to a model's ability to retain previously learned knowledge, while plasticity refers to its ability to adapt to learning new knowledge. Overemphasizing stability can lead to difficulties in learning new flawed patterns, while overemphasizing plasticity can result in catastrophic forgetting.
[0033] In one embodiment of the present invention, the stable plasticity balancing module 3 includes a feature distance calculation unit, a dynamic weight adjustment unit, a balance loss generation unit, and a gradient projection unit.
[0034] The feature distance calculation unit extracts the intermediate layer feature representations of the new model and the original model, and calculates the feature distance between them. The feature extraction location is chosen at the output of the last convolutional feature map of the backbone network of the detection network. The features at this location contain sufficient semantic information while preserving a certain spatial resolution. Let the feature output of the original model be... The feature output of the new model is ,in For batch size, The number of feature channels, and These represent the height and width of the feature map, respectively. The feature distance is measured using mean squared error.
[0035] ,
[0036] in, For feature distance values, and The feature maps of the original model and the new model are located at the following positions. The eigenvalue at that location.
[0037] The dynamic weight adjustment unit dynamically adjusts the stability and plasticity weights based on the current stage of incremental learning. In the initial stages of incremental learning, the new model needs to quickly adapt to new defect patterns, so the plasticity weight should be higher. As training progresses and the model gradually masters new defect patterns, the stability weight should be increased to consolidate learned knowledge and prevent forgetting in subsequent training iterations. The weight adjustment strategy uses a cosine annealing function.
[0038] ,
[0039] ,
[0040] in, and The first Stability weights and plasticity weights during each training iteration and These are the minimum and maximum values of the stability weight, respectively. This represents the total number of iterations in the current incremental learning cycle. Preferably, Set to 0.3, Set it to 0.7.
[0041] The balance loss generation unit synthesizes feature distance and dynamic weights to generate a stable and malleable balance loss:
[0042] ,
[0043] This balancing loss is fed back to the knowledge distillation update module 2, and together with the selective distillation loss, they form the comprehensive training loss, which guides the parameter updates of the new model.
[0044] The gradient projection unit employs orthogonal gradient projection technology to further enhance the model's resistance to forgetting. Its core idea is to project the gradients learned from the new task onto a subspace orthogonal to the gradients of the old task, thereby ensuring that the learning of new knowledge does not interfere with the parameter space of existing knowledge. Let the gradient matrix of the old task be... The original gradient of the new task is The gradient after projection is:
[0045] ,
[0046] in, This is the pseudo-inverse of the gradient matrix of the old task. This represents the projected gradient vector. In practical implementations, to reduce computational complexity, a random projection approximation method is used to calculate the gradient projection.
[0047] Feature Invariance Constraint Module 4 is specifically designed to address batch variation issues in industrial production environments. In actual sealant testing production lines, different production batches may experience variations in lighting conditions, batch differences in sealant materials, camera parameter drift, and other factors. These factors can cause shifts in the feature distribution of the input image, thereby affecting the stability of the detection model.
[0048] In one embodiment of the present invention, the feature invariance constraint module 4 includes a batch feature extraction unit, a distribution difference calculation unit, an adaptive threshold adjustment unit, and an alignment constraint generation unit.
[0049] The batch feature extraction unit extracts feature distribution statistics from the sealant images of the current production batch while the model performs online detection. To avoid interfering with the normal detection process, feature extraction is performed asynchronously in the background. After accumulating a certain number of detection samples, the batch feature extraction unit calculates the feature mean vector and feature covariance matrix of that batch of samples:
[0050] ,
[0051] ,
[0052] in, This is the feature mean vector of the current batch. The feature covariance matrix for the current batch. This represents the number of samples in the current batch. For the first The feature vector of each sample. Preferably, the number of samples in each batch is set to 100 to 500.
[0053] The distribution difference calculation unit uses the maximum mean difference to measure the degree of difference between the feature distribution of the current batch and the feature distribution of historical batches. The maximum mean difference is a kernel-based distribution difference measure that can capture higher-order statistical differences between two distributions. Let the feature sample set of the current batch be... The feature sample set of historical batches is The formula for calculating the maximum mean difference is: ,
[0054] in, For kernel mapping functions, For the regenerating nucleus Hilbert space, and These represent the sample size for the current batch and the historical batches, respectively. In the actual calculation, a Gaussian kernel function is used, and kernel tricks are employed to avoid explicit computation of high-dimensional mappings.
[0055] ,
[0056] in, For Gaussian kernel function, This refers to the kernel bandwidth parameter. Preferably, the kernel bandwidth parameter is adaptively set based on the median distance of the sample features.
[0057] The adaptive threshold adjustment unit dynamically adjusts the feature difference threshold based on the degree of change in the production line environment. When changes in key environmental factors such as lighting conditions or batches of sealant materials are detected, the allowable range of the feature difference threshold is automatically expanded to prevent normal environmental changes from being misjudged as abnormal distribution shifts. Changes in environmental factors can be obtained through work order information in the production management system or through dedicated environmental sensors. Preferably, under normal production conditions, the preset feature difference threshold is set between 0.1 and 0.3; when a change in environmental factors is detected, the threshold is automatically expanded by 1.5 to 2 times.
[0058] When the alignment constraint generation unit detects a distribution difference exceeding a threshold, it generates a feature alignment constraint gradient and passes it to the knowledge distillation update module 2. The feature alignment constraint loss employs the distribution alignment objective function from domain adaptation.
[0059] ,
[0060] This constraint loss enables the model to learn feature representations that are invariant to batch variations, thereby improving the model's stability across different production batches.
[0061] Model Evolution Management Module 5 is responsible for managing the entire lifecycle of the sealant testing model, ensuring the safety, traceability, and rollback capability of model updates. In industrial production environments, model updates are a task that requires careful handling; any improper model replacement may lead to a decline in testing quality, thereby affecting product quality and production efficiency.
[0062] In one embodiment of the present invention, the model evolution management module 5 includes a performance evaluation unit, an evolution decision unit, a version management unit, and a version rollback unit.
[0063] The performance evaluation unit continuously monitors the detection performance metrics of the deployed model. Key evaluation metrics include detection rate, false alarm rate, and detection response time. Detection rate refers to the proportion of correctly identified defective samples out of all real defective samples; false alarm rate refers to the proportion of normal samples misclassified as defects out of all samples predicted as defects; detection response time refers to the end-to-end latency from image acquisition to detection result output. Performance metrics are statistically analyzed using a sliding window approach, with the window size set to the most recent 1000 to 5000 detection samples. In addition, the performance evaluation unit also collects manual re-inspection feedback from the production line quality control stations to correct statistical biases in the performance metrics.
[0064] The evolutionary decision unit determines whether the model update conditions are met based on the performance evaluation results. The triggering conditions for model updates employ a multi-indicator joint judgment mechanism: First, the new model's detection rate on the offline validation set must be no lower than the original model's, and its false positive rate must be no higher than the original model's; second, the new model's performance in small-scale gray-scale validation on the production line meets expectations; and finally, no serious performance fluctuation events occur during the incremental learning period. Only when all the above conditions are met simultaneously will the evolutionary decision unit approve the model update request.
[0065] The version management unit assigns a unique version identifier to each model version and records complete version metadata information. Version metadata includes the version number, creation timestamp, training data summary, model parameter snapshot, performance baseline, and association with the parent version. Version storage uses object storage services, supporting on-demand loading of historical version model parameters. In embodiments of this invention, the version number adopts a semantic versioning format, consisting of a major version number, a minor version number, and a revision number. For example, v2.3.15 represents the 2nd major version, the 3rd feature update, and the 15th revision.
[0066] The version rollback unit provides model version rollback capabilities. When an updated model experiences performance anomalies during production line operation, it can quickly roll back to the previous stable version. Rollback trigger conditions include: a continuous decrease in detection rate exceeding a preset decrease threshold, a continuous increase in false alarm rate exceeding a preset increase threshold, and a detection response time exceeding service level agreement requirements. Preferably, the preset decrease threshold is set to 3% to 5%, and the preset increase threshold is set to 2% to 3%. The rollback operation automatically records the rollback reason and rollback time, facilitating subsequent analysis of the root cause of model update failure.
[0067] The five modules of this invention form a tightly coupled closed-loop collaborative structure. The NG sample acquisition module 1 serves as the data entry point, continuously providing the system with high-quality incremental training data; the knowledge distillation and update module 2 serves as the core processing engine, executing the main computational tasks of incremental learning; the stability and plasticity balancing module 3 and the feature invariance constraint module 4 serve as constraint regulators, constraining the incremental learning process from the two dimensions of temporal stability and spatial invariance, respectively; and the model evolution management module 5 serves as the quality guardian, ensuring that only fully validated model versions can be deployed online.
[0068] In a complete incremental learning cycle, the collaborative workflow of each module is as follows: First, the NG sample acquisition module 1 receives newly accumulated NG samples from the industrial cloud platform and completes expert annotation to form an incremental training dataset; then, the knowledge distillation update module 2 loads the incremental training dataset and the currently deployed original model to start the incremental training process; during the training process, the stability and plasticity balancing module 3 calculates the feature distance in real time and dynamically adjusts the weights, feeding back the balance loss to the knowledge distillation update module 2; at the same time, the feature invariance constraint module 4 monitors the changes in batch feature distribution and generates alignment constraint gradients when necessary; after training is completed, the model evolution management module 5 evaluates the performance of the new model, and if the update conditions are met, the model is replaced; otherwise, the original model remains unchanged.
[0069] The incremental learning process of this invention uses a comprehensive loss function to drive model parameter updates. This comprehensive loss function integrates three components: selective distillation loss, stable plasticity balance loss, and feature invariance constraint loss.
[0070] ,
[0071] in, The total loss value, For selective knowledge distillation loss, To stabilize the loss of plasticity equilibrium, For feature invariance constraint loss, and This is the balance coefficient. Preferably, The value range is from 0.1 to 0.5. The value range is from 0.05 to 0.2. In the practical application of this invention, The preferred value is 0.3. The preferred value is 0.1.
[0072] The complete incremental training process includes the following stages: In the warm-up stage, the learning rate is linearly increased from one-tenth of the initial value to the target learning rate. This stage accounts for 5% to 10% of the total training iterations, aiming to ensure a smooth transition of model parameters in the early stages of incremental learning. In the main training stage, a cosine annealing learning rate scheduling strategy is used, gradually decreasing the learning rate from the target value to the minimum learning rate. This stage accounts for 85% to 90% of the total training iterations. In the fine-tuning stage, the model is finely adjusted using a minimal learning rate. This stage accounts for 5% of the total training iterations.
[0073] To prevent overfitting, this invention employs multiple regularization techniques. For data augmentation, random horizontal flipping, random rotation, random brightness adjustment, and random contrast adjustment are performed on the out-of-the-box (NG) sample images to enhance the model's generalization ability. Preferably, the random rotation angle ranges from -10 degrees to +10 degrees, the brightness adjustment coefficient ranges from 0.8 to 1.2, and the contrast adjustment coefficient ranges from 0.8 to 1.2. For Dropout regularization, a Dropout layer is added before the fully connected layer of the detection network, with a dropout probability set to 0.3 to 0.5. For weight decay, an L2 regularization coefficient is set in the optimizer, with a preferred value of 0.0001.
[0074] The incremental learning system for sealant detection models of this invention adopts a cloud-edge collaborative deployment architecture. The industrial cloud platform undertakes computationally intensive tasks such as data aggregation, expert annotation, model training, and version management; the edge detection device undertakes low-latency tasks such as real-time image acquisition, model inference, and result output.
[0075] At the cloud deployment level, the main functions of the NG sample acquisition module 1, knowledge distillation and update module 2, stability and plasticity balancing module 3, and model evolution management module 5 are deployed on the GPU computing cluster of the industrial cloud platform. Preferably, the GPU computing cluster uses an NVIDIA A100 or equivalent graphics processor, equipped with no less than 80GB of video memory, and supports mixed-precision training to accelerate the model training process. The cloud storage system adopts a distributed object storage architecture, providing highly reliable NG sample image storage and model version archiving services.
[0076] At the edge deployment level, the sealant detection model is deployed on edge computing devices next to the production line, achieving millisecond-level detection response speeds. Preferably, the edge computing devices employ embedded GPU platforms, supporting the TensorRT inference acceleration framework, with single-frame image detection latency controlled within 50 milliseconds. The batch feature acquisition function of feature invariance constraint module 4 is deployed on the edge devices, and the acquired feature statistics are uploaded to the cloud via a secure channel for distribution difference calculation.
[0077] Communication between the cloud and the edge employs a combination of MQTT and HTTPS protocols. MQTT is used for message transmission with high real-time requirements, such as model update notifications and detection result reporting; HTTPS is used for large-scale data transmission scenarios, such as model parameter distribution and uploading out-of-the-box (NG) sample images. The communication process utilizes TLS encryption and two-way authentication mechanisms to ensure data transmission security.
[0078] To verify the practical effectiveness of the technical solution of this invention, a six-month actual operation test was conducted on the sealant coating production line of an automotive parts manufacturing company. The test environment employed two parallel production lines for comparative experiments: one line deployed the incremental learning system of this invention as the experimental group, and the other line deployed a traditional periodic full retraining scheme as the control group.
[0079] The production scale and data accumulation during the testing period are as follows: The two production lines processed an average of approximately 3,000 workpieces per day, accumulating approximately 80,000 NG (non-performing) samples, of which approximately 65,000 were valid after expert annotation. New defect types included novel bubble defects arising from material batch changes, irregular glue breakage defects caused by equipment aging, and glue width gradient defects introduced by process parameter adjustments. A total of 12 incremental learning iterations were conducted during the testing period, with an average incremental update every two weeks.
[0080] In terms of performance comparison, both systems achieved a detection rate of 89% and a false alarm rate of 12% in the initial testing phase. After six months of operation, the detection rate of the experimental group improved to 96.3%, a relative increase of approximately 8.2 percentage points; the false alarm rate decreased to 6.8%, a relative decrease of approximately 43%. In contrast, the control group, using a traditional periodic full-scale retraining scheme, only achieved a detection rate of 92.1% and a false alarm rate of 9.5%. The present invention demonstrated a detection rate 4.2 percentage points higher and a false alarm rate 2.7 percentage points lower than the control group.
[0081] In terms of verifying anti-forgetting ability, three new defect types were added during the testing period. After each new defect type was added, the change in the model's accuracy in recognizing existing defect types was monitored. After learning the new defects, the experimental group maintained an accuracy rate of over 98% in recognizing known defects, with a maximum decrease of only 1.2 percentage points, and quickly recovered through subsequent training iterations. In contrast, the control group experienced a significant decrease in accuracy for recognizing certain low-frequency defect types during full retraining, with a maximum decrease of 8.5 percentage points.
[0082] Regarding cross-batch stability verification, the production line experienced three batch changes in sealant material and two adjustments to workshop lighting conditions during this period. In the first production shift after the environmental changes, the performance fluctuation of the experimental group of this invention was controlled within 2%, and the feature invariance constraint module effectively suppressed the impact of environmental changes on detection performance. The performance fluctuation of the control group after the environmental changes reached 5% to 8%, requiring the accumulation of new batch samples and full retraining before it could recover to normal performance levels, with an average recovery period of 5 to 7 days. This invention shortens the performance recovery time from an average of 5 to 7 days to less than 4 hours.
[0083] In terms of training efficiency comparison, the incremental learning scheme of this invention only needs to process newly added NG samples per update, with a training time of approximately 2 to 4 hours; while the control group's full retraining scheme needs to process all historical samples each time, with a training time of approximately 16 to 24 hours. The training efficiency of this invention is 4 to 6 times higher than that of the control group.
[0084] Regarding model update security, the experimental group of this invention triggered two version rollback operations during the test. Both were automatically triggered because the new model's recognition accuracy for specific defect types was lower than that of the original model. The version rollback operations were completed within 5 minutes and did not affect the normal operation of the production line. The model evolution management module fully recorded all version update and rollback operation logs, supporting post-event auditing and problem tracing.
[0085] In summary, the technical solution of the present invention is significantly superior to existing technical solutions in terms of improved detection performance, resistance to forgetting, cross-batch stability, training efficiency, and update security, thus verifying the effectiveness and practicality of the technical solution of the present invention.
[0086] See Figure 2 This invention also provides an incremental learning method for sealant detection models in industrial environments, corresponding to the functions of each module in the above system embodiments. This method includes the following steps:
[0087] Step S1: Perform the NG sample acquisition step. NG sample images of sealant defects collected from the production line are received via the industrial cloud platform. Defect type and location annotations by experts on the NG sample images are obtained. The NG sample images are then associated and paired with the corresponding annotations to construct an incremental training dataset. The specific implementation of this step is consistent with the description of NG sample acquisition module 1 in the system embodiment, including cloud data reception, expert annotation collaboration, and sample quality assessment processes.
[0088] Step S2: Perform the knowledge distillation update step. Receive the incremental training dataset constructed in step S1 and input it into the currently deployed original sealant detection model to obtain the original model's soft label output. Based on a selective knowledge distillation strategy, calculate the distillation loss for samples belonging to known defect types and the classification loss for samples belonging to new defect types. Update the network parameters of the new sealant detection model by combining the distillation loss and the classification loss. The selective distillation loss is calculated as described in knowledge distillation update module 2 in the system embodiment, using a combination of temperature-softened KL divergence loss and cross-entropy loss.
[0089] Step S3: Perform the stability-plasticity balancing step. Extract the intermediate layer feature representations of the new model and the original model, and calculate the feature distance between the features of the new model and the features of the original model. Based on the current iteration stage of incremental learning, dynamically adjust the stability weights and plasticity weights using a cosine annealing function. Generate a stability-plasticity balance loss based on the stability weights and feature distances, and feed this balance loss back to step S2 to constrain the parameter update direction. If necessary, use orthogonal gradient projection to project the gradient of the new task onto a subspace orthogonal to the gradient of the old task.
[0090] Step S4: Perform the feature invariance constraint step. While the model performs online detection, the background asynchronously acquires sealant image samples of the current production batch and extracts the batch feature distribution. Calculate the maximum mean difference between the current batch feature distribution and the historical batch feature distribution. When the maximum mean difference exceeds a preset feature difference threshold, generate a feature alignment constraint gradient and pass it to step S2. Simultaneously, adaptively adjust the allowable range of the feature difference threshold according to changes in the production line environment.
[0091] Step S5: Execute the model evolution management steps. Continuously monitor the detection performance indicators of the deployed model, including detection rate, false alarm rate, and detection response time. When the detection performance indicators meet the preset evolution trigger conditions, replace the currently deployed original sealant detection model with the new sealant detection model updated in step S2, and record the model version information. Synchronize the model version information to the industrial cloud platform. When the new model experiences performance abnormalities during production line operation, automatically revert to the previous stable version.
[0092] The steps S1 to S5 described above form a complete incremental learning cycle. This cycle can be executed periodically according to the actual needs of the production line, with a preferred execution cycle being once a week or once every two weeks. During the cycle interval, the system continuously accumulates out-of-process (NG) samples and performs expert annotation to prepare training data for the next incremental learning cycle.
[0093] It is worth noting that although the technical solution of this invention is described using sealant detection as a specific application scenario, its core incremental learning framework is also applicable to other industrial vision inspection fields. In welding quality inspection scenarios, this invention can be used for continuous learning and recognition of weld defects; in surface scratch detection scenarios, it can be used for rapid adaptation to new scratch patterns; and in assembly integrity inspection scenarios, it can be used for incremental recognition of newly added component types. Those skilled in the art can adaptively adjust the data interface of the NG sample acquisition module, the network structure of the knowledge distillation update module, and the distribution alignment strategy of the feature invariance constraint module according to specific application scenarios, without departing from the core technical concept of this invention. Furthermore, the technical solution of this invention can be combined with other advanced technologies to further improve system performance, such as combining with federated learning technology to achieve collaborative incremental learning across multiple production lines, combining with active learning technology to achieve intelligent screening of high-value samples, and combining with model compression technology to achieve efficient deployment on edge devices.
[0094] The embodiments of the present invention are not limited to the specific embodiments described above. Those skilled in the art can make various equivalent changes or substitutions based on the technical solutions of the present invention, and all such changes or substitutions should be included within the protection scope of the present invention.
Claims
1. An incremental learning system for sealant testing models in industrial environments, characterized in that, include: The NG sample acquisition module is used to receive NG sample images of sealant defects collected from the production line through the industrial cloud platform, obtain defect type annotation information and defect location annotation information of experts for the NG sample images, associate and match the NG sample images with the corresponding annotation information, and build an incremental training dataset. The knowledge distillation update module is used to receive the incremental training dataset, input the incremental training dataset into the currently deployed original sealant detection model to obtain the original model's soft label output, calculate the distillation loss of the new model for known defect patterns and the classification loss for new defect patterns based on the selective knowledge distillation strategy, and update the network parameters of the new sealant detection model according to the distillation loss and the classification loss. The stable plasticity balance module is used to receive new model features output by the knowledge distillation update module, calculate the feature distance between the new model features and the original model features, dynamically adjust the stability weight and plasticity weight according to the current incremental learning stage, generate a stable plasticity balance loss based on the stability weight and the plasticity weight, and feed the stable plasticity balance loss back to the knowledge distillation update module to constrain the parameter update direction. The feature invariance constraint module is used to collect sealant image samples of the current production batch to extract batch feature distribution, calculate the distribution difference value between the batch feature distribution and the historical batch feature distribution, and generate feature alignment constraint gradient when the distribution difference value exceeds a preset feature difference threshold. The feature alignment constraint gradient is then passed to the knowledge distillation update module to enhance the model's cross-batch stability. The model evolution management module is used to receive the detection performance indicators from the production line verification feedback. When the detection performance indicators meet the preset evolution trigger conditions, the updated new sealant detection model replaces the original sealant detection model and records the model version information. The model version information is then synchronized to the industrial cloud platform.
2. The system according to claim 1, characterized in that, In the knowledge distillation update module, the selective knowledge distillation strategy includes: for samples in the incremental training dataset that belong to known defect types, the original model's soft label output is softened by a distillation temperature parameter before the distillation loss is calculated; for samples that belong to new defect types, the classification loss between the original model and the true label is directly calculated; the value of the distillation temperature parameter ranges from 2 to 10.
3. The system according to claim 1, characterized in that, In the stability-plasticity balancing module, the dynamic adjustment rules for the stability weight and the plasticity weight include: setting the plasticity weight higher than the stability weight in the initial stage of incremental learning to quickly learn new defect patterns, and gradually increasing the stability weight in the middle and later stages of incremental learning to consolidate the learned knowledge; the sum of the stability weight and the plasticity weight is 1.
4. The system according to claim 1, characterized in that, In the feature invariance constraint module, the preset feature difference threshold is adaptively adjusted according to the degree of change in the production line environment; when the lighting conditions of the production line or the batch of sealant materials change, the allowable range of the preset feature difference threshold is automatically expanded.
5. The system according to claim 1, characterized in that, The knowledge distillation update module also includes an importance-aware distillation unit, which is used to assign distillation weights to each defect type based on the original model's recognition confidence. Higher distillation weights are assigned to high-confidence defect types to retain the discrimination ability, while lower distillation weights are assigned to low-confidence defect types to allow for model correction.
6. The system according to claim 1, characterized in that, The stable plasticity balancing module also includes a gradient projection unit, which projects the gradient of the new task learning onto a subspace orthogonal to the gradient of the old task, so as to avoid catastrophic forgetting of existing knowledge caused by the learning of new knowledge.
7. The system according to claim 1, characterized in that, The NG sample acquisition module also includes a sample quality assessment unit, which is used to assess the sharpness of the acquired NG sample images and verify the consistency of the annotations, filtering out samples with sharpness below a preset sharpness threshold or with ambiguous annotations.
8. The system according to claim 1, characterized in that, The model evolution management module also includes a version rollback unit, which is used to automatically roll back to the original sealant detection model version and record the reason for rollback when the detection performance index of the updated new sealant detection model is lower than that of the original sealant detection model in the production line verification.
9. The system according to claim 1, characterized in that, The feature invariance constraint module adopts a domain adaptive alignment strategy, which achieves feature distribution alignment by minimizing the maximum mean difference between different production batches. The kernel function for the maximum mean difference is a Gaussian kernel function.
10. An incremental learning method for sealant detection models in industrial environments, employing the system described in any one of claims 1-9, characterized in that, include: The NG sample collection step involves receiving NG sample images of sealant defects collected from the production line through the industrial cloud platform, obtaining expert annotation information, and constructing an incremental training dataset. The knowledge distillation update step involves inputting the incremental training dataset into the original sealant detection model to obtain the soft label output of the original model, calculating the distillation loss and classification loss based on the selective knowledge distillation strategy, and updating the network parameters of the new sealant detection model. The stable-plasticity balance step calculates the feature distance between the new model features and the original model features, dynamically adjusts the stability weights and plasticity weights, and generates a stable-plasticity balance loss to constrain the parameter update direction. The feature invariance constraint step involves collecting sealant image samples from the current production batch to extract batch feature distribution. When the difference in batch feature distribution exceeds a preset feature difference threshold, a feature alignment constraint gradient is generated. The model evolution management process involves replacing the original sealant detection model with the updated new sealant detection model and synchronizing the model version information when the detection performance indicators meet the preset evolution trigger conditions.