Wind turbine blade defect detection method based on improved RT-DETR

By improving the RT-DETR model and combining displacement reparameterized convolution, dynamic hyperbolic tangent normalization, and context anchor attention, the problem of identifying minute defects in complex backgrounds in wind turbine blade defect detection was solved, achieving high-precision and robust detection results.

CN121639694BActive Publication Date: 2026-05-08SHANDONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANDONG UNIV OF SCI & TECH
Filing Date
2026-02-05
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Defect detection in wind turbine blades faces the challenge of identifying minute defects in complex environments. Traditional methods are inefficient and pose safety hazards, and are difficult to maintain robustness and high accuracy under high-altitude aerial photography conditions.

Method used

An improved RT-DETR model is adopted, and the displacement reparameterized convolution SWRepBlock module, DyT-AIFI module and CAA-HSFPN module are introduced to enhance multi-scale feature extraction and robustness. The detection capability is improved by dynamic hyperbolic tangent normalization and context anchor attention.

Benefits of technology

It significantly improves the ability to detect minute damage against the background of complex surface textures on wind turbine blades, and can effectively identify multiple types of defect features such as cracks, erosion, and oil leaks, thereby improving detection accuracy and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121639694B_ABST
    Figure CN121639694B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of target detection, and discloses a wind turbine blade defect detection method based on an improved RT-DETR. The method introduces a SWRepBlock module in the backbone network, thereby effectively solving the problem that a fixed receptive field of a traditional network cannot adaptively extract target features of different scales. In addition, the method replaces an AIFI module in an encoder with a DyT-AIFI module to improve the semantic understanding effect of long-distance feature interaction. In addition, the method introduces a CAA-HSFPN module in the encoder, thereby effectively solving the problem of a semantic gap of a traditional feature pyramid and insufficient distinction of feature importance. The wind turbine blade defect detection method can not only significantly improve the detection capability of small damages on a complex surface texture background of a wind turbine blade, but also effectively identify multiple types of defect features such as cracks, erosion and oil leakage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of target detection technology, specifically relating to a method for detecting defects in wind turbine blades based on an improved RT-DETR. Background Technology

[0002] In wind turbine blade defect detection, the large size of the blades and their installation at high altitudes or in remote areas create complex detection environments and significant variations in shooting distance, resulting in noticeable differences in the scale of defects in the images. Furthermore, surface defects such as cracks and erosion are often small in size and occupy a limited area, easily leading to feature blurring and loss of detail. In addition, in blade images captured by drones, defect areas are often highly similar to the background textures and stains on the blade surface, increasing the difficulty of identification. Moreover, drones are prone to shaking and blurring during flight, and the blades themselves generate motion blur while in operation, further reducing image clarity and exacerbating the uncertainty of detection.

[0003] Secondly, the challenges posed by environmental and application requirements cannot be ignored. Wind turbine blades are exposed to extreme outdoor environments year-round, affected by wind, rain, snow, ultraviolet radiation, changes in sunlight, and weather conditions, leading to a decline in the visibility of defect features and the stability of image quality. Simultaneously, defect detection often requires a balance between timeliness and high accuracy to achieve early fault diagnosis and preventative maintenance. However, traditional manual inspection methods are inefficient and pose safety hazards, while new detection technologies face constraints such as equipment cost, environmental noise interference, and signal processing complexity. These factors collectively limit the performance breakthrough in wind turbine blade defect detection, especially in the early detection of minute defects.

[0004] Defect detection in wind turbine blades, as an important research direction at the intersection of energy engineering and computer vision, has made significant progress in recent years, but also faces many challenges. Traditional methods include manual visual inspection, acoustic emission detection, vibration signal analysis, ultrasonic testing, and infrared thermal imaging, but each has its limitations: manual visual inspection relies on experience and carries safety risks; acoustic emission detection is limited by noise interference and cost; vibration signal analysis lacks accuracy in detecting microcracks; ultrasonic testing involves complex signal processing; and infrared thermal imaging has limited ability to identify defect types and depth. With the development of deep learning, image detection methods based on machine vision and UAVs have gradually become a research hotspot. However, wind turbine blade images contain a large number of micro-defects with extremely small pixel proportions, inconspicuous features, and are easily masked by complex backgrounds, making them prone to missed or false detections.

[0005] Therefore, a detection method is needed to identify minute defect features against a background of complex blade surface texture. Specifically, such a method must not only possess the ability to extract and fuse multi-scale features to simultaneously capture shallow texture details and deep semantic information, but also maintain robustness under interference factors such as changes in perspective caused by aerial photography, differences in lighting, fluctuations in weather conditions, and blade surface contamination. Furthermore, in practical industrial applications, the algorithm must balance detection accuracy and computational efficiency, and be adaptable to diverse forms of different defect types, such as cracks, erosion, dirt, and oil leaks, thereby providing reliable technical support for the safe and stable operation and preventative maintenance of wind turbines. Summary of the Invention

[0006] The purpose of this invention is to propose a wind turbine blade defect detection method based on an improved RT-DETR. This method balances detection accuracy and computational efficiency, and can not only identify small target features in complex backgrounds, but also maintain robustness under interference factors such as changes in viewing angle, differences in illumination, fluctuations in meteorological conditions, and contamination on the blade surface.

[0007] To achieve the above objectives, the present invention adopts the following technical solution:

[0008] The wind turbine blade defect detection method based on the improved RT-DETR includes the following steps:

[0009] Step 1. Obtain images of wind turbine blade defects and construct a dataset for wind turbine blade defect detection;

[0010] Step 2. Build the improved RT-DETR model, which includes a backbone network, encoder, decoder and detector head;

[0011] The improved RT-DETR model is obtained by making the following improvements to the original RT-DETR model: introducing a displacement reparameterized convolution SWRepBlock module into the backbone network; replacing the AIFI module in the encoder with a DyT-AIFI module, which is obtained by replacing the original layer normalization module of the AIFI module with a dynamic hyperbolic tangent normalization module; and introducing a CAA-HSFPN module based on context anchor attention into the encoder.

[0012] Step 3. Use the dataset constructed in Step 1 to train the improved RT-DETR model to obtain the trained model;

[0013] Step 4. Using the trained model obtained in Step 3, perform defect detection on the images of wind turbine blades.

[0014] Furthermore, based on the above-mentioned wind turbine blade defect detection method based on improved RT-DETR, this invention also proposes a computer device, which includes a memory and one or more processors;

[0015] The memory stores executable code, and when the processor executes the executable code, it implements the steps of the wind turbine blade defect detection method based on the improved RT-DETR mentioned above.

[0016] The present invention has the following advantages:

[0017] As described above, this invention discloses a wind turbine blade defect detection method based on an improved RT-DETR. This method introduces a displacement-reparameterized convolutional SWRepBlock module into the backbone network. The SWRepBlock module, based on displacement-aware low-rank convolution decomposition technology, expands the receptive field during the training phase using a multi-branch structure to capture multi-scale semantic information. During the inference phase after training, it is fused into a single convolutional layer (equivalent convolutional layer) through structural reparameterization to maintain computational efficiency, thus effectively solving the problem that traditional networks with fixed receptive fields struggle to adaptively extract target features at different scales. Furthermore, this invention replaces the AIFI module in the encoder with a DyT-AIFI module, which preserves channel statistical distribution information through a hyperbolic tangent function and enhances the modeling ability for complex nonlinear feature distributions by combining a learnable scaling factor, thereby improving the semantic understanding of long-distance feature interactions. Furthermore, the method of this invention introduces a CAA-HSFPN module into the encoder. This module integrates a context anchor attention mechanism, guiding the adaptive alignment and selective fusion of high-level semantics and low-level geometric details through explicit attention weights. This effectively solves the problems of semantic gap and insufficient feature importance differentiation in traditional feature pyramids. The wind turbine blade defect detection method proposed in this invention not only significantly improves the detection capability of minute damage against the background of complex surface textures of wind turbine blades, but also effectively identifies multiple types of defect features such as cracks, erosion, and oil leaks. Attached Figure Description

