A defect detection method for composite wind turbine blades based on semantic segmentation

Through a semantic segmentation method, combined with the ResNeXt50 network and dual self-attention CPAM module, the automated and accurate detection of wind power blade defects is realized, and the subjectivity and complexity of manual analysis in ultrasonic non-destructive testing is solved, and the detection efficiency and accuracy are improved.

CN117218101BActive Publication Date: 2025-08-22HANGZHOU DIANZI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311261096.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-27
Publication Date
2025-08-22
Estimated Expiration
2043-09-27

AI Technical Summary

Technical Problem

The existing ultrasonic non-destructive testing technology has complex images in wind power blade defect detection, requiring manual analysis, and has subjectivity and human resources dependence.

Method used

Using a semantic segmentation method, combined with OpenCV technology, the ResNeXt50 network is used as the backbone to build an encoder and decoder, and a dual self-attention CPAM module is introduced for feature extraction and fusion, and wind power blade defects are automatically identified through semantic segmentation.

Benefits of technology

The automated and precise analysis of wind power blade defects has been realized, manual participation has been reduced, detection efficiency and accuracy have been improved, and subjective impact has been reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117218101B_ABST
    Figure CN117218101B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for defect detection of composite wind turbine blades based on semantic segmentation. The present invention uses ultrasonic nondestructive testing equipment to collect defect detection images of industrial wind turbine blades and uses a semantic segmentation network to automatically segment the defect areas on the wind turbine blades. The segmented image assigns different colors to different defect locations in the image, separates different color areas using OpenCV correlation functions, and performs specific image analysis using connected domain analysis and contour detection. The semantic segmentation network provided in the present invention has a good segmentation effect for ultrasonic nondestructive testing of wind turbine blades, thereby enabling automatic analysis of defect features. The introduction of artificial intelligence and computer vision technology into the field of industrial nondestructive testing for auxiliary analysis greatly reduces manual participation, reduces the subjectivity of defect analysis, and improves analysis efficiency and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of wind turbine blade detection, and in particular to a method for detecting defects in composite material wind turbine blades based on semantic segmentation. Background Art

[0002] Modern society has an enormous demand for energy, especially electricity. Wind energy, a green and renewable energy source, has become humanity's preferred solution to the growing shortage of traditional energy, thanks to its advantages such as ease of development, unlimited availability, and pollution-free operation. Wind turbines are the devices that generate wind power, consisting of blades, a nacelle, and a tower. The blades are responsible for bearing wind loads and transmitting mechanical energy to the nacelle, making them a crucial component of wind turbines operating under harsh conditions. To achieve large-scale, lightweight, and low-cost materials, fiber-reinforced composites (FRCs), consisting of fibers and a matrix, have become the mainstream material. However, defects caused by the production process of these composites include inclusion defects, air gap defects (delamination, adhesive deficiency, cracks), fat accumulation, pores, bubbles, wrinkles, dry spots, dry fibers, and cracks. These defects directly affect the quality of the raw materials used for wind turbine blades, and thus the proper operation of wind turbines. Therefore, nondestructive testing (NDT) is often required in industry to ensure material quality and safety.

[0003] Ultrasonic non-destructive testing technology is currently the most widely used technical means for wind turbine blade defect detection. Ultrasonic non-destructive testing equipment uses an ultrasonic probe to transmit a wave source to the object being tested, and then obtains an echo based on the propagation and reflection of the ultrasonic wave in the object being tested. The testing equipment then analyzes the echo to obtain an ultrasonic detection image, thereby obtaining information on the type, size and location of the defect. However, ultrasonic non-destructive testing images are often more complex and often require specialized personnel to analyze.

[0004] Semantic segmentation, a classic computer vision problem, has been a research hotspot in recent years. It identifies images at the pixel level and labels the category of each pixel, typically assigning different colors to the predicted image, thereby segmenting the image into regions with distinct semantic information. Introducing this technology into the field of nondestructive testing to process ultrasonic inspection images can automatically segment defective areas within the image and analyze them using image processing techniques. This allows for more accurate analysis of defective areas, eliminating reliance on the experience of inspectors, reducing the influence of subjective elements in inspection and analysis, and saving manpower. Summary of the Invention

[0005] The purpose of this invention is to propose a wind turbine blade composite material defect detection method based on semantic segmentation and OpenCV.

[0006] The present invention provides a composite material wind turbine blade defect detection method based on semantic segmentation, comprising the following steps:

[0007] Step 1: Use ultrasonic non-destructive testing equipment to inspect wind turbine blades and build a labeled dataset.

[0008] Step 2: Construct a semantic segmentation module. The semantic segmentation module includes an encoder, a decoder, and an attention module. The encoder uses the ResNeXt50 network as the backbone extraction network. The ResNeXt50 network is equipped with five different ResnextBlock blocks. The feature layers output by multiple ResnextBlock blocks are respectively input to the corresponding attention module. The feature layers before and after the input to the attention module are summed to obtain the target feature layer. The decoder sequentially upsamples and skips the feature fusion of each target feature layer. Each upsampling is preceded by an attention module. The attention module includes a CAM attention layer and a PAM attention layer. The feature map input to the attention module first passes through a 3×3 convolution layer before entering the CAM attention layer. The output of the CAM attention layer is processed with dropout and 1×1 convolution before entering the PAM attention layer. The output of the PAM attention layer is then subjected to two dropsout processes and 1×1 convolutions to obtain the final output of the dual self-attention CPAM module.

[0009] Step 3: Use the data set amplified in step 2 to train the semantic segmentation module constructed in step 3; the trained semantic segmentation module processes the ultrasonic data collected from the wind turbine blade under test by the segmentation image analysis module to obtain a segmented image.

[0010] Step 4: Identify the segmented image to obtain the location and size of the defect in the wind turbine blade being tested.

[0011] Preferably, the data set in step one is enhanced and amplified by a data enhancement module; the amplified image is amplified by gamma change, blurring the original image, adding noise, translation and flipping, rotation, contrast and brightness adjustment, and saturation adjustment.

[0012] Preferably, during the augmentation process, a random function is first used to generate a random probability P for the original image. When P is greater than a preset probability threshold P0, the original image is blurred, noise is added, and translation and flipping are performed, with the probability of horizontal or vertical flipping both being 0.5. For the image that has undergone the blurred, noise-added, translation, and flipping processes, a random function is then used to randomly generate a probability P'. When P' is greater than the preset probability threshold P0, the image brightness, saturation, and contrast are adjusted.

[0013] As a preference, in the CAM attention layer, the input feature map x∈R B×C×H×WAfter inputting the CAM attention layer, the matrix Q of dimension B×C×HW is obtained through dimension conversion, and the matrix K of dimension B×HW×C is obtained through dimension conversion and transposition. The matrix V of dimension B×C×HW is obtained through dimension conversion. The inner product of matrix Q and matrix K is obtained to obtain the matrix E of dimension B×C×C. The corresponding element of each position of matrix E is subtracted from the maximum value of the last dimension of matrix E to reconstruct matrix E. This makes it possible for each element of matrix E to not have too large a value and avoids numerical overflow of exponent. The reconstructed matrix E is passed through the softmax function to obtain the attention matrix A. Multiply the attention matrix A with the matrix V, multiply the multiplication result with the learning parameter β, and then multiply it with the input feature map x∈R B×C×H×W The final output features are obtained by adding them together. B is the batch size, C is the number of channels, H is the height, and W is the width. The learning parameter β is initially 0 and gradually increases during learning.

[0014] As a preference, in the PAM attention layer, the input feature map x∈R B×C×H×W After inputting into the PAM attention layer, a set of average pooling of different scales is performed to obtain a set of downsampled features, and then all the obtained features are stacked in the channel dimension to obtain the feature map F∈R B×C×M ; Input feature map x∈R B×C×H×W After dimension conversion and transposition, the inner product is performed with the transposed feature map F to obtain a matrix of dimension B×H×W×M; the matrix is ​​then passed through the softmax function to obtain the attention matrix E; the attention matrix E is transposed and the inner product is performed with the transposed feature map F, and the result is multiplied by the learning parameter α and then multiplied with x∈R B×C×H×W Add them together to get the output of the PAM attention layer.

[0015] Preferably, in step three, the training cycle is 100; during the training process, the Adam optimizer is used for optimization, the momentum is set to 0.9, the initial learning rate is set to 0.0001, and the loss function is the cross entropy loss function.

[0016] Preferably, in step 4, the separated images are subjected to median filtering denoising in sequence, and then the area and center point coordinates of the connected domain are extracted through median filtering denoising, grayscale conversion, binarization conversion, dilated convolution operation, and connected domain analysis.

[0017] The advantages and beneficial effects of the present invention are:

[0018] The semantic segmentation network provided in the present invention has a good segmentation effect for ultrasonic non-destructive testing of wind turbine blades, thereby enabling automatic analysis of defect characteristics; introducing artificial intelligence and computer vision technology into the field of industrial non-destructive testing for auxiliary analysis greatly reduces manual participation, reduces the subjectivity of defect analysis, and improves analysis efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is the workflow diagram of the present invention.

[0020] Figure 2 This is a diagram of the process of constructing the data set in the present invention.

[0021] Figure 3 This is a diagram showing the effect of data enhancement in step 2 of the present invention.

[0022] Figure 4 Schematic diagram of the network structure of the semantic segmentation module in the present invention.

[0023] Figure 5 This is the structural diagram of the dual self-attention CPAM module in the present invention.

[0024] Figure 6 This is the CAM attention layer structure diagram in the present invention.

[0025] Figure 7 This is the structural diagram of the PAM attention layer in the present invention.

[0026] Figure 8 Schematic diagram of group convolution in the ResNeXt50 network of the present invention.

[0027] Figure 9 This is a diagram showing the semantic segmentation effect of the semantic segmentation module in the present invention.

[0028] Figure 10 This is a workflow diagram of the segmentation image analysis module in the present invention.

[0029] Figure 11 Schematic diagram of connected domain analysis of the segmented image analysis module in the present invention.

[0030] Figure 12 Schematic diagram of defect profile analysis obtained in the present invention. DETAILED DESCRIPTION

[0031] The present invention will be described below with reference to the accompanying drawings and specific examples so that the purpose and effects of the present invention will become more clear. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0032] like Figure 1 As shown, a composite material wind turbine blade defect detection method based on semantic segmentation includes the following steps:

[0033] Step 1: Figure 2As shown in the figure, a dataset was constructed. Ultrasonic data was collected using ultrasonic nondestructive testing equipment on multiple different wind turbine blades (some of which had surface or internal defects). Images of wind turbine blade composite defects were obtained. Labeled using LabelMe, these images were labeled and labeled files were generated. The original images and label files were mapped one-to-one to form a semantic segmentation dataset. This dataset was then trained on a semantic segmentation network to generate a semantic segmentation model, which can be used to segment images from wind turbine blade composite nondestructive testing. Figure 2 In the figure, part (a) is the side view of the wind turbine blade workpiece, part (b) is the ultrasonic non-destructive testing image of the pore defect, part (c) is the annotated image of the ultrasonic non-destructive testing of the pore defect, part (d) is the top view of the wind turbine blade workpiece, part (e) is the ultrasonic non-destructive testing image of the surface defect, and part (f) is the annotated image of the ultrasonic non-destructive testing of the surface defect.

[0034] Step 2: Use the data enhancement module to enhance the dataset.

[0035] like Figure 3 As shown, the original image in the data set is subjected to gamma changes, original image blurring, noise addition, translation and flipping, rotation, contrast and brightness adjustment, and saturation adjustment to obtain an amplified image. The amplified image and the original image are merged into the data set, which expands the data volume of the data set and improves the diversity of the images in the data set. During the amplification process, a random probability P is first generated for the original image using a random function. When P is greater than a preset probability threshold P0, the original image is blurred, noise is added, and translation and flipping are performed, where the probability of horizontal or vertical flipping is 0.5. For the image that has been blurred, noise added, translated, and flipped, a random function is used to randomly generate a probability P'. When P' is greater than the preset probability threshold P0, the image brightness, saturation, and contrast are adjusted. The image brightness, saturation, and contrast are randomly adjusted within the adjustment range (0 to 1 in this embodiment). At the same time, the adjustments to brightness, saturation, and contrast can be randomly superimposed.

[0036] Figure 3 In the figure, part (a) is the non-destructive testing image of the pore defect, part (b) is the annotated image of the non-destructive testing of the pore defect, part (c) is the image after the non-destructive testing data enhancement processing of the pore defect, and part (d) is the image after the annotated data enhancement processing of the non-destructive testing of the pore defect.

[0037] In this embodiment, the process of gamma change is as follows: first, the pixel values ​​are normalized, and then the exponent is taken so that the grayscale value of the output image is exponentially related to the grayscale value of the input image. This is accomplished by the LUT function in OpenCV, which maps the pixels of the original image one by one through a mapping table, thereby enhancing the image contrast and making the details clearer.

[0038] The process of blurring the original image is to use the cv2.blur function to perform mean filtering on the image.

