Fan blade defect detection method based on APF-YOLO model
By improving the multi-scale feature extraction and feature aggregation diffusion network structure of the YOLOv8n framework and combining it with the Focaler SIoU loss function, the accuracy and efficiency problems in wind turbine blade defect detection are solved, achieving efficient and accurate detection results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA THREE GORGES UNIV
- Filing Date
- 2025-12-03
- Publication Date
- 2026-05-01
AI Technical Summary
Existing methods for detecting defects in wind turbine blades suffer from low detection accuracy and low computational efficiency. They are particularly difficult to identify small defects in complex environments, and existing deep learning models require a large amount of computation, making them difficult to deploy in resource-constrained industrial settings.
A wind turbine blade defect detection method based on the APF-YOLO model is adopted. The YOLOv8n framework is improved by using the multi-scale feature extraction module ACCUD and the multi-scale feature aggregation diffusion network structure CFDPN. The Focaler SIoU loss function is introduced to optimize the feature extraction and regression performance of the model.
It improves the detection accuracy of small targets in complex environments, reduces computational complexity, and achieves efficient and accurate wind turbine blade defect detection, making it suitable for resource-constrained industrial sites.
Smart Images

Figure CN121962567A_ABST
Abstract
Description
Wind turbine blade defect detection method based on APF-YOLO model Technical Field
[0001] This invention relates to the field of wind turbine blade defect detection technology, specifically to a wind turbine blade defect detection method based on the APF-YOLO model. Background Technology
[0002] Wind energy, due to its abundant resources and environmental friendliness, has become a key focus of new energy development in countries worldwide. As a green and sustainable power generation method, wind power is rapidly expanding globally. Most wind power bases are located in harsh environments, and wind turbine blades must withstand complex and variable environmental and mechanical loads throughout their service life, which can lead to damage to many turbines during long-term operation. Therefore, employing effective detection methods to promptly identify surface defects in wind turbine blades is a crucial measure to ensure the safety and economic efficiency of wind turbine operation.
[0003] Currently, methods for detecting defects in wind turbine blades are mainly divided into traditional detection methods and deep learning-based detection methods. Traditional detection methods include vibration analysis, acoustic emission, ultrasonic waves, and thermal imaging, which primarily infer damage based on signal changes. These are signal-based detection technologies, but suffer from instability and insufficient data accuracy. Deep learning-based detection methods include two-stage detection technologies such as Faster-RCCn and one-stage detection technologies such as YOLO. By analyzing blade images, deep learning-based detection methods can accurately locate and classify surface damage on the blades, transforming a highly experience-dependent, repetitive, and uncertain task into an automated, data-driven, quantifiable, and continuously optimized intelligent process. This not only brings a qualitative leap in efficiency, accuracy, and safety, but more importantly, it lays a solid technical foundation for intelligent operation and maintenance and asset lifecycle management in the wind power industry.
[0004] The success of deep learning in object detection has made it a research hotspot for wind turbine blade surface defect detection. This method trains models to learn defect features for automated identification and localization. However, existing algorithms still have limitations: complex models lead to low computational efficiency, making real-time detection difficult; furthermore, the detection accuracy for small target defects is often poor in complex backgrounds, requiring improvement. For example, in complex lighting environments and extreme weather conditions such as rain, snow, and fog, the model is prone to feature confusion, significantly reducing image contrast and limiting feature extraction capabilities, leading to missed detections of small-scale defects and a sharp drop in detection accuracy. While YOLOv8n is an advanced algorithm in object detection, its applicability to the fine task of wind turbine blade surface defect detection is clearly insufficient. The primary problem is that detection accuracy is limited by the existing network structure; the model's ability to extract subtle features from blade images is weak, resulting in poor identification of small-sized defects. Secondly, the model's complexity and the large number of parameters not only lead to high computational costs but also hinder its embedding and deployment in resource-constrained industrial environments.
[0005] In conclusion, surface defect detection of wind turbine blades is a crucial step in ensuring the safe and efficient operation of wind power generation systems. Traditional methods are inefficient and inaccurate, while existing deep learning models are often difficult to implement due to their complex structure and high computational cost. Therefore, developing detection algorithms that combine high accuracy and high efficiency is of paramount importance. Summary of the Invention
[0006] This invention provides a wind turbine blade defect detection method based on the APF-YOLO model to solve the interference of complex environment on wind turbine blade detection and improve the accuracy of small target defect detection.
[0007] The technical solution adopted in this invention is as follows: a wind turbine blade defect detection method based on the APF-YOLO model, comprising the following steps: Step 1: obtaining a wind turbine blade defect dataset and preprocessing the dataset; Step 2: randomly dividing the dataset into a training set and a test set according to a certain ratio; Step 3: constructing an APF-YOLO defect detection model based on YOLOv8n; Step 4: training the APF-YOLO defect detection model using the training set to obtain the detection results.
[0008] In step 1, publicly available wind turbine blade surface defect datasets are collected from the Kaggle online platform. The pixel values of the resized wind turbine blade images are then normalized and standardized sequentially. Normalization scales pixel values to a fixed range of [0,1] or [-1,1], eliminating the influence of the original pixel value range (0-255), essentially a linear scaling process. Standardization converts the data into a normal distribution with a mean of 0 and a standard deviation of 1, essentially a decentralization and scaling process, requiring calculation based on global statistics of the dataset. These normalization and standardization processes ensure good numerical stability and comparability of the dataset during deep learning training. Finally, bilinear interpolation is used to adjust the original wind turbine blade images to a fixed input size. To adapt to network input requirements.
[0009] The collected wind turbine blade defect dataset was labeled using the open-source software LabelImg. The detected defects included four typical categories: cracks, damage, dirt, and paint peeling. The core of using LabelImg to label the wind turbine blade defect dataset is to annotate the defect region in each blade image with a "bounding box (BBox)" and a "defect category label". Finally, a machine-readable YOLO format txt annotation file is generated, which provides the supervision information required for training the subsequent target YOLO detection model.
[0010] The processing of the wind turbine blade defect dataset includes data augmentation techniques such as flipping, cropping, and Gaussian blurring to create a surface defect dataset for wind turbine blades. Flipping involves mirroring or rotating the pixel positions of the image. Wind turbine blade defects may appear on the left or right side, front or back of the blade. Flipping can simulate different orientations of the defects and is the most basic geometric augmentation method. Cropping involves extracting arbitrary rectangular sub-regions from the original image. Wind turbine blade defects may only appear locally. Cropping can simulate the scene of focusing on the defect area while reducing background interference. Gaussian blurring uses a Gaussian kernel to perform a weighted average of image pixels, simulating the blurred scene of wind turbine blades when photographed outdoors (such as in rainy weather or at a distance), improving the model's ability to recognize blurred defects. Finally, a total of 2200 images are generated.
[0011] In step 2, the wind turbine blade surface defect dataset preprocessed in step 1 is randomly divided into a training set, a test set, and a validation set in a ratio of 8:1:1. The training set contains 1760 images, the validation set contains 220 images, and the training set contains 220 images.
[0012] In step 3, the APF-YOLO defect detection model is constructed, including: 3.1: In the backbone network of the YOLOv8n framework, the C2f module in the backbone network is replaced with a multi-scale feature extraction module ACCUD; 3.2: In the neck structure of the YOLOv8n framework, the PAFPN network structure is replaced with a multi-scale feature aggregation and diffusion network structure CFDPN; 3.3: In terms of loss function design, the Focaler SIoU loss function is introduced to optimize the bounding box regression process and improve the discrimination between easy and difficult samples.
[0013] In section 3.1, the ACCUD multi-scale feature extraction module is formed as follows: Let the input feature map tensor be... : (1); In equation (1), C is the number of channels and spatial size, W is the width of the feature map, and H is the height of the feature map; Define the value space for the data; based on the multi-scale requirements in wind turbine blade defect detection, introduce... , , Three adaptive average pooling layers at different scales, each corresponding to a different feature dimension, ensure that the target's features are represented at different scales: for the input features Perform adaptive average pooling in both horizontal and vertical directions to obtain the spatial context: (2); In equation (2), The horizontal average characteristic value, The vertical average feature value; three adaptive average pooling layers of different scales, each with its own vertical average feature value. Convolutional Conv module The convolutional Conv module, the upsampling Upsample module, and the DAT attention module are concatenated to obtain three new modules. Inputting three new modules yields three new output features, which are labeled as follows: , , ; (3); In equation (3), This indicates the input feature map Perform adaptive average pooling with a size of 3×3; This indicates the input feature map Perform adaptive average pooling with a size of 6×6; This indicates the input feature map Perform adaptive average pooling with a size of 3×3; For 3×3 size convolution operations; This is an upsampling operation; This section describes the stitching of the DAT attention module. The DAT attention module is a deformable attention mechanism that dynamically adjusts the sampling position to adaptively focus on key regions in the image, making it particularly suitable for scenarios with sparse and uneven feature distribution. In wind turbine blade defect detection images, the image environment is complex, and defect regions typically exhibit non-uniform distribution, local density, and complex shapes. This complexity makes it difficult for traditional fixed-mode attention mechanisms to capture key features. DAT's dynamic offset mechanism can flexibly adjust the region of interest based on the defect shape and distribution, thereby extracting defect details more accurately, effectively reducing interference from irrelevant information, and providing more discriminative feature representations for subsequent detection. When calculating attention, features at fixed positions are no longer used; instead, bilinear interpolation is performed based on the adjusted sampling position to extract keys from the feature map. Sum The calculation expression is: (4); In equation (4), It is the sampling location in the feature map; and These are the projection matrices of the keys and values, respectively; for each query Calculate its relationship with the key The similarity is determined, and deformable relative positional deviations are introduced. The formula for calculating local attention distribution is: (5); In equation (5), This represents the attention weight for the i-th key corresponding to the m-th query; This represents the m-th query vector; This represents the transpose of the m-th key vector; This indicates a predefined relative position offset table. The difference operation, This represents the normalized relative displacement. The attention output is: (6); In equation (6), This represents the output feature vector of the m-th attention mechanism. It is an activation function used to introduce nonlinear mappings; Represent the value vector of the m-th group; finally, , , and The convolutional Conv module performs a row feature concatenation operation and obtains the output features through a linear transformation. : (7); In equation (7), Indicates input features Perform convolution operations; This is a feature splicing operation.
[0014] In section 3.2, the PAPPN network structure is replaced with a multi-scale feature aggregation and diffusion network structure, CFDPN. This network can aggregate deep and shallow features to intermediate layers and diffuse aggregated features containing rich multi-scale context to the upper and lower layers of the network in a bidirectional divergent manner, thereby realizing bidirectional dynamic interaction of multi-scale features. Specifically: the multi-scale feature aggregation and diffusion network structure CFDPN first aggregates input features from different levels through the feature aggregation module FAM; the feature aggregation module FAM explicitly models targets at different scales through a parallel branch structure composed of multiple depthwise separable convolutions, thereby enhancing the feature representation of the model; the feature aggregation module FAM receives three different scale input feature maps, denoted as... , , ,in: It is a high-resolution feature map, containing spatial detail information that is especially important for small target detection; yes Next-level feature map; yes Next level feature map, Feature layers provide rich global context and high-level semantic information. Since traditional convolutional downsampling easily loses key details of small targets, this invention employs a lightweight downsampling module, ADown, in the feature aggregation module FAM to process high-resolution feature maps. The lightweight downsampling module ADown considers the distribution of input features and can adaptively learn feature weights, preserving key target features while downsampling, enhancing the saliency of small targets in subsequent feature maps, and improving the input features... Input features are processed by the lightweight downsampling module ADown. Input features are processed through the Conv module. The outputs after convolutional Conv modules are concatenated to obtain : (8); In equation (8), This refers to the intermediate features obtained by concatenating the features after multi-path processing in the Feature Aggregation Module (FAM). Indicates input features Lightweight downsampling operation is implemented using the ADown module; Indicates input features Perform convolution operations; Indicates input features Perform convolution operations; This indicates a feature splicing operation.
[0015] Features from different levels are captured by a set of parallel depthwise separable convolutions (DWConv), and then integrated and summed to obtain... : (9); In equation (9), Indicates intermediate features Perform a 3×3 depthwise separable convolution operation; Indicates intermediate features Perform a 5×5 depthwise separable convolution operation; Indicates intermediate features Perform a 7×7 depthwise separable convolution operation; After that Convolutional Conv module and Perform residual connections to obtain the final output of the feature aggregation module FAM: (10); In equation (10), Indicates intermediate features Perform a 1×1 convolution operation; then pass The convolutional Conv module passes shallow detail information downwards, and the upsampling module feeds in deep semantic information upwards; then it is concatenated with the P2 and P4 feature layers respectively, thus achieving the first feature diffusion; after the first feature diffusion, the feature processing and concatenation process is repeated again: the features processed in the previous stage are... The features processed by the convolutional Conv module are concatenated with feature maps of different scales at the corresponding level along the channel dimension, thereby further integrating multi-scale and multi-path feature information and achieving a second feature diffusion. Finally, the model achieves detailed contextual information at each detection scale, while also complementing shallow details and deep semantics, improving the model's detection performance for multi-scale targets.
[0016] In section 3.3, regarding the design of the loss function, the Focaler SIoU loss function is introduced to replace the CIoU loss function of YOLOv8 itself, thereby optimizing the bounding box regression process and improving the discrimination between easy and difficult samples. Drawing on the core idea of Focal Loss, this method uses a dynamic focusing mechanism to assign greater weight to "difficult" predicted boxes that have low overlap with the ground truth boxes during loss calculation. By focusing on different regression samples, the performance of the detector can be improved in different detection tasks. This is achieved by dynamically adjusting the values of parameters m and n. It can adaptively focus on regression samples of varying difficulty, thereby optimizing the model's regression performance; The calculation formula is as follows: (11); In equation (11), This indicates the intersection over union ratio. This represents the lower limit of the IoU threshold for difficult samples; This represents the upper limit of the IoU threshold for easy samples; it is determined by... Define its loss function for: (12); SIoU redesigned the loss calculation for bounding box regression, incorporating angular cost, distance cost, and shape cost. SIoU not only considers box overlap and center point distance, but also aligns the predicted and ground truth boxes in terms of orientation and aspect ratio, making the bounding box regression process more geometrically logical and guiding the model to converge faster and more accurately. Finally, combining SIoU with... The Focaler SIoU loss function is obtained as follows: (13).
[0017] In step 4, during the training phase of the APF-YOLO defect detection model, the key hyperparameters are set as follows: the training period is 3000, the batch size is 16, the initial learning rate is set to 0.01, and a cosine annealing scheduler is used for dynamic adjustment. After training, the obtained model is used to detect wind turbine blade defects in order to identify the type of wind turbine blade defect and locate its position.
[0018] Finally, this embodiment adopts the common evaluation metric mAP@50 in the field of object detection. mAP@50 is a core evaluation metric in the field of object detection, short for "mean accuracy at an IoU threshold of 50%", used to comprehensively measure the detection accuracy of the model. The calculation formula is shown below: (14); In equation (14), parameter n represents the total number of target categories in the dataset. Let be the AP value for class i.
[0019] This invention provides a wind turbine blade defect detection method based on the APF-YOLO model. The technical effects are as follows: 1) In the backbone network of the YOLOv8n framework, this invention replaces the C2f module in the backbone network with a multi-scale feature extraction module ACCUD, which can better preserve detailed information. Especially in complex scenarios, it enhances the more accurate extraction of defect details from the target and effectively avoids interference from background information, providing more recognizable feature representation for subsequent detection.
[0020] 2) In the neck structure of the YOLOv8n framework, this invention replaces the PAPPN network structure with a multi-scale feature aggregation diffusion network structure CFDPN, which enables the model to have detailed contextual information at each detection scale, while achieving mutual complementarity between shallow details and deep semantics, thereby improving the model's detection performance for multi-scale targets.
[0021] 3) This invention introduces the Focaler SIoU loss function into the loss function of the YOLOv8n framework, which can adaptively focus on regression samples of different difficulty levels, thereby optimizing the regression performance of the model and guiding the model to converge faster and more accurately. Attached Figure Description
[0022] The present invention will be further described below with reference to the accompanying drawings and examples; Figure 1 is a flowchart of a wind turbine blade defect detection method based on deep learning according to the present invention.
[0023] Figure 2 is a schematic diagram of the overall APF-YOLO defect detection model of the present invention.
[0024] Figure 3 is a schematic diagram of the ACCUD model of the multi-scale feature extraction module of the present invention.
[0025] Figure 4 is a schematic diagram of the CFDPN model of the multi-scale feature aggregation diffusion network structure of the present invention.
[0026] Figure 5 is a schematic diagram of the detection results of the present invention and various algorithms. Detailed Implementation
[0027] Example 1: As shown in Figures 1-4, a method for detecting surface defects on wind turbine blades based on the YOLO algorithm includes the following steps: acquiring a dataset of wind turbine blade images and preprocessing the surface defect detection dataset; collecting publicly available wind turbine blade surface defect datasets from the Kaggle platform; performing normalization and standardization on the pixel values of the resized images to ensure good numerical stability and comparability of the data during deep learning training; and adjusting the original wind turbine blade images to a fixed input size using bilinear interpolation. To adapt to network input requirements, the collected wind turbine blade data was labeled using the open-source software LabelImg, detecting four typical defects: cracks, breakage, dirt, and paint peeling. Data augmentation techniques, including flipping, cropping, and Gaussian blurring, were used to process the wind turbine blades, resulting in a dataset of 2200 images. The dataset was randomly divided into training, testing, and validation sets in an 8:1:1 ratio, with the training set containing 1760 images, the validation set 220 images, and the testing set 220 images.
[0028] Based on YOLOv8n, an APF-YOLO defect detection model is constructed as shown in Figure 2: (I) In the backbone network of YOLOv8, the C2f module is a feature map transformation module designed to convert low-level feature maps into high-level feature maps. However, this module uses large convolutional kernels for downsampling, resulting in the loss of some detailed semantic information, thereby reducing detection performance. To solve this problem, this invention replaces the C2f module with the multi-scale feature extraction module ACCUD in the backbone network of YOLOv8, as shown in Figure 3.
[0029] Let the input feature map tensor be... for: In the formula, C represents the number of channels and spatial dimensions, W represents the width of the feature map, and H represents the height of the feature map. Based on the multi-scale requirements in wind turbine blade defect detection, the following is introduced... , , Three adaptive average pooling layers at different scales, each corresponding to a different feature dimension, ensure that the target's features are represented at different scales; for the input features... Perform adaptive average pooling in both horizontal and vertical directions to obtain spatial context: In the formula: The horizontal average characteristic value, The vertical average feature value; the three different scales of the adaptive average pooling layer AAP module are each associated with... Convolutional Conv module The convolutional Conv module, the upsampling Upsample module, and the DAT attention module are concatenated to obtain three new modules. Inputting three new modules yields three new output features, which are labeled as follows: , , : The DAT attention module is a deformable attention mechanism that dynamically adjusts the sampling position to adaptively focus on key regions in the image, making it particularly suitable for scenarios with sparse and uneven feature distribution. In wind turbine blade defect detection images, the image environment is complex, and defect regions typically exhibit non-uniform distribution, local density, and complex shapes. This complexity makes it difficult for traditional fixed-pattern attention mechanisms to capture key features. DAT's dynamic offset mechanism, however, can flexibly adjust the region of interest based on the defect shape and distribution, thereby extracting defect details more accurately, effectively reducing interference from irrelevant information, and providing more discriminative feature representations for subsequent detection. When calculating attention, instead of using features at fixed positions, bilinear interpolation is performed based on the adjusted sampling position to extract keys from the feature map. Sum The calculation expression is: In the formula, It is the sampling location in the feature map. and These are the projection matrices of the keys and values, respectively. For each query... Calculate its relationship with the key The similarity is determined, and deformable relative positional deviations are introduced. The formula for calculating local attention distribution is: In the formula, This indicates a predefined relative position offset table. The difference operation, This represents the normalized relative displacement. The attention output is: In the formula, It is an activation function used to introduce nonlinear mappings; finally, , , and The convolutional Conv module performs a row feature concatenation operation and obtains the output features through a linear transformation. ; In the formula, Concat is the feature concatenation operation.
[0030] (ii) The unidirectional and local feature fusion method used by the PAFPN network results in insufficient information transfer between different scales, affecting the classification and localization accuracy of the model. This invention replaces the YOLOv8 neck network PAFPN with the multi-scale feature aggregation and diffusion network structure CFDPN shown in Figure 4.
[0031] The Multi-Scale Feature Aggregation Diffusion Network (CFDPN) first aggregates input features from different levels of the Feature Aggregation Module (FAM) through modules. The FAM module explicitly models targets at different scales through a parallel branch structure composed of multiple depthwise separable convolutions, thereby enhancing the model's feature representation. This module receives three different scale input feature maps, denoted as... , , . It is a high-resolution feature map, containing spatial detail information that is especially important for small target detection; yes Next-level feature map; yes The next-level feature map provides rich global context and high-level semantic information. Since traditional convolutional downsampling easily loses key details of small targets, this paper employs a lightweight downsampling module, ADown, in the FAM module to process the high-resolution feature map. This module considers the distribution of input features and can adaptively learn feature weights, preserving key target features while downsampling, enhancing the saliency of small targets in subsequent feature maps, and improving the input features. Input features are processed by the ADown adaptive downsampling module. After convolutional Conv module, input features The outputs after convolutional Conv modules are concatenated to obtain : ; Features from different levels are captured by a set of parallel depthwise separable convolutions (DWConv), and then integrated and summed to obtain... : ; After that Convolutional Conv module and Perform residual connections to obtain the final output of the FAM module. : ;Then pass The convolutional Conv module passes shallow detail information downwards, and the upsampling Upsample module feeds in deep semantic information upwards. These are then concatenated with the P2 and P4 feature layers, thus achieving the first feature diffusion. This process is repeated, and the features from the first stage of feature diffusion are... The convolutional Conv module and upsampling module are concatenated with the subsequent corresponding outputs to achieve a second feature diffusion. Finally, the model achieves detailed contextual information at each detection scale, while also complementing shallow details and deep semantics, thus improving the model's detection performance for multi-scale targets.
[0032] (III) YOLOv8 uses the CIoU loss function, but it has significant drawbacks. Specifically, during training, the model may overemphasize aspect ratio optimization, neglecting the core requirement of "overlap" in object detection. This results in predicted bounding boxes with aspect ratios close to the true bounding boxes, but with a small overlap area with the target, leading to decreased localization accuracy and poor performance in detecting small targets like wind turbine blade defects. This invention introduces the Focaler SIoU loss function to replace YOLOv8's CIoU loss function, optimizing the bounding box regression process and improving the discrimination between easy and difficult samples.
[0033] Drawing on the core idea of Focal Loss, this method uses a dynamic focusing mechanism to assign greater weight to "difficult" predicted boxes that have low overlap with the ground truth boxes during loss calculation. By focusing on different regression samples, the performance of the detector can be improved in different detection tasks. This is achieved by dynamically adjusting the values of parameters m and n. It can adaptively focus on regression samples of varying difficulty, thereby optimizing the model's regression performance; The calculation formula is as follows: ;Depend on Define its loss function for: SIoU redesigns the loss calculation for bounding box regression, incorporating angular cost, distance cost, and shape cost. SIoU considers not only box overlap and center point distance but also predicts the orientation alignment and aspect ratio difference between the predicted and ground truth boxes. This makes the bounding box regression process more geometrically logical, guiding the model to converge faster and more accurately. The final Focaler SIoU loss function is: .
[0034] This model is evaluated using mAP@50, a commonly used performance evaluation metric in object detection algorithms. The hyperparameters are set as follows: 300 training iterations, batch size of 16, maximum learning rate of 0.01, minimum learning rate of 0, and cosine annealing algorithm is used to dynamically adjust the learning rate.
[0035] After training the model, the trained model is used to detect surface defects on wind turbine blades, thereby determining the type and location of the defects.
[0036] Example 2: In another preferred embodiment, based on Example 1, this embodiment describes in detail the complete process of the wind turbine blade defect detection method based on deep learning.
[0037] First, a public dataset containing 2200 images was constructed from images obtained from the Kaggle platform, covering four defect types: cracks, damage, dirt, and paint peeling. Then, LabelImg was used to standardize the location and category of defects in all images. Finally, the labeled dataset was randomly divided into three parts in an 8:1:1 ratio: a training set (1760 images) for model training, a validation set (220 images) for parameter tuning, and a test set (220 images) for final unbiased evaluation of model performance.
[0038] Secondly, the YOLOv8 model is improved. In the backbone network of the YOLOv8n framework, the C2f module is replaced with a multi-scale feature extraction module ACCUD, which better preserves detailed information, especially in complex scenes. This enhances the more accurate extraction of defect details and effectively avoids interference from background information, providing more discernible feature representations for subsequent detection. In the neck structure of the YOLOv8n framework, the PAFPN network structure is replaced with a multi-scale feature aggregation and diffusion network structure CFDPN, which enables the model to have detailed contextual information at each detection scale, while achieving mutual complementarity between shallow details and deep semantics, improving the model's detection performance for multi-scale targets. In the loss function of the YOLOv8n framework, the Focaler SIoU loss function is introduced, which can adaptively focus on regression samples of different difficulty levels, thereby optimizing the model's regression performance and guiding the model to converge faster and more accurately.
[0039] During the model training phase, the key hyperparameters were set as follows: a training period of 3000, a batch size of 16, and an initial learning rate of 0.01, dynamically adjusted using a cosine annealing scheduler. After training, the obtained model was used to detect blade defects, identifying defect categories and locating their positions. Finally, this embodiment uses the common evaluation metric mAP@50 in the field of object detection to quantitatively evaluate the model performance.
[0040] Example 3: In another preferred embodiment, based on Examples 1 and 2, this embodiment takes a specific application scenario as an example to demonstrate the effect of the present invention in practical application.
[0041] In its daily operation and maintenance, a wind farm has long been plagued by common defects in its wind turbine blades, such as cracks, damage, dirt, and paint peeling. To ensure the safe and stable operation of the power generation system and to achieve early detection and rapid repair of defects, the wind farm has introduced the deep learning-based wind turbine blade defect detection method proposed in this invention.
[0042] In practical applications, after preparing the data and training the improved YOLOv8 model based on the aforementioned embodiments, it is deployed to the wind farm monitoring system. This system can use the model to perform real-time analysis of captured blade images, automatically detect the type and location of defects, and immediately feed the results back to staff, thus achieving rapid response.
[0043] Practical applications have shown that the method of this invention significantly improves the detection efficiency and identification accuracy of blade surface defects, providing a solid guarantee for the safe and stable operation of wind farms. At the same time, the method exhibits excellent robustness and generalization ability, and can be reliably applied to detection tasks under various complex environments and changing conditions.
[0044] In the preferred scheme, the dataset used by S1 comes from the Kaggle public platform. The dataset is labeled using the LabelImg tool and includes four types of defect images: cracks, damage, dirt, and paint peeling, to cover common blade defect types.
[0045] In the preferred scheme, S2 randomly divides the dataset into training, testing, and validation sets in an 8:1:1 ratio. This ensures data quality and annotation efficiency while providing a reliable foundation for model training and generalization ability evaluation through a scientific partitioning strategy.
[0046] In the preferred scheme, S3 replaces the C2f module in the backbone network of the YOLOv8n framework with a multi-scale feature extraction module ACCUD. This better preserves detailed information, especially in complex scenes, enhancing the more accurate extraction of defect details and effectively avoiding interference from background information, providing more discernible feature representations for subsequent detection. In the neck structure of the YOLOv8n framework, the PAFPN network structure is replaced with a multi-scale feature aggregation and diffusion network structure CFDPN. This allows the model to have detailed contextual information at each detection scale, while achieving mutual complementarity between shallow details and deep semantics, improving the model's detection performance for multi-scale targets. In the loss function of the YOLOv8n framework, the Focaler SIoU loss function is introduced, which can adaptively focus on regression samples of different difficulty levels, thereby optimizing the model's regression performance and guiding the model to converge faster and more accurately.
[0047] In the preferred scheme, the hyperparameter settings of S4 aim to improve model performance by finely tuning the training process. Specifically, this includes setting the number of training iterations, batch size, and initial learning rate, and applying the cosine annealing algorithm. This setup not only aims to achieve more efficient and stable model convergence, but its dynamic learning rate adjustment mechanism also enables the model to effectively escape local optima, thereby gaining stronger generalization ability.
[0048] In the preferred embodiment, the performance of the APF-YOLO defect detection model of the present invention was compared with that of mainstream deep learning methods, including Faster-RCNN, RTDETR, SSD, YOLOv5n, YOLOv8n, and YOLOv10n. The experimental results are shown in Table 1.
[0049] Specifically, compared to YOLOv5, YOLOv8n, and YOLO10n models of similar scale, the APF-YOLO model of this invention exhibits superior detection performance. Compared to larger-scale Faster-RCNN, RTDETR, and SDD models, the APF-YOLO model also maintains a leading position in mAP metric. In summary, the APF-YOLO model proposed in this invention achieves optimal overall detection performance while maintaining low computational complexity, fully demonstrating its efficiency and robustness.
[0050] In summary, this invention proposes a deep learning-based method for wind turbine blade defect detection, aiming to address the problem that in complex lighting environments and extreme weather conditions such as rain, snow, and fog, the model is prone to feature confusion, which significantly reduces image contrast, limits feature extraction capabilities, and leads to missed detection of small-scale defects, resulting in a substantial decrease in detection accuracy. Existing target detection algorithms often struggle to accurately identify small target defects in complex backgrounds and variable lighting conditions, and the detection process demands high computational resources.
[0051] To address this, this invention introduces a multi-scale feature extraction module, ACCUD, which better preserves detailed information, especially in complex scenarios. This enhances the accuracy of extracting defect details and effectively avoids interference from background information, providing more discernible feature representations for subsequent detection. Replacing the PAFPN network structure with a multi-scale feature aggregation and diffusion network structure, CFDPN, allows the model to have detailed contextual information at each detection scale, while simultaneously achieving mutual complementarity between shallow details and deep semantics, improving the model's detection performance for multi-scale targets. Introducing the Focaler SIoU loss function adaptively focuses on regression samples of varying difficulty, thereby optimizing the model's regression performance and guiding it to converge faster and more accurately. This approach also emphasizes the processing and labeling of the dataset, ensuring high-quality data for model training, thus improving the model's generalization ability and robustness. Through these innovative improvements and designs, this invention not only improves the detection accuracy and efficiency of surface defects on wind turbine blades but also provides new ideas and methods for enhancing the performance of target detection algorithms, bringing new breakthroughs and developments to the field of wind turbine blade surface defect detection.
Claims
1. A method for detecting defects in wind turbine blades based on the APF-YOLO model, characterized in that... The process includes the following steps: Step 1: Obtain the wind turbine blade defect dataset and preprocess it; Step 2: Randomly divide the dataset into training and testing sets according to a certain ratio; Step 3: Construct the APF-YOLO defect detection model based on YOLOv8n; Step 4: Train the APF-YOLO defect detection model using the training set to obtain the detection results.
2. The wind turbine blade defect detection method based on the APF-YOLO model according to claim 1, characterized in that: In step 3, the APF-YOLO defect detection model is constructed, including: 3.1: In the backbone network of the YOLOv8n framework, the C2f module in the backbone network is replaced with a multi-scale feature extraction module ACCUD; 3.2: In the neck structure of the YOLOv8n framework, the PAFPN network structure is replaced with a multi-scale feature aggregation and diffusion network structure CFDPN; 3.3: In terms of loss function design, the Focaler SIoU loss function is introduced to optimize the bounding box regression process and improve the discrimination between easy and difficult samples.
3. The wind turbine blade defect detection method based on the APF-YOLO model according to claim 2, characterized in that: In section 3.1, the ACCUD multi-scale feature extraction module is formed as follows: Let the input feature map tensor be... : (1); In equation (1), C is the number of channels and spatial size, W is the width of the feature map, and H is the height of the feature map; Define the value space for the data; based on the multi-scale requirements in wind turbine blade defect detection, introduce... 、 、 Three adaptive average pooling layers at different scales, each corresponding to a different feature dimension, ensure that the target's features are represented at different scales: for the input features Perform adaptive average pooling in both horizontal and vertical directions to obtain the spatial context: (2); In equation (2), The horizontal average characteristic value, It is the vertical average characteristic value.
4. The wind turbine blade defect detection method based on the APF-YOLO model according to claim 3, characterized in that: Three adaptive average pooling layers of different scales, each with its own... Convolutional Conv module The convolutional Conv module, the upsampling Upsample module, and the DAT attention module are concatenated to obtain three new modules. Inputting three new modules yields three new output features, which are labeled as follows: 、 、 ; (3); In equation (3), This indicates the input feature map Perform adaptive average pooling with a size of 3×3; This indicates the input feature map Perform adaptive average pooling with a size of 6×6; This indicates the input feature map Perform adaptive average pooling with a size of 3×3; For 3×3 size convolution operations; This is an upsampling operation; For DAT attention module splicing.
5. The wind turbine blade defect detection method based on the APF-YOLO model according to claim 4, characterized in that: For the DAT attention module, when calculating attention, features at fixed locations are no longer used. Instead, bilinear interpolation is performed based on the adjusted sampling locations to extract keys from the feature map. Sum The calculation expression is: (4); In equation (4), It is the sampling location in the feature map; and These are the projection matrices of the keys and values, respectively; for each query Calculate its relationship with the key The similarity is determined, and deformable relative positional deviations are introduced. The formula for calculating local attention distribution is: (5); In equation (5), This represents the attention weight for the i-th key corresponding to the m-th query; This represents the m-th query vector; This represents the transpose of the m-th key vector; This indicates a predefined relative position offset table. The difference operation, This represents the normalized relative displacement; the attention output is: (6); In equation (6), This represents the output feature vector of the m-th attention mechanism. It is an activation function used to introduce nonlinear mappings; Represent the value vector of the m-th group; finally, 、 、 and The convolutional Conv module performs a row feature concatenation operation and obtains the output features through a linear transformation. : (7); In equation (7), Indicates input features Perform convolution operations; This is a feature splicing operation.
6. The wind turbine blade defect detection method based on the APF-YOLO model according to claim 5, characterized in that: In section 3.2, the multi-scale feature aggregation and diffusion network structure CFDPN is used. This network can aggregate deep and shallow features to an intermediate level and diffuse aggregated features containing rich multi-scale context to the upper and lower layers of the network in a bidirectional divergent manner, thereby realizing bidirectional dynamic interaction of multi-scale features. Specifically, the multi-scale feature aggregation and diffusion network structure CFDPN first aggregates input features at different levels through the feature aggregation module FAM. The Feature Aggregation Module (FAM) enhances the feature representation of the model by explicitly modeling targets at different scales through a parallel branch structure consisting of multiple depthwise separable convolutions. The Feature Aggregation Module (FAM) receives input feature maps at three different scales, denoted as follows: , , ,in: It is a high-resolution feature map, containing spatial detail information that is especially important for small target detection; yes Next-level feature map; yes Next level feature map, Feature layers provide rich global context and advanced semantic information.
7. The wind turbine blade defect detection method based on the APF-YOLO model according to claim 6, characterized in that: The Feature Aggregation Module (FAM) employs a lightweight downsampling module (ADown) to process high-resolution feature maps. ADown considers the distribution of input features and adaptively learns feature weights, preserving key target features while downsampling, thus enhancing the saliency of small targets in subsequent feature maps and improving the input features. Input features are processed by the lightweight downsampling module ADown. Input features are processed through the Conv module. The outputs after convolutional Conv modules are concatenated to obtain : (8); In equation (8), This refers to the intermediate features obtained by concatenating the features after multi-path processing in the Feature Aggregation Module (FAM). Indicates input features Lightweight downsampling operation is implemented using the ADown module; Indicates input features Perform convolution operations; Indicates input features Perform convolution operations; Features from different levels are captured by a set of parallel depthwise separable convolutions (DWConv), and then integrated and summed to obtain... : (9); In equation (9), Indicates intermediate features Perform a 3×3 depthwise separable convolution operation; Indicates intermediate features Perform a 5×5 depthwise separable convolution operation; Indicates intermediate features Perform a 7×7 depthwise separable convolution operation; After that Convolutional Conv module and Perform residual connections to obtain the final output of the feature aggregation module FAM: (10); In equation (10), Indicates intermediate features Perform a 1×1 convolution operation; then pass The Conv module passes shallow detail information downwards and uses the Upsample module to feed deep semantic information upwards; then it is concatenated with the P2 and P4 feature layers respectively, thus achieving the first feature diffusion.
8. The wind turbine blade defect detection method based on the APF-YOLO model according to claim 7, characterized in that: After the first feature diffusion, the feature processing and splicing process is repeated: the features from the previous stage are then combined. The features processed by the convolutional Conv module are concatenated with feature maps of different scales at the corresponding level along the channel dimension, thereby further integrating multi-scale and multi-path feature information to achieve a second feature diffusion.
9. The wind turbine blade defect detection method based on the APF-YOLO model according to claim 8, characterized in that: In section 3.3, regarding the design of the loss function, the Focaler SIoU loss function is introduced to replace the CIoU loss function of YOLOv8 itself, thereby optimizing the bounding box regression process and improving the discrimination between easy and difficult samples. The calculation formula is as follows: (11); In equation (11), Indicates intersection, union, and ratio; This represents the lower limit of the IoU threshold for difficult samples; This represents the upper limit of the IoU threshold for easy samples; Depend on Define its loss function for: (12); Combining SIoU and The Focaler SIoU loss function is obtained as follows: (13)。 10. The wind turbine blade defect detection method based on the APF-YOLO model according to claim 9, characterized in that: In step 4, during the training phase of the APF-YOLO defect detection model, the key hyperparameters are set as follows: the training period is 3000, the batch size is 16, the initial learning rate is set to 0.01, and a cosine annealing scheduler is used for dynamic adjustment. After training, the obtained model is used to detect wind turbine blade defects in order to identify the type of wind turbine blade defect and locate its position. Finally, a common evaluation metric in the field of object detection is adopted: the mean accuracy at an IoU threshold of 50%, to comprehensively measure the detection accuracy of the model; the calculation formula is shown below: (14); In equation (14), parameter n represents the total number of target categories in the dataset. Let be the AP value for class i.