Spacecraft thermal control film coating defect identification method based on multi-dimensional attention mechanism

By adopting multi-dimensional attention mechanism and deep learning technology in the identification of spacecraft thermally controlled thin film coating defects, the problems of low efficiency and low accuracy in the existing technology are solved, and efficient and accurate coating defect detection is achieved.

CN119515792APending Publication Date: 2025-02-25HARBIN UNIV OF SCI & TECH
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202411525030.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The prior art is inefficient and accurate in the identification of defects of thermally controlled films in spacecraft, especially in the identification of fold defects on the surface of composite films, which are greatly affected by light and reflection, resulting in inaccurate image segmentation results.

Method used

Using the thermally controlled thin film coating defect recognition method based on multi-dimensional attention mechanism, the characteristic information of coating defects is extracted by constructing a convolutional neural network and channel-space attention mechanism, and the small sample incremental reinforcement learning algorithm and GhostConv module are used to construct technologies such as , realize accurate extraction and real-time detection of different types of defect features.

Benefits of technology

The accuracy and efficiency of coating defect detection have been significantly improved. Compared with the YOLOv5 model, the accuracy of EDM is increased by 12% in terms of EDM defect detection and achieved a 99% accurate recognition effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119515792A_ABST
    Figure CN119515792A_ABST
Patent Text Reader

Abstract

The invention relates to a spacecraft thermal control film coating defect identification method based on a multi-dimensional attention mechanism. According to the method, a correlation mapping model based on monitoring data-detection image sensitive features-coating defects is constructed, and accurate feature information extraction of the multi-type defects of the coating on the surface of the spacecraft by a convolution kernel is realized by constructing a channel-space attention mechanism convolution neural network; through modes of random rotation, mirroring, symmetry, blurring, brightness change, contrast adjustment, saturation change, Gaussian noise addition and the like, data expansion is performed on variety defect categories with relatively small sample sizes, a data set is enriched, and the problem that the sample sizes of multiple types of defects are unbalanced is solved; a lightweight module (LM-Block) and a feature enhancement module (FEM-block) based on an attention mechanism are designed on the basis of a GhostConv self-adaptive ghost convolution module, and a coating defect detection model architecture based on efficient self-adaptive convolution and channel-spatial pyramid pooling is proposed on the basis of the modules to realize accurate recognition of defects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of defect recognition, and in particular to a method for identifying defects in thermal control thin film coatings on a spacecraft surface. Background Art

[0002] Product defect detection has always been one of the most important steps in the field of processing. In order to ensure the final quality and output of the manufactured products, the accuracy and efficiency of defect detection are increasingly required. Traditional defect detection methods mainly rely on manual visual inspection, which is not only inefficient but also susceptible to subjective factors such as fatigue and decreased concentration. In addition, manual visual inspection cannot guarantee 100% inspection coverage, so some key defects may be missed. With the rapid development of computer technology and image processing technology, machine vision technology has become a key technology in the field of defect detection. Machine vision systems can automatically detect and identify various defects, including scratches, stains, cracks, and abnormal shapes by capturing and analyzing images. In recent years, deep learning technology has made breakthrough progress in the field of image recognition and classification. In particular, the emergence of convolutional neural networks (CNNs) has greatly improved the accuracy and robustness of defect detection. However, the technology in the field of defect detection in the field of thin film coating is still not fully mature.

[0003] In the field of aerospace, the accuracy and efficiency of defect detection are more stringent. The design and manufacture of spacecraft is a highly complex technical activity, in which thermal control thin film coating plays an important role in ensuring the normal operation of spacecraft equipment and maintaining the stability of the internal environment. However, defects in the coating process may have a serious impact on the performance of the spacecraft. Therefore, the identification of thermal control thin film coating defects for spacecraft is particularly strict. At present, the process of identifying defects in thermal control thin film coating of spacecraft mainly relies on manual inspection, which is not only inefficient but also prone to errors. In addition, due to the special structure and purpose of spacecraft, the requirements for coating are extremely high, and even tiny defects may affect its normal operation in the space environment. The conventional recognition method is to use the threshold segmentation method to process the surface image of the composite film. However, since the wrinkle defects on the surface of the composite film are mainly presented as tunnel-like shapes, the grayscale difference is not obvious, and most of the composite films are white, the reflection will occur due to the presence of light, affecting the selection of the threshold, making the image segmentation result inaccurate, and thus resulting in the composite film defect recognition result is also inaccurate because the old method has failed to meet the industry requirements in terms of efficiency and accuracy. Therefore, there is an urgent need for a fast, accurate and real-time online coating defect detection technology. Summary of the invention

[0004] In order to solve the above technical problems, the purpose of the present invention is to provide a method for identifying defects in thermal control thin film coatings. The technical solutions adopted are as follows:

[0005] A method for identifying defects in thermal control thin film coatings based on a multi-dimensional attention mechanism comprises the following steps:

[0006] Step 1: Construct an association mapping model based on monitoring data, sensitive features of detection images, and coating defects to achieve efficient and high-accuracy intelligent identification. By constructing a convolutional neural network, the convolution kernel is used to extract feature information of the spacecraft surface coating defect image. Based on the database and massive new data from coating production, the weight adjustment of feature information is achieved through the channel-spatial attention mechanism, revealing the data-driven "feature-defect" mapping relationship, thereby achieving accurate extraction of different types of defect features.

