Engineering plastic production quality detection method and system

By building a ViT-Adapter network with multi-scale sliding window and an improved loss function, combined with the WinCLIP framework for engineering plastic production defect detection, the problem of low detection efficiency and accuracy is solved, pixel-level positioning and automatic adjustment of production lines is realized, and production quality and intelligence are improved.

CN120259242AActive Publication Date: 2025-07-04JIANGSU GUONUO PRECISION TECH CO LTD

Patent Information

Application Number
CN202510339568.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-21
Publication Date
2025-07-04
Estimated Expiration
2045-03-21

AI Technical Summary

Technical Problem

In the production process of existing engineering plastics, defect detection efficiency is low, accuracy is low, and the image features and process parameters are lacking, making it difficult to achieve pixel-level positioning and production line linkage adjustment.

Method used

Through industrial cameras, a ViT-Adapter network with multi-scale sliding windows is constructed to fusion across modal features. The defect classification model is trained using the joint loss function of improved Focal Loss and contrast learning, and zero-sample abnormal segmentation is performed in combination with the WinCLIP framework to generate defect heat maps and adjust production line parameters.

Benefits of technology

It realizes efficient and accurate defect detection, can locate surface defects at pixel level, and automatically adjusts production line parameters, improving production quality and intelligence level.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120259242A_ABST
    Figure CN120259242A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computer vision, and discloses an engineering plastic production quality detection method and system. According to the method, an engineering plastic surface image sequence on a production line is collected in real time through an industrial camera, and injection molding machine technological parameters are synchronously obtained. And constructing a ViT-Adapter visual feature extraction network based on a multi-scale sliding window, and fusing surface texture features and process parameters. A defect classification model is trained by adopting a combined loss function of improved Focal Loss and comparative learning, zero sample abnormal segmentation is realized based on WinCLIP, and pixel-level positioning of surface bubbles and scratches is realized. And finally, outputting a defect thermodynamic diagram, and carrying out result visualization in linkage with production line parameter self-adjustment. According to the method, the defect detection accuracy and efficiency are improved, automatic adjustment is realized, manual intervention is reduced, and the production quality and the intelligent level are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology, and particularly to a method and system for detecting the production quality of engineering plastics. Background Art

[0002] During the production process of engineering plastics, surface defects such as bubbles and scratches seriously affect the product quality. Traditional manual inspection methods are inefficient and easily affected by subjective factors. In recent years, although there have been defect detection methods based on machine vision, most of them only rely on image features and ignore the influence of process parameters on defect formation, resulting in low detection accuracy. At the same time, existing methods still have difficulties in dealing with complex defect types and achieving pixel-level positioning, and lack a linkage adjustment mechanism with the production line. Therefore, there is an urgent need for a method that can fuse image features and process parameters, achieve efficient and accurate defect detection, and automatically adjust the production line parameters. Summary of the Invention

[0003] Aiming at the above-mentioned technical deficiencies, the purpose of the present invention is to provide a method and system for detecting the production quality of engineering plastics, so as to solve the problems of low detection efficiency, low accuracy and lack of linkage adjustment mechanism in the prior art.

[0004] To solve the above technical problems, the present invention adopts the following technical solutions: In the first aspect, the present invention provides a method for detecting the production quality of engineering plastics, and the method includes: Step S100: Real-time collect the surface image of the engineering plastics on the production line through an industrial camera, and synchronously obtain the process parameters of the injection molding machine; Step S200: Construct a ViT-Adapter visual feature extraction network with a multi-scale sliding window, and generate a fusion feature vector by cross-modal fusion of the surface image features of the engineering plastics and the real-time process parameters of the injection molding machine through an adaptive attention mechanism; Step S300: Based on the fusion feature vector, construct a two-branch training network, and train a defect classification model with a combined loss function of improved Focal Loss and contrastive learning; Step S400: Use the defect classification model to extract deep semantic features, and combine with the zero-shot anomaly segmentation algorithm of the WinCLIP framework to perform pixel-level positioning on surface bubbles and scratches, and generate a defect mask map; Step S500: Real-time generate a defect heat map according to the defect positioning result and visualize the result. Based on the proportion of the defect area and the spatial distribution in the heat map, adjust the process parameters of the injection molding machine through the PID control algorithm.