[0039] The process of adding noise is to add salt and pepper noise by randomly setting some pixels to 0 or 255.

[0040] The translation and inversion process is as follows: specify the maximum moving distance of all target boxes in the up, down, left, and right directions, and use the cv2.warpAffine function to achieve translation; use the cv2.flip function to achieve horizontal or up and down flipping of the image.

[0041] The rotation processing process is as follows: randomly generate a rotation angle of 0-360° and convert it into radians through the random function, and then realize the image coordinate rotation through the rotation transformation formula.

[0042] The process of contrast, brightness and saturation adjustment is as follows: Contrast adjustment converts the image to HSV format and first selects the median of all brightness. When increasing contrast, reduce the brightness value smaller than the median and increase the brightness value larger than the median; when reducing contrast, increase the brightness value smaller than the median and reduce the brightness value larger than the median, so that all brightness values ​​are close to the median; Brightness adjustment converts the image to HLS format and changes the brightness of the image by adjusting the value of the L channel in the image. Directly add or subtract a fixed value to each pixel in the RGB color space; Convert the image to HSV format and change the saturation of the image color by adjusting the S value in the image. Converting the image to HSV format is achieved through the cv2.cvtColor function.

[0043] Step 3: Build the semantic segmentation module ResNeXt-CPAM-Unet.

[0044] like Figure 4 As shown in the figure, the semantic segmentation module includes an encoder, a decoder, and an attention module. The encoder uses a ResNeXt50 network as the backbone extraction network. The ResNeXt50 network consists of five different ResnextBlock blocks. The feature layers output by the five ResnextBlock blocks are respectively fed into five attention modules. The feature layers before and after the attention module are summed to obtain the target feature layer. The decoder performs four upsampling and skip connection feature fusion on the five target feature layers. The final output layer is the output feature map. In addition, an attention module is applied before each upsampling to obtain multi-scale feature connections and richer abstract semantic information.

[0045] As shown in Table 1, the ResNeXt50 and ResNet50 used in this embodiment are similar in structure, with a total of 5 convolution modules, of which the conv1 module of the two is the same. In the last four convolution modules, the number of convolution kernels in the first two convolution layers of each ResnextBlock block of ResNeXt50 is twice that of ResNet50, and the third convolution layer is the same; at the same time, the middle layer 3×3 convolution ResNet50 uses group convolution with group=32. Figure 8 As shown in the figure, group convolution uses the idea of ​​division and integration to split a high-dimensional convolution into multiple identical low-dimensional convolutions. After the convolution operation, the multiple features of the group convolution are fused. Using group convolution reduces the number of parameters compared to the original ResNet50 network structure and improves network performance.

[0046] Table 1 Comparison between ResNet50 and ResNext50

[0047]

[0048] The attention module is a dual self-attention CPAM module with a residual structure; specifically, the dual self-attention CPAM module includes a CAM attention layer and a PAM attention layer; the former focuses on mining the spatial dependency between feature maps and aggregates and updates the position features of the feature maps through weighted summation; the latter focuses on mining the channel dependency between feature maps and uses the weight of each channel map to update the channel information.

[0049] like Figure 5 As shown in the figure, the dual self-attention CPAM module adopts the attention mechanism of serial connection of CAM and PAM. The input feature map first passes through a 3×3 convolution layer before entering the CAM attention layer to obtain more abstract semantic information and prevent overfitting problems. The output result of the CAM attention layer is processed by Dropout and 1×1 convolution before inputting into the PAM attention layer. The output result of the PAM attention layer is then processed by two Dropout processes and 1×1 convolutions to obtain the final output result of the dual self-attention CPAM module.

[0050] like Figure 6 As shown, the working process of the CAM attention layer is as follows: Input feature map x∈R B×C×H×WAfter inputting the CAM attention layer, the matrix Q of dimension B×C×HW is obtained through dimension conversion, and the matrix K of dimension B×HW×C is obtained through dimension conversion and transposition. The matrix V of dimension B×C×HW is obtained through dimension conversion. The inner product of matrix Q and matrix K is obtained to obtain the matrix E of dimension B×C×C. The corresponding element of each position of matrix E is subtracted from the maximum value of the last dimension of matrix E to reconstruct matrix E. This makes it possible for each element of matrix E to not have too large a value and avoids the overflow of the exponential value. The reconstructed matrix E is passed through the softmax function to obtain the attention matrix A, which is actually the cosine similarity between matrix Q and matrix K. The attention matrix A is compared with the input feature map x∈R B×C×H×W The matrix V with dimensions B×C×HW obtained by dimensional conversion is multiplied, and the multiplication result is multiplied by the learning parameter β (the initial value of the β parameter is 0, and the weight gradually increases through learning) and then multiplied by the input feature map x∈R B ×C×H×W Add them together to get the final output features. B is Batchsize, i.e. batch size; C is Channels, i.e. number of channels; H is height; W is width.