[0007] Step 2: Propose a small sample incremental reinforcement learning algorithm model driven by an attention mechanism, and use data augmentation to improve model performance to increase the diversity of training data, while improving the generalization ability of the model and reducing the risk of overfitting;

[0008] By means of random rotation, mirroring, symmetry, blurring, changing brightness, adjusting contrast, changing saturation and adding Gaussian noise, data expansion is performed on defect categories with smaller sample sizes and the data set is enriched to achieve a balance among various types of samples.

[0009] Step 3: Based on the method used in step 1, the channel-spatial attention mechanism is used to evaluate the value of the defect features extracted by the convolution layer after the convolution layer, and a mapping relationship between the strongly correlated features of coating defects and the defect categories is established to reduce the amount of calculation of redundant feature information and achieve accurate identification of defect categories;

[0010] A deep learning defect detection model is built to realize real-time detection of coating defects. A novel LM-Block module is designed based on the adaptive ghost convolution module of GhostConv. At the same time, a FEM module that integrates the adaptive ghost convolution module and the fully connected attention mechanism is designed. This module greatly enhances the feature extraction ability of the model, which is also the reason for incorporating it into the backbone network. The use of the FC attention mechanism reduces the computational cost, enabling the model to detect defects faster and more accurately; using the channel-spatial pyramid pooling (CSPP) module, features with different focuses are extracted through different feature extraction mechanisms. This enhancement enriches the feature representation of the model at different scales and spatial levels, thereby effectively solving the problem that the detection process is often disturbed by image background noise and uneven distribution of defect features, resulting in a reduced recall rate; the above three modules are used to form a coating defect detection model architecture based on efficient adaptive convolution and channel-spatial pyramid pooling to accurately identify defects.

[0011] Preferably, in step 1, in the constructed convolutional neural network, the input of the convolutional layer is the image of the coating defect on the surface of the spacecraft, there are three layers of convolution, the convolution kernel size is [3, 3], and the input of the model is the sensitive feature F of the coating defect on the surface of the spacecraft ilter ∈R H×W×C , which means the number of input channels is C and the feature map size is H×W. The relevant mathematical expressions are as follows:

[0012] F ilter ={x1, x2, ..., x c}

[0013]

[0014] Where, X i ——The output feature matrix of the i-th convolution kernel; ——The i-th convolution kernel of the k-th channel;

[0015] ——Feature map of the coating defect on the input spacecraft surface of the i-th channel; B i ——Bias of the i-th convolution kernel; F is the activation function, which can be expressed as follows:

[0016]

[0017] Preferably, in step 1, in the constructed convolutional neural network, the border of the input coating defect feature map is filled with zeros, and the size of the output feature matrix after filling is as follows:

[0018]

[0019] Where, s is the sliding step of the convolution kernel; N is the size of the coating defect feature matrix; F is the size of the convolution kernel.

[0020] Preferably, in step 1, in order to prevent gradient explosion and gradient disappearance in the constructed convolutional neural network, the feature matrix needs to be normalized (BN) after extracting the defect features of the spacecraft surface coating. The normalization process is as follows:

[0021]

[0022] In the formula, B is the input batch data; M is the number of data; x i ——the i-th data; μ B ——mean value of data B; σ 2 B ——variance of data B; y i ——Normalized data.

[0023] The extracted spacecraft surface coating defect features are further compressed through the pooling layer, which reduces the feature dimension while retaining the feature information and reduces the sensitivity of the feature output to distortion. The mathematical expression of the pooling layer is as follows:

[0024]

[0025] In the formula, p s ——The output of the pooling layer; Pool——sampling function; ——Features of spacecraft surface coating defects after processing by channel attention mechanism and spatial attention mechanism; P——pooling window size.

[0026] Preferably, in step 1, in the constructed convolutional neural network, three fully connected layers are established to process the extracted 256 spacecraft surface coating defect features, and a mapping between the spacecraft surface coating defect features and the defect categories is established. The network input of this layer is the spacecraft surface coating defect features after value assessment. Each neuron is connected to all neurons in the previous layer to integrate and extract the association between the spacecraft surface coating defect features. There are three fully connected layers in total. The number of neurons in the first two layers is 256 and 32, and the number of neurons in the last layer is 7. The output is expressed as follows:

[0027] y i =w k A i-1 +b k

[0028] In the formula, y i ——The output of the neurons in the connection layer; w k , b k ——The weights and biases of the fully connected layer can be updated through back propagation; A i-1 ——The feature vector of the previous layer network.

[0029] Preferably, in step 1, the structure of the coating defect weight adjustment mechanism based on spatial attention is to first reduce the channel dimension, associate the features of multiple channels through a convolution kernel of size [1, 1], and input X H×W×M train , the output is a single channel feature Figure X H×W×1 train .

[0030] X H×W×1 train =f 1*1 *(X H×W×M train )

[0031] In the formula, f 1*1——Convolution kernel of size [1, 1]; *——Convolution operation; X H×W×M train ——Characteristic diagram of spacecraft surface coating defects; X H×W×1 train ——After M channels are associated, they are merged into one channel of spacecraft surface coating defect features with a size of H×W.