[0005] Preferably, in a possible implementation manner of the first aspect, the image acquisition frame rate of the industrial camera Satisfies the relational expression with the injection molding cycle:

[0006] Where is the injection molding cycle time, is the redundancy coefficient, and the ejection signal of the injection molding machine is obtained in real time through the encoder to trigger the acquisition.

[0007] Preferably, in a possible implementation manner of the first aspect, the feature extraction network includes: The global features extracted by the ViT-L / 16 backbone network and the sliding window local features are spatially aligned, is a real number matrix, and feature fusion is achieved through deformable convolution:

[0008] Where is the fused feature tensor, is the weight coefficient of the th sliding window, generated by the gated attention mechanism, is the deformable convolution, and s is the number of sliding windows.

[0009] Preferably, in a possible implementation manner of the first aspect, the cross-modal fusion features adopt a pyramid structure for cross-scale feature interaction: Construct a 3-level feature pyramid , where the resolution of the P2 layer is 1 / 4 and the number of channels is 512; the resolution of the P3 layer is 1 / 8 and the number of channels is 256; the resolution of the P4 layer is 1 / 16 and the number of channels is 128; cross-scale feature interaction is performed through a bidirectional feature pyramid network:

[0010] Where is the output feature map of the th layer, is the input feature map of the th layer, is the feature weight of the current layer, is the feature weight of the adjacent layer, is the input feature map of the th layer, and are learnable weights, satisfying , is the upsampling or downsampling operation.

[0011] Preferably, in a possible implementation manner of the first aspect, the defect classification model training adopts an improved loss function:

[0012] Among them and are loss weight coefficients, is the Focal Loss, is the contrast loss term:

[0013] Among them is the similarity score of the positive sample pair, is the similarity score of the negative sample pair, n is the index of the negative sample, temperature coefficient , N is the number of negative samples.

[0014] Preferably, in a possible implementation manner of the first aspect, the defect classification model training adopts multi-modal data augmentation: It includes image generation conditioned on process parameters, and synthetic data with defect labels is generated through VAE-GAN:

[0015] Among them is the expected value calculation, is the discriminator output, is the image generated by the generator with the latent variable and the process conditions generated, is the latent variable distribution output by the encoder, is the prior distribution, is the KL divergence calculation, is the KL divergence weight, is the conditional vector, including process parameters of a preset dimension.

[0016] Preferably, in a possible implementation manner of the first aspect, the abnormal segmentation algorithm includes: Calculating the pixel-level similarity based on the abnormal semantic vector generated by the CLIP text encoder and the visual feature

[0017] Among them is a real number matrix, is the pixel point 's abnormal score, is the visual feature vector of the image patch at the position , is the defect semantic vector generated by the text encoder, is the scaling function, scaling factor , is the number of training cycles.

[0018] Preferably, in a possible implementation manner of the first aspect, the result visualization includes: Mapping the defect heat map to the CAD model to generate a three-dimensional quality distribution cloud map, and the defect area is colored according to:

[0019] At the same time, mark the maximum defect size ; where is the centroid coordinate of the defect area, is the set of all defect pixel points.

[0020] Preferably, in a possible implementation manner of the first aspect, the adjustment of the injection molding machine process parameters is realized as: According to the proportion of the defect area and the position distribution , calculate the correction amount of the injection molding machine:

[0021] where the PID coefficient , , , is the proportion of the defect area in the current detection cycle, is the integral of the historical defect area, is the change rate of the defect area.