[0018] Figure 1 This is a flowchart of a wind turbine blade defect detection method based on an improved RT-DETR in an embodiment of the present invention.

[0019] Figure 2 This is a network structure diagram of the improved RT-DETR model in an embodiment of the present invention.

[0020] Figure 3 This is a flowchart illustrating the signal processing in the SWRepBlock module in an embodiment of the present invention.

[0021] Figure 4The signal processing flow in the LoRA decomposition path and auxiliary convolution path of the RLKConv module. Figure 1 .

[0022] Figure 5 The signal processing flow in the LoRA decomposition path and auxiliary convolution path of the RLKConv module. Figure 2 .

[0023] Figure 6 This is a flowchart illustrating the signal processing in the DyT-AIFI module in an embodiment of the present invention.

[0024] Figure 7 This is a flowchart illustrating the signal processing in the CAA-HSFPN module in an embodiment of the present invention.

[0025] Figure 8 The specific results obtained by using the method of the present invention for defect detection of wind turbine blades are shown below. Figure 1 .

[0026] Figure 9 The specific results obtained by using the method of the present invention for defect detection of wind turbine blades are shown below. Figure 2 .

[0027] Figure 10 The specific results obtained by using the method of the present invention for defect detection of wind turbine blades are shown below. Figure 3 .

[0028] Figure 11 The specific results obtained by using the method of the present invention for defect detection of wind turbine blades are shown below. Figure 4 . Detailed Implementation

[0029] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:

[0030] Example 1

[0031] This embodiment discloses a wind turbine blade defect detection method based on an improved RT-DETR model. This method introduces a displacement-reparameterized convolutional block, SWRepBlock, into the backbone network module of the RT-DETR model to replace the traditional convolutional structure. Through displacement-aware low-rank convolution decomposition technology, large-size convolutional kernels are decomposed into asymmetric convolutional sequences. During the training phase, a multi-branch structure is used to expand the receptive field to capture multi-scale semantic information. During the inference phase, structural reparameterization is used to fuse the convolutional layers into a single convolutional layer to maintain computational efficiency. Furthermore, the method integrates a dynamic token normalization mechanism in the encoder module using the DyT-AIFI module, preserves channel statistical distribution information through a hyperbolic tangent function, and enhances the modeling ability for complex nonlinear features by combining a learnable scaling factor. Additionally, the method designs a hierarchical feature pyramid network based on context anchor attention, i.e., introducing a CAA-HSFPN module into the encoder, which guides the adaptive fusion of high-level semantics and low-level geometric details through explicit attention weights. The wind turbine blade defect detection method proposed in this invention aims to solve the problem of detecting minute damage under the background of complex surface texture of wind turbine blades. The method has high precision, strong generalization ability and strong robustness, and can effectively identify multiple types of defect features such as cracks, erosion and oil leakage, which greatly enhances the practical value and application potential of wind turbine blade defect detection.

[0032] like Figure 1 As shown, the wind turbine blade defect detection method based on the improved RT-DETR includes the following steps:

[0033] Step 1. Acquire images of wind turbine blade defects and construct a dataset for wind turbine blade defect detection. Images of wind turbine blade defects can be obtained from daily operation and maintenance inspection reports of wind farms and image data collected by UAV aerial photography technology.

[0034] In this embodiment, the constructed dataset specifically includes datasets for model training, validation, and testing.

[0035] By integrating daily operation and maintenance inspection reports from multiple wind farms and image data collected by UAV aerial photography, images of wind turbine blade defects were obtained and rigorously screened and identified, ultimately constructing an image dataset for model training, validation, and testing.

[0036] Specifically, the image dataset used in this embodiment for constructing wind turbine blade defect image detection mainly integrates information from multiple sources. On the one hand, it includes inspection reports generated during the daily operation and maintenance of multiple wind farms, and on the other hand, it includes image data collected through UAV aerial photography technology. To ensure data quality, all raw data underwent rigorous screening and identification, ultimately determining 3282 valid images, each clearly containing blade damage features.

[0037] In step 1 of this embodiment, the integrated wind turbine blade defect image data is further normalized to a size, scaling the input image and bounding box to a uniform resolution of 640×640, and applying pixel-level normalization and Z-score normalization transformation. Adaptive histogram equalization is used to correct the photometric characteristics of the image to eliminate inconsistencies in image quality introduced by specular reflection on the blade surface, contaminant adhesion, and fluctuations in meteorological and lighting conditions. Simultaneously, a noise reduction filtering algorithm is applied to improve the spatial saliency and edge discrimination of defect features such as cracks, wear, and delamination. A format mapping transformation is then performed on the labeled data to generate a labeled file conforming to the YOLO format.

[0038] Based on a stratified sampling strategy, the processed dataset is divided into training, validation, and test sets according to a preset ratio to ensure the consistency of defect type distribution in each subset. During model training, diverse data augmentation strategies are applied, such as random mirror flipping, multi-scale geometric transformation, and random region cropping, to enhance the model's detection generalization performance and robustness under complex surface textures, heterogeneous defect modalities, and multi-view imaging conditions.

[0039] Step 2. Build an improved RT-DETR model, which includes a backbone network, encoder, decoder and detector head.

[0040] like Figure 2 As shown, the improved RT-DETR model is obtained by making the following improvements to the original RT-DETR model: A displacement-reparameterized convolutional SWRepBlock module is introduced into the backbone network. Through the displacement reparameterization mechanism, the network's multi-scale feature extraction and long-distance spatial dependency modeling capabilities are enhanced. The AIFI module in the encoder is replaced with a DyT-AIFI module to improve the discriminative and nonlinear representation capabilities of visual features. The DyT-AIFI module is obtained by replacing the original layer normalization module of the AIFI module with a dynamic hyperbolic tangent normalization module. To address the semantic gap and attention deficit issues present in traditional feature pyramids, a CAA-HSFPN module based on context anchor attention is introduced into the encoder. The RT-DETR neck network is reconstructed by integrating context anchor attention, average pooling optimization, and asymmetric convolution decomposition. The RT-DETR neck network is the encoder part of the RT-DETR model.

[0041] First, let's introduce the backbone network.

[0042] The backbone network consists of three convolutional normalization layers, one max pooling layer, and four SWRepBlock modules. Figure 2 The convolutional normalization layer *3 in the text represents three convolutional normalization layers.

[0043] The four SWRepBlock modules are defined as the first SWRepBlock module, the second SWRepBlock module, the third SWRepBlock module, and the fourth SWRepBlock module, respectively.

[0044] The signal processing flow in the backbone network is as follows:

[0045] The backbone network is fed with feature maps from a dataset used for wind turbine blade defect detection. .

[0046] Feature maps of the input backbone network The data is processed sequentially through three convolutional normalization layers and one max pooling layer, and then fed into the first SWRepBlock module to obtain the output feature map of the first SWRepBlock module. .

[0047] The output feature map of the first SWRepBlock module The data is fed into the second SWRepBlock module for processing, yielding the output feature map of the second SWRepBlock module. .

[0048] The output feature map of the second SWRepBlock module The data is fed into the third SWRepBlock module for processing, resulting in the output feature map of the third SWRepBlock module. .