[0032] The maximum pooling (Maxpool) and average pooling (Avgpool) of the channel dimension are performed on the coating defect features of the spacecraft surface to obtain the feature matrix F after maximum pooling max And after average pooling F avg The characteristic matrix of F avg and F max Combined together to get a new feature map F H×W×2 teain , and finally pass through the convolution kernel f with size [1, 1] 1*1 The convolution operation obtains the new feature F H×W×1 train The activation function is the same as the channel attention. The processed feature matrix is ​​converted into a normalized coefficient between 0 and 1 through the Sigmoid function to obtain the weight coefficient M of the spatial attention mechanism. S , the weight coefficient M S With the input feature X H ×W×M train Multiplying them together can get the sensitive characteristics of the spacecraft surface coating defects corrected by space attention. The mathematical expression is as follows:

[0033] F avg =Avgpool(X H×W×1 train )

[0034] F max =Maxpool(X H×W×1 train )

[0035]

[0036] F H×W×1 train =f 1*1 *(F H×W×2 train )

[0037] M S =Sigmoid(F H×W×1 train )

[0038]

[0039] In the formula, Maxpool, Avgpool——Perform maximum pooling and average pooling on the feature map;

[0040] F avg With F max ——Feature map after average pooling and maximum pooling of spacecraft surface coating defect features;

[0041] X H×W×1 train ——Single channel features after multi-channel fusion; Refers to associating two feature matrices together;

[0042] F H×W×2 train ——Dual channel features after correlation;

[0043] f 1*1 ——Convolution kernel of size [1, 1];

[0044] M S ——Normalized spatial attention feature coefficient;

[0045] ——Defect characteristics of spacecraft surface coating after correction through attention mechanism.

[0046] Preferably, in step 2, the deep features of the spacecraft surface coating defects are extracted through a dual-dimensional attention mechanism, and the spacecraft surface coating defect data F ilter After dimensionality reduction through the convolution kernel, the defect feature X of the spacecraft surface coating is obtained. H ×W×M train The channel attention mechanism and the spatial attention mechanism are used to realize the feature analysis of the coating defects on the surface of the spacecraft, and the dimensions of the space and channel are compressed respectively, and the feature vector is normalized.

[0047] Preferably, in step 3, when performing the GhostConv ghost convolution operation, the given input data is first convolved using some channels to generate an intermediate feature map, and then a part of the output feature map is obtained from the intermediate feature map through low-cost linear operations, and then the final output feature map is obtained by splicing it with the intermediate feature map.

[0048] Specifically, the first convolution operation is used to generate M intrinsic feature maps Y′∈R H′×W′×M .

[0049] Y′=X*f′

[0050] Where f′∈R C×K×K×M ——Convolution filter.

[0051] M<N means that the convolution filter is less than the original convolution block. In order to obtain the final N output feature maps, a series of cheap linear operations are required on Y′ to generate Ghost features according to the following function.

[0052]

[0053] where y i ′ is the i-th intrinsic feature map of Y′, Φ i,j Applicable to the j-th (except the last) linear operation to generate the j-th Ghost feature map, and the last Φ i,s In order to maintain the identity mapping of the intermediate feature map, by using:

[0054]

[0055] We can get N = M × S feature maps Y = [y 11 ,y 22 , …, y ms ] as the final output feature map of the GhostConv operation, The operation is a linear operation, and the computational complexity of linear operations is much lower than that of ordinary convolution operations. GhostConv is a lighter convolution layer than Conv.

[0056] Preferably, in step 3, the details of the FC attention mechanism are that, initially, the receptive field of the neuron is increased by using a downsampling operation of the average pool, which helps the model to better understand the global structure of different defect features. Then, the computational cost is reduced by using a small convolution filter (1×1 convolution). In order to capture global information, an attention map with a global receptive field is generated through two fully connected layers. Finally, the result is obtained using an activation function.

[0057] Preferably, in step 3, the channel-spatial pyramid pooling (CSPP) module consists of two parts: a spatial feature mechanism and a channel feature extraction. The spatial feature mechanism uses coordinated attention technology to capture features at different spatial positions in the image. The channel feature extraction module focuses on extracting features from different channels present in the defect image. Secondly, by embedding the coordinated attention mechanism, the feature extraction capability of the model is effectively enhanced in the spatial dimension. This module is distinguished from the previous attention mechanism by using a global pooling operation. This operation decomposes the feature map into a one-dimensional feature map in the horizontal and vertical directions. The specific operation is defined as follows:

[0058]

[0059] Where c represents the number of input channels, the height is H, and the width is w. This operation can help obtain the position information in space. The constructed one-dimensional feature map is operated in sequence along the spatial dimension as follows:

[0060] f=δ(F1([z h , z w ])),

[0061] Where [·,·] represents the concatenation operation along the spatial dimension, and δ represents the nonlinear activation function. Next, a series of convolution operations are performed to calculate the weight scores along the height and width directions, as shown in the formula:

[0062] g h =σ(F h (f h ))

[0063] g w =σ(F w (f w ))

