A machine vision-based protective film appearance defect detection method and system
By constructing a multi-source data fusion correction mechanism, correction values of multiple dimensions are obtained and correction functions are constructed to correct the initial confidence level. This solves the problem of insufficient detection accuracy of the single vision data driven model under complex working conditions in the existing technology, and realizes high accuracy and high reliability of protective film appearance defect detection.
Patent Information
- Application Number
- CN202510697785.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2045-05-28
AI Technical Summary
Existing machine vision-based methods and systems for detecting appearance defects in protective film production rely on neural network models driven by single visual data. They lack a mechanism for fusing and correcting multi-source data such as the physical parameters of the protective film and historical defects, resulting in insufficient detection accuracy under complex working conditions.
By constructing a multi-source data fusion correction mechanism, correction values of multiple dimensions of factors are obtained and correction functions are constructed to correct the initial confidence level, including physical parameters of the protective film, defect distribution parameters, and environmental parameters, thereby improving the accuracy of the output results of the neural network model.
It significantly improves the detection accuracy of protective film appearance defects under complex working conditions, and enhances the accuracy and reliability of detecting protective film appearance defects.
Smart Images

Figure CN120634979B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, in particular to a protective film appearance defect detection method and system based on machine vision. BACKGROUND
[0002] Protective film is a kind of thin film material, which is usually used to protect the surface of objects from damage, pollution or corrosion, and is widely used in various fields such as screens of electronic products, surfaces of automobiles and building materials. In order to ensure that the product is fully protected by the protective film, sometimes strict requirements are placed on the performance of the protective film, and appearance defect detection of the protective film needs to be performed during production.
[0003] A protective film production appearance defect detection method and system based on machine vision is disclosed in Chinese patent application No. CN202410963156.3, which installs high-resolution fast cameras and multi-light source systems on the production line to realize real-time collection and high-quality shooting of protective film surface images. The image preprocessing module performs denoising, correction and other processing on the collected images to improve the clarity and accuracy of the images. Combined with the recognition of defect features by a deep learning model, the system can quickly and accurately detect bubbles, scratches and wrinkle defects on the protective film, greatly improving the detection accuracy and speed, and reducing human detection errors and time costs.
[0004] Then the above-mentioned protective film production appearance defect detection method and system based on machine vision mainly rely on a single visual data driven neural network model, which has the problem of single data dimension, lacks a multi-source data fusion correction mechanism for physical parameters and historical defects of the protective film, and there is room for further improvement in defect detection accuracy under complex working conditions. SUMMARY
[0005] Therefore, in order to improve the appearance defect detection accuracy of the protective film, the present application provides a protective film appearance defect detection method and system based on machine vision, and the specific technical solutions are as follows:
[0006] A protective film appearance defect detection method based on machine vision includes the following steps:
[0007] Obtain the protective film image to be detected, and construct a neural network model. The trained neural network model is used to identify the initial appearance defects of the protective film image, and obtain the initial confidence.
[0008] Obtain the correction value of the multiple dimension factors affecting the accuracy of the output result of the neural network model, and construct a correction function according to the correction value.
[0009] The initial confidence is modified according to the correction function to obtain a final confidence, and the appearance defect detection of the protective film is realized according to the final confidence.
[0010] The protective film appearance defect detection method can obtain correction values of multiple dimension factors, modify the initial confidence to obtain a final confidence according to the correction values, and correct the neural network prediction result of the protective film appearance defect in real time based on multi-source data by constructing a multi-source data fusion correction mechanism, thereby significantly improving the detection accuracy of the protective film appearance defect under complex working conditions.
[0011] Preferably, the specific method for initial appearance defect recognition of the protective film image comprises the following steps:
[0012] Global features of the RGB image and the structured light phase image are extracted respectively;
[0013] The global features of the RGB image are subjected to deformable convolution operation to obtain first modality local defect features, and the global features of the structured light phase image are subjected to deformable convolution operation to obtain second modality local defect features;
[0014] The first modality local defect features and the second modality local defect features are subjected to bilinear interactive pooling operation to obtain double modality fusion features;
[0015] The protective film image is subjected to initial appearance defect recognition according to the double modality fusion features;
[0016] The protective film image comprises an RGB image and a structured light phase image.
[0017] Preferably, the multiple dimension factors comprise a protective film physical parameter, and the specific method for obtaining the correction value of the protective film physical parameter comprises:
[0018] The strain rate tensor of the protective film is obtained, and a dynamic deformation accumulation factor is obtained according to the strain rate tensor;
[0019] The temperature sensitivity coefficient of the protective film and the current environmental temperature are obtained, and a temperature sensitivity factor is obtained according to the temperature sensitivity coefficient and the current environmental temperature;
[0020] The surface roughness and the interfacial energy density gradient of the protective film are obtained, and the correction value of the protective film physical parameter is obtained according to the surface roughness, the interfacial energy density gradient, the dynamic deformation accumulation factor and the temperature sensitivity factor;
[0021] The protective film physical parameter comprises a strain rate tensor, a temperature sensitivity coefficient, a surface roughness and an interfacial energy density gradient.
[0022] Preferably, the plurality of dimensional factors further comprises a defect distribution parameter, and a specific method for obtaining a revised value of the defect distribution parameter comprises:
[0023] obtaining a current defect distribution sample of the protective film and a historical defect distribution sample corresponding to the protective film;
[0024] obtaining a feature similarity between the current defect distribution sample and the historical defect distribution sample;
[0025] obtaining a revised value of the defect distribution parameter according to the feature similarity;
[0026] wherein the defect distribution parameter comprises the current defect distribution sample and the historical defect distribution sample.
[0027] Preferably, a specific method for obtaining a feature similarity between the current defect distribution sample and the historical defect distribution sample comprises:
[0028] dividing the historical defect distribution sample into m typical patterns by K-mean clustering;
[0029] obtaining a feature similarity between the current defect distribution sample and a clustering center.
[0030] Preferably, the revised value of the physical parameter of the protective film
[0031] wherein dE represents an interfacial energy density gradient, Ra represents a surface roughness, represents a dynamic deformation accumulation factor, γ represents a deformation weight coefficient, ε represents a strain rate tensor, e -λ(T-T') represents a temperature sensitivity factor, e represents a natural constant, λ represents a temperature sensitivity coefficient, T and T' represent a current environmental temperature and a reference temperature, respectively.
[0032] Preferably, a specific method for obtaining a revised value of the defect distribution parameter according to the feature similarity comprises:
[0033] obtaining an intra-class density weight according to a number of defect samples of the clustering center and a total number of samples of the current defect distribution sample
[0034] obtaining a revised value of the defect distribution parameter according to the intra-class density weight and the feature similarity
[0035] wherein N i represents a number of defect samples of the i-th clustering center, N total represents a total number of samples, λ' represents a time decay rate parameter, ΔT irepresents the time difference between the current time and the time of occurrence of the i-th type of defect, C i represents the i-th type of cluster center, 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] wherein S initial represents the initial confidence, M represents the number of correction values of the dimension 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 machine vision-based protective film appearance defect detection system for implementing the protective film appearance defect detection method, comprising:
[0039] An image acquisition module for acquiring a protective film image to be detected;
[0040] A neural network model for initial appearance defect recognition of the protective film image to obtain an initial confidence;
[0041] A function construction module for obtaining correction values of a plurality of dimension factors affecting the accuracy of the output result of the neural network model, and constructing a correction function according to the correction values;
[0042] A confidence correction module for correcting the initial confidence according to the correction function to obtain a final confidence, and realizing the detection of the protective film appearance defect according to the final confidence.
[0043] Preferably, the image acquisition module comprises:
[0044] A multispectral camera for acquiring an RGB image of the protective film;
[0045] A structured light projection device for acquiring a structured light phase image of the protective film;
[0046] Wherein the protective film image comprises an RGB image and a structured light phase image. BRIEF DESCRIPTION OF DRAWINGS
[0047] The present application can be further understood from the following description in conjunction with the accompanying drawings. The components in the drawings are not necessarily drawn to scale, but emphasis is placed on showing the principles of the embodiments. In different views, the same reference numerals designate corresponding parts.
[0048] Figure 1 is a schematic diagram of the overall process of a protective film appearance defect detection method based on machine vision in an embodiment of the present application;
[0049] Figure 2 is a schematic diagram of the specific method of initial appearance defect identification of a protective film image in an embodiment of the present application;
[0050] Figure 3 is a schematic diagram of the specific method of obtaining a corrected value of a physical parameter of the protective film in an embodiment of the present application;
[0051] Figure 4 is a schematic diagram of the specific method of obtaining a corrected value of a defect distribution parameter in an embodiment of the present application;
[0052] Figure 5 is a schematic diagram of the specific method of obtaining a feature similarity between the current defect distribution sample and the historical defect distribution sample in an embodiment of the present application;
[0053] Figure 6 is a schematic diagram of the specific method of obtaining a corrected value of the defect distribution parameter according to the feature similarity in an embodiment of the present application;
[0054] Figure 7 is a schematic diagram of the specific method of obtaining a corrected value of the environmental parameter in an embodiment of the present application;
[0055] Figure 8 is a schematic diagram of the specific method of obtaining a corrected value of the defect heat index in an embodiment of the present application;
[0056] Figure 9 is a schematic diagram of the overall structure of a protective film appearance defect detection system based on machine vision in an embodiment of the present application. DETAILED DESCRIPTION
[0057] In order to make the objectives, technical solutions, and advantages of the present application clearer and more apparent, the present application will be further described in detail below with reference to embodiments thereof. It should be understood that the specific embodiments described herein are merely intended to explain the present application and do not limit the scope of protection of the present application.
[0058] It should be understood that when an element as a "fixed" to another element, it can be directly on the other element or there can be an intervening element. When an element is considered to be "connected" to another element, it can be directly connected to the other element or there can be an intervening element. The terms "vertical", "horizontal", "left", "right", and similar expressions used herein are for illustrative purposes only and are not intended to be limiting.
[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0060] The "first", "second" in the present application do not represent the specific number and order, but only for the name of the distinction.
[0061] As shown in the figure, a method for detecting appearance defects of a protective film based on machine vision according to an embodiment of the present application comprises the following steps: Figure 1
[0062] S1, obtaining a protective film image to be detected, and constructing a neural network model, and performing initial appearance defect recognition on the protective film image through the trained neural network model to obtain an initial confidence.
[0063] Specifically, the protective film image includes but is not limited to the RGB image and the structured light phase diagram of the protective film. The RGB image can be obtained by a multispectral camera, and the structured light phase diagram can be obtained by a structured light projection device.
[0064] For the neural network model, it includes but is not limited to CNN (Convolutional Neural Network), target detection network (such as Fast R-CNN, YOLO, etc.), instance segmentation network (Mask R-CNN), generative adversarial network GAN (Generative Adversarial Networks), and multi-scale fusion attention mechanism. 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, which is particularly suitable for processing image data. Through convolutional layers, pooling layers and fully connected layers, CNN can automatically extract features in images for defect classification and positioning.
[0066] 2. Object detection networks can simultaneously locate and classify defects, common models include Faster R-CNN, YOLO, etc. These models mark the location of defects by generating bounding boxes and classify the defect type. For example, Faster R-CNN introduces a region proposal network (RPN) that can quickly generate candidate regions and classify them.
[0067] 3. Instance segmentation combines the advantages of object detection and semantic segmentation, and can perform pixel-level segmentation of defects. Mask R-CNN is a classic instance segmentation model that generates masks to accurately mark the location and shape of defects. In addition, new models such as YOLOv8-seg also perform well in industrial defect detection.
[0068] 4. GAN through the adversarial training of generator and discriminator, can generate images similar to real defects, for data augmentation or direct detection. For example, some studies use the discriminator of GAN to generate defect distribution likelihood maps, combined with residual maps for defect localization. Some models use multi-scale fusion and attention mechanisms to improve the accuracy of defect detection. For example, the channel modulation feature pyramid network (CM-FPN) in ETDNet and lightweight Transformer are combined, which can effectively handle the scale and shape changes of defects.
[0069] Preferably, the neural network model can be a cascaded attention network. Cascaded attention network (Cascaded Attention Network) is a deep learning architecture that combines multi-level attention mechanisms, which enhances the model's ability to capture complex features through step-by-step feature extraction. The core of the cascaded attention network includes multi-level attention mechanism, dynamic feature fusion and lightweight design. Multi-level attention mechanism refers to cascaded attention through a series of attention modules, focusing on different levels of features layer by layer, dynamic feature fusion refers to in 3D object detection, cascaded attention module aggregates region proposal features at different stages, through cross-attention operation to solve the sample imbalance problem of long-distance target detection, and reduce error propagation. For example, EfficientViT uses cascaded group attention modules to divide features into different attention heads, reducing computational redundancy.
[0070] As a preferred technical solution, as shown in Figure 2 The specific method for performing initial appearance defect recognition on the protective film image includes the following steps:
[0071] S11, respectively extracting the global features of the RGB image and the structured light phase image.
[0072] Here, the improved ResNet-50 can be used as the backbone network, and multi-scale feature maps are generated through a feature pyramid (Feature Pyramid Network, FPN). A dynamic channel attention mechanism is embedded in the FPN to dynamically adjust the channel weight according to real-time environmental parameters (such as temperature, illumination), for example, to enhance the edge detection channel in a high-temperature and high-humidity environment and to enhance the expression ability of key features. The main role of step S11 is to capture the macro defect patterns of the protective film, such as large-area scratches, corrugations, and the like.
[0073] The RGB image is input into the ResNet-50 backbone network, and multi-scale feature maps (C3: 1 / 8 size, C4: 1 / 16 size, C5: 1 / 32 size) are generated through layer-by-layer downsampling. Similarly, the structured light phase image is input into the ResNet-50 backbone network, and multi-scale feature maps are generated through layer-by-layer downsampling.
[0074] For the feature pyramid, C5 is first upsampled, and P4 (enhanced semantic information) is generated by weighted fusion with C4, and then P4 is continuously upsampled, and P3 (supplement spatial details) is generated by fusion with C3.
[0075] S12, the global feature of the RGB image is subjected to a deformable convolution operation to obtain a first modality local defect feature, and the global feature of the structured light phase image is subjected to a deformable convolution operation to obtain a first local defect feature and a second modality local defect feature.
[0076] Here, a deformable convolution network (Deformable Convolutional Networks, DCN) can be introduced to refine the local features of small targets or fine-grained defects. Through a skip connection (Skip Connection), shallow high-resolution features and deep semantic features are fused to improve spatial positioning accuracy.
[0077] The main role of step S12 is to locate micro defects such as pinholes and bubbles through an adaptive convolution kernel. Specifically, first, 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 3x3 to 5x5, and the offset Δx = 2 pixels to align the defect center. Then, P3 (1 / 8) and the upsampled P4 (1 / 16→1 / 8) are fused by element-wise addition to generate the final positioning map.
[0078] S13, the first modality local defect feature and the second modality local defect feature are subjected to a bilinear interaction pooling operation to obtain a dual-modality fusion feature.
[0079] The first modality local defect feature of the RGB image and the second modality local defect feature of the structured light phase image are fused through a bilinear interaction pooling operation, and the complementarity of the texture and depth features is enhanced. Specifically, assuming that the RGB image feature (i.e., the first modality local defect feature) highlights color abnormalities (such as yellow discoloration areas), and the second modality local defect feature reflects surface topography (such as a 0.1 μm deep recess), the dual-modality fusion feature can contain color-topography associated information (such as a yellow area accompanied by a recess).
[0080] Bilinear pooling is a method of constructing a fusion representation by calculating the outer product of two vectors, which enables interaction between all elements of the two vector representations and very sufficient fusion. Several common bilinear fusion methods:
[0081] 1. Multimodal compressed bilinear pooling (MCB): MCB first maps the original image-text representation to a high-dimensional representation space through count sketch, and then convolves the two representations through element multiplication in the fast Fourier transform space. Through these two steps, the bilinear pooling simulated can avoid the high-dimensional features of the square expansion.
[0082] 2. Multimodal low-rank bilinear pooling (MLB): MLB decomposes Wi into two low-rank matrices P and Q. By decomposing Wi, the parameter size is reduced.
[0083] 3. Multimodal factor bilinear pooling (MFB): MFB is very similar to MLB, which also decomposes Wi into two low-rank matrices. The difference is that instead of replacing the all-1 vector with a parameter matrix to obtain a fusion vector, MFB uses Dz groups of low-rank matrices to obtain Dz elements in the fusion vector.
[0084] 4. Multimodal Tucker fusion: Tucker decomposition is a high-dimensional tensor principal component analysis method. For a three-dimensional tensor W, a three-dimensional core tensor Tc and the product of three factor matrices P, Q, and W can be obtained by Tucker decomposition.
[0085] Since the fusion of multi-modal features through bilinear interaction pooling is a routine technical means in the art, it will not be described here.
[0086] S14, performing initial appearance defect identification on the protective film image according to the dual-modality fusion feature.
[0087] Specifically, a large number of historical RGB images and structured light phase data of protective films are obtained, and after preprocessing including cleaning and label annotation, a training data set is obtained. The neural network model is trained according to the training data set until a preset training number is reached or a convergence condition is met to obtain a trained neural network model. Then the obtained dual-modal fusion features are input into the trained neural network to perform initial appearance defect recognition on the protective film image and obtain an initial confidence. The loss function of the neural network model includes but is not limited to cross-entropy loss and mean square error loss. Since the training of the neural network model based on the loss function and the training data set is a conventional technical means in the art, it will not be described here.
[0088] The initial confidence can be understood as the classification prediction probability output by the trained neural network model after inputting the dual-modal fusion features. That is, the initial confidence is the prediction probability value of the model directly on the input data (such as the appearance defect image of the protective film) before external correction. For example, in a binary classification task, the initial confidence can represent the probability of "defect existence".
[0089] S2, obtaining correction values of multiple dimensional factors affecting the accuracy of the output results of the neural network model, and constructing a correction function according to the correction values.
[0090] For each dimensional factor, at least one parameter related to the accuracy of protective film defect detection is included, which affects the accuracy of protective film defect detection or can optimize the classification prediction probability and confidence of the neural network model, such as environmental parameters (such as temperature, humidity and light intensity), protective film physical parameters (surface roughness, thickness, Young's modulus), process parameters (such as coating speed and curing time), etc. The correction value can be constructed as a logarithmic function, a polynomial function, a piecewise function, etc. of several parameters in the corresponding dimensional factor. Each dimensional factor corresponds to a correction value, and the main function of the correction value includes linear or nonlinear transformation of several parameters to reasonably correct the initial confidence.
[0091] S3, correcting the initial confidence according to the correction function to obtain a final confidence, and detecting the appearance defect of the protective film according to the final confidence.
[0092] The initial confidence is easily affected by data bias, noise or model overfitting. For example, when the number of defect samples in the training data is insufficient, the initial confidence may be too low for slight defects. The present application can better eliminate environmental interference or model blind area by obtaining a correction function through external correction values of multiple dimensional factors and then correcting the initial confidence based on the correction function.
[0093] Specifically, if the initial confidence of a 0.01 mm scratch is 65% when detecting the scratch of the protective film, but the actual initial confidence should be ≥80% to determine a defect. If the initial confidence is modified by introducing the correction values of the three-dimensional factors of environmental temperature and humidity, light intensity, and equipment vibration, the final confidence is improved to 82%. In this way, the influence of external factors on the prediction probability of protective film defect detection can be considered, thereby improving the accuracy of the model for protective film defect classification prediction.
[0094] As a preferred technical solution, the final confidence
[0095] where 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 dimensional factor, represents the correction function.
[0096] Here, the initial confidence S initial output by the neural network model is adjusted and modified by the nonlinear correction term , which can enhance the expression ability of the model for complex relationships. exp as the natural exponential function can ensure that the output is always positive and amplify important features. The weight coefficient of the correction value is a learnable weight parameter, which can be optimized through backpropagation to balance the contribution of the correction values of each dimensional factor. When is greater than zero, the certainty of the neural network model can be enhanced, and when is less than zero, the overconfident prediction of the neural network model can be suppressed.
[0097] The final confidence is obtained, and according to the corresponding confidence threshold, the final defect classification prediction is output by comparing the size relationship between the final confidence and the confidence threshold, realizing the detection and recognition of the protective film defect. For example, if the final confidence corresponding to the scratch of the protective film obtained by the neural network model is 93%, and the confidence threshold is set to 90%, since the final confidence is greater than the confidence threshold, it can be determined that the protective film image input into 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 output by the neural network include but are not limited to protective film scratch, bubble, protrusion, depression, contamination, and particulate foreign matter.
[0099] In summary, the protective film appearance defect detection method corrects the initial confidence degree to obtain the final confidence degree by obtaining the correction values of multiple dimension factors and constructing a correction function according to the correction values, and can correct the neural network prediction result of the protective film appearance defect in real time based on multi-source data by constructing a multi-source data fusion correction mechanism, thereby significantly improving the protective film appearance defect detection accuracy under complex working conditions.
[0100] As a preferred technical solution, the multiple dimension factors include protective film physical parameters, such as Figure 3 As shown in the figure, the specific method for obtaining the correction value of the protective film physical parameter includes:
[0101] S211, obtaining the strain rate tensor of the protective film, and obtaining a dynamic deformation accumulation factor according to the strain rate tensor.
[0102] S212, obtaining the temperature sensitivity coefficient of the protective film and the current environmental temperature, and obtaining a temperature sensitivity factor according to the temperature sensitivity coefficient and the current environmental temperature.
[0103] S213, obtaining the surface roughness and the interface energy density gradient of the protective film, and obtaining the correction value of the protective film physical parameter according to the surface roughness, the interface energy density gradient, the dynamic deformation accumulation factor and the temperature sensitivity factor.
[0104] Among them, the protective film physical parameters include strain rate tensor, temperature sensitivity coefficient, surface roughness and interface energy density gradient.
[0105] Specifically, the correction value of the protective film physical parameter Among them, 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, e -λ(T-T') represents the temperature sensitivity factor, e represents the natural constant, λ represents the temperature sensitivity coefficient, T and T' represent the current environmental temperature and the reference temperature respectively, f1 represents the correction value of the protective film physical parameter. The integral term represents the accumulation of deformation over time, reflecting the gradual accumulation of microstructure changes (such as lattice distortion and interface slip) of the protective film under dynamic load (such as stress and temperature fluctuation), which is used to quantify the accumulation effect of the strain rate over time, and the result is the total deformation.
[0106] The dynamic deformation accumulation factor is used to quantify the cumulative effect of irreversible deformation of the protective film under stress on energy dissipation, which reflects the dynamic evolution law of microstructure (such as lattice distortion, interface slip) by strain rate integration, and corrects the defects of traditional models ignoring the influence of deformation speed. The dynamic deformation accumulation factor is suitable for non-steady state working conditions (such as impact load, cyclic stress), and can capture the viscoelastic response and hysteresis effect of the material.
[0107] The temperature sensitivity factor is used to describe the nonlinear modulation effect of temperature on the energy transfer efficiency of the protective film, which reflects the energy loss caused by material softening, phase change (such as graphitization) or oxidation at high temperature through an exponential decay form, and can correct the problems of thermal expansion mismatch and fracture toughness reduction caused by deviation of current environmental temperature from reference temperature. represents the strain rate tensor component, describes the rate and directionality of micro-deformation, and the unit is s -1 , such as 0.02 s -1 The temperature sensitivity coefficient is related to the thermal conductivity and phase change activation energy of the material, and the reference temperature is the critical temperature threshold of the material without thermal damage, which can be set based on experience or obtained 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 , which can be obtained by micro-arc oxidation film removal experiment, such as 500 J / m 3 The surface roughness affects the geometric complexity of energy dissipation path, and the unit is μm, which can be obtained by biaxial tensile test, such as 0.8 μm. The deformation weight coefficient reflects the creep characteristics and damping effect of the material, and is dimensionless, generally with a value range of 0.1-1.5, such as 0.5.
[0109] The specific method for obtaining the interface energy density gradient based on the micro-arc oxidation film removal experiment includes the following steps:
[0110] 1. Prepare a micro-arc oxidation film on the surface of a magnesium alloy by controlling parameters such as voltage and current density. Use a nanoindenter or an atomic force microscope to measure the stress-strain curve at the interface and record the energy dissipation data; use a scanning electron microscope or a focused ion beam to reconstruct the interface region in three dimensions and obtain the interface thickness and microstructure information.
[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 by the least squares method.
[0113] 4. The applicability of dE at different time scales is verified by combining molecular dynamics simulation and finite element analysis, and the influence of experimental noise on dE is evaluated by Monte Carlo simulation to ensure data reliability.
[0114] For the strain rate tensor, it can be obtained by the formula wherein represents the displacement gradient of the protective film, i.e. the spatial variation rate of the displacement field, represents the temperature gradient, i.e. the spatial variation rate of the temperature field, and α and β represent the mechanical coupling coefficient and the thermodynamic coupling coefficient, respectively. The mechanical coupling coefficient is used to adjust the influence weight of the displacement gradient on the deformation, and the thermodynamic coupling coefficient is used to adjust the influence weight of the temperature gradient on the deformation. The formula simultaneously considers the coupling influence of mechanical deformation (displacement gradient) and thermodynamic effect (temperature gradient) on the deformation of the protective film material, which captures the anisotropic deformation response of the material through the tensor form, and is suitable for complex microscopic mechanisms such as lattice distortion and interface slip. By adjusting the relative contribution of mechanical and thermodynamic factors through coefficients α and β, the formula can realize adaptive modeling of protective films with different material properties.
[0115] Both the mechanical coupling coefficient and the thermodynamic coupling coefficient can be calibrated by experiments, or set according to experience.
[0116] The correction value function of the physical parameters of the protective film By unifying the macroscopic energy parameter (dE), the microscopic deformation (ε) and the environmental factor (T) in the same framework, the limitations of traditional single-factor correction are broken through. The combination of integral and exponential terms in the formula can be compatible with physical processes at different time scales.
[0117] In summary, the correction value function of the physical parameters of the protective film realizes high-precision modeling of the energy dissipation mechanism of the protective film under complex working conditions through the synergistic correction of dynamic deformation accumulation and temperature sensitivity, and can effectively correct the defect prediction probability of the neural network model, improving the defect classification prediction accuracy.
[0118] As a preferred technical solution, the plurality of dimension factors further include a defect distribution parameter, such as Figure 4 As shown in the formula, the specific method for obtaining the correction value of the defect distribution parameter includes:
[0119] S221, obtaining the current defect distribution sample of the protective film and the historical defect distribution sample corresponding to the protective film.
[0120] The current defect distribution sample and the historical defect distribution sample can be understood as a defect feature matrix, which includes defect spatial distribution heat map and other information. For the current defect distribution sample and the historical defect distribution sample, a normalized encoding format can be used to ensure their comparability.
[0121] S222, obtaining the current defect distribution sample D current and the historical defect distribution sample D k . k . current .
[0122] The feature similarity includes but is not limited to cosine similarity, structural similarity, and spatial Euclidean distance. The current defect distribution sample and the historical defect distribution sample both include defect types (scratches, bubbles, etc.), geometric parameters (area, aspect ratio), environmental parameters (temperature, humidity), etc.
[0123] S223, obtaining the correction value of the defect distribution parameter according to the feature similarity. The defect distribution parameter includes the current defect distribution sample and the historical defect distribution sample.
[0124] Specifically, a weight coefficient corresponding to each historical defect distribution sample can be assigned, which can be calculated according to 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. where 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, the 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 certain 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 missing detection scene compensation and false alarm suppression, and can effectively improve the F1-score.
[0127] The weight coefficient h k corresponding to the kth historical defect distribution sample can be preset according to experience. However, the static weight coefficient hk The time-dependent change of the defect pattern cannot be reflected, and therefore a time decay factor h is introduced k '=h k ·e -λ'·Δt . Wherein, λ' represents a preset time decay rate, and Δt represents the interval between the current time and the defect occurrence time. In this way, the weight coefficient h of the kth historical defect distribution sample is k The time-dependent change of the defect pattern can be reflected, and the time-varying characteristics of the production line process can be adapted, so that the final confidence after the initial confidence is corrected according to the correction value of the defect distribution parameter is more accurate, and the precision of the model for protective film defect detection and recognition is further improved.
[0128] Preferably, in step S222, as shown in the specific method for obtaining the feature similarity between the current defect distribution sample and the historical defect distribution sample includes: Figure 5
[0129] S2221, the historical defect distribution sample is divided into m typical patterns such as scratch type, bubble type, protrusion type, and pollution type by K-mean clustering.
[0130] S2222, the feature similarity sim(C i ,D current ) between the current defect distribution sample and the cluster center is obtained.
[0131] Preferably, in step S223, as shown in the specific method for obtaining the correction value of the defect distribution parameter according to the feature similarity includes: Figure 6
[0132] S2231, the intra-class density weight is obtained according to the number of defect samples of the cluster center and the total number of current defect distribution samples
[0133] S2232, the correction value of the defect distribution parameter is obtained according to the intra-class density weight and the feature similarity Wherein, N i represents the number of defect samples of the ith 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 occurrence time of the ith class defect (usually in hours or days), C i represents the ith cluster center, D current represents the current defect distribution sample, and 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 Reflects the universality of the category, used to filter high-frequency defect patterns. The time decay rate parameter λ' controls the decay speed of the historical sample weight. Used to achieve dynamic control of the timeliness of historical data, recent high-frequency defect sample weight is higher, which solves the problem that static weight cannot reflect the change of defect patterns over time, for example, defects caused by recent production line temperature fluctuations will be given priority to attention. By K-means clustering, historical defects are divided into typical patterns (such as scratch, bubble class), and only the similarity to the cluster center is calculated, which can reduce redundant calculation, and the intra-class density weight can ensure that high-frequency defect patterns have a greater impact on the current detection.
[0135] As a preferred technical solution, the plurality of dimension 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 the temperature gradient, humidity fluctuation, and light intensity;
[0137] S232, obtaining the corrected value of the environmental parameter according to the temperature gradient ΔTE, humidity fluctuation ΔHE, and light intensity I Where a, b, and c represent the weight coefficients of the temperature gradient, humidity fluctuation, and light intensity, respectively.
[0138] The temperature gradient can be understood as the difference between the current temperature and the process standard temperature, which reflects the thermal expansion and contraction effect. The humidity fluctuation represents the deviation of the real-time humidity from the standard humidity (usually 45-65% RH), which affects the surface tension of the material. The light intensity represents the visible light irradiance in the detection environment, which directly affects the signal-to-noise ratio of the image sensor. a, b, and c can be optimized by gradient descent method, reflecting the influence weight of each environmental factor on defect detection, and are all dimensionless.
[0139] For the formula a·ΔTE+b·ΔHE+c·I=0, f3=0.5, it can be understood that the environment is in standard working condition at this time; when a·ΔTE+b·ΔHE+c·I>0, that is, the parameters are positively offset (such as temperature rise, humidity rise, or light intensity enhancement), f3→1, which enhances the sensitivity of defect recognition; when the parameters are negatively offset (such as insufficient light, low temperature, or low humidity), f3→0, which suppresses the risk of false positives.
[0140] It should be noted that before inputting the temperature gradient, humidity fluctuation and light intensity into the function formula, the temperature gradient, humidity fluctuation and light intensity can be subjected to Min-Max standardization processing to eliminate dimensional differences. For the variables of the function in other embodiments of the application, normalization and dimensionless processing can also be performed to facilitate calculation and eliminate dimensional differences.
[0141] The function The linear combination of temperature, humidity and light is mapped to the interval (0, 1) by the Sigmoid function, realizing nonlinear correction of the initial confidence of the neural network model. When the environmental parameters deviate from the standard working condition, the sensitivity threshold of defect detection is automatically adjusted. The function can produce a gradient response to parameter mutation events (such as sudden changes in temperature and humidity) through the exponential function characteristic. In addition, the function can also avoid decision confusion caused by multi-variable coupling by fusing multi-dimensional environmental parameters into a single correction factor.
[0142] As a preferred technical solution, the plurality of dimension factors include a 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, obtaining the market defect report frequency C of the same type of product of the protective film report .
[0144] S242, obtaining the defect heat index according to the report frequency.
[0145] Specifically, the market defect report frequency of the same type of product can be understood as the number of standardized defect cases per unit time, which is generally obtained from an industry quality database / market supervision system, and the typical value range is 0-500 times / month. The defect heat index f4 = ln(1 + C report ), f4 = ln(1 + C report ) is a smoothing constant, which avoids the failure of the function when the report frequency = 0, while ensuring the mathematical rationality of the logarithmic operation.
[0146] Suppose that when the market defect report frequency C report of the same type of product of a certain model of protective film is 30 times, f4 = ln(1 + C report ) = ln(31) ≈ 3.43. Suppose that during the plum rain season, C report increases from 50 liters to 120, then the correction factor increases from ln(51) ≈ 3.93 to ln(121) ≈ 4.80, at which time the detection weight of the humidity-related protective film defect can be increased, and the initial confidence is automatically corrected, which can improve the accuracy of protective film defect detection and recognition. For example, the same type of product of a competitor has a coating process problem, resulting in C report= 200, f4 = = ln(201) = 5.30, at this time, the sensitivity of the automatic strengthening coating uniformity related defect detection is enhanced, and the initial confidence can be also corrected and optimized.
[0147] The defect heat index function converts the defect report frequency of similar products in the market into a logarithmic correction factor, and can dynamically adjust the prediction confidence of the neural network model. When the defect report of similar products in the market increases sharply, the system automatically enhances the detection sensitivity. The logarithmic function can suppress the influence of extreme values and enhance the sensitivity in the low value area. Since C report represents the defect report frequency of similar products in the market, the defect heat index function can compensate for the lack of current product detection samples by absorbing defect data of similar products, and is particularly suitable for the cold start scene in the initial stage of new product online.
[0148] As a preferred technical solution, the defect report frequency C report is decomposed into sub-parameters according to regional distribution, application scenarios and other dimensions Multi-dimensional information fusion is realized by weighted summation, for example, coating defect reports in the plum rain season in coastal areas and ultraviolet aging defect reports in plateau areas can be independently analyzed and superimposed, and corresponding weight coefficients W i are introduced to reflect the importance difference of different dimensions. The weight of the regional dimension can be dynamically adjusted according to the supply chain concentration (for example, if the proportion of a certain regional supplier is more than 50%, the corresponding weight coefficient is automatically increased, for example, 20%), and the weight of the application scenario can be set with a gradient combined with the profit contribution of the product (for example, the weight coefficient of the medical grade application is 0.8, and the weight coefficient of the industrial grade application is 0.5). For low sample dimensions of new products / new markets (for example ), the weak signal is amplified by the ln function to avoid misjudgment caused by insufficient single dimension data.
[0149] Finally, the defect heat index wherein, represents the standardized defect report frequency of the i-th dimension, such as the monthly average defect case number of East China, South China and North China in the regional dimension. The role of the ln function is to suppress extreme values and enhance low value sensitivity, and W i represents the weight coefficient corresponding to , which can be set by a technician according to experience or the importance difference of different dimensions.
[0150] As shown in Figure 9 , a protective film appearance defect detection system based on machine vision in an embodiment of the present application is used to realize the protective film appearance defect detection method, which comprises an image acquisition module, a neural network model, a function construction module and a confidence correction module.
[0151] The image acquisition module is configured to acquire a protective film image to be detected, and includes a multispectral camera and a structured light projection device. The multispectral camera is configured to acquire an RGB image of the protective film, and the structured light projection device is configured to acquire a structured light phase image of the protective film. The protective film image includes the RGB image and the structured light phase image.
[0152] The neural network model is configured to perform initial appearance defect identification on the protective film image to obtain an initial confidence. The initial confidence can be understood as a classification task prediction probability value output by the neural network model.
[0153] The function construction module is configured to obtain correction values of multiple dimension factors affecting the output accuracy of the neural network model, and construct a correction function according to the correction values. Specifically, each dimension factor corresponds to a correction value, and the correction values corresponding to the multiple dimension factors jointly construct the correction function.
[0154] The confidence correction module is configured to correct the initial confidence according to the correction function to obtain a final confidence, and perform detection of the appearance defect of the protective film according to the final confidence.
[0155] The final confidence wherein S initial represents the initial confidence, M represents the number of correction values of the dimension factors, w i represents a weight coefficient of the correction value, exp represents a natural exponential function, and f i represents the correction value of the i-th dimension factor, represents the correction function.
[0156] Here, the initial confidence S initial is output by the neural network model. The nonlinear correction term is adjusted and corrected, which can enhance the expression ability of the model for complex relationships. The exp as the natural exponential function can ensure that the output is always positive and amplify important features. The weight coefficient of the correction value is a learnable weight parameter, which can be optimized through back propagation to balance the contribution of the correction values of each dimension factor. When is greater than zero, the certainty of the neural network model can be enhanced, and when is less than zero, the overconfident prediction of the neural network model can be inhibited.
[0157] The multiple dimension factors include but are not limited to physical parameters of the protective film, defect distribution parameters, environmental parameters, and defect heat indexes. The weight coefficient w i of the correction value can realize a dynamic weight distribution mechanism of the multiple dimension parameters based on a reinforcement learning strategy. Specifically, wherein Var(V iVar(Vi) represents the parameter variance of the i-th dimensional factor, used to quantify the dynamic volatility of the parameter of the dimensional factor. 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. j Var(Vj) represents the parameter variance of the j-th dimensional factor, The normalization denominator is used to ensure that the sum of the weights of the modified values of all dimensional factors is 1, eliminating the dimensional difference. β' represents a temperature adjustment factor that controls the concentration of the weight distribution. When it tends to zero, the weight distribution is uniform. When it tends to infinity, only the largest variance dimension is effective. Generally, the value range is set to 0.5-3.0.
[0158] The function By calculating the exponentially weighted value of the variance Var(V i ) of each dimensional parameter, high volatility / criticality dimensions are given higher weights, so that the model focuses on the features with the most discriminative power in the current scenario. It uses a Softmax structure (exponential function + normalization denominator) to realize the probability distribution mapping of the weight, ensuring that the sum of all weights is 1, which meets the probability constraint condition. In addition, by adjusting the temperature adjustment factor, the "sharpening" degree of the weight distribution is controlled, and combined with the reward and punishment mechanism of the reinforcement learning strategy, the model can autonomously optimize the weight allocation strategy according to the environmental feedback.
[0159] In general, the weight coefficient acquisition function of the modified value solves the problem that the traditional static weight allocation cannot adapt to dynamic changes in data through variance analysis and exponential normalization processing.
[0160] The system can also include a MySQL database, a keyword acquisition module, and a keyword heat acquisition module. The MySQL database is used to store data related to protective film image defect identification and detection, including historical defect data. The keyword acquisition module is used to acquire keywords related to protective film image defects and send the keywords to the MySQL database for storage. The keywords include core words, derivative words, and scene words. The core words include scratches, bubbles, wrinkles, pinholes, etc. The derivative words include white spots, fisheye, and crystal point micro-defect words. The scene words include die cutting overflow glue, coating stripes, etc.
[0161] The keyword heat acquisition module is used to acquire the defect keyword heat value according to the formula ln(1+∑(λ k ·S k (t)))φ(τ). Wherein, S k (t) represents the real-time search volume of the k-th defect keyword, which can be obtained through Baidu index API and other methods. λ k represents the dynamic weight coefficient of the k-th defect keyword, and φ(τ) represents the time decay function.
[0162] Specifically, TF(k) represents the real-time word frequency of the kth defect keyword in industry forums or technical documents, which can be obtained by crawling the text data of target sites (such as professional forums and knowledge bases). IDF(k) represents the inverse document frequency of the kth 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 kth defect keyword and the current defect type, which can use BERT vector cosine similarity. N represents the total number of corpus documents, n k represents the number of documents containing the kth defect keyword. sim(Q k ,D defect ) represents the semantic field strength factor, which can be understood as the cosine similarity between the vector Q k of the kth defect keyword and the defect type vector D defect , used to strengthen the weight of keywords strongly related to the current defect type and weaken the interference words of spelling approximation (such as "film crack" vs. "die cutting").
[0163] max(TF) represents the maximum word frequency value among all keywords in the current period, used to eliminate the bias caused by the difference in forum activity, and to constrain the TF-IDF output range to the [0, 1] interval, avoiding extreme values.
[0164] By updating the TF value through real-time crawling, we can achieve hour-level hot spot capture; by calculating IDF through a special technical document library, we can avoid general corpus bias. In general, the dynamic weight coefficient function of the kth defect keyword is evaluated through a three-dimensional evaluation system of "word frequency heat × scarcity × semantic correlation", which solves the semantic missing and hot spot delay problems of traditional TF-IDF in professional fields.
[0165] The time decay function φ(τ) can be designed as a hyperbolic tangent decay mechanism, i.e. where T half represents the half-life of the keyword, which can be predicted by the search volume decay curve of LSTM, t0 represents the timestamp of the protective film defect event outbreak, t represents the current time, and ε' represents the smoothing coefficient (recommended value 0.01).
[0166] To avoid the long-tail effect of defect keywords, we can gain keywords with low search volume but high relevance. According to the formula , the real-time search volume of the kth defect keyword is optimized. Where N related represents the number of associated long-tail words, which can be obtained by Word2Vec clustering calculation, and S avg represents the industry daily search volume baseline value, which can be taken as the industry daily search volume of a 30-day moving time window.
[0167] The final defect keyword popularity value is expressed as follows:
[0168] After obtaining the popularity value of defect keywords, the frequency of defect reports for similar products of the protective film under different dimensions is combined. Obtain the defect popularity index f4. This defect popularity index can be the popularity value of defect keywords. and The maximum, average, or weighted average of the two values. In this way, the final defect popularity index f4 achieves a leapfrog innovation from single frequency statistics to semantic association network and synergistic optimization of search volume and market feedback by constructing a three-dimensional correction system of "market feedback + semantic field strength + spatiotemporal decay". It has a significant advantage, especially in capturing public opinion on potential defects.
[0169] In summary, the protective film appearance defect detection system obtains correction values for multiple dimensions of factors and constructs a correction function based on these values to correct the initial confidence level and obtain the final confidence level. By constructing a multi-source data fusion correction mechanism, it can correct the neural network prediction results of protective film appearance defects in real time based on multi-source data, which significantly improves the detection accuracy of protective film appearance defects under complex working conditions.
[0170] The technical features of the embodiments described can be combined in any way. For the sake of brevity, not all possible combinations of the 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 embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.
Claims
1. A method for detecting appearance defects in protective films based on machine vision, characterized in that, Includes the following steps: The protective film image to be detected is acquired, and a neural network model is constructed. The trained neural network model is used to perform initial appearance defect identification on the protective film image to obtain an initial confidence level. Obtain correction values for multiple dimensions of factors that affect the accuracy of the output results of the neural network model, and construct a correction function based on the correction values; The initial confidence level is corrected according to the correction function to obtain the final confidence level, and the appearance defects of the protective film are detected according to the final confidence level. The multiple dimensional factors include physical parameters of the protective film, and specific methods for obtaining correction values for these physical parameters include: Obtain the strain rate tensor of the protective film, and obtain the dynamic deformation accumulation factor based on the strain rate tensor; Obtain the temperature sensitivity coefficient of the protective film and the current ambient temperature, and obtain the temperature sensitivity factor based on the temperature sensitivity coefficient and the current ambient temperature; The surface roughness and interfacial energy density gradient of the protective film are obtained, and the correction values of the physical parameters of the protective film are obtained based on the surface roughness, interfacial 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 interfacial energy density gradient. Correction values of the physical parameters of the protective film ; in, Represents the interface energy density gradient. Indicates surface roughness. Indicates the dynamic deformation accumulation factor. This represents the deformation weighting coefficient. Represents the strain rate tensor. Indicates temperature-sensitive factor, Represents the natural constant. Indicates the temperature sensitivity coefficient. These represent the current ambient temperature and the reference temperature, respectively. strain rate tensor ; This represents the displacement gradient of the protective film. Represents the temperature gradient. These represent the mechanical coupling coefficient and the thermodynamic coupling coefficient, respectively.
2. The method for detecting appearance defects of protective films based on machine vision as described in claim 1, characterized in that, The specific method for initial appearance defect identification of protective film images includes the following steps: Global features were extracted from the RGB image and the structured light phase map, respectively. Perform deformable convolution operation on the global features of the RGB image to obtain the first modality local defect features, perform deformable convolution operation on the global features of the structured light phase map to obtain the first local defect features, and obtain the second modality local defect features. Bilinear interactive pooling is performed on the local defect features of the first mode and the local defect features of the second mode to obtain the dual-modal fusion features; Initial appearance defect identification is performed on the protective film image based on the dual-modal fusion features; The protective film image includes an RGB image and a structured light phase map.
3. The method for detecting appearance defects of protective films based on machine vision as described in claim 2, characterized in that, The multiple dimensional factors also include defect distribution parameters, and specific methods for obtaining correction values for the defect distribution parameters include: Obtain the current defect distribution sample of the protective film and the historical defect distribution sample corresponding to the protective film; Obtain the feature similarity between the current defect distribution sample and the historical defect distribution sample; The correction value of the defect distribution parameter is obtained based on the feature similarity. The defect distribution parameters include current defect distribution samples and historical defect distribution samples.
4. The method for detecting appearance defects of protective films based on machine vision as described in claim 3, characterized in that, The specific method for obtaining the feature similarity between the current defect distribution sample and the historical defect distribution sample includes: The historical defect distribution samples were divided using K-means clustering. A typical pattern; Obtain the feature similarity between the current defect distribution sample and the cluster center.
5. The method for detecting appearance defects of protective films based on machine vision as described in claim 4, characterized in that, The specific method for obtaining the correction value of the defect distribution parameter based on the feature similarity includes: The intra-cluster density weights are obtained based on the number of defect samples at the cluster centers and the total number of samples in the current defect distribution. ; The correction value of the defect distribution parameter is obtained based on the intra-class density weight and feature similarity. ; in, Indicates the first The number of defective samples in each cluster center Represents the total number of samples. This represents the time decay rate parameter. Indicates the current time and the number of... The time difference between the occurrence of the defects Indicates the first Cluster centers This represents the current defect distribution sample. This indicates the feature similarity between the current defect distribution sample and the cluster center.
6. The method for detecting appearance defects of protective films based on machine vision as described in claim 5, characterized in that, The final confidence level ; in, Indicates the initial confidence level. This indicates the number of correction values for the stated dimension factor. The weighting coefficients represent the correction values. This represents the natural exponential function. Indicates the first Correction values for each dimension factor, This represents the correction function.
7. A machine vision-based protective film appearance defect detection system, used to implement the protective film appearance defect detection method as described in any one of claims 1-6, characterized in that, include: The image acquisition module is used to acquire images of the protective film to be detected. A neural network model is used to perform initial appearance defect identification on the protective film image and obtain an initial confidence level. The function construction module is used to obtain correction values for multiple dimensions of factors that affect the accuracy of the output results of the neural network model, and to construct a correction function based on the correction values; The confidence correction module is used to correct the initial confidence based on the correction function to obtain the final confidence, and to detect the appearance defects of the protective film based on the final confidence. The multiple dimensional factors include physical parameters of the protective film, and specific methods for obtaining correction values for these physical parameters include: Obtain the strain rate tensor of the protective film, and obtain the dynamic deformation accumulation factor based on the strain rate tensor; Obtain the temperature sensitivity coefficient of the protective film and the current ambient temperature, and obtain the temperature sensitivity factor based on the temperature sensitivity coefficient and the current ambient temperature; The surface roughness and interfacial energy density gradient of the protective film are obtained, and the correction values of the physical parameters of the protective film are obtained based on the surface roughness, interfacial 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 interfacial energy density gradient. Correction values of the physical parameters of the protective film ; in, Represents the interface energy density gradient. Indicates surface roughness. Indicates the dynamic deformation accumulation factor. This represents the deformation weighting coefficient. Represents the strain rate tensor. Indicates temperature-sensitive factor, Represents the natural constant. Indicates the temperature sensitivity coefficient. These represent the current ambient temperature and the reference temperature, respectively. strain rate tensor ; This represents the displacement gradient of the protective film. Represents the temperature gradient. These represent the mechanical coupling coefficient and the thermodynamic coupling coefficient, respectively.
8. The machine vision-based protective film appearance defect detection system as described in claim 7, characterized in that, The image acquisition module includes: A multispectral camera is used to acquire RGB images of the protective film; A structured light projection device is used to acquire the structured light phase map of the protective film; The protective film image includes an RGB image and a structured light phase map.
Citation Information
Patent Citations
Protective film production appearance defect detection method and system based on machine vision
CN118914195A
Defect identification method and device, computer equipment and computer readable storage medium
CN114627089A