[0049] The output feature map of the third SWRepBlock module The data is fed into the fourth SWRepBlock module for processing, resulting in the output feature map of the fourth SWRepBlock module. .

[0050] Next, we will introduce the SWRepBlock module.

[0051] The SWRepBlock module includes a main branch and a residual branch.

[0052] like Figure 3 As shown, the signal processing flow in the SWRepBlock module is as follows:

[0053] Input feature map of the SWRepBlock module In the main branch, the convolution kernel size is... Convolution operations, batch normalization and The activation function is used to process the data to obtain intermediate feature maps. :

[0054] .

[0055] in, express Activation function This indicates a batch normalization operation. This indicates that the kernel size in the main branch is... The convolution weights of the convolution operation. This represents the convolution operation.

[0056] Then the intermediate feature map The input is fed into the displacement-reparameterized large-kernel convolution RLKConv module for processing, and the output feature map of the RLKConv module is used. The output feature map serves as the main branch.

[0057] Input feature map of the SWRepBlock module In the residual branch, first check if the parameter, i.e., the shortcut flag, is true. If the shortcut parameter is true, then the residual branch performs the identity mapping, i.e. The output feature map of the residual branch is obtained. .

[0058] If the parameter shortcut is false, the mapping transformation path of the residual branch will be entered. At this time, it is necessary to further combine the module configuration and downsampling requirements to perform branch judgment, that is, to further judge whether the parameters variant='d' and stride=2 are satisfied.

[0059] When the parameter shortcut is false, and both the parameters variant='d' and stride=2 are satisfied, the input feature map of the SWRepBlock module... Perform average pooling with a stride of 2 and a kernel size of [missing value]. The convolution operation and batch normalization process are performed, where the convolution operation is used to adjust the number of channels, and finally the output feature map of the residual branch is obtained. :

[0060] .

[0061] in, Indicates the feature map Perform an average pooling operation with a stride of 2 to compress the feature map size to half of its original size to achieve downsampling; This indicates that the kernel size in the residual branch is... The convolution weights of the convolution operation. Through this series of operations, the output feature map of the residual branch can be fused with the output feature map of the main branch, thus ensuring the effective implementation of the residual connection.

[0062] If the parameter `shortcut` is false, and the parameters `variant='d'` and `stride=2` are not simultaneously satisfied, then average pooling is skipped, and the input feature map of the `SWRepBlock` module is directly processed. The kernel size is [size to be filled in] The convolution operation and batch normalization process are used to obtain the output feature map of the residual branch. :

[0063] .

[0064] Figure 3 In this context, Conv+BN represents performing convolution operations and batch normalization sequentially, while Conv+BN+SiLU represents performing convolution operations, batch normalization, and... The activation function is used for processing.

[0065] Output feature map of the main branch Output feature map of residual branch The summation, i.e., the element-wise addition and fusion, followed by processing with the ReLU activation function, yields the output feature map of the SWRepBlock module. :

[0066] .

[0067] in, This represents the ReLU activation function.

[0068] Then, the RLKConv module will be introduced.

[0069] The RLKConv module includes the LoRA decomposition path and the auxiliary convolution path.

[0070] The signal processing flow in the RLKConv module is as follows:

[0071] The input feature map of the RLKConv module is the intermediate feature map. .

[0072] like Figure 4 and Figure 5As shown, during the training phase, the displacement-reparameterized large-kernel convolution module decomposes the large-size convolution kernel into asymmetric convolutions in the horizontal and vertical directions using a displacement-aware low-rank decomposition strategy. Initial feature extraction is performed by small-kernel convolutions. Then, learnable mask matrices Mask1 and Mask2 are used to weight the features in the horizontal and vertical directions respectively. Finally, spatial displacement operations are used to reconstruct the feature response to approximate the receptive field of the large-kernel convolution. In this embodiment, Figure 4 The processing flow of the corresponding signal in the LoRA decomposition path and auxiliary convolution path of the RLKConv module in the first SWRepBlock module. Figure 5 The processing flow of the corresponding signal in the LoRA decomposition path and auxiliary convolution path of the RLKConv module in the second, third, and fourth SWRepBlock modules.

[0073] Input feature map of the RLKConv module The processing procedure in the LoRA decomposition path is as follows:

[0074] .

[0075] in, This represents the LoRA decomposition path. , This indicates the number of branches that the large convolution kernel is split into. It reflects the accumulation of multi-step displacement and weighted summation. and These represent the feature displacement and clipping operations along the horizontal and vertical directions, respectively. This represents the Sigmoid activation function. and This represents a learnable mask matrix. , , This represents the channel dimension of the mask matrix. This indicates element-wise multiplication. Represents the input feature map The i-th sub-feature map obtained after splitting.

[0076] Input feature map of the RLKConv module The auxiliary convolution path passes through a convolution kernel of size [size missing]. The convolution operation yields the output feature map of the auxiliary convolution path. ,in This indicates that the kernel size in the auxiliary convolution path is... The convolution weights of the convolution operation.

[0077] Output feature map of LoRA decomposition path Output feature map of auxiliary convolution path After addition, and after batch normalization operation and After processing by the activation function, the output feature map of the main branch is obtained. :

[0078] .

[0079] Furthermore, in this embodiment, during the inference phase after training, the entire main branch of the SWRepBlock module is merged into a single convolution with weights of [value missing] using structural reparameterization. Bias is A single equivalent convolutional layer eliminates computational redundancy caused by branching structures, thereby achieving efficient inference.

[0080] Output feature map of SWRepBlock module The output feature map is obtained by adding the output feature map of the equivalent convolutional layer and the output feature map of the residual branch, and then processing it through the ReLU activation function. The process is as follows:

[0081] .

[0082] The method of this invention significantly expands the effective receptive field while maintaining computational efficiency through a displacement reparameterization mechanism, enabling the network to adaptively capture target features at different scales and long-distance spatial dependencies, thereby enhancing the backbone network's semantic representation ability of multi-scale targets in complex scenes.

[0083] The encoder is described below.

[0084] The encoder includes two 1×1 convolutional layers, one DyT-AIFI module, five CAA-HSFPN modules, three 2D convolutional layers, two transposed convolutional layers, and two reparameterized C3 modules.

[0085] Two convolutional layers with a kernel size of 1×1 are defined as the first 1×1 convolutional layer and the second 1×1 convolutional layer, respectively.

[0086] The five CAA-HSFPN modules are defined as the first CAA-HSFPN module, the second CAA-HSFPN module, the third CAA-HSFPN module, the fourth CAA-HSFPN module, and the fifth CAA-HSFPN module, respectively.

[0087] The three two-dimensional convolutional layers are defined as the first two-dimensional convolutional layer, the second two-dimensional convolutional layer, and the third two-dimensional convolutional layer, respectively.

[0088] The two transposed convolutional layers are defined as the first transposed convolutional layer and the second transposed convolutional layer, respectively.

[0089] The two reparameterized C3 modules are defined as the first reparameterized C3 module and the second reparameterized C3 module, respectively.

[0090] The signal processing flow in the encoder is as follows:

[0091] Output feature map of the second SWRepBlock module After processing by the first CAA-HSFPN module, the data is fed into the first two-dimensional convolutional layer to obtain the output feature map of the first two-dimensional convolutional layer. .

[0092] Output feature map of the third SWRepBlock module After processing by the second CAA-HSFPN module, the data is fed into the second two-dimensional convolutional layer to obtain the output feature map of the second two-dimensional convolutional layer. .