[0064] Among them, F h and F w represents a 1×1 convolution, and σ represents a sigmoid activation function. Finally, the attention score is multiplied by the input feature map to get the final output. The overall formula is defined as

[0065]

[0066] Beneficial effects of the present invention:

[0067] The gain effect achieved by this method for EDM defect detection is as follows: Fig.10 As shown in the figure, the improved model and the version with the feature extraction module based on the attention mechanism have significantly improved the detection accuracy. Specifically, the improved coating defect detection model has improved the accuracy of EDM defect detection by 12% to 92% compared with the original YOLOv5 model; after adding the feature extraction module, the model can locate defects more accurately, with an accuracy of 99%, thus achieving accurate identification of coating defects. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] Figure 1 It is a flow chart of a method for identifying defects in thermally controlled thin film coatings based on a multi-dimensional attention mechanism in an embodiment of the present invention;

[0069] Figure 2 Schematic diagram of the channel attention mechanism;

[0070] Figure 3 Schematic diagram of the spatial attention mechanism;

[0071] Figure 4 The minimum and maximum activation channels of EDM coating defects are shown;

[0072] Figure 5 The expanded database of EDM defects is shown;

[0073] Figure 6 The flexible thin film coating EDM defect detection process is illustrated;

[0074] Figure 7 The specific structures of the LM-Block module and the adaptive ghost convolution module are shown;

[0075] Figure 8 The specific structure of FEM-block and fully connected attention mechanism is shown;

[0076] Fig. 9 The channel-space pyramid module structure is illustrated;

[0077] Fig.10 The comparison of recognition accuracy between the constructed coating defect detection system and the original YOLOv5 model is shown. DETAILED DESCRIPTION

[0078] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0079] Please also see Figures 1 to 9 , the present invention provides some embodiments of a method for identifying defects in spacecraft thermal control thin film coatings using a multi-dimensional attention mechanism.

[0080] The present invention takes the common electric spark defects in the coating production process as an example to illustrate, and other coating surface defects are also applicable to the method of the present invention. The identification ideas used are as follows: Figure 1 As shown, the specific steps include:

[0081] Step S100: Construct an association mapping model based on monitoring data-sensitive features of detection images-coating defects to extract strongly correlated features of the coating process monitoring information; accurately identify coating defects on the surface of spacecraft and extract feature information by constructing a convolutional neural network; extract feature information of the spacecraft surface coating defect image by using a convolutional kernel by constructing a convolutional neural network; based on the database and massive new data from coating production, adjust the weight of feature information through a channel-space attention mechanism to achieve accurate extraction of features of different types of defects.

[0082] Specifically, step S100 includes the following steps:

[0083] Step S110: The input of the EDM defect feature extraction is a 224×224×3 RGB image of satellite surface coating defects. “224×224” refers to the pixel size of the input, and “3” refers to the satellite surface coating defect image having three channels. After the convolution operation, the feature images of multiple channels are extracted as the satellite surface coating defect features. Since the convolution process adopts the same mode and retains the edge information of the defect data, the output satellite surface coating defect feature image size is still 224×224. The satellite surface coating defect feature extraction module first consists of 6 hidden layers, which are composed of three convolution layers Conv1-Conv3 and three fully connected layers FC1, FC2 and FC3. The first three layers are convolution layers. Between every two convolution layers, there are normalization, activation layers, and pooling layers. After the three convolution layers, there are three fully connected layers. The number of neurons in the first two layers is 256 and 32 neurons according to the size and complexity of the data. The last layer requires 7 neurons to complete the identification of coating defects according to the number of defect categories. Finally, the classification function Softmax is used to complete the identification of coating defects.

[0084] Step S120: Establish three fully connected layers to process the extracted 256 satellite surface coating defect features and establish a mapping between satellite surface coating defect features and defect categories. The input of this layer of network is the satellite surface coating defect features after value assessment. Each neuron is connected to all neurons in the previous layer to integrate and extract the association between satellite surface coating defect features. There are three fully connected layers in total. The number of neurons in the first two layers is 256 and 32, and the number of neurons in the last layer is 7. The output is expressed as follows:

[0085] y i =w k A i-1 +b k

[0086] Where, ——the output of neurons in the connection layer;

[0087] The weights and biases of the fully connected layers can be updated via backpropagation.

[0088] ——The feature vector of the previous layer network.

[0089] Step S130: Building a channel attention mechanism for satellite surface coating EDM defect extraction, which is mainly divided into three steps: squeeze, excitation and scale fusion. Figure 3 The satellite surface coating defect sensitive feature channel is compressed by Squeeze operation, and the coating defect sensitive feature is compressed into a global feature, which is input as the satellite surface coating defect sensitive feature X H×W×M trainThe output is the compressed global feature F of the satellite surface coating defect 1×1×M sq .

[0090] X H×W×M train = {X1, X2, ..., X M}

[0091] F i sq =GAP(X i train )

[0092]

[0093] Where, X H×W×M train ——Sensitive features of satellite surface coating defects after convolution operation, with M feature channels and a feature map size of H×W;

[0094] F i sq ——Global features of the i-th feature map through global average pooling;

[0095] GAP — global average pooling operation;

[0096] F 1×1×M sq ——Global features corresponding to M channels.