[0022] In a second aspect, the present invention provides an engineering plastic production quality detection system, and the system includes: An image acquisition module for real-time acquisition of the surface image of the engineering plastic on the production line through an industrial camera and synchronously obtaining the injection molding machine process parameters; A feature extraction and fusion module that constructs a ViT-Adapter visual feature extraction network with a multi-scale sliding window, and through an adaptive attention mechanism, cross-modal fusion features of the surface image features of the engineering plastic and the real-time process parameters of the injection molding machine are generated to generate a fusion feature vector; A model training module that constructs a two-branch training network based on the fusion feature vector and trains a defect classification model using a combined loss function of improved Focal Loss and contrastive learning; An abnormal segmentation module that uses the defect classification model to extract deep semantic features, combines the zero-shot abnormal segmentation algorithm of the WinCLIP framework, and performs pixel-level positioning on surface bubbles and scratches to generate a defect mask map; The result output module generates a defect heat map in real time according to the defect location results and visualizes the results. Based on the defect area ratio and spatial distribution of the heat map, the injection molding machine process parameters are adjusted through the PID control algorithm.

[0023] The beneficial effects of the present invention are as follows: the present invention collects images and process parameters in real time through intelligent sensors, constructs a ViT-Adapter network of multi-scale sliding windows to extract fusion features, adopts an improved loss function to train a defect classification model, realizes zero-sample anomaly segmentation based on WinCLIP, outputs defect heat maps and links production line parameters for self-adjustment.

[0024] This method uses visual inspection to improve the accuracy and efficiency of defect detection, achieves pixel-level positioning, and can automatically adjust production line parameters, reducing manual intervention and improving production quality and intelligence.

[0025] In addition, the application of technologies such as multimodal data enhancement and cross-scale feature interaction of pyramid structures further enhances the generalization and robustness of the model, providing a new solution for quality inspection of engineering plastic production. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0027] Figure 1 A flow chart of a method for testing the production quality of engineering plastics is provided for this application.

[0028] Figure 2 A structural diagram of an engineering plastic production quality inspection system is provided for this application.

[0029] Explanation of the accompanying drawings: 1-image acquisition module, 2-feature extraction and fusion module, 3-model training module, 4-abnormal segmentation module, 5-result output module. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0031] Embodiment 1:Figure 1 As shown in the figure, the present invention provides a method for detecting the production quality of engineering plastics, including: Step S100: Real-time collect the surface images of engineering plastics on the production line through an industrial camera, and synchronously obtain the process parameters of the injection molding machine.

[0032] In this embodiment, the image acquisition system uses a Basler ace2 16k industrial camera, equipped with a Schneider Kreuznach Cinegon 1.4 / 12 mm fixed-focus lens, installed 1.2 meters directly above the mold opening station of the injection molding machine, at a 45° angle to the product surface, covering the largest imaging area. The light source system consists of 12 groups of ring LED cold light sources, and realizes stepless brightness adjustment of 0 - 1000 Lux through a PWM dimming controller, eliminating the reflection interference of the metal mold.

[0033] The image acquisition frame rate is dynamically adjusted according to the injection molding cycle: when the cycle time tcycle = 15 seconds, through the formula (where ξ = 1.8), the frame rate is obtained as 8.64 Hz, ensuring that at least 12 frames of images are collected in each cycle, and the injection molding machine ejection signal is obtained in real time through an encoder to trigger the acquisition.

[0034] The synchronous acquisition system obtains process parameters through a Kistler 5074A pressure sensor and a FLIR A655sc infrared thermal imager, and the data is transmitted to the industrial control computer through the OPC UA protocol, and the time stamp alignment accuracy reaches level. The image preprocessing process includes: (1) Non-uniform illumination correction, using the CLAHE algorithm, with a grid size of 64×64 and a contrast limit threshold of 2.0.

[0035] (2) Motion blur elimination, based on Wiener filtering, with a point spread function PSF size of 5×5.

[0036] (3) Multi-frame super-resolution reconstruction, using the VSRNet model, fusing 4 consecutive images into a resolution of 8192×8196. Data storage adopts a hierarchical architecture. The original images are encoded and compressed in H.265 and then stored in the NAS storage array, and the process parameters are stored in the time series database InfluxDB to achieve millisecond-level associated query.

[0037] Step S200: Construct a ViT-Adapter visual feature extraction network with a multi-scale sliding window, and generate a fusion feature vector by cross-modal fusion of the engineering plastic surface image features and the real-time process parameters of the injection molding machine through an adaptive attention mechanism.