[0093] Output feature map of the fourth SWRepBlock module After being processed sequentially by the first 1×1 convolutional layer, the DyT-AIFI module, the second 1×1 convolutional layer, and the third CAA-HSFPN module, the data is fed into the third two-dimensional convolutional layer to obtain the output feature map of the third two-dimensional convolutional layer. .

[0094] Output feature map of the third 2D convolutional layer After processing by the first transposed convolutional layer and the fourth CAA-HSFPN module, the output feature map is compared with that of the second two-dimensional convolutional layer. Element-wise multiplication is performed, followed by addition and fusion with the output feature map of the first transposed convolutional layer. This fusion is then fed into the first parameterized C3 module to obtain the output feature map of the first parameterized C3 module. .

[0095] The output feature map of the first transposed convolutional layer is further processed by the second transposed convolutional layer and the fifth CAA-HSFPN module, and then compared with the output feature map of the first two-dimensional convolutional layer. Element-wise multiplication is performed, followed by addition and fusion with the output feature map of the second transposed convolutional layer. This result is then fed into the second parameterized C3 module to obtain its output feature map. .

[0096] The output feature map of the first parameterized C3 module The output feature map of the second parameterized C3 module and the output feature map of the third two-dimensional convolutional layer The encoder's output feature map is obtained by stitching along the channel dimension.

[0097] The following section introduces the DyT-AIFI module for dynamic hyperbolic tangent attention-based intrascale feature interaction.

[0098] The DyT-AIFI module contains N stacked Transformer encoder layers, each containing two dynamic hyperbolic tangent normalization modules.

[0099] like Figure 6 As shown, the signal processing flow in the DyT-AIFI module is as follows:

[0100] Input feature map of DyT-AIFI module This is the output feature map of the first 1×1 convolutional layer, where Indicates batch size. Indicates the number of channels. and These represent the height and width of the feature map, which first needs to be converted from a four-dimensional spatial structure into a sequence form that can be processed by the Transformer.

[0101] Specifically, the spatial dimension of the input feature map of the DyT-AIFI module is compressed to the sequence length dimension through flattening and transpose operations, resulting in the input sequence of the first Transformer encoder layer, i.e., the serialized input feature map. Each spatial location is treated as a token in the sequence.

[0102] To preserve spatial location information, a two-dimensional sine-cosine position code is constructed. This encoding is generated by applying sine and cosine functions of different frequencies to the width and height coordinates, respectively. The construction process is as follows:

[0103] .

[0104] in, This indicates a concatenation operation along the feature dimension. and These are the grid coordinates in the width and height directions, respectively. , This indicates the outer product operation. Represents the angular frequency vector. and These are the sine and cosine functions, respectively.

[0105] After the positional encoding is added to the serialized feature map, it enters the Transformer encoder layer for feature interaction processing. First, the query and key matrix is ​​obtained by adding the input sequence to the positional encoding:

[0106] .

[0107] in, Represents the query matrix. Represents the bond matrix.

[0108] Value matrix Directly using the input sequence to maintain the integrity of the content information, i.e. .

[0109] The multi-head self-attention mechanism will input the query matrix Key matrix Value matrix Projected to Each attention head independently computes scaled dot product attention in three distinct representation subspaces:

[0110] .

[0111] in, , Indicates the first The output of each attention head. This represents the Softmax function. , , Indicates the first The projection matrix of each attention head. , , This is a scaling factor used to stabilize gradients during training.

[0112] The outputs of each attention head are concatenated. With output projection matrix A linear transformation is performed to fuse the results, yielding a fused output from multi-head self-attention. :

[0113] .

[0114] Multi-head self-attention fusion output After applying Dropout regularization to mitigate overfitting, the input feature map is then compared with... Residual connections are performed to facilitate gradient flow and information preservation, resulting in intermediate feature representations. :

[0115] .

[0116] in, This indicates Dropout regularization.

[0117] Unlike traditional Transformer encoders that use layer normalization, the DyT-AIFI module introduces a dynamic hyperbolic tangent DyT normalization operation. This normalization strategy abandons the linear normalization method of the original LayerNorm module, which achieves zero mean and unit variance by subtracting the mean and dividing the standard deviation. Instead, it uses a hyperbolic tangent nonlinear function to adaptively compress the feature amplitude and combines learnable scaling and affine transformation parameters to enhance expressive power. Specifically, the signal processing process in the first dynamic hyperbolic tangent normalization module, i.e., the first DyT normalization operation, is defined as follows:

[0118] .

[0119] in, Represents the normalized features. This is the output of the first dynamic hyperbolic tangent normalization module in the first Transformer encoder layer. and This represents the channel-by-channel affine transformation parameter vector. , This represents globally learnable adaptive scaling parameters. This represents the hyperbolic tangent nonlinear function, used to compress input values ​​to... Interval.

[0120] Normalized features The signal is fed into a feedforward neural network (FFN) to perform nonlinear feature transformation between channels.

[0121] FFN consists of two fully connected layers. The first fully connected layer divides the feature dimension from... Expand to Then, the GELU activation function is applied to introduce non-linearity, and after Dropout regularization, the feature dimension is compressed back through a second fully connected layer. The process is represented as:

[0122] .

[0123] in, This indicates the output of FFN. and This represents the weight matrix of the two fully connected layers. , This represents the GELU activation function. and This represents the bias vector. , .

[0124] FFN output Features after Dropout regularization and normalization Perform residual connections to obtain the output features after residual connections. :

[0125] .

[0126] The second dynamic hyperbolic tangent normalization module describes the output characteristics after residual connection. A dynamic hyperbolic tangent normalization operation is applied to stabilize the feature distribution and enhance expressive power, resulting in the output of the second dynamic hyperbolic tangent normalization module in the first Transformer encoder layer. :

[0127] .

[0128] in, This is the output of the first Transformer encoder layer. and This represents the channel-by-channel affine transformation parameter vector. , This represents globally learnable adaptive scaling parameters. .

[0129] The above only describes the signal processing flow for a single Transformer encoder layer. The DyT-AIFI module needs to execute this flow N times to complete the deep feature encoding, which is the output of the first Transformer encoder layer. As the input to the next Transformer encoder layer, after being processed by N stacked Transformer encoder layers, the output of the last Transformer encoder layer is restored to the spatial structure of the original feature map through inverse transformation, resulting in the restored feature map. The final restored feature map is the output feature map of the DyT-AIFI module.

[0130] The method of this invention replaces the traditional layer normalization strategy with dynamic hyperbolic tangent normalization. It utilizes the nonlinear saturation characteristics of the hyperbolic tangent function and the adaptive adjustment capability of learnable parameters to enhance the discriminativeness and nonlinear modeling ability of features while preserving the statistical characteristics of the channel dimension. This effectively solves the performance degradation problem caused by the destruction of channel statistics by layer normalization and the limitation of nonlinear expression by linear transformation when the standard Transformer encoder processes visual features. It enables the model to capture long-distance spatial dependencies more effectively within the same scale and enhance semantic understanding capabilities.

[0131] The following section introduces the CAA-HSFPN module, a hierarchical scale feature pyramid network based on context anchor attention.

[0132] like Figure 7 As shown, the signal processing flow in the CAA-HSFPN module is as follows:

[0133] Let the input feature map of the CAA-HSFPN module be denoted as .

[0134] Input feature map of CAA-HSFPN module Perform average pooling to obtain the spatially downsampled feature map. :

[0135] .

[0136] in, Indicates the pooling window size is The average pooling operation is used to aggregate the context information of local neighborhoods. In this embodiment, the average pooling layer uses a stride of 1 and a padding of 3 to maintain the spatial resolution of the feature map.

