Plastic product defect identification method based on a transfer learning identification model
By constructing a multimodal feature hierarchical decoupling network and a defect knowledge graph, combined with a dual-channel incremental transfer mechanism and an optical-thermal multiphysics compensation module, the problem that existing models cannot adapt to new materials or processes is solved, and the rapid adaptation and efficient identification of defects in plastic products are realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Filing Date
- 2026-03-26
- Publication Date
- 2026-07-14
AI Technical Summary
Existing machine learning-based defect identification models for plastic products cannot be adapted to new materials or processes, requiring the collection of a large number of labeled samples for retraining, resulting in low production efficiency and increased costs.
By employing a transfer learning-based approach, a multimodal feature hierarchical decoupling network and a defect knowledge graph are constructed. Combined with a dual-channel incremental transfer mechanism and an optical-thermal multiphysics compensation module, the model parameters are dynamically reorganized and rapidly adapted as needed.
It reduces reliance on manually labeled samples, shortens the cycle of model adaptation to new scenarios, improves the efficiency and accuracy of defect identification, avoids production stoppages, and enhances the flexibility of the production line.
Smart Images

Figure CN122391085A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of plastic product defect identification technology, specifically to a method for identifying plastic product defects based on a transfer learning identification model. Background Technology
[0002] Plastic products are widely used in numerous fields such as daily necessities, industrial parts, and packaging materials, and their quality directly affects their performance and safety. During the production process of plastic products, factors such as raw material characteristics, molding equipment precision, and production process parameters can easily lead to various defects such as surface scratches, internal bubbles, and edge deformation. Therefore, defect identification is a critical step in the plastic product manufacturing process. With technological advancements, traditional defect identification methods relying on manual visual observation are gradually being replaced by automated identification methods based on machine learning due to their low efficiency, high subjectivity, and susceptibility to missed or false positives. The core of machine learning-based defect identification methods is to train a model to learn the characteristics of defect samples, thereby enabling defect judgment on new samples. Effective model training typically requires a large amount of accurately labeled defect sample data. Current machine learning-based methods for identifying defects in plastic products struggle to adapt to changes in materials or processes during production. Different materials, such as polyethylene and polypropylene, exhibit variations in surface reflectivity and hardness, resulting in different visual characteristics for the same type of defect. Furthermore, adjustments to production processes, such as changes in injection temperature and pressure, alter the morphology and distribution of defects. Trained models can only identify defects specific to the training samples and their corresponding materials and processes, failing to transfer existing defect identification knowledge to new materials or processes. Applying this knowledge to new scenarios necessitates collecting numerous defect samples, manually labeling them, and retraining the model. This process demands significant time and manpower for sample collection and labeling, and the lengthy retraining cycle can disrupt defect identification during production, impacting overall efficiency and hindering rapid responses to changes in materials or processes. Summary of the Invention
[0003] To address the shortcomings of existing technologies, this invention provides a defect identification method for plastic products based on a transfer learning recognition model. This method solves the problem that existing models are difficult to adapt to new materials and processes, requiring the collection of a large number of labeled samples for retraining, which is time-consuming, labor-intensive, and affects production efficiency.
[0004] To achieve the above objectives, the present invention provides the following technical solution: a method for identifying defects in plastic products based on a transfer learning recognition model, comprising: S1. Acquire visible light image data and infrared thermal imaging data of the plastic product to be identified; S2. Construct a multimodal feature hierarchical decoupling network, which decouples the defect features of plastic products into a material-independent general defect feature layer, a material-related attribute layer, and a process dynamic parameter layer. The general defect feature layer represents the abstract features of common defects, the material-related attribute layer represents the surface reflection and texture features of different materials, and the process dynamic parameter layer represents the mapping relationship between production process parameters and defect morphology. S3. Construct a dual-channel incremental transfer mechanism, including an offline learning channel and an online learning channel; the offline learning channel trains the basic model using multi-material defect samples from the source domain; the online learning channel uses unlabeled samples from the current production line for feature alignment transfer, and automatically generates pseudo-labels using an adversarial generation strategy, and then performs confidence-weighted fusion of the pseudo-labels with the prediction results of the basic model in the offline learning channel. S4. Establish a defect knowledge graph, which is based on a graph neural network and transforms the defect features in the general defect feature layer, material related attribute layer and process dynamic parameter layer into interpretable graph node relationships in the knowledge graph. S5. When a new material or process parameter of the target plastic product is detected, the model parameter set associated with the new material or process parameter is determined by matching the similarity of graph nodes in the knowledge graph. The parameter set is activated to participate in the calculation, and irrelevant model parameters are frozen, so as to realize the on-demand dynamic reorganization of the defect identification model parameters. S6 integrates a light-thermal multiphysics compensation module, which generates a compensation feature vector based on the material's thermal conductivity characteristics reflected by infrared thermal imaging data to address surface reflectivity differences. It also automatically adjusts the contribution weights of visible light image data and infrared thermal imaging data through a physical field coupling attention module to output defect identification results for plastic products.
[0005] Furthermore, the construction of the multimodal feature hierarchical decoupling network includes: Preprocessing of visible light image data and infrared thermal imaging data generates initial multimodal features; The initial multimodal features are input into the feature decoupling module to separate the material-independent general defect feature layer; The initial multimodal features and general defect feature layers are input into the material property extraction module, which uses an adaptive filtering mechanism to extract the material-related property layers. The initial multimodal features, general defect feature layer, and material-related attribute layer are input into the process parameter mapping module. The module is updated online through real-time production data stream to extract the dynamic process parameter layer.
[0006] Furthermore, the offline learning channel trains the base model using multi-material defect samples from the source domain, including: Collect defect sample data of plastic products under different materials and production processes as source domain multi-material defect samples; Manually label the multi-material defect samples in the source domain to form a labeled training dataset; The labeled training dataset is input into the pre-trained network to train and obtain the base model for the offline learning channel.
[0007] Furthermore, the online learning channel utilizes unlabeled samples from the current production line for feature alignment and transfer, and employs an adversarial generation strategy to automatically generate pseudo-labels. The pseudo-labels are then weighted and fused with the prediction results of the offline learning channel's base model, including: Real-time acquisition of defect sample data for unlabeled plastic products on the production line; Input the unlabeled plastic product defect sample data into the feature alignment module to align the features of the unlabeled samples with the features of the multi-material defect samples in the source domain; Generative adversarial networks are used to automatically generate pseudo-labels for unlabeled samples after feature alignment. Calculate the confidence level of the prediction results of the offline learning channel base model for unlabeled samples; The pseudo-labels and the confidence scores of the prediction results are weighted and fused together to update the model parameters of the online learning channel.
[0008] Furthermore, the establishment of the defect knowledge graph, based on a graph neural network, transforms defect features in the general defect feature layer, material-related attribute layer, and process dynamic parameter layer into interpretable graph node relationships in the knowledge graph. The establishment of the defect knowledge graph includes: Define the types of graph nodes in the defect knowledge graph, including general defect nodes, material attribute nodes, and process parameter nodes; Define the graph edge relationships of the defect knowledge graph to represent the associations between different graph nodes, including the associations between materials and defects, processes and defects, and different defect types; Map the features in the general defect feature layer to general defect nodes; Map the features in the material-related property layer to material property nodes; The features in the process dynamic parameter layer are mapped to process parameter nodes.
[0009] Furthermore, when a new material or process parameter is detected in the target plastic product, the model parameter set associated with the new material or process parameter is determined through graph node similarity matching in the knowledge graph. This parameter set is then activated to participate in the calculation, while irrelevant model parameters are frozen. This enables on-demand dynamic reorganization of the defect identification model parameters, including: Receive information on new materials or new process parameters for the target plastic product; Calculate the similarity between information on new materials or new process parameters and existing graph nodes in the defect knowledge graph; Based on similarity, determine the set of graph nodes that best match the parameters of the new material or process; Activate the defect identification subnetwork associated with the graph node set; Freeze model parameters in the knowledge graph that are not related to the set of graph nodes.
[0010] Furthermore, the integrated optical-thermal multiphysics compensation module, for the sake of surface reflectivity differences, generates a compensation feature vector using the material's thermal conductivity characteristics reflected by infrared thermal imaging data, including: Temperature field analysis of infrared thermal imaging data is performed to obtain the surface temperature distribution characteristics of plastic products; Based on the surface temperature distribution characteristics and combined with the material thermal conductivity database, a feature map reflecting the thermal conductivity properties of the material is generated. The feature map is converted into a compensation feature vector, which corrects the defect feature deviation in the visible light image data caused by surface reflection.
[0011] Furthermore, the automatic adjustment of the contribution weights of visible light image data and infrared thermal imaging data through the physical field coupling attention module includes: Input visible light image data features, infrared thermal imaging data features, and compensation feature vectors into the physical field coupled attention module; The physical field coupled attention module calculates the attention weights of visible light image data features and infrared thermal imaging data features; Based on attention weights, the features of visible light image data and infrared thermal imaging data are weighted and fused to generate enhanced multimodal fusion features.
[0012] Furthermore, the separation of the general defect feature layer includes: The initial multimodal features are input into a general feature extractor. The extractor learns and extracts abstract features of common defects in plastic products of different materials through cross-material pre-training. The features output by the general feature extractor are used as a material-independent general defect feature layer.
[0013] Furthermore, the extraction of the material-related property layer and the process dynamic parameter layer includes: The material property extraction module uses an adaptive filtering module to dynamically adjust the parameters related to the surface reflection and texture features of the material in the initial multimodal features in order to extract the material-related property layer. The process parameter mapping module receives injection temperature and injection pressure process parameters from the real-time production data stream, compares them with the preset defect morphology mapping relationship, and updates the mapping relationship online to extract the dynamic process parameter layer.
[0014] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention constructs a multimodal feature hierarchical decoupling network, decoupling defect features into three layers: general, material-related, and process dynamic parameters. Combined with a defect knowledge graph based on graph neural networks, when a new material or process parameter is detected, the associated subnetwork is activated by graph node similarity matching, and irrelevant parameters are frozen. This enables dynamic reorganization of model parameters as needed, solving the problem that traditional models cannot adapt to new scenarios and require retraining. Utilizing a dual-channel incremental transfer mechanism, the offline channel trains the base model with multi-material samples, while the online channel uses unlabeled samples to generate pseudo-labels through feature alignment and adversarial processing. These pseudo-labels are then weighted and fused with the confidence scores of the base model's predictions, reducing reliance on manually labeled samples and lowering labor costs and sample collection time. An integrated optical-thermal multiphysics compensation module uses infrared thermal imaging data to generate compensation vectors to correct reflectivity deviations in visible light images. An attention module adjusts the weights of the dual-modal data, improving defect recognition accuracy. Overall, this shortens the model's adaptation cycle to new scenarios, avoids production stoppages, and improves the efficiency and flexibility of defect recognition in plastic products. Attached Figure Description
[0015] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] Please see Figure 1 This invention provides a method for identifying defects in plastic products based on a transfer learning recognition model, comprising: S1. Acquire visible light image data and infrared thermal imaging data of the plastic product to be identified; S2. Construct a multimodal feature hierarchical decoupling network, which decouples the defect features of plastic products into a material-independent general defect feature layer, a material-related attribute layer, and a process dynamic parameter layer. The general defect feature layer represents the abstract features of common defects, the material-related attribute layer represents the surface reflection and texture features of different materials, and the process dynamic parameter layer represents the mapping relationship between production process parameters and defect morphology. S3. Construct a dual-channel incremental transfer mechanism, including an offline learning channel and an online learning channel; the offline learning channel trains the basic model using multi-material defect samples from the source domain; the online learning channel uses unlabeled samples from the current production line for feature alignment transfer, and automatically generates pseudo-labels using an adversarial generation strategy, and then performs confidence-weighted fusion of the pseudo-labels with the prediction results of the basic model in the offline learning channel. S4. Establish a defect knowledge graph, which is based on a graph neural network and transforms the defect features in the general defect feature layer, material related attribute layer and process dynamic parameter layer into interpretable graph node relationships in the knowledge graph. S5. When a new material or process parameter of the target plastic product is detected, the model parameter set associated with the new material or process parameter is determined by matching the similarity of graph nodes in the knowledge graph. The parameter set is activated to participate in the calculation, and irrelevant model parameters are frozen, so as to realize the on-demand dynamic reorganization of the defect identification model parameters. S6 integrates a light-thermal multiphysics compensation module, which generates a compensation feature vector based on the material's thermal conductivity characteristics reflected by infrared thermal imaging data to address surface reflectivity differences. It also automatically adjusts the contribution weights of visible light image data and infrared thermal imaging data through a physical field coupling attention module to output defect identification results for plastic products.
[0018] Specifically, high-definition industrial visible light cameras and infrared thermal imagers are deployed next to the plastic product production line. The two simultaneously collect image data of the plastic products to be identified. The visible light camera needs to cover the surface of the product at different angles, while the infrared thermal imager ensures that the real-time temperature distribution of the product is captured during the production process.
[0019] When constructing a multimodal feature hierarchical decoupling network, the collected bimodal data is first preprocessed, and then the defect features are decomposed through the network structure: the general defect feature layer focuses on the abstract form of common defects such as scratches and bubbles, which is not affected by material differences; the material-related attribute layer extracts unique features such as surface reflectivity and texture density for different materials such as polyethylene and polypropylene; the process dynamic parameter layer associates the correspondence between production parameters such as injection molding temperature and pressure and defect forms, such as edge deformation features that are easily caused by high temperature.
[0020] In the dual-channel incremental transfer learning mechanism, the offline learning channel collects defect samples from various materials and processes. After manual annotation, these samples are input into a pre-trained network to generate a basic model capable of recognizing defects in multiple scenarios. The online learning channel acquires unlabeled samples from the production line in real time and uses a feature alignment module to make them consistent with the features of the offline samples. Here, the feature alignment uses the maximum mean difference (MMD) algorithm, a mature technology commonly used to measure the distance between two distributions. We will not elaborate further. Then, an adversarial generative network automatically generates pseudo-labels for the unlabeled samples. These pseudo-labels are then combined with the prediction confidence of the basic model for these samples, and the online model parameters are updated through weighted fusion. The weighted fusion formula is as follows: , formula (1); in, The final prediction result after fusion. This represents the pseudo-label weight, with a value range of [0,1], and is dynamically adjusted based on the pseudo-label generation accuracy. To combat the pseudo-label predictions output by the generator network, The prediction results are from the offline base model, and and All data have been normalized to ensure dimensional consistency. This fusion method reduces reliance on manual annotation and improves model update efficiency.
[0021] The defect knowledge graph is built on graph neural networks, which maps common defect features to common defect nodes, material attribute features to material attribute nodes, and process parameter features to process parameter nodes. The nodes are connected by graph edges. For example, the "polypropylene material node" and the "surface scratch node" are connected by the relationship of "easy to produce shallow scratches", and the "high temperature injection molding node" and the "edge deformation node" are associated by the relationship of "high probability of occurrence".
[0022] When production switches to a new material, such as polyvinyl chloride, or new process parameters such as injection pressure are adjusted, the system calculates the similarity between the new parameters and existing nodes in the knowledge graph. This similarity calculation uses the cosine similarity algorithm, a commonly used feature similarity measurement method, and requires no further elaboration. After finding the best-matching set of nodes, the corresponding defect identification subnetwork is activated, while node parameters unrelated to the new material or process are frozen. This eliminates the need to retrain the entire model, enabling rapid adaptation.
[0023] The optical-thermal multiphysics compensation module addresses surface reflection interference in plastic products by analyzing the temperature field of infrared thermal imaging data and combining it with a material thermal conductivity database to generate a compensation feature vector, correcting defect features in visible light images that are blurred due to reflection. The physical field coupling attention module automatically adjusts the weights of the dual-modal data according to defect identification requirements; the weight allocation formula is as follows: , Formula (2); in, Weights for visible light image data. For infrared thermal imaging data weights, The information entropy of visible light image features. The information entropy of infrared thermal imaging data features. To compensate for the correction coefficients of the feature vectors on the visible light image, the values range from [0.5, 1.5]. As a balance coefficient, it is set to 1 to ensure dimensional consistency. For example, when identifying internal air bubbles, air bubbles inside plastic products can cause local differences in thermal conductivity. Infrared thermal imaging data can more clearly show this area of difference, and its information entropy ( The value is relatively higher; after substituting into formula (2), because Enlargement will The calculation result is reduced, thus making The system automatically increases the weight of infrared thermal imaging data in defect identification, effectively capturing the temperature characteristics of internal bubbles and avoiding the problem of visible light images failing to clearly display internal defects due to surface reflection. This results in accurate defect identification results. This implementation effectively solves the problem of poor adaptability of traditional models to new materials and processes, reduces sample annotation costs and model training cycles, and improves the efficiency and accuracy of defect identification on the production line.
[0024] In this embodiment, a multimodal feature hierarchical decoupling network is constructed, including: Preprocessing of visible light image data and infrared thermal imaging data generates initial multimodal features; The initial multimodal features are input into the feature decoupling module to separate the material-independent general defect feature layer; The initial multimodal features and general defect feature layers are input into the material property extraction module, which uses an adaptive filtering mechanism to extract the material-related property layers. The initial multimodal features, general defect feature layer, and material-related attribute layer are input into the process parameter mapping module. The module is updated online through real-time production data stream to extract the dynamic process parameter layer.
[0025] Specifically, Gaussian filtering is used to remove environmental noise from visible light image data, and grayscale normalization is used to unify image brightness; infrared thermal imaging data undergoes temperature calibration to eliminate equipment errors, and after processing, initial multimodal features are generated.
[0026] The initial multimodal features are input into the feature decoupling module. The general feature extractor within the module is pre-trained on defect samples from various materials and uses a convolutional neural network (CNN) to extract features. CNN is a mature technology in the field of image feature extraction, and will not be elaborated upon further. This extractor can filter out material interference and accurately separate the material-independent general defect feature layer, such as the common contour features of bubbles on products made of different materials.
[0027] The initial multimodal features and the general defect feature layer are input into the material property extraction module. The module's adaptive filtering mechanism dynamically adjusts the filtering parameters according to different material properties. The filtering parameters are adjusted using the following formula: Formula (3); in, The standard deviation of the filter kernel is dimensionless. Since it needs to be matched with the normalized image feature data later, parameter normalization is used to ensure dimensional consistency. The basic adjustment coefficient, with a value of 2, is dimensionless. The surface reflectance intensity of the current material is normalized, with a value range of [0,1]. It is dimensionless, eliminating dimensional differences in reflectance intensity between different materials. The preset maximum reflectivity, set to 1, is dimensionless and serves as the normalization benchmark. For example, for highly reflective polypropylene materials... Approximately 1, dimensionless, substituting into the formula yields... Approaching 2, dimensionless, enhances feature extraction of reflective areas, thus obtaining a clear material-related property layer.
[0028] Three types of features are input into the process parameter mapping module. The module receives real-time data streams from the production line, such as injection temperature and pressure, and compares them with the preset "parameter-defect morphology" mapping relationship. If a new parameter combination corresponds to a new defect morphology, the mapping relationship is updated online. The update uses an incremental learning method, a common approach for dynamic model parameter updates, and requires no further explanation. This method ensures that the dynamic process parameter layer accurately reflects the defect characteristics under the current production process, providing precise feature support for subsequent model transfer and identification.
[0029] In this embodiment, the offline learning channel trains the base model using multi-material defect samples from the source domain, including: Collect defect sample data of plastic products under different materials and production processes as source domain multi-material defect samples; Manually label the multi-material defect samples in the source domain to form a labeled training dataset; The labeled training dataset is input into the pre-trained network to train and obtain the base model for the offline learning channel.
[0030] Specifically, in multiple plastic product manufacturing workshops, samples of various defects such as surface scratches, internal bubbles, and edge deformations were collected from products made of different materials such as polyethylene, polypropylene, and polyvinyl chloride under different injection molding temperatures and pressures, forming a source domain multi-material defect sample library.
[0031] Professional quality inspectors were organized to manually label each sample in the sample library according to the defect type, severity and other standards. The labeling information must clearly associate the sample with the corresponding material and production process, thereby forming a complete labeled training dataset.
[0032] The training dataset is input into a ResNet-based pre-trained network. ResNet is a commonly used deep neural network structure in existing technologies. Its residual connection mechanism can effectively solve the gradient vanishing problem in deep networks and is a mature technology, so it will not be elaborated on further. The learning rate is set to 0.001 and the number of iterations is 50. The network learns the correspondence between defect features and labels under different materials and processes. After multiple iterations and optimizations, when the network's defect recognition accuracy on the validation set tends to stabilize, training is stopped, and the basic model of the offline learning channel is obtained. This model has the basic ability to recognize defects in multiple scenarios.
[0033] In this embodiment, the online learning channel utilizes unlabeled samples from the current production line for feature alignment and transfer, and automatically generates pseudo-labels using an adversarial generation strategy. The pseudo-labels are then weighted and fused with the prediction results of the offline learning channel's base model, including: Real-time acquisition of defect sample data for unlabeled plastic products on the production line; Input the unlabeled plastic product defect sample data into the feature alignment module to align the features of the unlabeled samples with the features of the multi-material defect samples in the source domain; Generative adversarial networks are used to automatically generate pseudo-labels for unlabeled samples after feature alignment. Calculate the confidence level of the prediction results of the offline learning channel base model for unlabeled samples; The pseudo-labels and the confidence scores of the prediction results are weighted and fused together to update the model parameters of the online learning channel.
[0034] Specifically, data acquisition terminals are installed on the production line to capture images of unlabeled defective plastic products and corresponding production process data in real time, ensuring that the samples cover products from different production stages on the production line.
[0035] Unlabeled sample data is input into the feature alignment module, which employs the existing Maximum Mean Difference (MMD) algorithm. This algorithm achieves feature alignment by calculating the mean difference between two distributions and is a commonly used method in the field, so it will not be elaborated upon here. This algorithm ensures that the features of the unlabeled samples are consistent with the feature distribution of the multi-material defect samples in the source domain, thus completing feature alignment.
[0036] The aligned unlabeled samples are input into the adversarial generative network. The generator and discriminator in the network adopt the existing Generative Adversarial Network (GAN) architecture. GAN is a mature technology in the field of generative models, and will not be elaborated on further. After 30 rounds of adversarial training, the accuracy of the generated pseudo-labels meets the requirements.
[0037] The offline base model is used to predict unlabeled samples, and the confidence level is calculated based on the probability distribution of the prediction results. The confidence level calculation formula is as follows: in, The confidence level of the prediction result, with a value ranging from [0,1]. This represents the model's predicted probability of a sample belonging to any of the various defect categories, including those without defects. The more concentrated the probability, the better. The closer to 1, the higher the confidence level.
[0038] The pseudo-labels and the prediction results of the base model are weighted according to their confidence levels. The weighting formula is based on formula (1). ,in and negative correlation The higher, The smaller, such as hour, ; hour, After weighted fusion, more reliable sample labels are obtained. These labels are used to update the model parameters of the online learning channel, enabling the online model to continuously adapt to the defect identification needs of the current production line.
[0039] In this embodiment, a defect knowledge graph is established, which is based on a graph neural network. The defect features in the general defect feature layer, material-related attribute layer, and process dynamic parameter layer are transformed into interpretable graph node relationships in the knowledge graph. The establishment of the defect knowledge graph includes: Define the types of graph nodes in the defect knowledge graph, including general defect nodes, material attribute nodes, and process parameter nodes; Define the graph edge relationships of the defect knowledge graph to represent the associations between different graph nodes, including the associations between materials and defects, processes and defects, and different defect types; Map the features in the general defect feature layer to general defect nodes; Map the features in the material-related property layer to material property nodes; The features in the process dynamic parameter layer are mapped to process parameter nodes.
[0040] Specifically, first clarify the types of nodes in the defect knowledge graph: general defect nodes cover common defect types such as scratches, bubbles, and edge deformation; material attribute nodes include materials such as polyethylene and polypropylene and their reflective and texture features; process parameter nodes correspond to production parameters such as injection molding temperature and pressure.
[0041] Define the relationships between the edges in the graph: "Material-Defect" edges represent the types of defects that a material is prone to, such as polypropylene being associated with shallow surface scratches; "Process-Defect" edges reflect the influence of process parameters on defects, such as high injection pressure being associated with internal air bubbles; "Defect-Defect" edges reflect the co-occurrence relationships of different defects, such as edge deformation often being associated with surface depressions.
[0042] The features of each layer are transformed into node attributes using a feature mapping algorithm. The feature mapping uses the following formula: in, represents the attribute value of the graph node, with a value range of [0,1]. These are the feature values in the feature layer. This is the minimum eigenvalue of the feature layer. This is the maximum eigenvalue of the feature layer. This formula maps the abstract features of the general defect feature layer, the material features of the material-related attribute layer, and the parameters of the process dynamic parameter layer to the defect mapping relationship, respectively, as attribute information for general defect nodes, material attribute nodes, and process parameter nodes. This ultimately constructs a defect knowledge graph with clear nodes and relationships, providing interpretable knowledge support for subsequent adaptation to new scenarios. This formula normalizes the eigenvalues of each layer to the [0,1] interval as the attribute values of the graph nodes, thereby eliminating the influence of different feature dimensions and facilitating subsequent similarity calculations.
[0043] In this embodiment, when a new material or process parameter of the target plastic product is detected, the model parameter set associated with the new material or process parameter is determined by matching the similarity of graph nodes in the knowledge graph. This parameter set is then activated to participate in the calculation, and irrelevant model parameters are frozen. This enables the on-demand dynamic reorganization of the defect identification model parameters, including: Receive information on new materials or new process parameters for the target plastic product; Calculate the similarity between information on new materials or new process parameters and existing graph nodes in the defect knowledge graph; Based on similarity, determine the set of graph nodes that best match the parameters of the new material or process; Activate the defect identification subnetwork associated with the graph node set; Freeze model parameters in the knowledge graph that are not related to the set of graph nodes.
[0044] Specifically, the production line control system receives information on new materials or new process parameters in real time and transmits it to the defect identification system.
[0045] The cosine similarity algorithm, a commonly used technique, is employed to calculate the similarity between new information and knowledge graph nodes. This algorithm measures similarity by calculating the cosine of the angle between two vectors and will not be elaborated upon further. The similarity between the feature vector corresponding to the new information and the feature vectors of all similar nodes in the knowledge graph is also calculated. For example, the similarity between the reflectivity and texture features of a new material and existing material attribute nodes.
[0046] Set a similarity threshold of 0.6, filter out graph nodes with a similarity higher than 0.6, and form a set of nodes that best match the new material or process, such as "high light transmittance material node" and "low reflectivity node" that match polycarbonate material.
[0047] The system activates the associated defect identification subnetwork based on the matched set of nodes. This subnetwork is specifically designed to identify the defect features corresponding to such nodes.
[0048] At the same time, the node parameters in the knowledge graph that are not related to the node set are frozen, such as the polyethylene material node parameters that are not related to the polycarbonate material, to avoid interference from irrelevant parameters, realize efficient dynamic reorganization of model parameters, and quickly adapt to new production scenarios.
[0049] In this embodiment, an integrated optical-thermal multiphysics compensation module is used to generate a compensation feature vector based on the material's thermal conductivity characteristics reflected by infrared thermal imaging data, addressing differences in surface reflectivity. This includes: Temperature field analysis of infrared thermal imaging data is performed to obtain the surface temperature distribution characteristics of plastic products; Based on the surface temperature distribution characteristics and combined with the material thermal conductivity database, a feature map reflecting the thermal conductivity properties of the material is generated. The feature map is converted into a compensation feature vector, which corrects the defect feature deviation in the visible light image data caused by surface reflection.
[0050] Specifically, temperature field analysis is performed on infrared thermal imaging data. A region growing algorithm, a mature technique in image segmentation, is used to extract the distribution of high-temperature and low-temperature zones on the surface of the plastic product. This algorithm generates a temperature field feature map, clearly showing the temperature differences in different areas of the product.
[0051] The system calls upon the built-in thermal conductivity database of materials, extracts the corresponding thermal conductivity parameters based on the material type of the product to be identified, and combines them with the temperature field feature map to generate a feature map reflecting the thermal conductivity characteristics of the material through feature fusion. The feature fusion uses the following formula: in, This is a characteristic diagram of thermal conductivity. The value represents the thermal conductivity of the material, expressed in W / (m·K), and has been normalized. This is a temperature field feature map, with pixel values normalized. For example, in the rapid heat dissipation region of a high thermal conductivity material... The differences in characteristics will be obvious.
[0052] Will The vector is transformed into a fixed-dimensional compensation feature vector using a vector transformation algorithm. The vector transformation employs Principal Component Analysis (PCA), a mature technology commonly used for feature dimensionality reduction and vector transformation, which will not be elaborated upon further. The compensation feature vector is then input into the visible light image defect feature extraction module to correct the deviations in defect features caused by surface reflection, such as blurred scratches and invisible bubbles, thereby improving the clarity of defect features in the visible light image.
[0053] In this embodiment, the contribution weights of visible light image data and infrared thermal imaging data are automatically adjusted by the physical field coupling attention module, including: Input visible light image data features, infrared thermal imaging data features, and compensation feature vectors into the physical field coupled attention module; The physical field coupled attention module calculates the attention weights of visible light image data features and infrared thermal imaging data features; Based on attention weights, the features of visible light image data and infrared thermal imaging data are weighted and fused to generate enhanced multimodal fusion features.
[0054] Specifically, the preprocessed visible light image features, infrared thermal imaging features, and compensation feature vectors are input together into the physical field coupling attention module.
[0055] The module internally calculates the weights of the bimodal features using an attention mechanism algorithm. The weight calculation adopts formula (2), i.e. , .in, and The information entropy of visible light image features and infrared thermal imaging features are respectively obtained by the information entropy calculation method in the existing technology. Information entropy calculation is a basic method in information theory, which will not be elaborated on further. To compensate for the correction coefficients of the feature vectors on the visible light image, the coefficients are dynamically adjusted according to the degree of reflection interference; the stronger the reflection, the better. The closer it is to 1.5.
[0056] Based on the assigned weights, the dual-modal features are fused using a feature-weighted fusion algorithm, with the following formula: in, To enhance multimodal fusion features, The features are visible light image characteristics, after normalization processing. This is an infrared thermal imaging feature, which has been normalized. This feature retains the surface details of the visible light image while incorporating the internal defect information of the infrared thermal image, providing high-quality feature support for subsequent accurate defect identification.
[0057] In this embodiment, the separation of the general defect feature layer includes: The initial multimodal features are input into a general feature extractor. The extractor learns and extracts abstract features of common defects in plastic products of different materials through cross-material pre-training. The features output by the general feature extractor are used as a material-independent general defect feature layer.
[0058] Specifically, the preprocessed initial multimodal features are input into a pre-trained general feature extractor. This extractor employs a deep convolutional neural network (DCNN) structure, a mature technology with excellent performance in image abstraction feature extraction, which will not be elaborated upon further. The extractor undergoes cross-material pre-training using a large number of defect samples from different materials such as polyethylene, polypropylene, and polyvinyl chloride. The pre-training process utilizes transfer learning methods, a technique that effectively leverages existing data to improve the model's generalization ability without requiring further elaboration.
[0059] Through pre-training, the extractor has learned abstract features of common defects such as scratches and bubbles in products made of various materials, including the defect outline and grayscale variation patterns. Feature extraction and filtering are performed on the initial multimodal features to suppress material-related interference, outputting only the abstract features of common defects. This result serves as a material-independent general defect feature layer, laying the foundation for knowledge transfer between products made of different materials in subsequent models.
[0060] In this embodiment, the extraction of the material-related property layer and the process dynamic parameter layer includes: The material property extraction module uses an adaptive filtering module to dynamically adjust the parameters related to the surface reflection and texture features of the material in the initial multimodal features in order to extract the material-related property layer. The process parameter mapping module receives injection temperature and injection pressure process parameters from the real-time production data stream, compares them with the preset defect morphology mapping relationship, and updates the mapping relationship online to extract the dynamic process parameter layer.
[0061] Specifically, the adaptive filtering module in the material property extraction module receives the initial multimodal feature and general defect feature layer data in real time, and dynamically adjusts the filtering parameters according to the surface characteristics of different materials. The filtering parameter adjustment adopts formula (3), that is... .in, This is a combined value of the surface reflectivity and texture density of the current material, after normalization. Stronger reflectivity and denser texture indicate higher reflectivity. The larger the value, the more dynamically the standard deviation of the filter kernel is adjusted using this formula. For example, for materials with dense surface textures, The size is reduced to preserve texture details, thereby accurately extracting the material-related attribute layers that are related to the surface reflection and texture of the material. After parameter normalization, the dimensional consistency is ensured.
[0062] The process parameter mapping module receives real-time process parameter data streams such as injection temperature and injection pressure from the production line via a data interface. These real-time parameters are then compared with a pre-defined "process parameter-defect morphology" mapping relationship within the module. The mapping relationship is updated using the following formula: in, For the updated mapping relationship, This is the original mapping relationship. The actual correspondence between current real-time parameters and defect morphologies is normalized. To update the coefficients, a value of 0.7 is used to balance the weights of historical and real-time data. If a new parameter combination is found to correspond to a defect morphology that has not been recorded, the mapping database is automatically updated using this formula, followed by a feature extraction algorithm. The gradient boosting tree algorithm, a technique already in use, is employed (details omitted here). This extracts a dynamic process parameter layer reflecting the defect morphology characteristics under the current process, ensuring that this feature layer remains synchronized with the actual production process.
[0063] Preferably, M represents a vector or matrix describing the strength of the correlation between process parameters and defect morphology; It is a correlation vector obtained by performing correlation analysis between the current real-time parameters and the synchronously collected defect samples. This analysis can be carried out using methods such as Pearson correlation coefficient, and the results are normalized.
[0064] In summary, this invention constructs a multimodal feature hierarchical decoupling network, decoupling defect features into three layers: general, material-related, and process dynamic parameters. Combined with a defect knowledge graph based on graph neural networks, when a new material or process parameter is detected, the associated sub-network is activated and irrelevant parameters are frozen through graph node similarity matching, enabling dynamic reorganization of model parameters on demand. This solves the problem of traditional models being unable to adapt to new scenarios and requiring retraining. Utilizing a dual-channel incremental transfer mechanism, the offline channel trains the basic model using multi-material samples, while the online channel uses unlabeled samples to generate pseudo-labels through feature alignment and adversarial processing. These pseudo-labels are then weighted and fused with the confidence scores of the basic model's predictions, reducing reliance on manually labeled samples and lowering labor costs and sample collection time. An integrated optical-thermal multiphysics compensation module uses infrared thermal imaging data to generate compensation vectors to correct reflectivity deviations in visible light images. An attention module adjusts the weights of the dual-modal data, improving defect recognition accuracy. Overall, this shortens the model's adaptation cycle to new scenarios, avoids production stoppages, and improves the efficiency and flexibility of defect recognition in plastic products.
[0065] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0066] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for identifying defects in plastic products based on a transfer learning recognition model, characterized in that, include: S1. Acquire visible light image data and infrared thermal imaging data of the plastic product to be identified; S2. Construct a multimodal feature hierarchical decoupling network, which decouples the defect features of plastic products into a material-independent general defect feature layer, a material-related attribute layer, and a process dynamic parameter layer. The general defect feature layer represents the abstract features of common defects, the material-related attribute layer represents the surface reflection and texture features of different materials, and the process dynamic parameter layer represents the mapping relationship between production process parameters and defect morphology. S3. Construct a dual-channel incremental migration mechanism, including an offline learning channel and an online learning channel; The offline learning channel trains the basic model using defect samples from multiple materials in the source domain; The online learning channel uses unlabeled samples from the current production line for feature alignment and transfer, and adopts an adversarial generation strategy to automatically generate pseudo-labels. The pseudo-labels are then fused with the prediction results of the offline learning channel's basic model using a confidence-weighted fusion. S4. Establish a defect knowledge graph, which is based on a graph neural network and transforms the defect features in the general defect feature layer, material related attribute layer and process dynamic parameter layer into interpretable graph node relationships in the knowledge graph. S5. When a new material or process parameter of the target plastic product is detected, the model parameter set associated with the new material or process parameter is determined by matching the similarity of graph nodes in the knowledge graph. The parameter set is activated to participate in the calculation, and irrelevant model parameters are frozen, so as to realize the on-demand dynamic reorganization of the defect identification model parameters. S6 integrates a light-thermal multiphysics compensation module, which generates a compensation feature vector based on the material's thermal conductivity characteristics reflected by infrared thermal imaging data to address surface reflectivity differences. It also automatically adjusts the contribution weights of visible light image data and infrared thermal imaging data through a physical field coupling attention module to output defect identification results for plastic products.
2. The method for identifying defects in plastic products based on a transfer learning recognition model according to claim 1, characterized in that, The construction of the multimodal feature hierarchical decoupling network includes: Preprocessing of visible light image data and infrared thermal imaging data generates initial multimodal features; The initial multimodal features are input into the feature decoupling module to separate the material-independent general defect feature layer; The initial multimodal features and general defect feature layers are input into the material property extraction module, which uses an adaptive filtering mechanism to extract the material-related property layers. The initial multimodal features, general defect feature layer, and material-related attribute layer are input into the process parameter mapping module. The module is updated online through real-time production data stream to extract the dynamic process parameter layer.
3. The method for identifying defects in plastic products based on a transfer learning recognition model according to claim 1, characterized in that, The offline learning channel trains a basic model using multi-material defect samples from the source domain, including: Collect defect sample data of plastic products under different materials and production processes as source domain multi-material defect samples; Manually label the multi-material defect samples in the source domain to form a labeled training dataset; The labeled training dataset is input into the pre-trained network to train and obtain the base model for the offline learning channel.
4. The method for identifying defects in plastic products based on a transfer learning recognition model according to claim 1, characterized in that, The online learning channel utilizes unlabeled samples from the current production line for feature alignment and transfer, and employs an adversarial generation strategy to automatically generate pseudo-labels. These pseudo-labels are then weighted and fused with the prediction results of the offline learning channel's base model, including: Real-time acquisition of defect sample data for unlabeled plastic products on the production line; Input the unlabeled plastic product defect sample data into the feature alignment module to align the features of the unlabeled samples with the features of the multi-material defect samples in the source domain; Generative adversarial networks are used to automatically generate pseudo-labels for unlabeled samples after feature alignment. Calculate the confidence level of the prediction results of the offline learning channel base model for unlabeled samples; The pseudo-labels and the confidence scores of the prediction results are weighted and fused together to update the model parameters of the online learning channel.
5. The method for identifying defects in plastic products based on a transfer learning recognition model according to claim 1, characterized in that, The establishment of the defect knowledge graph, based on a graph neural network, transforms defect features from the general defect feature layer, material-related attribute layer, and process dynamic parameter layer into interpretable graph node relationships in the knowledge graph. The establishment of the defect knowledge graph includes: Define the types of graph nodes in the defect knowledge graph, including general defect nodes, material attribute nodes, and process parameter nodes; Define the graph edge relationships of the defect knowledge graph to represent the associations between different graph nodes, including the associations between materials and defects, processes and defects, and different defect types; Map the features in the general defect feature layer to general defect nodes; Map the features in the material-related property layer to material property nodes; The features in the process dynamic parameter layer are mapped to process parameter nodes.
6. The method for identifying defects in plastic products based on a transfer learning recognition model according to claim 1, characterized in that, When a new material or process parameter is detected in the target plastic product, the model parameter set associated with the new material or process parameter is determined through graph node similarity matching in the knowledge graph. This parameter set is then activated to participate in the calculation, while irrelevant model parameters are frozen. This enables on-demand dynamic reorganization of defect identification model parameters, including: Receive information on new materials or new process parameters for the target plastic product; Calculate the similarity between information on new materials or new process parameters and existing graph nodes in the defect knowledge graph; Based on similarity, determine the set of graph nodes that best match the parameters of the new material or process; Activate the defect identification subnetwork associated with the graph node set; Freeze model parameters in the knowledge graph that are not related to the set of graph nodes.
7. The method for identifying defects in plastic products based on a transfer learning recognition model according to claim 1, characterized in that, The integrated optical-thermal multiphysics compensation module, based on differences in surface reflectivity, generates a compensation feature vector using the material's thermal conductivity characteristics reflected in infrared thermal imaging data, including: Temperature field analysis of infrared thermal imaging data is performed to obtain the surface temperature distribution characteristics of plastic products; Based on the surface temperature distribution characteristics and combined with the material thermal conductivity database, a feature map reflecting the thermal conductivity properties of the material is generated. The feature map is converted into a compensation feature vector, which corrects the defect feature deviation in the visible light image data caused by surface reflection.
8. The method for identifying defects in plastic products based on a transfer learning recognition model according to claim 1, characterized in that, The automatic adjustment of the contribution weights of visible light image data and infrared thermal imaging data through the physical field coupling attention module includes: Input visible light image data features, infrared thermal imaging data features, and compensation feature vectors into the physical field coupled attention module; The physical field coupled attention module calculates the attention weights of visible light image data features and infrared thermal imaging data features; Based on attention weights, the features of visible light image data and infrared thermal imaging data are weighted and fused to generate enhanced multimodal fusion features.
9. The method for identifying defects in plastic products based on a transfer learning recognition model according to claim 2, characterized in that, The separation of the general defect feature layer includes: The initial multimodal features are input into a general feature extractor. The extractor learns and extracts abstract features of common defects in plastic products of different materials through cross-material pre-training. The features output by the general feature extractor are used as a material-independent general defect feature layer.
10. The method for identifying defects in plastic products based on a transfer learning recognition model according to claim 2, characterized in that, The extraction of the material-related property layer and the process dynamic parameter layer includes: The material property extraction module uses an adaptive filtering module to dynamically adjust the parameters related to the surface reflection and texture features of the material in the initial multimodal features in order to extract the material-related property layer. The process parameter mapping module receives injection temperature and injection pressure process parameters from the real-time production data stream, compares them with the preset defect morphology mapping relationship, and updates the mapping relationship online to extract the dynamic process parameter layer.