[0051] like Figure 7 As shown, the working process of the PAM attention layer is as follows: Input feature map x∈R B×C×H×W After inputting into the PAM attention layer, a set of average pooling of different scales is performed to obtain a set of downsampled features, and then all the obtained features are stacked in the channel dimension to obtain the feature map F∈R B×C×M , thereby reducing the amount of calculation; the input feature map x∈R B×C×H×W After dimension conversion and transposition, the inner product is performed with the transposed feature map F to obtain a matrix of dimension B×H×W×M; the matrix is ​​then passed through the softmax function to obtain the attention matrix E; the attention matrix E is transposed and the inner product is performed with the transposed feature map F, and the result is multiplied by the learning parameter α (the initial value of the α parameter is 0, and it gradually gets a larger weight through learning) and then multiplied by x∈R B×C×H×W Add together to get the final output features.

[0052] Step 4: Use the dataset expanded in step 2 to train the semantic segmentation module constructed in step 3; the training cycle is 100; during the training process, the Adam optimizer is used for optimization, the momentum is set to 0.9, the initial learning rate is set to 0.0001, and the loss function is the cross entropy loss function.

[0053] To evaluate the segmentation accuracy of wind turbine blade nondestructive testing images, we used intersection over union (IoU) and category pixel accuracy (CPA) as segmentation evaluation metrics. Evaluations were performed every five training epochs and the results were saved. The same random number seed was used to generate the same random number sequence during training for different models, thus avoiding network fluctuations caused by varying random parameters. Table 2 shows a comparison of the IoU and CPA metrics for the semantic segmentation module proposed in this paper compared to several other segmentation algorithms.

[0054] Table 2 Comparison of segmentation algorithm indicators

[0055]

[0056] In Table 2, ResNeXt-CPAM-Unet refers to the semantic segmentation module provided by this embodiment; ResNeXt-CBAM-Unet refers to a network model in which the backbone of the Unet network is replaced with ResNeXt and the CBAM attention mechanism is added to the feature fusion part; ResUnet-CBAM refers to a network model in which the backbone of the Unet network is replaced with Resnet and the CBAM attention mechanism is added to the feature fusion part; ResUnet-CPAM refers to a network model in which the backbone of the Unet network is replaced with Resnet and the CPAM attention mechanism is added to the feature fusion part; and ResUnet-CoordAttention refers to a model in which the backbone of the Unet network is replaced with Resnet and the CoordAttention attention mechanism is added. As can be seen from Table 2, the semantic segmentation model ResNeXt-CPAM-Unet provided by this embodiment achieves the best defect image segmentation results.

[0057] like Figure 9 As shown, the semantic segmentation model obtained in this embodiment can achieve good segmentation effect for defect images. Figure 9 In the figure, (a) is the ultrasonic nondestructive testing image of pores, (b) is the ultrasonic nondestructive testing image of surface defects, (c) is the semantic segmentation result of the ultrasonic nondestructive testing image of pores, and (d) is the semantic segmentation result of the surface defect nondestructive testing image.

[0058] Step 5: Build the segmentation image analysis module.

[0059] For the segmented images obtained by the semantic segmentation model, different types of defects are separated and saved according to different colors; Figure 10As shown in the figure, median filtering is first performed through the cv2.medianBlur function to reduce noise, and then grayscale conversion and binarization are performed through the cv2.cvtColor and cv2.threshold functions to obtain a binary image. After the dilated convolution operation, the connected domain analysis is performed through the cv2.connectedComponentsWithStats function to obtain the area and center point coordinates of the connected domain. The results of the connected domain analysis are shown in the figure. Figure 11 shown.

[0060] Multiple defects of the same type will also be assigned different colors and statistically output separately; Figure 12 As shown, the above binary image is subjected to contour detection and analysis using the cv2.findContours function to obtain the image perimeter and aspect ratio. In addition, the above-mentioned size data are all pixel sizes. The actual size can be obtained by combining the image resolution and the original image scale.

Claims