[0097] Through the Excitation operation (FC1 layer + Relu activation + FC2 layer + Sigmoid activation), the fully connected layer FC1 reduces the dimension of the feature map vector along the channel dimension, the Relu activation function realizes nonlinearity, the fully connected layer FC2 restores the channel dimension of the feature vector to the original dimension, and the Sigmoid function converts the processed feature vector into a normalized weight vector S between 0 and 1 1×1×M , that is, to generate weight values ​​of different sensitive features. Two fully connected layers FC1 and FC2 are used to give extra attention to the important information in the sensitive features of satellite surface coating defects. The mathematical expression is as follows:

[0098] FC1=W1×F 1×1×M sq

[0099] FC2=W2×Relu(FC1)

[0100] S 1×1×M =Sigmoid(FC2)

[0101] like Figure 2 As shown, among which W1, M is the number of sensitive features of satellite surface coating defects, and r is the dimensionality reduction coefficient. 1×1×M is the feature vector corresponding to the sensitive features of satellite surface coating defects of M channels, Sigmoid is the activation function, and its mathematical expression is:

[0102]

[0103] Finally, through the Scale operation, the expression is:

[0104]

[0105] The normalized channel weight S 1×1×M Satellite surface coating defect sensitive characteristics X H×W×M train Fusion to generate new sensitive features This makes the model more discriminating about the sensitive features of satellite coating defects in different channels.

[0106] Step S140: Build a spatial attention mechanism to enable the satellite surface coating defect type recognition model to obtain spatial recognition capabilities and focus on the strongly correlated features of different feature regions. The structure of the spatial attention mechanism is as follows: Figure 3 First, the channel dimension is reduced, and the features of multiple channels are associated through a convolution kernel of size [1,1]. The input is X H×W×M train , the output is a single channel feature Figure X H×W×1 train .

[0107] X H×W×1 train =f 1*1 *(X H×W×M train )

[0108] In the formula, f 1*1 ——Convolution kernel of size [1,1];

[0109] *——Convolution operation;

[0110] X H×W×M train ——Characteristic diagram of satellite surface coating defects;

[0111] X H×W×1 train ——After M channels are associated, the satellite surface coating defect features are merged into one channel with a size of H×W.

[0112] Step S140: Analyze the defect characteristics of the electrospark coating, such as Figure 4As shown in the figure, the defect feature information under the optimal activation channel is extracted. The optimal channel for electrospark coating defect information extraction is 64, and the minimum activation channel is 51. In the process of extracting 64 feature information channels, the channels have different performances in extracting different defect features, and different channels have different contributions to the defect features.

[0113] Step S200: Propose a small sample incremental reinforcement learning algorithm model driven by an attention mechanism, use data expansion to improve model performance, increase the diversity of training data, and at the same time improve the generalization ability of the model and reduce the risk of overfitting; through random rotation, mirroring, symmetry, blurring, changing brightness, adjusting contrast, changing saturation and adding Gaussian noise, etc., perform data expansion and enrich the data set for defect categories with small sample sizes to achieve a balance among various types of samples.

[0114] Specifically, step S200 includes the following steps:

[0115] Step S210: First, collect and acquire the original defect data. For example, in this example, a high-resolution camera is used to capture the microscopic details of the spark defect. The camera is shot under low light conditions to highlight the discharge trajectory of the spark. When collecting data, pay attention to the following points:

[0116] Lighting and reflection: Lighting should be sufficient and evenly distributed. Avoid strong light directly shining on the defective sample to avoid light reflection or blocking the defect details. Uniform lighting equipment or soft light sources can be used to reduce reflection, make details more visible, and ensure the accuracy and identifiability of defects.

[0117] Camera lens settings: Use a high-resolution industrial camera to capture as many defect details as possible. Set the appropriate focal length and exposure time to obtain a clear image. Use the appropriate white balance setting to ensure the color accuracy and consistency of the image.

[0118] Sample preparation: The defect sample should be clean and smooth, and there should be no other interference factors. When the defect sample is small or subtle, a magnifying glass or microscope can be used for more detailed observation and photography.

[0119] Data recording and management: Record each defect sample in detail, including defect type, acquisition date, location and other information, to establish a complete defect database. Appropriately name and classify the images for storage to facilitate subsequent image processing and analysis.

[0120] Step S220: In the process of detecting EDM defects of flexible thin film coating for aerospace, an industrial camera is called to monitor the production process of flexible thin film coating in real time; the industrial camera is connected, the shooting interval is set, and the production process of flexible thin film coating is photographed; through subsequent experimental tests, for EDM defects, rotation has little effect on the accuracy improvement in the model training process, so the EDM defects are expanded by changing the brightness, changing the saturation, and blurring for data enhancement. This part generates 300 training data through the above method, such as Figure 5 shown.

[0121] Step S230: store the captured images in the production process image acquisition folder and name the images by time; use the embedded flexible thin film coating defect recognition algorithm to perform defect detection and recognition on the images in the production process image acquisition folder; store the defect recognition results in the defect recognition history database.