[0038] In this embodiment, the backbone network uses the ViT-Large model, with a Patch size of 16×16, 24 layers, a hidden layer dimension of 1024. After the input image is processed by block division, a global feature of 14×14 is generated. , with a dimension of 14×14×1024. For the characteristics of the fine defects on the surface of the injection molded parts, five scales of sliding windows are designed, namely 3×3, 5×5, 7×7, 9×9, and 11×11. Each window extracts local features through RoI Align. , with a dimension of 5×5×256, and performs spatial alignment with the global feature through deformable convolution DeformConv (offset learning rate 0.1, convolution kernel 3×3) to solve the problem of mold texture deformation. The process parameters are mapped to a 128-dimensional conditional vector through an MLP encoder (3 fully connected layers, hidden layer dimension 256), and are jointly input into the gated attention network to dynamically generate weights. .

[0039] In the specific implementation, the feature fusion formula , where n = 36 is dynamically calculated and determined by the image size of 2048×2048. The attention weight generation network adopts a dual-path structure: the global path obtains context information through average pooling, and the local path adopts the SENet channel attention mechanism. Finally, the fusion weight is output through Sigmoid activation. During training, a curriculum learning strategy is adopted. Initially, only the 3×3 and 5×5 windows are enabled, and larger-scale windows are gradually introduced to prevent the model from falling into local optima prematurely.

[0040] At the same time, feature fusion adopts a multi-level pyramid structure to achieve in-depth interaction of cross-scale features. The pyramid structure consists of three levels. The feature fusion module adopts a three-level feature pyramid structure, including three levels of P2, P3, and P4, corresponding to 1 / 4 (P2 layer, 512 channels), 1 / 8 (P3 layer, 256 channels), and 1 / 16 (P4 layer, 128 channels) of the original image resolution respectively. The P2 layer upsamples the 14×14 feature map output by the ViT backbone to a resolution of 28×28 through depthwise separable convolution (kernel size 3×3, stride 2), and at the same time uses hybrid dilated convolution (dilation rate ) to enhance the perception ability of large-area flow marks; the P3 layer is obtained by downsampling the P2 layer through max pooling (kernel size 2×2, stride 2), and fuses the cross-region texture correlation extracted by dilated convolution (dilation = 2); the P4 layer directly connects to the global feature Fg of the ViT backbone, compresses the channels to 128 dimensions through 1×1 convolution, and performs conditional splicing with the real-time process parameters to form a process-aware feature vector. The process parameters include melt temperature, mold temperature, injection pressure, holding pressure, clamping force, injection speed, holding time, cooling time, back pressure, screw speed, melt viscosity, and material moisture content.

[0041] Cross-scale fusion is achieved through a two-way feature interaction path between pyramid levels:

[0042] Among them is the output feature map of the th layer, is the input feature map of the th layer, is the feature weight of the current layer, is the feature weight of the adjacent layer, is the input feature map of the th layer, and are learnable weights, satisfying , is the upsampling or downsampling operation. The top-down path bilinearly upsamples the features of the P4 layer to the resolution of the P3 layer, combines them with the features of the P3 layer through gated addition, and the gated weights are generated by two fully connected networks; the bottom-up path performs atrous spatial pyramid pooling on the features of the P2 layer, and the output features are downsampled to the resolution of the P3 layer by a 3×3 convolution and then concatenated with the features of the P3 layer, and then the channel weights are recalibrated through the SE attention module. The core of cross-layer interaction lies in the dynamic multi-scale attention mechanism: for the position of each sliding window, multi-resolution feature blocks in the corresponding regions are extracted from the P2-P4 layers, and the cross-layer feature correlation matrix is calculated through cosine similarity, and the hierarchical fusion weights are generated after Softmax normalization.