[0137] The pooled features are the feature maps after spatial downsampling. Intra-channel feature transformation and enhancement are performed using a standard convolutional module with a kernel size of [missing value]. Convolutional operations, batch normalization layers, and SiLU activation functions affect feature maps. This process involves performing a nonlinear mapping of the features to obtain the transformed intermediate feature map. :

[0138] .

[0139] in, Indicates the point convolution kernel weights. .

[0140] Transformed intermediate features We enter the context anchor attention computation pathway based on asymmetric convolution decomposition. This pathway adopts a depthwise separable convolution strategy, which decomposes the two-dimensional spatial convolution with a large receptive field into two one-dimensional depthwise convolution operations executed sequentially along the horizontal and vertical directions.

[0141] Specifically, firstly, the intermediate features after transformation... A depthwise convolution is applied along the horizontal direction, with a kernel size of . In this embodiment By using grouped convolutions to process each channel independently, long-range spatial dependencies in the horizontal direction are extracted, resulting in a feature map after horizontal convolution. :

[0142] .

[0143] in, The horizontal depth convolution kernel weights, This is a depthwise separable convolution operation.

[0144] Next, the feature map after horizontal convolution A depthwise convolution is applied along the vertical direction to capture long-range spatial correlations in the vertical direction, with a kernel size of [size missing]. In this embodiment The feature map obtained after vertical convolution is obtained. :

[0145] .

[0146] in, The weights are the vertical depth convolution kernel weights. .

[0147] Feature map after convolution in the vertical direction Further nonlinear feature transformation is performed using a standard convolutional module with a kernel size of [missing information]. Convolutional operations, batch normalization layers, and SiLU activation functions affect feature maps. The process is performed to obtain the transformed intermediate feature map. :

[0148] .

[0149] in, Indicates the point convolution kernel weights. .

[0150] The transformed features, i.e., the intermediate feature map Mapped to via the Sigmoid activation function Intervals are used to generate channel-wise and pixel-wise spatial attention weight maps. :

[0151] .

[0152] in, .

[0153] Spatial attention weight map Each element ,in , , These represent the height, width, and channel index of the feature map, respectively. , , .

[0154] Spatial attention weight map The value of the Boolean flag parameter (flag) can be used to determine whether the input feature map of the CAA-HSFPN module is true or false. Element-wise multiplication is performed to achieve self-attention weighted enhancement, or the output can be directly used for cross-level attention guidance. Specifically, the parameter `flag` is first checked for truth. If `flag` is true, the spatial attention weight map is then... Input feature map of CAA-HSFPN module Element-wise multiplication is performed, and the result is used as the output of the CAA-HSFPN module. When the flag parameter is false, the spatial attention weight map is directly used. As the output of the CAA-HSFPN module.

[0155] In this embodiment, the parameter flag in the first, second, and third CAA-HSFPN modules is set to true, i.e., flag=True; the parameter flag in the fourth and fifth CAA-HSFPN modules is set to false, i.e., flag=False.

[0156] In the hierarchical scale feature pyramid network architecture, the CAA-HSFPN module achieves semantic alignment and adaptive fusion of cross-scale features through dual-mode operation and multi-path attention guidance.

[0157] Specifically, the top-level features enhanced by the DyT-AIFI module in the encoder. , That is, the output features of the second 1×1 convolutional layer, where and Representing feature maps respectively The height and width are first processed by the third CAA-HSFPN module, at which point flag=True, and self-attention enhanced features are generated by the third CAA-HSFPN module. :

[0158] .

[0159] in, It is a feature map The channel-wise, pixel-wise spatial attention weight map generated in the third CAA-HSFPN module is processed by average pooling, convolution, depthwise separable convolution, and the sigmoid activation function. This indicates element-wise multiplication.

[0160] Self-attention enhancement features Then, sequentially, the convolution kernel size is... Standard convolution That is, the third two-dimensional convolutional layer adjusts the channel dimension, and then uses a convolutional kernel size of... transposed convolution That is, the first transposed convolutional layer is implemented. Spatial upsampling yields upsampled features aligned with the spatial resolution of the output feature map of the second 2D convolutional layer. Upsampling features This is the output feature map of the first transposed convolutional layer:

[0161] .

[0162] Parallel features from the backbone network ,feature That is, the output feature map of the third SWRepBlock module. ,in and Representing feature maps respectively Height and width. Features Independently extract its own context attention enhancement features through the second CAA-HSFPN module. At this point, flag=True:

[0163] .

[0164] in, It is a feature map The channel-wise, pixel-wise spatial attention weight map is generated in the second CAA-HSFPN module after processing by average pooling, convolution, depthwise separable convolution, and sigmoid activation function.

[0165] Enhanced features After convolution kernel size is The feature map is obtained after projection from the second two-dimensional convolutional layer. , This is the output feature map of the second two-dimensional convolutional layer. .

[0166] The crucial cross-scale attention guidance mechanism is activated at this point, which uses the upsampled top-level features... Input the fourth CAA-HSFPN module, but at this point, flag=False, causing the fourth CAA-HSFPN module to skip the final feature weighting step and directly output the pure attention weight map. :

[0167] .

[0168] in, These are the top-level features after upsampling. This indicates the average pooling operation. , , , These represent the first convolution operation, the horizontal depthwise convolution operation, the vertical depthwise convolution operation, and the second convolution operation, respectively. This is the activation function. The fourth CAA-HSFPN module generates a pure attention weight map through this series of operations. .

[0169] Cross-scale attention weight map Carrying top-level semantic information regarding the importance of spatial location, the projected features are processed through Multiply, i.e., element-wise multiplication. Spatially selective modulation is performed to obtain the spatially selectively modulated features. :

[0170] .

[0171] This modulation process enables explicit guidance of low-level geometric details by high-level abstract semantics, allowing low-level features to adaptively enhance target-related spatial regions and suppress background interference based on high-level semantic information.

[0172] Modulated features With upsampling features By performing residual fusion through the Add operation (addition fusion), a complete cross-scale feature fusion path is formed, ultimately yielding the cross-scale feature fusion output. :

[0173] .

[0174] Fusion features The input is then fed into the RepC3 module, the first-level parameterized C3 module, for deep feature refinement. This module employs a cascaded structure of heavily parameterized convolutional blocks. During the training phase, it enhances feature representation through multi-branch convolutional paths, and during the inference phase, it merges them into a single convolutional layer to improve computational efficiency. Finally, it generates a feature representation for medium-scale object detection, namely the output feature map of the first-level parameterized C3 module. .

[0175] Similarly, a multiply-add fusion mechanism is used to integrate cross-scale features to obtain fused features. fusion features This is the input feature map of the second parameterized C3 module:

[0176] .

[0177] Among them, upsampling features That is, the output feature map of the second transposed convolutional layer. It is an upsampling feature The cross-scale attention weight map generated by the fifth CAA-HSFPN module has flag=False. This is the output feature map of the second SWRepBlock module. After self-attention enhancement by the first CAA-HSFPN module and convolution kernel size of The convolution is the feature after projection from the first two-dimensional convolutional layer. This is the output feature map of the first two-dimensional convolutional layer. Through the above series of operations, effective fusion of cross-scale features can be achieved.

[0178] Fusion features Small-scale detection features are generated after refinement by the second parameterization C3 module. ,in and Representation of feature map The height and width. Ultimately, the features are represented at three scales. The data are uniformly fed into the decoder for end-to-end target detection and localization. Large-scale features are directly taken from the top-level enhanced features after the first channel projection, i.e., the output features of the third two-dimensional convolutional layer. .