[0122] Step S300: Use the channel-spatial attention mechanism to evaluate the value of the defect features extracted by the convolution layer after the convolution layer, and establish a mapping relationship between the strongly correlated features of the coating defects and the defect categories. At the same time, a feature enhancement module (FEM-block) integrating the adaptive ghost convolution module and the fully connected (FC) attention mechanism is designed. The use of the FC attention mechanism reduces the computational cost, enabling the model to detect defects faster and more accurately; the channel-spatial pyramid pooling (CSPP) module is used to extract features with different focuses through different feature extraction mechanisms.

[0123] Specifically, step S300 includes the following steps:

[0124] Step S310: First, the images in the training set are processed through some data enhancement operations and then input into the network model for defect detection. A total of 200 rounds of training are performed. After each round of training, the images in the validation set are input into the network to calculate the model performance. The prediction results of the training set are compared with the true labels to calculate the loss function. The loss function includes three categories: target loss, classification loss, and positioning loss. The goal is to continuously iterate and reduce the loss function until it reaches the optimal value. The model is constantly taught to learn the characteristics of defect manifestations. The best round of performance in the validation set is used as the optimal weight file, which is used as the weight file obtained after the final training of the model. After experimental verification, the entire network model converges after 200 rounds of iterations, and the best effect of the model is obtained. The entire workflow is as follows. Figure 6 shown.

[0125] Step S320: Build a deep learning defect detection model to realize real-time detection of coating defects, and design a lightweight module (LM-Block) based on the adaptive ghost convolution module of GhostConv. Generate a ghost feature map through cheap operations instead of ordinary convolution to remove redundant information, and only focus on the intrinsic feature information of important defects. First, the given input data is convolved using some channels to generate an intermediate feature map, and then a part of the output feature map is obtained from the intermediate feature map through low-cost linear operations, and then the final output feature map is obtained by splicing with the intermediate feature map. Due to the small amount of floating-point operations, it is more conducive to real-time detection applications. The specific structure of the LM-Block module and the adaptive ghost convolution module is as follows: Figure 7 .

[0126] Step S330: First, a 1×1 convolution kernel is used to extract local features, and a fully connected attention mechanism is used to extract global features. The obtained features are then multiplied, allowing the model to flexibly focus on important parts of the feature map. Subsequently, another 1×1 convolution kernel is used to adjust the channel dimension, helping the model to flexibly adjust the depth of the feature map. The computational cost is reduced by using small convolution filters (1×1 convolution). In order to capture global information, an attention map with a global receptive field is generated through two fully connected layers.

[0127] The specific structure of the FEM block is as follows Figure 8 .

[0128] Step S340: Use the coordinated attention technique of the spatial feature mechanism to capture features at different spatial locations in the image. This enhancement helps the network understand the defect distribution in different spatial dimensions. At the same time, the channel feature extraction module focuses on extracting features from different channels present in the defect image. By performing channel-level feature extraction, it can extract different feature channel capture information to help the network understand the defect features and their distribution. This enhancement enriches the feature representation of the model at different scales and spatial levels. The specific module structure is as follows Fig. 9 shown.

[0129] Step S350: Use the confidence loss function to determine whether the rectangular box predicted by the network contains the target. The classification loss is used to determine whether the category predicted by the network is accurate. The positioning loss determines whether the position of the predicted rectangular box is consistent with the actual labeled box. The specific formula is:

[0130] Loss = λ1L cls +λ2L obj +λ3L coc

[0131] Where λ1, λ2, λ3 represent the balance coefficients of the loss functions of each part.

[0132] Step S400: For learning rate update, a warm-up method is used to initialize the learning rate. In the warm-up stage, one-dimensional linear interpolation is used to update the learning rate of each iteration, and the cosine annealing algorithm is used to update the learning rate after the warm-up stage. In the initial training of the model, 3 epochs of warm-up training are first performed. After the warm-up training, the initial learning rate is set to 0.01, and the minimum learning rate is 0.0001. The recognition accuracy of the constructed coating EDM defect detection system is compared as follows: the original detection model is 80%, the improved model is 92%, and the improved model + feature extraction is 99%. The experimental results show that after adding the feature extraction module, the model can locate defects more accurately, and the above-mentioned lightweight module (LM-Block), the feature enhancement module (FEM-block) based on the attention mechanism, and the coating defect detection model architecture of efficient adaptive convolution and channel-space pyramid pooling can achieve accurate recognition of EDM defects.

Claims

1. A method for identifying defects in spacecraft thermal control thin film coatings based on a multi-dimensional attention mechanism, characterized in that: The following steps are involved: Step 1: Build an association mapping model based on monitoring data, sensitive features of detection images, and coating defects. By building a convolutional neural network, the convolution kernel is used to extract feature information of the coating defect image on the surface of the spacecraft. Based on the database and the massive new data of coating production, the weight of feature information is adjusted through the channel-space attention mechanism to achieve accurate extraction of features of different types of defects. Step 2: Propose a small sample incremental reinforcement learning algorithm model driven by the attention mechanism, use data expansion to improve model performance, increase the diversity of training data, and at the same time improve the generalization ability of the model and reduce the risk of overfitting. Through random rotation, mirroring, symmetry, blurring, changing brightness, adjusting contrast, changing saturation, and adding Gaussian noise, data expansion is performed on defect categories with small sample sizes and the data set is enriched to achieve a balance among various types of samples. Step 3: According to the method used in step 1, the channel-space attention mechanism is used to evaluate the value of the defect features extracted by the convolution layer after the convolution layer, and a mapping relationship between the strongly correlated features of the coating defects and the defect categories is established; a deep learning defect detection model is built to realize real-time detection of coating defects, and a lightweight module (LM-Block) is designed based on the adaptive ghost convolution module of GhostConv; at the same time, a feature enhancement module (FEM-block) integrating the adaptive ghost convolution module and the fully connected (FC) attention mechanism is designed, and the use of the FC attention mechanism reduces the computational cost, so that the model can detect defects faster and more accurately; using the channel-space pyramid pooling (CSPP) module, features with different focuses are extracted through different feature extraction mechanisms; the above three modules are used to form a coating defect detection model architecture based on efficient adaptive convolution and channel-space pyramid pooling to achieve accurate identification of defects.