[0043] The pyramid structure is deeply coupled with the sliding window: for each sliding window, the P2 layer covers an area 4 times the original size of the window (e.g., a 7×7 window corresponds to 28×28 pixels), and the multi-scale deformation is aligned through deformable convolution DeformConv (the offset range is pixels); the P3 layer corresponds to an area 2 times the window (14×14 pixels), and deformable RoI Align is used to extract local features; the P4 layer directly maps the central area of the window (7×7 pixels), and the global context is fused through the cross-attention mechanism. A cross-level feature compensation module is designed to solve the resolution mismatch problem: after the features of the P4 layer are upsampled to the resolution of the P3 layer through sub-pixel convolution, they are concatenated with the features of the P3 layer in the channel dimension, and then compressed to 256 dimensions through a 3×3 convolution; similarly, the features of the P3 layer are compensated to the P2 layer through the same operation, forming a closed-loop feature enhancement path.

[0044] Step S300: Based on the fused feature vector, construct a two-branch training network, and train the defect classification model using a joint loss function of improved Focal Loss and contrastive learning.

[0045] In this embodiment, to address the issue of unbalanced injection molding defect samples, a combined loss function is adopted. Among them, and are loss weight coefficients. In this embodiment, is adopted. , is the Focal Loss. In the Focal Loss, the class balance coefficient , and the difficult sample focusing coefficient . In the contrastive learning part, a Memory Bank containing 1024 negative samples is constructed. The temperature coefficient softens the similarity distribution. The loss function , where is the cosine similarity between the anchor point and the positive sample, is the negative sample similarity, n is the index of the negative sample, and N is the number of negative samples.

[0046] The training strategy adopts two-stage optimization: in the first 50 epochs, the Focal Loss is used to stabilize the feature space, and in the subsequent 30 epochs, the contrastive loss is introduced, while enabling difficult sample mining. 256 samples are sampled in each batch. The optimizer is selected as Rectified Adam, with a weight decay coefficient of 0.01 and a gradient clipping threshold of 5.0.

[0047] Step S400: Use the defect classification model to extract deep semantic features, and combine with the zero-shot anomaly segmentation algorithm of the WinCLIP framework to perform pixel-level localization on surface bubbles and scratches, generating a defect mask map.

[0048] In this embodiment, the text encoder of the WinCLIP framework is extended to support the input of process parameter conditions. After splicing the text prompt (such as "surface bubble, diameter 2mm") with the real-time process parameters, a 512-dimensional defect semantic vector is generated by the BERT model . The visual branch uses 3-layer strided convolution to extract multi-scale features. In the calculation step , is the anomaly score of the pixel point , is the visual feature vector of the image patch at the position , is the defect semantic vector generated by the text encoder, is a scaling function, and the scaling factor is dynamically adjusted during training. In the initial stage, T = 0.12 promotes feature learning, in the middle stage, T = 0.09 balances the accuracy, and in the later stage, T = 0.08 improves the localization details.

[0049] The training data adopts synthetic defect generation technology, and realistic defects are added to normal samples through the VAE-GAN model (the latent space dimension is 64, and the generator contains 5 residual blocks): , where is the expected value calculation, is the discriminator output, is the image generated by the generator with the latent variable and process conditions , is the latent variable distribution output by the encoder, is the prior distribution, is the KL divergence calculation, is the KL divergence weight, is the conditional vector, which contains process parameters with a preset dimension. In this embodiment, 12-dimensional process parameters are adopted. The process parameters include melt temperature, mold temperature, injection pressure, holding pressure, clamping force, injection speed, holding time, cooling time, back pressure, screw speed, melt viscosity, and material moisture content. The double-threshold method is adopted in the test stage: the abnormal score is determined as a confirmed defect, is marked as a suspected area, and the connected domain area is calculated.

[0050] Step S500: Generate a defect heat map in real time according to the defect localization result and perform result visualization. Based on the proportion and spatial distribution of the defect area in the heat map, adjust the injection molding machine process parameters through the PID control algorithm.

[0051] In this embodiment, the defect heat map is rendered according to the formula , and the intensity of the red channel is positively correlated with the abnormal score. At the same time, calculate the defect centroid and the maximum extension distance . When , parameter adjustment is triggered. The PID control module calculates the adjustment amount according to the formula, and the PID coefficients , , , where the time window of the integral term is set to 30 minutes, and the differential term uses moving average filtering to eliminate noise.