[0179] This invention achieves an organic unity of self-attention enhancement and cross-scale attention transfer through the flexible deployment of a dual-mode CAA-HSFPN module. This dual-mode design fundamentally solves the semantic gap problem caused by the simple upsampling-stitching paradigm of traditional feature pyramids, enabling high-level abstract semantics to explicitly guide the selective enhancement of low-level geometric details, rather than simply transmitting information through implicit feature stacking. Simultaneously, the large receptive field attention computation strategy based on asymmetric convolution decomposition significantly expands the spatial range of feature interactions while maintaining parameter efficiency. This allows the network to effectively capture the global structural information and long-distance dependencies of large targets such as wind turbine blades. Furthermore, the Sigmoid-normalized continuous-value attention weights provide soft adaptive suppression of interference factors such as background noise and blade surface texture variations, ultimately generating semantically rich, spatially accurate, and scale-adaptive multi-level feature representations to support high-precision defect detection tasks in complex scenarios.

[0180] Step 3. Use the dataset constructed in Step 1 to train the improved RT-DETR model to obtain the trained model.

[0181] In step 3 of this embodiment, the model is trained using the training dataset to learn and extract the features of wind turbine blade loss. The model's hyperparameters are adjusted during training using the validation dataset to help select the best model and avoid overfitting. The model's final performance is evaluated using the test dataset to ensure its generalization ability on unknown data. Finally, the improved detection model that has been trained is obtained, i.e., the trained model.

[0182] Furthermore, the method of this invention also employs optimized classification and regression methods in the target detection head to output detection results. The classification method in the detection head of the improved real-time target detection model adopts a focus loss function to enhance the ability to handle imbalanced samples; the regression method in the detection head adopts an IoU_aware strategy to improve the accuracy of the detection box.

[0183] Focus loss function Modulation was performed based on cross-entropy loss, and its expression is as follows:

[0184] .

[0185] in, This represents the model's predicted probability of the true class of the current sample; This represents the positive and negative sample balance factor; This represents the focusing factor, which is used to modulate the weights of easily classified samples. When When = 0, the focus loss function degenerates into the standard cross-entropy loss.

[0186] The IoU_aware policy consists of two components:

[0187] The IoU prediction branch runs in parallel with the regression branch, predicting the IoU score between the current candidate box and the ground truth box. IoU score Used as a confidence level reference.

[0188] The goal of loss optimization is to introduce IoU into the regression loss so that the model training process is closer to the actual detection and evaluation standards.

[0189] Step 4. Using the trained model obtained in Step 3, perform defect detection on the images of wind turbine blades.

[0190] In step 4 of this embodiment, the image of the wind turbine blade defect is used as the input to the trained model, and the output image of the model includes the target category, location, and confidence information.

[0191] In addition, to verify the effectiveness of the method proposed in this invention, the following specific experiments are also provided:

[0192] To verify the effectiveness and robustness of the invented method in the small target detection task of wind turbine blade defect images, the WTB-Defect dataset was selected as the experimental data source. This dataset contains 3282 images, divided into a training set of 2743 images, a validation set of 270 images, and a test set of 269 images. It comprehensively covers six common defect morphologies of wind turbine blades: cracks, erosion, dirt, oil leakage, PU tape damage, and holes. It can meet the needs of identification and analysis research of different blade defect types. Cracks are labeled as Crack, erosion as Erosion, dirt as Dirt, oil leakage as oil_leakage, PU tape damage as PU-tape, and holes as Pin_Hole.

[0193] The experimental environment is configured as follows:

[0194] Operating system: Linux.

[0195] Graphics card: NVIDIA-GeForce-RTX-4090.

[0196] Video memory: 24G.

[0197] Programming environment: Python 3.10.15.

[0198] Deep learning frameworks: PyTorch 2.5.1+cu121, Torchvision 0.20.1+cu121, CUDA 12.1.

[0199] Input: Images of defects in wind turbine blades.

[0200] Output: Visualized results after model detection, including target category, location information, and confidence level.

[0201] The experimental procedure is as follows:

[0202] The input images are cropped to a uniform 640×640 size and normalized to standardize the data format and reduce the impact of illumination differences and noise. After the acquired images of wind turbine blade defects are input into the improved RT-DETR model, the SWRepBlock module in the backbone network adaptively divides the window using a sliding window convolution mechanism. Multi-scale convolutional branches are used to extract spatial features and dynamically fuse them, expanding the receptive field while reducing parameter redundancy and enhancing the edge and texture information of small targets.

[0203] The DyT-AIFI module in the encoder integrates a dynamic transformation attention mechanism with learnable 2D sine-cosine positional encoding. It adaptively adjusts the spatial distribution of feature maps to enhance the model's attention to small targets with weak contrast, and utilizes a sparse attention strategy to suppress reflections on the blade surface and interference from complex textures. The CAA-HSFPN module in the encoder modulates and integrates multi-layer features based on channel-spatial collaborative attention weights during the feature fusion stage. It generates attention masks through average pooling and bidirectional convolution, achieving adaptive fusion of shallow details and deep semantics, and enhancing the semantic consistency of features across scales.

[0204] The model generates candidate boxes through a dynamic query mechanism, and outputs the detection results after multiple rounds of iterative optimization by the decoder. The output detection results include the target category, bounding box, and confidence score. By combining the Hungarian matching algorithm and a multi-task loss function, a one-to-one correspondence between predicted boxes and ground truth boxes is achieved, and finally, an labeled image is generated, which can intuitively demonstrate the detection effect of blade defects.

[0205] like Figures 8 to 11 As shown, the detection results of the method of the present invention on the WTB-Defect dataset show that the model can accurately identify blade defects in complex environments, with accurate detection box localization and high confidence, thus verifying the detection performance and practical value of the method of the present invention in complex environments.

[0206] Table 1. Comparative experimental results of the method of this invention with other object detection algorithms on the WTB-Defect dataset.

[0207]

[0208] As shown in Table 1, the method of this invention outperforms existing mainstream models in both detection accuracy and computational efficiency. On the WTB-Defect dataset, the mAP@50 and mAP@50:95 of the method of this invention reach 73.1% and 46.1%, respectively, which are improvements of 1.9% and 2.8% compared with the RT-DETR model, with only 17.1M parameters. Here, mAP@50 represents the mean average accuracy (mAP) calculated with an IoU threshold of 0.5, and mAP@50:95 represents the mean average accuracy calculated within the range of IoU thresholds from 0.5 to 0.95. Experimental results show that this invention maintains detection accuracy while possessing better lightweight performance, and can meet the deployment requirements in wind turbine blade defect detection scenarios.

[0209] This invention introduces a multi-module collaborative design on top of the existing RT-DETR framework to improve the accuracy and efficiency of small target detection in complex scenes. The method introduces the SWRepBlock module into the backbone network, replacing traditional convolutional blocks with a sliding window convolution mechanism. It employs an adaptive window partitioning strategy to capture local-global feature interactions at different scales, significantly reducing parameter redundancy while maintaining the receptive field. Furthermore, the method introduces the DyT-AIFI module to replace the original AIFI module in the encoder. This module adaptively adjusts the spatial distribution of feature maps through a dynamic attention mechanism, enhancing the localization ability of small targets by combining learnable positional encoding, while optimizing computational efficiency using a sparse attention strategy. Additionally, the method introduces the CAA-HSFPN module, which includes channel-spatial collaborative attention and hierarchical scale fusion, achieving more accurate multi-scale feature aggregation through cross-dimensional attention weight allocation. This model architecture not only strengthens the information flow between different semantic levels but also improves the robustness of small target detection through an adaptive feature weighting mechanism. The encoder outputs an enhanced feature map to generate a high-quality candidate box query. After multiple rounds of iterative optimization, the decoder outputs the target category and bounding box using the prediction head. Hungarian matching and multi-task loss are combined to achieve a one-to-one correspondence between the predicted box and the ground truth box, thus completing the target detection.