2. A thermal control thin film coating defect recognition method based on a multi-dimensional attention mechanism as claimed in claim 1, characterized in that: In step 1, in the constructed convolutional neural network, the input of the convolutional layer is the image of the coating defect on the surface of the spacecraft. There are three layers of convolution, and the convolution kernel size is [3,3]. The input of the model is the sensitive feature F of the coating defect on the surface of the spacecraft. ilter ∈R H×W×C , which means the number of input channels is C and the feature map size is H×W. The relevant mathematical expressions are as follows: F ilter ={x1,x2,…,x c } Where, X i ——The output feature matrix of the i-th convolution kernel; ——The i-th convolution kernel of the k-th channel; ——Feature map of the coating defect on the input spacecraft surface of the i-th channel; B i ——Bias of the i-th convolution kernel; F is the activation function, which can be expressed as follows:

3. A thermal control thin film coating defect recognition method based on a multi-dimensional attention mechanism as claimed in claim 1, characterized in that: In step 1, in the constructed convolutional neural network, the border of the input coating defect feature map is filled with zeros, and the size of the output feature matrix after filling is as follows: Where, s is the sliding step of the convolution kernel; N is the size of the coating defect feature matrix; F is the size of the convolution kernel.

4. A thermal control thin film coating defect recognition method based on a multi-dimensional attention mechanism as claimed in claim 1, characterized in that: In step 1, in the constructed convolutional neural network, in order to prevent gradient explosion and gradient disappearance, the feature matrix needs to be normalized (BN) after extracting the defect features of the spacecraft surface coating. The normalization process is as follows: In the formula, B is the input batch data; M is the number of data; x i ——the i-th data; μ B ——mean value of data B; σ 2 B ——variance of data B; y i ——After normalization, the extracted surface coating defect features of the spacecraft are further compressed through the pooling layer, which reduces the feature dimension while retaining the feature information and reduces the sensitivity of the feature output to distortion. The mathematical expression of the pooling layer is as follows: In the formula, p s ——The output of the pooling layer; Pool——sampling function; ——Features of spacecraft surface coating defects after processing by channel attention mechanism and spatial attention mechanism; P——pooling window size.

5. The method for identifying defects in thermal control thin film coatings based on a multi-dimensional attention mechanism according to claim 1, characterized in that: In step 1, in the constructed convolutional neural network, three fully connected layers are established to process the extracted 256 spacecraft surface coating defect features, and a mapping between the spacecraft surface coating defect features and the defect categories is established. The input of this layer of network is the spacecraft surface coating defect features after value assessment. Each neuron is connected to all neurons in the previous layer to integrate and extract the association between the spacecraft surface coating defect features. There are three fully connected layers in total. The number of neurons in the first two layers is 256 and 32, and the number of neurons in the last layer is 7. The output is expressed as follows: y i =w k A i-1 +b k In the formula, y i ——The output of the neurons in the connection layer; w k , b k ——The weights and biases of the fully connected layer can be updated through back propagation; A i-1 ——The feature vector of the previous layer network.

6. A method for identifying defects in thermal control thin film coatings based on a multi-dimensional attention mechanism as claimed in claim 1, characterized in that: In step 1, the structure of the channel-spatial attention mechanism to implement the weight adjustment mechanism of feature information is as follows: first, the channel dimension is reduced, and the features of multiple channels are associated through a convolution kernel of size [1,1], and the input is X H×W×M train , the output is a single channel feature map X H×W×1 train : X H×W×1 train =f 1*1* (X H×W×M train ) In the formula, f 1*1 ——Convolution kernel of size [1, 1]; *——Convolution operation; X H×W×M train ——Characteristic diagram of spacecraft surface coating defects; X H×W×1 train ——After M channels are associated, they are merged into one channel of spacecraft surface coating defect features with a size of H×W. The maximum pooling (Maxpool) and average pooling (Avgpool) of the channel dimension are performed on the coating defect features of the spacecraft surface to obtain the feature matrix F after maximum pooling max And after average pooling F avg The characteristic matrix of F avg and F max Combined together to get a new feature map F H×W×2 train , and finally pass through the convolution kernel f with size [1, 1] 1*1 The convolution operation obtains the new feature F H×W×1 train The activation function is the same as the channel attention. The processed feature matrix is ​​converted into a normalized coefficient between 0 and 1 through the Sigmoid function to obtain the weight coefficient M of the spatial attention mechanism. S , the weight coefficient M S With the input feature X H ×W×M train Multiplying them together can get the sensitive characteristics of the spacecraft surface coating defects corrected by space attention. The mathematical expression is as follows: F avg =Avgpool(X H×W×1 train ) F max =Maxpool(X H×W×1 train ) F H×W×1 train =f 1*1 *(F H×W×2 train ) M S =Sigmoid(F H×W×1 train ) In the formula, Maxpool, Avgpool——perform maximum pooling and average pooling on the feature map; F avg With F max ——Feature map after average pooling and maximum pooling of the coating defect features on the spacecraft surface; X H×W×1 train ——Single channel features after multi-channel fusion; Refers to associating two feature matrices together; F H×W×2 train ——Dual channel features after correlation; f 1*1 ——Convolution kernel of size [1, 1]; M S ——Normalized spatial attention feature coefficient; ——Defect characteristics of spacecraft surface coating after correction through attention mechanism.