1. A composite material wind turbine blade defect detection method based on semantic segmentation, characterized by: The following steps are involved: Step 1: Use ultrasonic non-destructive testing equipment to inspect wind turbine blades and build a labeled dataset; Step 2: Construct a semantic segmentation module; the semantic segmentation module includes an encoder, a decoder, and an attention module; the encoder uses the ResNeXt50 network as the backbone extraction network; the ResNeXt50 network is provided with five different ResnextBlock blocks; the feature layers output by multiple ResnextBlock blocks are respectively input into the corresponding attention modules; the feature layers before and after the input of the attention module are summed to obtain the target feature layer; the decoder sequentially upsamples and skips the feature fusion of each target feature layer; each upsampling is preceded by an attention module; The attention module is a dual self-attention CPAM module with a residual structure; the dual self-attention CPAM module includes a CAM attention layer and a PAM attention layer; the feature map of the input attention module first passes through a The convolution layer of the CAM attention layer is processed by Dropout and After convolution processing, it is input into the PAM attention layer; the output of the PAM attention layer is then processed twice by Dropout and Convolution obtains the final output of the dual self-attention CPAM module; Step 3: Use the expanded dataset to train the semantic segmentation module constructed in step 2; The trained semantic segmentation module processes the ultrasonic data collected from the wind turbine blade under test by the segmentation image analysis module to obtain a segmented image; Step 4: Identify the segmented image to obtain the location and size of the defect in the wind turbine blade being tested.

2. The method for defect detection of composite material wind turbine blades based on semantic segmentation according to claim 1, characterized in that: The dataset in step 1 is enhanced and amplified through the data enhancement module; the amplified image is amplified by gamma change, blurring the original image, adding noise, translation and flipping, rotation, contrast and brightness adjustment, and saturation adjustment.

3. The method for defect detection of composite material wind turbine blades based on semantic segmentation according to claim 2, characterized in that: During the amplification process, a random function is first used to generate a random probability P for the original image. When P is greater than the preset probability threshold P0, the original image is blurred, noise is added, and translation and flipping are performed, where the probability of horizontal or upside-down flipping is 0.

5. For the image that has been blurred, noise is added, translation and flipping are performed, a random function is used to randomly generate a probability P'. When P' is greater than the preset probability threshold P0, the image brightness, saturation and contrast are adjusted.

4. The method for defect detection of composite material wind turbine blades based on semantic segmentation according to claim 1, characterized in that: In the CAM attention layer, the input feature map After inputting the CAM attention layer, the dimension is converted to The matrix Q is transformed and transposed into The matrix K is converted into a matrix with a dimension of The inner product of matrix V, matrix Q and matrix K gives the dimension Matrix E, and then use the maximum value of the last dimension of matrix E minus the corresponding element of each position of matrix E to reconstruct matrix E, which makes each element of matrix E not have too large a value, avoiding the overflow of the exponent; the reconstructed matrix E is The attention matrix A is obtained after the function; the attention matrix A is multiplied by the matrix V, and the multiplication result is equal to the learning parameter After multiplication, it is combined with the input feature map Add together to get the final output features; B is the batch size, C is the number of channels, H is the height, and W is the width; learning parameters The initial value of is 0 and gradually increases through learning.

5. The method for defect detection of composite material wind turbine blades based on semantic segmentation according to claim 1, characterized in that: In the PAM attention layer, the input feature map After inputting into the PAM attention layer, a set of average pooling of different scales is performed to obtain a set of downsampled features, and then all the obtained features are stacked in the channel dimension to obtain the feature map ; Input feature map After dimension conversion and transposition, the inner product is performed with the transposed feature map F to obtain the dimension The matrix of The attention matrix E is obtained after the function; the inner product of the transposed feature map F and the transposed attention matrix E is obtained. After multiplication, Add them together to get the output of the PAM attention layer.

6. The method for defect detection of composite material wind turbine blades based on semantic segmentation according to claim 1, characterized in that: In step 3, the training cycle is 100; during the training process, the Adam optimizer is used for optimization, the momentum is set to 0.9, the initial learning rate is set to 0.0001, and the loss function is the cross entropy loss function.

7. The method for defect detection of composite material wind turbine blades based on semantic segmentation according to claim 1, characterized in that: In step 4, the separated images are subjected to median filtering denoising in sequence, and then the area and center point coordinates of the connected domain are extracted through median filtering denoising, grayscale conversion, binarization conversion, dilated convolution operation, and connected domain analysis.