[0210] Example 2

[0211] This embodiment 2 describes a computer device that includes a memory and one or more processors.

[0212] The memory stores executable code, which, when executed by the processor, is used to implement the steps of the wind turbine blade defect detection method based on the improved RT-DETR in Embodiment 1 above.

[0213] In this embodiment, the computer device can be any device or apparatus with data processing capabilities, and will not be described in detail here.

[0214] Of course, the above description is only a preferred embodiment of the present invention. The present invention is not limited to the above-described embodiments. It should be noted that any equivalent substitutions or obvious modifications made by those skilled in the art under the guidance of this specification fall within the scope of this specification and should be protected by the present invention.

Claims

1. A method for detecting defects in wind turbine blades based on improved RT-DETR, characterized in that, Includes the following steps: Step 1. Obtain images of wind turbine blade defects and construct a dataset for wind turbine blade defect detection; Step 2. Build the improved RT-DETR model, which includes a backbone network, encoder, decoder and detector head; The improved RT-DETR model is obtained by making the following improvements to the original RT-DETR model: introducing a displacement reparameterized convolution SWRepBlock module into the backbone network; replacing the AIFI module in the encoder with a DyT-AIFI module, which is obtained by replacing the original layer normalization module of the AIFI module with a dynamic hyperbolic tangent normalization module; and introducing a CAA-HSFPN module based on context anchor attention into the encoder. Step 3. Use the dataset constructed in Step 1 to train the improved RT-DETR model to obtain the trained model; Step 4. Using the trained model obtained in Step 3, perform defect detection on the images of wind turbine blades; The SWRepBlock module includes a main branch and a residual branch; The signal processing flow in the SWRepBlock module is as follows: Input feature map of the SWRepBlock module In the main branch, the convolution kernel size is... Convolution operations, batch normalization and The activation function is used to process the data to obtain intermediate feature maps. : ; in, express Activation function This indicates a batch normalization operation. This indicates that the kernel size in the main branch is... The convolution weights of the convolution operation. This represents the convolution operation; Then the intermediate feature map The data is fed into the RLKConv module for processing, and the output feature map of the RLKConv module is used for processing. The output feature map of the main branch; Input feature map of the SWRepBlock module In the residual branch, first check if the parameter `shortcut` is true; if `shortcut` is true, then the residual branch performs the identity mapping. The output feature map of the residual branch is obtained. ; If the parameter shortcut is false, then further check whether the parameters variant='d' and stride=2 are satisfied; When the parameter shortcut is false, and both the parameters variant='d' and stride=2 are satisfied, the input feature map of the SWRepBlock module... Perform average pooling with a stride of 2 and a kernel size of [missing value]. The convolution operation and batch normalization process are used to obtain the output feature map of the residual branch. : ; in, Indicates the feature map Perform an average pooling operation with a stride of 2. This indicates that the kernel size in the residual branch is... The convolution weights of the convolution operation; When the parameter shortcut is false, and the parameters variant='d' and stride=2 are not simultaneously satisfied, the input feature map of the SWRepBlock module... The kernel size is [size to be filled in] The convolution operation and batch normalization process are used to obtain the output feature map of the residual branch. : ; Output feature map of the main branch Output feature map of residual branch After addition, the result is processed by the ReLU activation function to obtain the output feature map of the SWRepBlock module. : ; in, This represents the ReLU activation function.

2. The method for detecting defects in wind turbine blades based on improved RT-DETR according to claim 1, characterized in that, In step 1, images of wind turbine blade defects are obtained through daily operation and maintenance inspection reports of wind farms and image data collected by UAV aerial photography technology.

3. The method for detecting defects in wind turbine blades based on improved RT-DETR according to claim 1, characterized in that, The backbone network includes three convolutional normalization layers, one max pooling layer, and four SWRepBlock modules; The four SWRepBlock modules are defined as the first SWRepBlock module, the second SWRepBlock module, the third SWRepBlock module, and the fourth SWRepBlock module, respectively. The signal processing flow in the backbone network is as follows: The backbone network is fed with feature maps from a dataset used for wind turbine blade defect detection. ; Feature maps of the input backbone network The data is processed sequentially through three convolutional normalization layers and one max pooling layer, and then fed into the first SWRepBlock module to obtain the output feature map of the first SWRepBlock module. ; The output feature map of the first SWRepBlock module The data is fed into the second SWRepBlock module for processing, yielding the output feature map of the second SWRepBlock module. ; The output feature map of the second SWRepBlock module The data is fed into the third SWRepBlock module for processing, resulting in the output feature map of the third SWRepBlock module. ; The output feature map of the third SWRepBlock module The data is fed into the fourth SWRepBlock module for processing, resulting in the output feature map of the fourth SWRepBlock module. .

4. The method for detecting defects in wind turbine blades based on improved RT-DETR according to claim 1, characterized in that, The RLKConv module includes a LoRA decomposition path and an auxiliary convolution path; The signal processing flow in the RLKConv module is as follows: The input feature map of the RLKConv module is the intermediate feature map. ; Input feature map of the RLKConv module The processing procedure in the LoRA decomposition path is as follows: ; in, Indicates the LoRA decomposition path; , This indicates the number of branches the convolution kernel is split into; and These represent the characteristic displacement and clipping operations along the horizontal and vertical directions, respectively; This represents the Sigmoid activation function; and This represents a learnable mask matrix. , , Represents the channel dimension of the mask matrix; This represents element-wise multiplication; Represents the input feature map The i-th sub-feature map obtained after splitting; Input feature map of the RLKConv module The auxiliary convolution path passes through a convolution kernel of size [size missing]. The convolution operation yields the output feature map of the auxiliary convolution path. ,in This indicates that the kernel size in the auxiliary convolution path is... The convolution weights of the convolution operation; Output feature map of LoRA decomposition path Output feature map of auxiliary convolution path After addition, and after batch normalization operation and After processing by the activation function, the output feature map of the main branch is obtained. : 。 5. The wind turbine blade defect detection method based on improved RT-DETR according to claim 4, characterized in that, After training, the main branches of the SWRepBlock module will be merged into a single convolution with weights of 1. Bias is The equivalent convolutional layer; Output feature map of SWRepBlock module The output feature map is obtained by adding the output feature map of the equivalent convolutional layer and the output feature map of the residual branch, and then processing it through the ReLU activation function. The process is as follows: 。 6. The method for detecting defects in wind turbine blades based on improved RT-DETR according to claim 3, characterized in that, The encoder includes two convolutional layers with a kernel size of 1×1, a DyT-AIFI module, five CAA-HSFPN modules, three two-dimensional convolutional layers, two transposed convolutional layers, and two reparameterized C3 modules. Two convolutional layers with a kernel size of 1×1 are defined as the first 1×1 convolutional layer and the second 1×1 convolutional layer, respectively. The five CAA-HSFPN modules are defined as the first CAA-HSFPN module, the second CAA-HSFPN module, the third CAA-HSFPN module, the fourth CAA-HSFPN module, and the fifth CAA-HSFPN module, respectively. The three two-dimensional convolutional layers are defined as the first two-dimensional convolutional layer, the second two-dimensional convolutional layer, and the third two-dimensional convolutional layer, respectively. The two transposed convolutional layers are defined as the first transposed convolutional layer and the second transposed convolutional layer, respectively. Define the two reparameterized C3 modules as the first reparameterized C3 module and the second reparameterized C3 module, respectively. The signal processing flow in the encoder is as follows: Output feature map of the second SWRepBlock module After processing by the first CAA-HSFPN module, the data is fed into the first two-dimensional convolutional layer to obtain the output feature map of the first two-dimensional convolutional layer. ; Output feature map of the third SWRepBlock module After processing by the second CAA-HSFPN module, the data is fed into the second two-dimensional convolutional layer to obtain the output feature map of the second two-dimensional convolutional layer. ; Output feature map of the fourth SWRepBlock module After being processed sequentially by the first 1×1 convolutional layer, the DyT-AIFI module, the second 1×1 convolutional layer, and the third CAA-HSFPN module, the data is fed into the third two-dimensional convolutional layer to obtain the output feature map of the third two-dimensional convolutional layer. ; Output feature map of the third 2D convolutional layer After processing by the first transposed convolutional layer and the fourth CAA-HSFPN module, the output feature map is compared with that of the second two-dimensional convolutional layer. Element-wise multiplication is performed, followed by addition and fusion with the output feature map of the first transposed convolutional layer. This fusion is then fed into the first parameterized C3 module to obtain the output feature map of the first parameterized C3 module. ; The output feature map of the first transposed convolutional layer is further processed by the second transposed convolutional layer and the fifth CAA-HSFPN module, and then compared with the output feature map of the first two-dimensional convolutional layer. Element-wise multiplication is performed, followed by addition and fusion with the output feature map of the second transposed convolutional layer. This result is then fed into the second parameterized C3 module to obtain its output feature map. ; The output feature map of the first parameterized C3 module The output feature map of the second parameterized C3 module and the output feature map of the third two-dimensional convolutional layer The encoder's output feature map is obtained by stitching along the channel dimension.