7. A thermal control thin film coating defect recognition method based on a multi-dimensional attention mechanism as claimed in claim 1, characterized in that: In step 2, the small sample incremental reinforcement learning algorithm model driven by the attention mechanism realizes the extraction of deep features of spacecraft surface coating defects through a dual-dimensional attention mechanism. The spacecraft surface coating defect data F ilter After dimensionality reduction through the convolution kernel, the defect feature X of the spacecraft surface coating is obtained. H×W×M tratin ,The channel attention mechanism and the spatial attention mechanism are used to realize the feature analysis of the surface coating defects of the spacecraft, and the dimensions of the space and channel are compressed respectively, and the feature vectors are normalized.

8. The method for identifying defects in thermal control thin film coatings based on a multi-dimensional attention mechanism according to claim 1, characterized in that: In step 3, the adaptive ghost convolution module of GhostConv first performs a convolution operation on the given input data using some channels to generate an intermediate feature map, then obtains a part of the output feature map from the intermediate feature map through low-cost linear operations, and then obtains the final output feature map by concatenating it with the intermediate feature map. Specifically, the first convolution operation is used to generate Y′∈R of M intrinsic feature maps. H×W′×M : Y′=X*Y′ In the formula, Y′∈R C×N×K×M ——Convolution filter; M<N means that the convolution filter is less than the original convolution block. In order to obtain the final N output feature maps, a series of cheap linear operations are required on Y′ to generate Ghost features according to the following function: where y′ i is the i-th intrinsic feature map of Y′, Φ i,j Applicable to the j-th (except the last) linear operation to generate the j-th Ghost feature map, and the last Φ i,s In order to maintain the identity mapping of the intermediate feature map, by using: We can get N = M × S feature maps Y = [y 11 ,y 22 …, y ms ] As the final output feature map of the GhostConv operation, the Φ operation is a linear operation, and the computational complexity of linear operations is much lower than that of ordinary convolution operations. GhostConv is a lighter convolution layer than Conv.

9. The method for identifying defects in thermal control thin film coatings based on a multi-dimensional attention mechanism according to claim 1, characterized in that: In step 3, the details of the FC attention mechanism are as follows: initially, the receptive field of the neuron is increased by using a downsampling operation using an average pool, and then a small convolution filter (1×1 convolution) is used. In order to capture global information, an attention map with a global receptive field is generated through two fully connected layers to capture global information. Finally, an activation function is used to obtain the result.

10. The method for identifying defects in thermal control thin film coatings based on a multi-dimensional attention mechanism according to claim 1, characterized in that: In step 3, the channel-spatial pyramid pooling (CSPP) module consists of two parts: a spatial feature mechanism and a channel feature extraction module. The spatial feature mechanism uses coordinated attention technology to capture features at different spatial positions in the image. The channel feature extraction module focuses on extracting features from different channels in the defect image. Secondly, by embedding the coordinated attention mechanism, the feature extraction capability of the model is enhanced in the spatial dimension. This module is distinguished from the previous attention mechanism by using a global pooling operation, which decomposes the feature map into a one-dimensional feature map in the horizontal and vertical directions. The specific operation is defined as follows: Among them, c represents the number of input channels, the height is H, and the width is w. This operation can help obtain the position information in space. The constructed one-dimensional feature map is sequentially operated as follows along the spatial dimension: f=δ(F1([z h ,z w ])), Where [·,·] represents the concatenation operation along the spatial dimension, and δ represents the nonlinear activation function. Next, a series of convolution operations are performed to calculate the weight scores along the height and width directions, as shown in the formula: g h =σ(F h (f h )) g w =σ(F w (f w )) Among them, F h and F w represents a 1×1 convolution, σ represents the sigmoid activation function, and finally, the attention score is multiplied by the input feature map to get the final output. The overall formula is defined as

Citation Information

Cited By

  • Article packaging defect detection method and system

    CN119762488A

  • A method and system for detecting defects in item packaging

    CN119762488B

  • Steel surface defect identification method and device, computer equipment and storage medium

    CN120164082A

  • Steel Surface Defect Identification Method, Device, Computer Equipment and Storage Medium

    CN120164082B

  • Anti-surge resistor production control method

    CN120578134A