[0052] The visualization system is built based on the WebGL engine, supports interactive viewing of the three-dimensional injection molding part model, and can be rotated, scaled arbitrarily and overlaid with the heat map. The data dashboard integrates the trend analysis function, displays the defect area change curve of the recent 200 cycles, and triggers a secondary alarm when for three consecutive cycles. The adjustment instruction is sent to the injection molding machine controller through the Modbus / TCP protocol, and the parameter update delay is less than 50ms.

[0053] Embodiment 2: As Figure 2As shown in the figure, the present invention provides a quality inspection system for engineering plastics production, including: An image acquisition module 1, which is used to collect the surface images of engineering plastics on the production line in real time through an industrial camera and synchronously obtain the process parameters of the injection molding machine.

[0054] A feature extraction and fusion module 2, which constructs a ViT-Adapter visual feature extraction network with a multi-scale sliding window, and through an adaptive attention mechanism, cross-modal fusion features are generated by fusing the surface image features of engineering plastics with the real-time process parameters of the injection molding machine, generating a fusion feature vector.

[0055] A model training module 3, which constructs a two-branch training network based on the fusion feature vector and trains a defect classification model using a combined loss function of improved Focal Loss and contrastive learning.

[0056] An abnormal segmentation module 4, which uses the defect classification model to extract deep semantic features, combines with the zero-shot abnormal segmentation algorithm of the WinCLIP framework, performs pixel-level localization on surface bubbles and scratches, and generates a defect mask map.

[0057] A result output module 5, which generates a defect heat map in real time according to the defect localization result and visualizes the result. Based on the proportion of the defect area and the spatial distribution of the heat map, the process parameters of the injection molding machine are adjusted through the PID control algorithm.

[0058] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and its equivalent technologies, the present invention also intends to include these changes and modifications.

Claims

1. A method for detecting the production quality of engineering plastics, characterized in that, The method includes: Step S100: Real-time collect the surface images of engineering plastics on the production line through an industrial camera, and synchronously obtain the process parameters of the injection molding machine; Step S200: Construct a ViT-Adapter visual feature extraction network with a multi-scale sliding window, and through an adaptive attention mechanism, perform cross-modal fusion of the surface image features of engineering plastics and the real-time process parameters of the injection molding machine to generate a fusion feature vector; Step S300: Based on the fusion feature vector, construct a two-branch training network, and use a combined loss function of improved Focal Loss and contrast learning to train the defect classification model; Step S400: Use the defect classification model to extract deep semantic features, and combine with the zero-shot anomaly segmentation algorithm of the WinCLIP framework to perform pixel-level localization of surface bubbles and scratches to generate a defect mask map; Step S500: According to the defect localization result, generate a defect heat map in real time and visualize the result. Based on the defect area ratio and spatial distribution of the heat map, adjust the process parameters of the injection molding machine through the PID control algorithm.

2. The method for detecting the production quality of engineering plastics according to claim 1, wherein, The image acquisition frame rate of the industrial camera satisfies the relational expression with the injection molding cycle: Among them is the injection molding cycle time, is the redundancy coefficient, and the ejection signal of the injection molding machine is obtained in real time through the encoder to trigger the acquisition.

3. The quality inspection method for engineering plastics production according to claim 1, characterized in that, The feature extraction network includes: Global features extracted by the ViT-L / 16 backbone network and the sliding window local features are spatially aligned, which is a real number matrix, and feature fusion is achieved through deformable convolution: Among them is the fused feature tensor, is the th sliding window weight coefficient, generated by the gated attention mechanism, is the deformable convolution, and s is the number of sliding windows.

4. The engineering plastic production quality detection method according to claim 3, characterized in that, The cross-modal fusion feature uses a pyramid structure for cross-scale feature interaction: Construct a three-level feature pyramid , where the resolution of the P2 layer is 1 / 4 and the number of channels is 512; the resolution of the P3 layer is 1 / 8 and the number of channels is 256; the resolution of the P4 layer is 1 / 16 and the number of channels is 128; cross-scale feature interaction is performed through a bidirectional feature pyramid network: Among them is the output feature map of the -th layer, is the input feature map of the -th layer, is the feature weight of the current layer, is the feature weight of the adjacent layer, is the input feature map of the -th layer, and are learnable weights, satisfying , is the upsampling or downsampling operation.