7. The method for detecting defects in wind turbine blades based on improved RT-DETR according to claim 6, characterized in that, The DyT-AIFI module contains N stacked Transformer encoder layers, each containing two dynamic hyperbolic tangent normalization modules; The signal processing flow in the DyT-AIFI module is as follows: Input feature map of DyT-AIFI module This is the output feature map of the first 1×1 convolutional layer, where Indicates batch size. Indicates the number of channels. and These represent the height and width of the feature map, respectively. The input feature map of the DyT-AIFI module is flattened and transposed to compress the spatial dimension to the sequence length dimension, resulting in the input sequence of the first Transformer encoder layer, i.e., the serialized input feature map. ; Constructing a two-dimensional sine-cosine position code Its construction process is represented as follows: ; in, and These are the grid coordinates in the width and height directions, respectively. , ; Indicates the outer product operation; Represents the angular frequency vector. ; and These are the sine and cosine functions, respectively. The query and key matrix is ​​obtained by adding the input sequence to the positional encoding: ; in, Represents the query matrix. Represents the key matrix; Value matrix Use the input sequence directly, that is ; The multi-head self-attention mechanism will input the query matrix Key matrix Value matrix Projected to Each attention head independently computes scaled dot product attention in three distinct representation subspaces: ; in, , Indicates the first The output of each attention head; This represents the Softmax function; , , Indicates the first The projection matrix of each attention head. , , ; This is the scaling factor; The outputs of each attention head are concatenated. With output projection matrix A linear transformation is performed to fuse the results, yielding a fused output from multi-head self-attention. : ; Multi-head self-attention fusion output After Dropout regularization, it is then compared with the input feature map. Perform residual connections to obtain intermediate feature representations. : ; in, This indicates Dropout regularization; A dynamic hyperbolic tangent normalization operation is introduced, and the characteristic amplitude is compressed using a hyperbolic tangent nonlinear function. The signal processing procedure in the first dynamic hyperbolic tangent normalization module is represented as follows: ; in, Represents the normalized features. That is, the output of the first dynamic hyperbolic tangent normalization module in the first Transformer encoder layer; and This represents the channel-by-channel affine transformation parameter vector. , ; This represents globally learnable adaptive scaling parameters. ; This represents the hyperbolic tangent nonlinear function, used to compress input values ​​to... interval; Normalized features The input is fed into a feedforward neural network (FFN) to perform nonlinear feature transformation between channels; FFN consists of two fully connected layers. The first fully connected layer divides the feature dimension from... Expand to Then, the GELU activation function is applied to introduce non-linearity, and after Dropout regularization, the feature dimension is compressed back through a second fully connected layer. The process is represented as: ; in, Indicates the output of FFN; and This represents the weight matrix of the two fully connected layers. , ; This represents the GELU activation function; and This represents the bias vector. , ; FFN output Features after Dropout regularization and normalization Perform residual connections to obtain the output features after residual connections. : ; The second dynamic hyperbolic tangent normalization module describes the output characteristics after residual connection. Applying a dynamic hyperbolic tangent normalization operation yields the output of the second dynamic hyperbolic tangent normalization module. : ; in, This is the output of the first Transformer encoder layer; and This represents the channel-by-channel affine transformation parameter vector. , ; This represents globally learnable adaptive scaling parameters. ; The output of the first Transformer encoder layer As input to the next Transformer encoder layer; After processing through N stacked Transformer encoder layers, the output of the last Transformer encoder layer is restored to the spatial structure of the original feature map through inverse transformation, resulting in the restored feature map. The final recovered feature map is the output feature map of the DyT-AIFI module.

8. The method for detecting defects in wind turbine blades based on improved RT-DETR according to claim 1, characterized in that, The signal processing flow in the CAA-HSFPN module is as follows: Let the input feature map of the CAA-HSFPN module be denoted as ; Input feature map of CAA-HSFPN module Perform average pooling to obtain the spatially downsampled feature map. : ; in, Indicates the pooling window size is Average pooling operation; The pooled features are the feature maps after spatial downsampling. Through convolution kernel size of The intermediate feature maps are processed by convolutional operations, batch normalization layers, and SiLU activation functions to obtain the transformed feature maps. : ; in, Indicates the point convolution kernel weights. ; For the transformed intermediate features A depthwise convolution is applied along the horizontal direction, with a kernel size of . The feature map obtained after horizontal convolution is obtained. : ; in, The horizontal depth convolution kernel weights, ; This is a depthwise separable convolution operation; Feature map after horizontal convolution A depthwise convolution is applied along the vertical direction, with a kernel size of . The feature map obtained after vertical convolution is obtained. : ; in, The weights are the vertical depth convolution kernel weights. ; Feature map after convolution in the vertical direction Through convolution kernel size of The intermediate feature maps are processed by convolutional operations, batch normalization layers, and SiLU activation functions to obtain the transformed feature maps. : ; in, Indicates the point convolution kernel weights. ; The transformed features, i.e., the intermediate feature map Mapped to via the Sigmoid activation function Intervals are used to generate channel-wise and pixel-wise spatial attention weight maps. : ; in, ; Spatial attention weight map Each element ,in , , These represent the height, width, and channel index of the feature map, respectively. , , ; Determine if the parameter flag is true; if the parameter flag is true, then add the spatial attention weight map. Input feature map of CAA-HSFPN module Perform element-wise multiplication and use the result as the output of the CAA-HSFPN module; if the flag parameter is false, then the spatial attention weight map is... As the output of the CAA-HSFPN module.

9. A computer device comprising a memory and one or more processors, wherein the memory stores executable code, characterized in that, When the processor executes the executable code, it implements the steps of the wind turbine blade defect detection method based on the improved RT-DETR as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Potato defect detection method based on improved YOLO V8 network model

    CN116597224A

  • Ultra-precision full-field displacement measurement method and system based on convolution variational auto-encoder

    CN120890374A