Protective film appearance defect detection method and system based on machine vision

By constructing a multi-source data fusion correction mechanism, the correction values ​​of multiple dimensional factors of protective film appearance defect detection are obtained, which solves the problem of insufficient accuracy of protective film appearance defect detection in the existing technology and realizes high-precision detection under complex working conditions.

CN120634979AActive Publication Date: 2025-09-12GUANGDONG QIANQIAN NEW MATERIAL TECH CO LTD

Patent Information

Application Number
CN202510697785.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-28
Publication Date
2025-09-12
Estimated Expiration
2045-05-28

AI Technical Summary

Technical Problem

The existing machine vision-based protective film appearance defect detection method has the problems of single data dimension and lack of multi-source data fusion and correction mechanism, resulting in insufficient detection accuracy under complex working conditions.

Method used

By obtaining correction values ​​for multiple dimensional factors, a correction function is constructed to modify the initial confidence level and obtain the final confidence level, achieving high-precision detection of protective film appearance defects. These dimensional factors include the protective film's physical parameters, defect distribution parameters, and environmental parameters.

Benefits of technology

The accuracy of protective film appearance defect detection under complex working conditions has been significantly improved, and the accuracy and robustness of the model for defect detection have been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120634979A_ABST
    Figure CN120634979A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, and provides a protective film appearance defect detection method and system based on machine vision, and the method comprises the following steps: obtaining a to-be-detected protective film image, constructing a neural network model, carrying out the initial appearance defect recognition of the protective film image through the trained neural network model, and obtaining a protective film appearance defect recognition result; obtaining an initial confidence coefficient; obtaining correction values of a plurality of dimension factors influencing the accuracy of the output result of the neural network model, and constructing a correction function according to the correction values; and correcting the initial confidence coefficient according to the correction function to obtain a final confidence coefficient, and detecting the appearance defect of the protective film according to the final confidence coefficient. By constructing a multi-source data fusion correction mechanism, the neural network prediction result of the protective film appearance defect can be corrected in real time based on the multi-source data, and the protective film appearance defect detection precision under the complex working condition is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a method and system for detecting appearance defects of a protective film based on machine vision. Background Art

[0002] Protective film is a thin film material typically used to protect surfaces from damage, contamination, or corrosion. It is widely used in various fields, such as electronic screens, automotive surfaces, and building materials. To ensure that products are adequately protected by protective film, strict performance requirements are sometimes imposed, requiring visual defect inspection of the protective film during production.

[0003] The Chinese invention patent application number CN202410963156.3 discloses a method and system for detecting appearance defects in protective film production based on machine vision. By installing a high-resolution fast camera and a multi-light source system on the production line, it can realize real-time acquisition and high-quality shooting of the surface image of the protective film. The image preprocessing module performs denoising and correction on the collected images to improve the clarity and accuracy of the image. Combined with the deep learning model's recognition of defect features, the system can quickly and accurately detect bubbles, scratches and wrinkle defects on the protective film, greatly improving the accuracy and speed of detection and reducing the errors and time costs of manual detection.

[0004] Then, the above-mentioned machine vision-based protective film production appearance defect detection method and system mainly rely on a neural network model driven by a single visual data. There is a problem of single data dimension and a lack of a multi-source data fusion and correction mechanism for the physical parameters of the protective film and historical defects. There is room for further improvement in its defect detection accuracy under complex working conditions. Summary of the Invention

[0005] Based on this, in order to improve the accuracy of protective film appearance defect detection, the present invention provides a protective film appearance defect detection method and system based on machine vision. The specific technical solution is as follows:

[0006] A method for detecting appearance defects of a protective film based on machine vision comprises the following steps:

[0007] Acquire an image of a protective film to be inspected, build a neural network model, and perform initial appearance defect recognition on the protective film image using the trained neural network model to obtain an initial confidence level;

[0008] Obtaining correction values ​​of multiple dimensional factors that affect the accuracy of the output result of the neural network model, and constructing a correction function based on the correction values;

[0009] The initial confidence is corrected according to the correction function to obtain a final confidence, and the detection of the appearance defects of the protective film is achieved according to the final confidence.

[0010] The protective film appearance defect detection method obtains correction values ​​of multiple dimensional factors, constructs a correction function based on the correction values, and corrects the initial confidence to obtain the final confidence. By constructing a multi-source data fusion correction mechanism, it can perform real-time correction on the neural network prediction results of protective film appearance defects based on multi-source data, significantly improving the accuracy of protective film appearance defect detection under complex working conditions.

[0011] Preferably, the specific method for identifying initial appearance defects of the protective film image includes the following steps:

[0012] Extract global features of RGB image and structured light phase image respectively;

[0013] Performing a deformable convolution operation on the global features of the RGB image to obtain a first modal local defect feature, performing a deformable convolution operation on the global features of the structured light phase image to obtain a first local defect feature, and obtaining a second modal local defect feature;

[0014] Performing a bilinear interactive pooling operation on the first modal local defect feature and the second modal local defect feature to obtain a bimodal fusion feature;

[0015] Performing initial appearance defect recognition on the protective film image according to the dual-modal fusion feature;

[0016] The protective film image includes an RGB image and a structured light phase image.

[0017] Preferably, the plurality of dimensional factors include physical parameters of the protective film, and the specific method for obtaining the corrected value of the physical parameter of the protective film includes:

[0018] Obtaining a strain rate tensor of the protective film, and obtaining a dynamic deformation accumulation factor according to the strain rate tensor;

[0019] Obtaining a temperature sensitivity coefficient of the protective film and a current ambient temperature, and obtaining a temperature sensitivity factor according to the temperature sensitivity coefficient and the current ambient temperature;

[0020] Obtaining the surface roughness and interface energy density gradient of the protective film, and obtaining the corrected values ​​of the physical parameters of the protective film according to the surface roughness, interface energy density gradient, dynamic deformation accumulation factor, and temperature sensitivity factor;

[0021] The physical parameters of the protective film include strain rate tensor, temperature sensitivity coefficient, surface roughness and interface energy density gradient.

[0022] Preferably, the plurality of dimensional factors further include a defect distribution parameter, and the specific method for obtaining the correction value of the defect distribution parameter includes:

[0023] Acquire a current defect distribution sample of the protective film and a historical defect distribution sample corresponding to the protective film;

[0024] Obtaining feature similarity between the current defect distribution sample and the historical defect distribution sample;

[0025] Obtaining a correction value of the defect distribution parameter according to the feature similarity;

[0026] The defect distribution parameters include current defect distribution samples and historical defect distribution samples.

[0027] Preferably, a specific method for obtaining the feature similarity between the current defect distribution sample and the historical defect distribution sample includes:

[0028] Dividing the historical defect distribution samples into m typical patterns through K-mean clustering;

[0029] Obtain feature similarity between the current defect distribution sample and the cluster center.

[0030] Preferably, the correction value of the physical parameter of the protective film

[0031] Where dE represents the interface energy density gradient, Ra represents the surface roughness, represents the dynamic deformation accumulation factor, γ represents the deformation weight coefficient, ε represents the strain rate tensor, and e -λ(T-T') represents the temperature sensitivity factor, e represents the natural constant, λ represents the temperature sensitivity coefficient, T and T' represent the current ambient temperature and the reference temperature respectively.

[0032] Preferably, the specific method of obtaining the correction value of the defect distribution parameter according to the feature similarity includes:

[0033] Obtain the intra-class density weight based on the number of defect samples in the cluster center and the total number of samples in the current defect distribution

[0034] Obtain the corrected value of the defect distribution parameter according to the intra-class density weight and feature similarity

[0035] Among them, N i Indicates the number of defective samples in the i-th cluster center, N total represents the total number of samples, λ' represents the time decay rate parameter, ΔT irepresents the time difference between the current time and the time when the i-th type defect occurs, C i represents the cluster center of the i-th category, D current Represents the current defect distribution sample, sim(C i ,D current ) represents the feature similarity between the current defect distribution sample and the cluster center.

[0036] Preferably, the final confidence

[0037] Among them, S initial represents the initial confidence, M represents the number of correction values ​​of the dimensional factors, w i Represents the weight coefficient of the correction value, exp represents the natural exponential function, f i represents the correction value of the i-th dimension factor, Represents the correction function.

[0038] A protective film appearance defect detection system based on machine vision, used to implement the protective film appearance defect detection method, comprising:

[0039] An image acquisition module, used for acquiring an image of the protective film to be detected;

[0040] A neural network model is used to perform initial appearance defect recognition on the protective film image and obtain initial confidence;

[0041] A function construction module, used to obtain correction values ​​of multiple dimensional factors that affect the accuracy of the output result of the neural network model, and construct a correction function based on the correction values;

[0042] A confidence correction module is used to correct the initial confidence according to the correction function to obtain a final confidence, and to detect the appearance defects of the protective film according to the final confidence.

[0043] Preferably, the image acquisition module includes:

[0044] A multispectral camera, used to obtain an RGB image of the protective film;

[0045] a structured light projection device for obtaining a structured light phase image of the protective film;

[0046] The protective film image includes an RGB image and a structured light phase image. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The present invention can be further understood from the following description in conjunction with the accompanying drawings. The components in the figures are not necessarily drawn to scale, but rather the emphasis is placed on illustrating the principles of the embodiments. In different views, the same reference numerals designate corresponding parts.

[0048] Figure 1 This is a schematic diagram of the overall process of a method for detecting appearance defects of a protective film based on machine vision in one embodiment of the present invention;

[0049] Figure 2 1 is a flow chart of a specific method for identifying initial appearance defects of a protective film image in one embodiment of the present invention;

[0050] Figure 3 is a flow chart of a specific method for obtaining the correction value of the physical parameter of the protective film in one embodiment of the present invention;

[0051] Figure 4 is a flowchart of a specific method for obtaining a correction value of the defect distribution parameter in one embodiment of the present invention;

[0052] Figure 5 is a flowchart of a specific method for obtaining feature similarity between the current defect distribution sample and the historical defect distribution sample in one embodiment of the present invention;

[0053] Figure 6 is a flowchart of a specific method for obtaining a correction value of the defect distribution parameter according to the feature similarity in one embodiment of the present invention;

[0054] Figure 7 is a flowchart of a specific method for obtaining the corrected value of the environmental parameter in one embodiment of the present invention;

[0055] Figure 8 is a flowchart of a specific method for obtaining a correction value of the defect heat index in one embodiment of the present invention;

[0056] Figure 9 The figure is a schematic diagram of the overall structure of a protective film appearance defect detection system based on machine vision in one embodiment of the present invention. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with its embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and do not limit the scope of protection of the present invention.

[0058] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly attached to the other element or there may be an intermediate element. When an element is referred to as being "connected to" another element, it may be directly connected to the other element or there may be an intermediate element. The terms "vertical," "horizontal," "left," "right," and similar expressions used herein are for illustrative purposes only and do not represent the only implementation methods.

[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this invention pertains. The terms used herein in the specification of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0060] The "first" and "second" in the present invention do not represent specific quantities and orders, but are only used to distinguish names.

[0061] like Figure 1 As shown, a method for detecting appearance defects of a protective film based on machine vision in one embodiment of the present invention includes the following steps:

[0062] S1, obtaining an image of a protective film to be inspected, and constructing a neural network model, performing initial appearance defect recognition on the protective film image through the trained neural network model to obtain an initial confidence level.

[0063] Specifically, the protective film image includes but is not limited to an RGB image and a structured light phase map of the protective film. The RGB image can be obtained by a multispectral camera, and the structured light phase map can be obtained by a structured light projection device.

[0064] Neural network models include, but are not limited to, CNN (Convolutional Neural Network), object detection networks (such as Fast R-CNN and YOLO), instance segmentation networks (Mask R-CNN), generative adversarial networks (GAN), and multi-scale fusion attention mechanisms. The following is a brief introduction to common neural network models:

[0065] 1. CNN is one of the most commonly used network structures in deep learning and is particularly suitable for processing image data. Through convolutional layers, pooling layers, and fully connected layers, CNN can automatically extract features from images for defect classification and location.

[0066] 2. Object detection networks can simultaneously locate and classify defects. Common models include Faster R-CNN and YOLO. These models generate bounding boxes to mark the location of defects and classify the defect type. For example, Faster R-CNN incorporates a Region Proposal Network (RPN), which can quickly generate candidate regions and perform classification.

[0067] Instance segmentation combines the advantages of object detection and semantic segmentation to segment defects at the pixel level. Mask R-CNN is a classic instance segmentation model that generates masks to accurately identify the location and shape of defects. Furthermore, newer models such as YOLOv8-seg have also performed well in industrial defect detection.

[0068] 4. GANs, through adversarial training of the generator and discriminator, can generate images that resemble real defects, enabling data augmentation or direct detection. For example, some studies have used the GAN discriminator to generate defect distribution likelihood maps, which are then combined with residual maps for defect localization. Some models improve defect detection accuracy through multi-scale fusion and attention mechanisms. For example, the combination of the Channel Modulated Feature Pyramid Network (CM-FPN) and the lightweight Transformer in ETDNet can effectively handle scale and shape variations of defects.

[0069] Preferably, the neural network model can be a cascaded attention network. The cascaded attention network is a deep learning architecture that combines a multi-level attention mechanism. It enhances the model's ability to capture complex features through a gradually refined feature extraction method. The core of the cascaded attention network includes a multi-level attention mechanism, dynamic feature fusion, and lightweight design. The multi-level attention mechanism refers to the cascaded attention focusing on features at different levels layer by layer by connecting multiple attention modules in series. Dynamic feature fusion refers to the cascaded attention module aggregating regional proposal features at different stages in 3D target detection, solving the sample imbalance problem of long-distance target detection through cross-attention operations, and reducing error propagation. For example, EfficientViT uses a cascaded group attention module to segment the features and input them into different attention heads to reduce computational redundancy.

[0070] As a preferred technical solution, Figure 2 As shown, the specific method for performing initial appearance defect recognition on a protective film image includes the following steps:

[0071] S11, extract the global features of the RGB image and the structured light phase image respectively.

[0072] Here, an improved ResNet-50 can be used as the backbone network to generate multi-scale feature maps through the Feature Pyramid Network (FPN). A dynamic channel attention mechanism is embedded in the FPN to dynamically adjust the channel weights according to real-time environmental parameters (such as temperature and light). For example, in high temperature and high humidity environments, the edge detection channel is enhanced to enhance the expression ability of key features. The main function of step S11 is to capture the macro defect patterns of the protective film, such as large scratches, ripples, etc.

[0073] The RGB image is fed into the ResNet-50 backbone network and downsampled layer by layer to generate a multi-scale feature map (C3: 1 / 8 size, C4: 1 / 16 size, C5: 1 / 32 size). Similarly, the structured light phase image is fed into the ResNet-50 backbone network and downsampled layer by layer to generate a multi-scale feature map.

[0074] For the feature pyramid, C5 is first upsampled and fused with C4 through weighted fusion to generate P4 (enhanced semantic information), and then P4 is further upsampled and fused with C3 to generate P3 (supplemented spatial details).

[0075] S12, performing a deformable convolution operation on the global features of the RGB image to obtain a first modal local defect feature, performing a deformable convolution operation on the global features of the structured light phase image to obtain a first local defect feature, and obtaining a second modal local defect feature.

[0076] Here, Deformable Convolutional Networks (DCN) can be introduced to refine local features for small objects or fine-grained defects. Skip connections are used to fuse shallow high-resolution features with deep semantic features to improve spatial positioning accuracy.

[0077] The main function of step S12 is to locate microscopic defects such as pinholes and bubbles through adaptive convolution kernels. Specifically, the offset and scaling factor are dynamically predicted on the P3 feature map to adjust the position and shape of the convolution kernel. For example, when a pinhole with a diameter of 1 mm is detected, the convolution kernel is expanded from 3×3 to 5×5, and the offset Δx = 2 pixels is used to align the center of the defect. Then, P3 (1 / 8) is fused with the upsampled P4 (1 / 16→1 / 8) by element-by-element addition to generate the final positioning map.

[0078] S13: Perform a bilinear interactive pooling operation on the first modal local defect feature and the second modal local defect feature to obtain a bimodal fusion feature.

[0079] Through a bilinear interactive pooling operation, the first-modal local defect features of the RGB image are fused with the second-modal local defect features of the structured light phase image to enhance the complementarity of texture and depth features. Specifically, assuming that the RGB image features (i.e., the first-modal local defect features) highlight color anomalies (such as yellow discoloration areas), and the second-modal local defect features reflect surface topography (such as depressions with a height difference of 0.1μm), the bimodal fusion features can also contain color-topography association information (such as yellow areas accompanied by depressions).

[0080] Bilinear pooling is a method that constructs a fusion representation by calculating the outer product of two vectors. It allows all elements of the two vector representations to interact and fuse very fully. Several common bilinear fusion methods are:

[0081] 1. Multimodal Compressed Bilinear Pooling (MCB): MCB first maps the original image and text representation to a high-dimensional representation space using a count sketch, and then convolves the two representations in the Fast Fourier Transform space using an element-wise product. This two-step process simulates bilinear pooling, avoiding the square expansion of high-dimensional features.

[0082] 2. Multimodal Low-Rank Bilinear Pooling (MLB): MLB decomposes Wi into two low-rank matrices P and Q. By decomposing Wi, the parameter scale is reduced.

[0083] 3. Multimodal Factor Bilinear Pooling (MFB): MFB is very similar to MLB and also decomposes Wi into two low-rank matrices. The difference is that instead of replacing the all-ones vector with the parameter matrix to obtain the fused vector, MFB uses Dz groups of low-rank matrices to obtain Dz elements in the fused vector.

[0084] 4. Multimodal Tucker Fusion: Tucker decomposition is a principal component analysis method for high-dimensional tensors. For a three-dimensional tensor W, Tucker decomposition yields the product of a three-dimensional kernel tensor Tc and three factor matrices P, Q, and W.

[0085] Since fusing multimodal features through bilinear interactive pooling is a conventional technical means in this field, it will not be described here in detail.

[0086] S14, performing initial appearance defect recognition on the protective film image according to the dual-modal fusion feature.

[0087] Specifically, a training data set can be obtained by obtaining a large number of historical RGB images and structured light phase map data of the protective film, and performing preprocessing including cleaning and labeling on them. The neural network model is trained according to the training data set until a preset number of training times is reached or the convergence conditions are met to obtain a trained neural network model. The obtained dual-modal fusion features are then input into the trained neural network to perform initial appearance defect recognition on the protective film image and obtain the initial confidence. As for the loss function of the neural network model, it includes but is not limited to cross entropy loss and mean square error loss. Since training the neural network model based on the loss function and the training data set is a conventional technical means in this field, it will not be repeated here.

[0088] The initial confidence level can be understood as the classification prediction probability output by the trained neural network model after inputting the bimodal fusion features. In other words, the initial confidence level is the model's predicted probability value for the input data (such as an image of a protective film appearance defect) before external correction. For example, in a binary classification task, the initial confidence level can represent the probability of "defect presence."

[0089] S2, obtaining correction values ​​of multiple dimensional factors that affect the accuracy of the output result of the neural network model, and constructing a correction function based on the correction values.

[0090] For each dimensional factor, at least one parameter related to the accuracy of protective film defect detection is included. The existence of this parameter affects the accuracy of protective film defect detection or can correct and optimize the classification prediction probability and confidence of the neural network model, such as environmental parameters (such as temperature, humidity and light intensity), physical parameters of the protective film (surface roughness, thickness, Young's modulus), process parameters (such as coating speed, curing time), etc. The correction value can be constructed as a logarithmic function, polynomial function, piecewise function, etc. of several parameters in the corresponding dimensional factors according to actual conditions. Each dimensional factor corresponds to a correction value. The main function of the correction value includes linear or nonlinear transformation of several parameters to make reasonable and appropriate corrections to the initial confidence.

[0091] S3, correcting the initial confidence according to the correction function to obtain a final confidence, and detecting the appearance defects of the protective film according to the final confidence.

[0092] The initial confidence level is susceptible to data bias, noise, or model overfitting. For example, when the training data contains insufficient defect samples, the initial confidence level may be too low for minor defects. This method uses correction values ​​from multiple external factors to derive a correction function, then corrects the initial confidence level based on the correction function, effectively eliminating environmental interference or model blind spots.

[0093] Specifically, suppose that when inspecting for scratches on a protective film, the initial confidence level for a 0.01mm scratch is 65%, but an initial confidence level of ≥80% is required to classify it as a defect. By introducing corrections for ambient temperature and humidity, light intensity, and equipment vibration to correct the initial confidence level, the final confidence level increases to 82%. This factor in the impact of external factors on the predicted probability of protective film defect detection can be taken into account, thereby improving the model's accuracy in predicting protective film defect classification.

[0094] As a preferred technical solution, the final confidence

[0095] Among them, S initial represents the initial confidence, M represents the number of correction values ​​of the dimensional factors, w i Represents the weight coefficient of the correction value, exp represents the natural exponential function, f i represents the correction value of the i-th dimension factor, Represents the correction function.

[0096] Here, the initial confidence S output by the neural network model initial Through the nonlinear correction term Adjustment and correction can enhance the model's ability to express complex relationships. exp, as a natural exponential function, ensures that the output is always positive and amplifies important features. The weight coefficient of the correction value is a learnable weight parameter that can be optimized through backpropagation to balance the contribution of the correction value of each dimensional factor. When it is greater than zero, it can enhance the certainty of the neural network model. When it is less than zero, it can suppress the overconfident prediction of the neural network model.

[0097] The final confidence level is obtained, and based on the corresponding confidence threshold, the final defect classification prediction is output by comparing the final confidence level with the confidence threshold, thereby achieving detection and identification of protective film defects. For example, if the final confidence level corresponding to a scratch on the protective film obtained by the neural network model is 93%, and the confidence threshold is set to 90%, since the final confidence level is greater than the confidence threshold, it can be determined that the protective film image input to the neural network has a scratch defect.

[0098] It should be noted that the neural network model is preferably a multi-output classification neural network, and the prediction categories it outputs include but are not limited to scratches on the protective film, bubbles, protrusions, depressions, pollution, and particulate foreign matter.

[0099] In summary, the protective film appearance defect detection method obtains the correction values ​​of multiple dimensional factors, constructs a correction function based on the correction values, and corrects the initial confidence to obtain the final confidence. By constructing a multi-source data fusion correction mechanism, it can make real-time corrections to the neural network prediction results of the protective film appearance defects based on multi-source data, significantly improving the detection accuracy of protective film appearance defects under complex working conditions.

[0100] As a preferred technical solution, the multiple dimensional factors include physical parameters of the protective film, such as Figure 3 As shown, the specific method for obtaining the correction value of the physical parameter of the protective film includes:

[0101] S211 , obtaining a strain rate tensor of the protective film, and obtaining a dynamic deformation accumulation factor according to the strain rate tensor.

[0102] S212 , obtaining a temperature sensitivity coefficient of the protective film and a current ambient temperature, and obtaining a temperature sensitivity factor according to the temperature sensitivity coefficient and the current ambient temperature.

[0103] S213 , obtaining the surface roughness and interface energy density gradient of the protective film, and obtaining correction values ​​of the physical parameters of the protective film according to the surface roughness, interface energy density gradient, dynamic deformation accumulation factor, and temperature sensitivity factor.

[0104] The physical parameters of the protective film include strain rate tensor, temperature sensitivity coefficient, surface roughness and interface energy density gradient.

[0105] Specifically, the correction value of the physical parameter of the protective film Where dE represents the interface energy density gradient, Ra represents the surface roughness, represents the dynamic deformation accumulation factor, γ represents the deformation weight coefficient, ε represents the strain rate tensor, and e -λ(T-T') Indicates the temperature sensitivity factor, e represents the natural constant, λ represents the temperature sensitivity coefficient, T and T' represent the current ambient temperature and the reference temperature respectively, and f1 represents the correction value of the physical parameters of the protective film. It represents the accumulation of deformation over time, reflecting the gradually accumulated microstructural changes (such as lattice distortion, interface slip, etc.) of the protective film under dynamic loads (such as stress and temperature fluctuations). It is used to quantify the cumulative effect of deformation rate over time, and the result is the total deformation.

[0106] The dynamic deformation accumulation factor (DFA) quantifies the cumulative effect of irreversible deformation of the protective film under stress on energy dissipation. It reflects the dynamic evolution of the microstructure (such as lattice distortion and interfacial slip) through the strain rate integral, correcting the flaw of traditional models that ignore the influence of deformation velocity. This DFA is applicable to non-steady-state conditions (such as impact loads and cyclic stresses) and can capture the material's viscoelastic response and hysteresis effects.

[0107] The temperature sensitivity factor is used to characterize the nonlinear modulation effect of temperature on the energy transfer efficiency of the protective film. It reflects the energy loss caused by material softening, phase change (such as graphitization) or oxidation at high temperature in the form of exponential decay. It can correct problems such as thermal expansion mismatch and decreased fracture toughness caused by the deviation between the current ambient temperature and the reference temperature. Represents the strain rate tensor component, describing the rate and direction of microscopic deformation, with the unit of s -1 , such as 0.02s -1 The temperature sensitivity coefficient is related to the thermal conductivity and phase change activation energy of the material. The reference temperature is the critical temperature threshold at which the material is not thermally damaged. It can be set based on experience or through PE protective film tearing test data.

[0108] The interface energy density gradient represents the energy transfer efficiency per unit volume, and the unit is J / m 3 , can be obtained through micro-arc oxidation film removal experiments, such as 500J / m 3 Surface roughness affects the geometric complexity of the energy dissipation path. Measured in μm, it can be obtained through biaxial tensile testing, e.g., 0.8 μm. The deformation weight coefficient reflects the creep characteristics and damping effect of the material. It is dimensionless and generally ranges from 0.1 to 1.5, e.g., 0.5.

[0109] The specific method for obtaining the interface energy density gradient based on the micro-arc oxidation film stripping experiment includes the following steps:

[0110] 1. Micro-arc oxidation films are deposited on magnesium alloy surfaces by controlling parameters such as voltage and current density. Stress-strain curves at the interface are measured using a nanoindenter or atomic force microscope, recording energy dissipation data. Three-dimensional reconstruction of the interface region is performed using a scanning electron microscope or focused ion beam to determine interface thickness and microstructure.

[0111] 2. Based on the phase field method, the interface layer is regarded as a diffusion interface, and the energy density is calculated through the gradient term of the free energy functional.

[0112] 3. Combine the experimentally measured stress-strain curve with the theoretical model and fit the dE value using the least squares method.

[0113] 4. Combine molecular dynamics simulation and finite element analysis to verify the applicability of dE at different time scales, and evaluate the impact of experimental noise on dE through Monte Carlo simulation to ensure data reliability.

[0114] For the strain rate tensor, the formula Get. Among them, represents the displacement gradient of the protective film, that is, the spatial rate of change of the displacement field, Represents the temperature gradient, that is, the spatial rate of change of the temperature field, α and β represent the mechanical coupling coefficient and the thermodynamic coupling coefficient respectively. The mechanical coupling coefficient is used to adjust the weight of the influence of the displacement gradient on the deformation, and the thermodynamic coupling coefficient is used to adjust the weight of the influence of the temperature gradient on the deformation. The coupled effects of mechanical deformation (displacement gradient) and thermodynamic effect (temperature gradient) on the deformation of the protective film material are considered at the same time. It captures the anisotropic deformation response of the material in the form of a tensor and is applicable to complex microscopic mechanisms such as lattice distortion and interface slip. The relative contribution of mechanical and thermodynamic factors is adjusted by coefficients α and β. The formula Adaptive modeling of protective films with different material properties can be achieved.

[0115] Both the mechanical coupling coefficient and the thermodynamic coupling coefficient can be calibrated through experiments or set based on experience.

[0116] Correction value function of the physical parameters of the protective film By unifying the macroscopic energy parameter (dE), microscopic deformation (ε) and environmental factors (T) into the same framework, the limitations of traditional single-factor correction are broken through. The combination of integral and exponential terms is compatible with physical processes of different time scales.

[0117] In general, the correction value function of the physical parameters of the protective film achieves high-precision modeling of the energy dissipation mechanism of the protective film under complex working conditions through the coordinated correction of dynamic deformation accumulation and temperature sensitivity, which can effectively correct the defect prediction probability of the neural network model and improve the accuracy of defect classification prediction.

[0118] As a preferred technical solution, the multiple dimensional factors also include defect distribution parameters, such as Figure 4 As shown, the specific method for obtaining the correction value of the defect distribution parameter includes:

[0119] S221 , obtaining a current defect distribution sample of the protective film and a historical defect distribution sample corresponding to the protective film.

[0120] The current defect distribution sample and the historical defect distribution sample can both be understood as a defect feature matrix, which includes information such as a defect spatial distribution heat map. A normalized encoding format can be used for the current defect distribution sample and the historical defect distribution sample to ensure comparability between the two.

[0121] S222, obtaining the current defect distribution sample D current and historical defect distribution sample D k The feature similarity sim(D k ,D current ).

[0122] The feature similarity includes but is not limited to cosine similarity, structural similarity, and spatial Euclidean distance. Both the current defect distribution sample and the historical defect distribution sample include defect type (scratches, bubbles, etc.), geometric parameters (area, aspect ratio), and environmental parameters (temperature, humidity).

[0123] S223: Obtain a correction value of the defect distribution parameter according to the feature similarity, wherein the defect distribution parameter includes a current defect distribution sample and a historical defect distribution sample.

[0124] Specifically, a weight coefficient corresponding to each historical defect distribution sample can be assigned first. The weight coefficient can be calculated based on the defect occurrence frequency, severity or time decay factor, and then the weighted value between the weight coefficient and the feature similarity is calculated to obtain the correction value of the defect distribution parameter. Among them, h k represents the weight coefficient corresponding to the kth historical defect distribution sample, and n represents the total number of historical defect distribution samples.

[0125] It should be noted that by calculating the feature similarity between the current defect distribution sample and the historical defect distribution sample, its essence is to map the local features output by the neural network model to the global distribution space of historical defects. When the detection object (such as a local position of the protective film) matches the historical high-incidence defect pattern, sim(D k ,D current )→1, f2 significantly improves the initial confidence through the exponential amplification effect, compensating for the insufficient representation of rare defects by the neural network model.

[0126] In general, the function Through spatiotemporal correlation modeling, the "single-frame decision" of traditional visual detection is upgraded to "cross-cycle decision", which has the functions of compensating for missed detection scenes and suppressing false alarms, and can effectively improve the F1-score.

[0127] The weight coefficient h corresponding to the kth historical defect distribution sample k It can be preset based on experience. However, the static weight coefficient hk It cannot reflect the time-dependent changes in defect modes. Therefore, the time attenuation factor h is introduced. k '=h k ·e -λ'·Δt Where λ' represents the preset time decay rate, and Δt represents the interval between the current time and the time when the defect occurs. Thus, the weight coefficient h corresponding to the kth historical defect distribution sample is k Dynamic adjustment can reflect the time-sensitive changes in defect patterns and adapt to the time-varying characteristics of the production line process, so that the final confidence level after correcting the initial confidence level according to the correction value of the defect distribution parameter is more accurate, further improving the accuracy of the model in detecting and identifying protective film defects.

[0128] Preferably, in step S222, as Figure 5 As shown, the specific method for obtaining the feature similarity between the current defect distribution sample and the historical defect distribution sample includes:

[0129] S2221 , dividing the historical defect distribution samples into m typical patterns through K-mean clustering, such as scratch type, bubble type, protrusion type, pollution type, etc.

[0130] S2222, obtaining the feature similarity sim (C i ,D current ).

[0131] Preferably, in step S223, as Figure 6 As shown, the specific method for obtaining the correction value of the defect distribution parameter according to the feature similarity includes:

[0132] S2231, obtain the intra-class density weight based on the number of defect samples in the cluster center and the total number of samples in the current defect distribution

[0133] S2232, obtaining a correction value of the defect distribution parameter according to the intra-class density weight and feature similarity Among them, N i Indicates the number of defective samples in the i-th cluster center, N total represents the total number of samples, λ' represents the time decay rate parameter, ΔT i It represents the time difference between the current time and the time when the i-th type defect occurs (usually in hours or days), C i represents the cluster center of the i-th category, D current Represents the current defect distribution sample, sim(C i ,D current ) represents the feature similarity between the current defect distribution sample and the cluster center.

[0134] Specifically, the intra-class density weight It reflects the prevalence of the category and is used to filter out high-frequency defect patterns. The time decay rate parameter λ' controls the decay speed of the historical sample weight. This approach dynamically controls the timeliness of historical data, assigning higher weights to recent, high-frequency defect samples. This addresses the issue of static weights failing to reflect changes in defect patterns over time. For example, defects caused by recent temperature fluctuations on the production line receive priority attention. K-means clustering is used to categorize historical defects into typical patterns (such as scratches and bubbles). Only the similarity with the cluster center is calculated, reducing redundant calculations. Intra-cluster density weighting ensures that high-frequency defect patterns have a greater impact on current inspections.

[0135] As a preferred technical solution, the multiple dimensional factors include environmental parameters, such as Figure 7 As shown, the specific method for obtaining the corrected value of the environmental parameter includes:

[0136] S231, obtaining temperature gradient, humidity fluctuation and light intensity;

[0137] S232, obtaining the correction value of the environmental parameter according to the temperature gradient ΔTE, humidity fluctuation ΔHE and light intensity I Among them, a, b, and c represent the weight coefficients of temperature gradient, humidity fluctuation, and light intensity, respectively.

[0138] Temperature gradient can be understood as the difference between the current temperature and the process standard temperature, reflecting the effects of thermal expansion and contraction. Humidity fluctuation represents the deviation between the actual humidity and the standard humidity (typically 45-65% RH), which affects the surface tension of the material. Light intensity represents the visible light irradiance in the inspection environment and directly affects the image sensor's signal-to-noise ratio. a, b, and c can be optimized using gradient descent methods and reflect the weight of each environmental factor's impact on defect detection. All are dimensionless.

[0139] For the formula a·ΔTE+b·ΔHE+c·I=0, f3=0.5, which means the environment is in standard working conditions at this time; when a·ΔTE+b·ΔHE+c·I>0, that is, when the parameters shift positively (such as increased temperature, increased humidity, or increased light intensity), f3→1, enhancing the sensitivity of defect recognition; when the parameters shift negatively (such as insufficient light, low temperature, or low humidity), f3→0, suppressing the risk of false alarms.

[0140] It should be noted that before entering the temperature gradient, humidity fluctuation, and light intensity into the function formula, they can be normalized using the Min-Max method to eliminate dimensional differences. Function variables in other embodiments of the present invention can also be normalized and dimensionless to facilitate calculation and eliminate dimensional differences.

[0141] This function A Sigmoid function maps the linear combination of three environmental parameters—temperature, humidity, and light—to the (0,1) interval, enabling nonlinear correction of the neural network model's initial confidence. This automatically adjusts the sensitivity threshold for defect detection when environmental parameters deviate from standard operating conditions. This function, through its exponential nature, generates a gradient response to sudden changes in parameters (such as sudden changes in temperature and humidity). Furthermore, by integrating multidimensional environmental parameters into a single correction factor, this function avoids decision-making confusion caused by multivariate coupling.

[0142] As a preferred technical solution, the multiple dimensional factors include defect heat index, such as Figure 8 As shown, the specific method for obtaining the corrected value of the defect heat index includes:

[0143] S241, obtain the frequency C of market defect reports of similar products of the protective film report .

[0144] S242: Obtain the defect heat index according to the reporting frequency.

[0145] Specifically, the frequency of market defect reports for similar products can be understood as the number of standardized defect cases per unit time, generally obtained through the industry quality database / market supervision system, with a typical value range of 0-500 times / month. The defect heat index f4 = ln(1+C report ), f4=ln(1+C report ) represents a smoothing constant, which prevents the function from failing when the reporting frequency = 0, while ensuring the mathematical rationality of the logarithmic operation.

[0146] If the market defect report frequency of similar products of a certain type of protective film is C report =30 times, f4=ln(1+C report )=ln(31)≈3.43. If in the rainy season C report When the value increases from 50 to 120, the correction factor increases from ln(51)≈3.93 to ln(121≈4.80. At this time, the detection weight of humidity-related protective film defects can be increased, and the initial confidence can be automatically improved and corrected, which can improve the accuracy of protective film defect detection and recognition. For example, similar products of competitors have C report=200, then f4==ln(201)≈5.30. At this time, the sensitivity of coating uniformity-related defect detection is automatically enhanced, and the initial confidence can also be corrected and optimized.

[0147] The defect heat index function converts the frequency of defect reports of similar products in the market into a logarithmic correction factor, which can dynamically adjust the prediction confidence of the neural network model. When the number of defect reports of similar products in the market surges, the system automatically improves the detection sensitivity. The use of a logarithmic function can suppress the influence of extreme values ​​and enhance the sensitivity of low-value areas. report It represents the frequency of market defect reports for similar products. Therefore, the defect heat index function can compensate for the problem of insufficient product testing samples by absorbing defect data of similar products. It is particularly suitable for the cold start scenario at the initial stage of new product launch.

[0148] As a preferred technical solution, the frequency of market defect reports of similar products C report Decompose into sub-parameters according to dimensions such as regional distribution and application scenarios Multi-dimensional information fusion is achieved through weighted summation. For example, the coating defect report during the rainy season in coastal areas and the UV aging defect report in plateau areas can be analyzed independently and then superimposed, and the corresponding weight coefficient W is introduced. i To reflect the importance of different dimensions, the weight of the regional dimension can be dynamically adjusted according to the concentration of the supply chain (for example, when the proportion of suppliers in a certain region exceeds 50%, the corresponding weight coefficient will automatically increase, such as 20%), and the weight of the application scenario can be set in a gradient based on the profit contribution of the product (for example, the weight coefficient of medical-grade application = 0.8, the weight coefficient of industrial-grade application = 0.5). ), weak signals are amplified by the ln function to avoid misjudgment caused by insufficient single-dimensional data.

[0149] Finally, the defect heat index in, Represents the standardized defect report frequency of the i-th dimension, such as the average monthly number of defect cases in the East China, South China, and North China regions in the regional dimension. The role of W is to suppress extreme values ​​and enhance low value sensitivity. i Indicates correspondence The weight coefficient can be set by technical personnel based on experience or the importance of different dimensions.

[0150] like Figure 9 As shown, a protective film appearance defect detection system based on machine vision in one embodiment of the present invention is used to implement the protective film appearance defect detection method, which includes an image acquisition module, a neural network model, a function construction module and a confidence correction module.

[0151] The image acquisition module is used to acquire an image of the protective film to be inspected and includes a multispectral camera and a structured light projection device. The multispectral camera is used to acquire an RGB image of the protective film; the structured light projection device is used to acquire a structured light phase map of the protective film. The protective film image includes the RGB image and the structured light phase map.

[0152] The neural network model is used to perform initial appearance defect recognition on the protective film image and obtain an initial confidence level, which can be understood as the predicted probability value of the classification task output by the neural network model.

[0153] The function construction module is used to obtain correction values ​​of multiple dimensional factors that affect the accuracy of the output results of the neural network model and construct a correction function based on the correction values. Specifically, each dimensional factor corresponds to a correction value, and the correction values ​​corresponding to multiple dimensional factors are combined to construct the correction function.

[0154] The confidence correction module is used to correct the initial confidence according to the correction function to obtain a final confidence, and realize the detection of the appearance defects of the protective film according to the final confidence.

[0155] The final confidence Among them, S initial represents the initial confidence, M represents the number of correction values ​​of the dimensional factors, w i Represents the weight coefficient of the correction value, exp represents the natural exponential function, f i represents the correction value of the i-th dimension factor, Represents the correction function.

[0156] Here, the initial confidence S output by the neural network model initial Through the nonlinear correction term Adjustment and correction can enhance the model's ability to express complex relationships. exp, as a natural exponential function, ensures that the output is always positive and amplifies important features. The weight coefficient of the correction value is a learnable weight parameter that can be optimized through backpropagation to balance the contribution of the correction value of each dimensional factor. When it is greater than zero, it can enhance the certainty of the neural network model. When it is less than zero, it can suppress the overconfident prediction of the neural network model.

[0157] Multiple dimensional factors include but are not limited to protective film physical parameters, defect distribution parameters, environmental parameters and defect heat index. The weight coefficient w for the correction value i , a dynamic weight allocation mechanism for multi-dimensional parameters can be realized based on reinforcement learning strategy. Specifically, Among them, Var(V i) represents the parameter variance of the i-th dimension factor, which is used to quantify the dynamic volatility of the dimension factor parameter. If the variance is high, it can be understood that the parameter fluctuates violently and needs to be paid attention to. If the variance is low, it means that the parameter is stable and the weight can be reduced. Var(V j ) represents the parameter variance of the j-th dimension factor, β' represents the normalized denominator, which is used to ensure that the sum of the weights of the correction values ​​of all dimensional factors is 1, eliminating dimensional differences. β' represents the temperature adjustment factor, which controls the concentration of the weight distribution. When it approaches zero, the weight distribution is uniform. When it approaches infinity, only the dimension with the largest variance is effective. Generally speaking, the value range is set to 0.5-3.0.

[0158] This function By calculating the variance Var(V i ) weights, assigning higher weights to highly volatile / critical dimensions, focusing the model's attention on the most discriminative features in the current scenario. A Softmax structure (exponential function + normalized denominator) is used to map the weights to a probability distribution, ensuring that all weights sum to 1, thus complying with probability constraints. Furthermore, by adjusting the temperature adjustment factor to control the sharpness of the weight distribution, combined with the reward and penalty mechanism of the reinforcement learning strategy, the model can autonomously optimize its weight allocation strategy based on environmental feedback.

[0159] In general, the weight coefficient acquisition function of the correction value solves the problem that traditional static weight allocation cannot adapt to dynamic changes in data through variance analysis and exponential normalization.

[0160] The system may also include a MySQL database, a keyword acquisition module, and a keyword popularity acquisition module. The MySQL database is used to store data related to protective film image defect detection, including historical defect data. The keyword acquisition module is used to acquire keywords related to protective film image defects and send them to the MySQL database for storage. The keywords include core words, derivative words, and scenario words. Core words include scratches, bubbles, wrinkles, and pinholes; derivative words include microscopic defect words such as white spots, fisheyes, and crystal points; and scenario words include die-cutting glue overflow and coating streaks.

[0161] The keyword heat acquisition module is used to obtain the keyword heat according to the formula ln(1+∑(λ k ·S k (t)))φ(τ) obtains the heat value of the defect keyword. Among them, S k (t) represents the real-time search volume of the k-th defect keyword, which can be obtained through Baidu Index API, etc., λ k represents the dynamic weight coefficient of the kth defect keyword, and φ(τ) represents the time attenuation function.

[0162] Specifically, TF(k) represents the real-time word frequency of the k-th defect keyword in industry forums or / and technical documents, which can be obtained by crawling text data statistics of the target site (such as professional forums and knowledge bases). IDF(k) represents the inverse document frequency of the k-th defect keyword, which can be calculated based on 1 million protective film technical documents. The sim() function represents the semantic similarity between the vector of the k-th defect keyword and the current defect type, which can use the BERT vector cosine similarity. N represents the total number of corpus documents, n k Indicates the number of documents containing the k-th defect keyword. sim(Q k ,D defect ) represents the semantic field strength factor, which can be understood as the vector Q of the k-th defect keyword k and defect type vector D defect The cosine similarity is used to strengthen the weight of keywords that are strongly related to the current defect type and weaken the noise words with similar spellings (such as "film crack" vs. "die cutting").

[0163] max(TF) represents the maximum frequency value of all keywords in the current period. It is used to eliminate the bias caused by differences in activity levels among different forums and constrain the TF-IDF output range to the [0, 1] interval to avoid extreme values.

[0164] Real-time crawling updates the TF value, enabling hourly hotspot detection. Calculating IDF using a dedicated technical document library avoids general corpus bias. Overall, the dynamic weight coefficient function for the kth defect keyword, through a three-dimensional evaluation system of "term frequency × scarcity × semantic relevance," addresses the semantic gaps and hotspot delays inherent in traditional TF-IDF in specialized fields.

[0165] The time-dependent decay function φ(τ) can be designed as a hyperbolic tangent decay mechanism, that is, Among them, T half It represents the half-life of the keyword. The search volume attenuation curve can be predicted through LSTM. t0 represents the timestamp of the protective film defect event outbreak, t represents the current time, and ε' represents the smoothing coefficient (0.01 is recommended).

[0166] In order to avoid the long tail effect of defective keywords, keywords with low search volume but high relevance can be boosted according to the formula Optimize the real-time search volume of the k-th defect keyword. related Indicates the number of associated long-tail words, which can be obtained through Word2Vec clustering calculation, S avg It represents the benchmark value of the industry's average daily search volume, which can be taken as the industry's average daily search volume in a 30-day moving time window.

[0167] The final defect keyword heat value is expressed as

[0168] After obtaining the heat value of the defect keyword, the frequency of market defect reports of similar products of the protective film under different dimensions is combined Get the defect heat index f4. The defect heat index can be the defect keyword heat value and The maximum, average, or weighted average of the two. The resulting defect heat index, f4, achieves a leapfrog innovation from single frequency statistics to a semantic association network, and the coordinated optimization of search volume and market feedback by constructing a three-dimensional correction system of "market feedback + semantic field strength + spatiotemporal attenuation." This provides a significant advantage in capturing public opinion about potential defects.

[0169] In summary, the protective film appearance defect detection system obtains the correction values ​​of multiple dimensional factors, constructs a correction function based on the correction values, and corrects the initial confidence to obtain the final confidence. By constructing a multi-source data fusion correction mechanism, it can make real-time corrections to the neural network prediction results of protective film appearance defects based on multi-source data, significantly improving the detection accuracy of protective film appearance defects under complex working conditions.

[0170] The various technical features of the embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the various technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0171] The above-described embodiments merely illustrate several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the patent for this invention shall be determined by the appended claims.

Claims

1. A method for detecting appearance defects of protective films based on machine vision, characterized in that: The steps include: Acquire an image of a protective film to be inspected, build a neural network model, and perform initial appearance defect recognition on the protective film image using the trained neural network model to obtain an initial confidence level; Obtaining correction values ​​of multiple dimensional factors that affect the accuracy of the output result of the neural network model, and constructing a correction function based on the correction values; The initial confidence is corrected according to the correction function to obtain a final confidence, and the detection of the appearance defects of the protective film is achieved according to the final confidence.

2. The method for detecting appearance defects of a protective film based on machine vision according to claim 1, wherein: The specific method for performing initial appearance defect recognition on a protective film image includes the following steps: Extract global features of RGB image and structured light phase image respectively; Performing a deformable convolution operation on the global features of the RGB image to obtain a first modal local defect feature, performing a deformable convolution operation on the global features of the structured light phase image to obtain a first local defect feature, and obtaining a second modal local defect feature; Performing a bilinear interactive pooling operation on the first modal local defect feature and the second modal local defect feature to obtain a bimodal fusion feature; Performing initial appearance defect recognition on the protective film image according to the dual-modal fusion feature; The protective film image includes an RGB image and a structured light phase image.

3. The method for detecting appearance defects of a protective film based on machine vision according to claim 2, wherein: The multiple dimensional factors include physical parameters of the protective film, and the specific method for obtaining the corrected values ​​of the physical parameters of the protective film includes: Obtaining a strain rate tensor of the protective film, and obtaining a dynamic deformation accumulation factor according to the strain rate tensor; Obtaining a temperature sensitivity coefficient of the protective film and a current ambient temperature, and obtaining a temperature sensitivity factor according to the temperature sensitivity coefficient and the current ambient temperature; Obtaining the surface roughness and interface energy density gradient of the protective film, and obtaining the corrected values ​​of the physical parameters of the protective film according to the surface roughness, interface energy density gradient, dynamic deformation accumulation factor, and temperature sensitivity factor; The physical parameters of the protective film include strain rate tensor, temperature sensitivity coefficient, surface roughness and interface energy density gradient.

4. The method for detecting appearance defects of a protective film based on machine vision according to claim 3, wherein: The multiple dimensional factors also include defect distribution parameters, and the specific method for obtaining the corrected value of the defect distribution parameter includes: Acquire a current defect distribution sample of the protective film and a historical defect distribution sample corresponding to the protective film; Obtaining feature similarity between the current defect distribution sample and the historical defect distribution sample; Obtaining a correction value of the defect distribution parameter according to the feature similarity; The defect distribution parameters include current defect distribution samples and historical defect distribution samples.

5. The method for detecting appearance defects of a protective film based on machine vision according to claim 4, wherein: The specific method for obtaining the feature similarity between the current defect distribution sample and the historical defect distribution sample includes: Dividing the historical defect distribution samples into m typical patterns through K-mean clustering; Obtain feature similarity between the current defect distribution sample and the cluster center.

6. The method for detecting appearance defects of a protective film based on machine vision according to claim 5, wherein: Corrected values ​​of the physical parameters of the protective film Where dE represents the interface energy density gradient, Ra represents the surface roughness, represents the dynamic deformation accumulation factor, γ represents the deformation weight coefficient, ε represents the strain rate tensor, and e -λ(T-T') represents the temperature sensitivity factor, e represents the natural constant, λ represents the temperature sensitivity coefficient, T and T' represent the current ambient temperature and the reference temperature respectively.

7. The method for detecting appearance defects of a protective film based on machine vision according to claim 6, wherein: The specific method of obtaining the correction value of the defect distribution parameter according to the feature similarity includes: Obtain the intra-class density weight based on the number of defect samples in the cluster center and the total number of samples in the current defect distribution Obtain the corrected value of the defect distribution parameter according to the intra-class density weight and feature similarity Among them, N i Indicates the number of defective samples in the i-th cluster center, N total represents the total number of samples, λ' represents the time decay rate parameter, ΔT i represents the time difference between the current time and the time when the i-th type defect occurs, C i represents the cluster center of the i-th category, D current Represents the current defect distribution sample, sim(C i ,D current ) represents the feature similarity between the current defect distribution sample and the cluster center.

8. The method for detecting appearance defects of a protective film based on machine vision according to claim 7, wherein: The final confidence Among them, S initial represents the initial confidence, M represents the number of correction values ​​of the dimensional factors, w i Represents the weight coefficient of the correction value, exp represents the natural exponential function, f i represents the correction value of the i-th dimension factor, Represents the correction function.

9. A protective film appearance defect detection system based on machine vision, used to implement the protective film appearance defect detection method according to any one of claims 1 to 8, characterized in that: include: An image acquisition module, used for acquiring an image of the protective film to be detected; A neural network model is used to perform initial appearance defect recognition on the protective film image and obtain initial confidence; A function construction module, used to obtain correction values ​​of multiple dimensional factors that affect the accuracy of the output result of the neural network model, and construct a correction function based on the correction values; A confidence correction module is used to correct the initial confidence according to the correction function to obtain a final confidence, and to detect the appearance defects of the protective film according to the final confidence.

10. The protective film appearance defect detection system based on machine vision according to claim 9, characterized in that: The image acquisition module includes: A multispectral camera, used to obtain an RGB image of the protective film; a structured light projection device for obtaining a structured light phase image of the protective film; The protective film image includes an RGB image and a structured light phase image.

Citation Information

Patent Citations

  • Protective film production appearance defect detection method and system based on machine vision

    CN118914195A

  • Product surface defect detection method and system based on dual neural network

    CN114092441A

  • Defect identification method and device, computer equipment and computer readable storage medium

    CN114627089A

  • Large-strain extrusion cutting strip texture prediction method considering strain rate influence

    CN115422797A

  • Defect detection method and device

    CN116385387A

Cited By

  • Product appearance defect detection method based on machine vision

    CN121678681A

  • Cooling tower rain area thermal performance simulation method and system based on double-peak dynamic evolution model

    CN122088392A

  • A method and system for simulating the thermodynamic performance of cooling tower rain zone based on a bimodal dynamic evolution model

    CN122088392B