5. The quality inspection method for engineering plastics production according to claim 1, characterized in that The training of the defect classification model uses an improved loss function: Among them and are loss weight coefficients, is the Focal Loss, is the contrast loss term: where is the similarity score of the positive sample pair, is the similarity score of the negative sample pair, n is the index of the negative sample, and the temperature coefficient , and N is the number of negative samples.

6. The quality inspection method for engineering plastics production according to claim 1, characterized in that, The training of the defect classification model uses multi-modal data augmentation: Include image generation conditional on process parameters, and generate synthetic data with defect labels through VAE-GAN: Among them is for expected value calculation is the discriminator output is the image generated by the generator with latent variable and process conditions is the latent variable distribution output by the encoder is the prior distribution is for KL divergence calculation is the KL divergence weight is the conditional vector containing process parameters of a preset dimension 7. The quality inspection method for engineering plastics production according to claim 1, characterized in that The anomaly segmentation algorithm includes: Abnormal semantic vectors generated based on the CLIP text encoder and visual features Calculate the pixel-level similarity: where is a real matrix, is the pixel point 's anomaly score, is the visual feature vector of the image patch at the position , is the defect semantic vector generated by the text encoder, is a scaling function with a scaling factor , is the number of training epochs.

8. The quality inspection method for engineering plastics production according to claim 7, characterized in that, The result visualization includes: Map the defect heat map to the CAD model to generate a three-dimensional quality distribution cloud map, and the coloring of the defect area follows: Mark the maximum defect size at the same time ; where is the centroid coordinate of the defect area, is the set of all defective pixel points.

9. The quality inspection method for engineering plastics production according to claim 1, wherein The adjustment of the process parameters of the injection molding machine is realized as: According to the proportion of the defect area and the position distribution , calculate the correction amount of the injection molding machine: Among them, the PID coefficients , , , is the proportion of the defective area in the current detection period, is the integral of the historical defective area, is the change rate of the defective area.

10. An engineering plastic production quality inspection system, characterized in that, The system includes: An image acquisition module for real-time collecting the surface images of engineering plastics on the production line through an industrial camera and synchronously obtaining the process parameters of the injection molding machine; A feature extraction and fusion module that constructs a ViT-Adapter visual feature extraction network with a multi-scale sliding window, and through an adaptive attention mechanism, performs cross-modal fusion of the surface image features of engineering plastics and the real-time process parameters of the injection molding machine to generate a fusion feature vector; A model training module that constructs a two-branch training network based on the fusion feature vector and uses a combined loss function of improved Focal Loss and contrast learning to train the defect classification model; An anomaly segmentation module that uses the defect classification model to extract deep semantic features, and combines with the zero-shot anomaly segmentation algorithm of the WinCLIP framework to perform pixel-level localization of surface bubbles and scratches to generate a defect mask map; A result output module that generates a defect heat map in real time according to the defect localization result and visualizes the result. Based on the defect area ratio and spatial distribution of the heat map, adjust the process parameters of the injection molding machine through the PID control algorithm.

Citation Information

Patent Citations

  • Defect detection method based on visual attention mechanism

    CN114648647A

  • Injection molding process product quality detection method based on multi-modal data driving

    CN116777836A

  • Plastic film production defect detection method and system

    CN117670820A

  • Electric power defect image detection method based on image-text question-answer multi-modal model

    CN117763107A

  • Automatic substrate glass surface defect detection method and system based on machine vision

    CN119006469A

Cited By

  • Injection mold surface defect detection method based on visual inspection

    CN121049290A

  • Microgyroscope manufacturing process defect intelligent detection and parameter autonomous optimization method

    CN121234160A

  • Intelligent manufacturing quality detection method and system based on machine vision

    CN121860472A