Gas turbine blade defect identification method based on improved YOLOV8 network
By using an improved YOLOV8 network, the problem of low detection efficiency of traditional borehole probes has been solved, enabling efficient and accurate detection of defects in gas turbine blades. This technology is adaptable to high-temperature and high-pressure environments and reduces manual intervention and missed detections.
Patent Information
- Application Number
- CN202510913230.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-03
- Publication Date
- 2025-10-28
AI Technical Summary
Traditional borescopes are inefficient, subjective, and prone to missing defects when detecting defects in gas turbine blades, making them unsuitable for testing under high temperature and high pressure conditions.
An improved YOLOv8 network is employed, which enhances detection accuracy and robustness through image acquisition, preprocessing, data augmentation, annotation, and model optimization, including layer-by-layer pooling modules, neck network structure optimization, and directional detection boxes.
It has achieved pixel-level detection and localization of defects in gas turbine blades, improving the accuracy and real-time performance of detection, reducing manual intervention, and lowering labor costs.
Smart Images

Figure CN120852854A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of defect identification technology, and in particular relates to a method for identifying defects in gas turbine blades based on an improved YOLOV8 network. Background Technology
[0002] Long-term high-load operation of gas turbines can lead to fatigue cracks, corrosion, creep, and thermal damage in critical turbine blades. If these defects are not detected and addressed promptly, they can cause serious malfunctions or even catastrophic accidents. Currently, the most mature solution is borehole inspection technology. However, traditional borehole inspection methods rely heavily on manual operation and visual judgment, generally suffering from low efficiency, high subjectivity, and a high risk of missed or undetected defects. A deep learning-based intelligent defect identification system can automatically process and analyze images, significantly improving inspection efficiency and reducing human intervention, which is of great significance for gas turbine inspection. By establishing and applying deep learning models, the system can automatically identify and classify defects in images, reducing human error and missed detections, and improving the accuracy and reliability of inspections. The intelligent defect identification system can also reduce reliance on professional inspection personnel, lowering labor costs. Summary of the Invention
[0003] The purpose of this invention is to address the need for detecting defects such as cracks and corrosion that easily occur in shipboard gas turbine blades under high temperature and high pressure operating environments. To solve the problems of low efficiency, strong subjectivity, and high missed detection rate of traditional borescope manual inspection, this invention provides a gas turbine blade defect identification method based on an improved YOLOV8 network.
[0004] To achieve the above objectives, the present invention adopts the following technical solution.
[0005] A method for identifying defects in gas turbine blades based on an improved YOLOv8 network includes the following steps:
[0006] Step 1, Image Acquisition: Use a high-resolution probe, manually focus to capture and save defect images; adopt a multi-angle acquisition method in the detection area, take 3 sets of images at each detection point, at 0°, 45° and 90° with the vertical line of the defect plane respectively, and at the same time reduce blind spots by extending and rotating the probe 360°.
[0007] Step 2, image preprocessing, refers to optimizing the original image to improve image quality, extract useful information, or adapt to the needs of subsequent tasks such as target detection, classification, and segmentation.
[0008] Step 3: Image data augmentation. Based on the original data, data augmentation is performed through geometric transformation and color perturbation to improve the model's generalization ability, making the model more accurate and faster, and able to adapt to complex changes in real-world conditions.
[0009] Step 4, image annotation, refers to adding structured labels or annotations to images to give them semantic information, enabling machine learning models to understand and utilize them, so as to extract data information through computing power;
[0010] Step 5: Model optimization. Based on YOLOv8, the following improvements are proposed to improve the detection and identification performance of the YOLOv8 model in gas turbine blade defect detection. Specific improvements include:
[0011] 5a. A layer-by-layer pooling module is added at the end of the backbone network. This module improves the model’s ability to capture and fuse defect features from different spatial scales. The layer-by-layer pooling module includes three branches and a CBS module that performs secondary extraction on the outputs of the three branches.
[0012] Branch 1 uses a spatial pyramid pooling module to perform layer-by-layer max pooling on feature maps of different scales, thereby generating fixed-length feature vectors. This process handles input images of different sizes, aggregates the semantic features above and below defects, and improves the model's ability to detect targets of different sizes.
[0013] Branch 2 uses convolutional layers, batch normalization layers, and activation function layers to extract feature map information from the input features, thereby improving the expressive power of the features and the generalization ability of the network, enhancing the distinguishability of the features, and thus improving the accuracy of small target recognition in target detection tasks.
[0014] Branch 3 employs a fusion of cross-directional average pooling and depthwise convolution to mine spatial information in feature maps, enhance the ability to extract contextual information, and alleviate the problem of information loss in feature maps.
[0015] After the three branches are combined, the fused feature map information is extracted again by the CBS module to enhance the module's ability to aggregate contextual information of the feature map.
[0016] 3b. Optimize the neck network structure by replacing the Bottleneck structure in the original C2f module with the DBB+ structure. In the combined structure, the BN module in the original dynamic multi-branch structure (DBB) is replaced with a plug-and-play self-attention module (CBAM).
[0017] 3c. Optimize the detection frame structure by replacing the YOLOv8 detection frame with an oriented detection frame (OBB). The θ angle is adaptively adjusted by rotating the bounding box to improve the detection accuracy of defects in any direction.
[0018] Step 6: Training and Prediction Analysis. The collected training and validation datasets are used to train the aforementioned model on a distributed heterogeneous computing framework and then used for prediction tasks.
[0019] A further improvement or preferred embodiment of the aforementioned gas turbine blade defect identification method based on the improved YOLOv8 network, wherein step 2 of the image preprocessing includes image denoising, image enhancement, and normalization; specifically:
[0020] 2a Image denoising refers to removing noise from an image using algorithms, including Gaussian noise and salt-and-pepper noise;
[0021] 2b Image enhancement refers to the targeted highlighting of features of interest and suppression of irrelevant information, improving image clarity while adapting to human visual perception characteristics, and transforming it into a form that is easier for machine analysis.
[0022] 2c. Normalization refers to the process of converting the original image into a unique standard form through a series of standardized transformations. The processed standard image is called a normalized image, which has invariance to affine transformations such as translation, rotation, and scaling.
[0023] A further improvement or preferred embodiment of the aforementioned gas turbine blade defect identification method based on the improved YOLOV8 network, wherein the image data enhancement method in step 3 includes geometric transformation and color perturbation;
[0024] Geometric transformations refer to changing the spatial position of pixels in an image through mathematical mapping, thereby adjusting the shape, viewpoint, or spatial relationships of the image. These transformations include rotation, flipping, cropping, scaling, and shifting operations.
[0025] Color perturbation generates diverse images by adjusting the color attributes of an image, simulating different lighting conditions and color configurations, including brightness adjustment, contrast adjustment, saturation adjustment, and hue adjustment.
[0026] In a further improved or preferred embodiment of the aforementioned gas turbine blade defect identification method based on the improved YOLOV8 network, step 4 involves using the LabelMe annotation tool for image annotation, selecting target defects using polygonal bounding boxes; inputting labels after completion, and saving the generated label JSON file in the directory after confirmation; finally, constructing a dataset from all annotated data, and dividing the dataset into training, validation, and test sets in an 8:1:1 ratio. The training set is used to train the model, the validation set is used to validate the model's performance, and adjustments are made continuously based on the results to find the optimal model parameters. The hyperparameters of the best model are then recorded, and finally, the test set is used to evaluate the final model.
[0027] In a further improved or preferred embodiment of the aforementioned gas turbine blade defect identification method based on the improved YOLOV8 network, the third branch first performs average pooling on the input feature map in the x-axis and y-axis directions to capture the spatial features of the feature map and fill in the smoothness gaps. Then, the spatial features are analyzed and fused through the MPConv convolution module to enrich the feature representation. Finally, the feature distribution is standardized through a batch normalization layer in each convolutional layer, and nonlinearity is introduced through the SiLU activation function to improve the feature discrimination ability and achieve accurate identification in complex scenarios.
[0028] In a further improved or preferred embodiment of the aforementioned gas turbine blade defect identification method based on the improved YOLOV8 network, in step 2a, Gaussian filtering is used for image processing to address Gaussian noise. The new value of each pixel in the processed image is obtained by weighted averaging of the pixel's own value and the values of other pixels in its neighborhood. Median filtering is used to address salt-and-pepper noise. This involves analyzing the sampled values in the input signal to determine whether they truly represent the signal characteristics. Using an observation window composed of an odd number of sampled values, the values within the observation window are first sorted, and the median value in the middle position is used as the output value. The earliest sampled value in the window is discarded, and new sampled values are included. The above sorting and calculation process is repeated until the entire image processing is completed.
[0029] In a further improvement or preferred embodiment of the aforementioned gas turbine blade defect identification method based on the improved YOLOV8 network, the image enhancement method used in step 2b includes contrast enhancement, color enhancement, and brightness adjustment;
[0030] Contrast enhancement refers to calculating the histogram, then calculating the cumulative distribution function, mapping it to a new gray level, and finally generating an equalized image.
[0031] Color enhancement modifies the colors of an image using methods such as saturation adjustment and color balance. Saturation enhancement increases the saturation component value in the HSV or HSL color space to make the colors more vibrant. Color balance corrects color casts caused by the light source color, making white objects appear white in the image.
[0032] Brightness adjustment is used to adjust the brightness of an image to make it clearer.
[0033] The gas turbine blade defect identification method based on the improved YOLOV8 network proposed in this application can achieve pixel-level detection and localization of blade defects, which can effectively meet the needs of daily inspection, while taking into account both detection accuracy and real-time performance. Attached Figure Description
[0034] Figure 1This is a schematic diagram illustrating the principle of Gaussian function calculation and generation;
[0035] Figure 2 This refers to a schematic diagram of the image before noise reduction.
[0036] Figure 3 This refers to a schematic diagram of the image after noise reduction.
[0037] Figure 4 This is a schematic diagram of the image before enhancement processing;
[0038] Figure 5 This is a schematic diagram after image enhancement processing;
[0039] Figure 6 It is the original image;
[0040] Figure 7 yes Figure 6 The image obtained after cropping;
[0041] Figure 8 yes Figure 7 The image obtained after rotation;
[0042] Figure 9 This is a flowchart of the data annotation workflow;
[0043] Figure 10 This is a schematic diagram of the Instance segmentation method.
[0044] Figure 11 This is a trend chart of the F1 score as the confidence level changes;
[0045] Figure 12 It is a trend chart showing how accuracy changes as confidence level changes;
[0046] Figure 13 It is a trend chart showing how precision changes as recall changes;
[0047] Figure 14 It is a trend chart showing how recall rate changes with confidence level;
[0048] Figure 15 This is a diagram of a confusion matrix;
[0049] Figure 16 This is a diagram of a standardized confusion matrix;
[0050] Figure 17 This is a chart showing the number of instances in each category;
[0051] Figure 18 It is a bounding box distribution map;
[0052] Figure 19 This is a map showing the distribution of the target center coordinates;
[0053] Figure 20 This is a distribution map of the target's aspect ratio;
[0054] Figure 21 It is a plot of univariate distribution (diagonal subplot: histogram) and bivariate correlation (off-diagonal subplot: two-dimensional histogram / scatter plot);
[0055] Figure 22 It is the mask F1-confidence curve;
[0056] Figure 23 It is the mask recall-confidence curve;
[0057] Figure 24 These are curves showing the accuracy performance at different confidence thresholds;
[0058] Figure 25 It is a recall-confidence curve;
[0059] Figure 26 It is the training loss map (including bounding box loss, segmentation loss, classification loss, and regression loss);
[0060] Figure 27 It is a verification loss graph;
[0061] Figure 28 This is a diagram illustrating the evaluation metrics of precision and recall.
[0062] Figure 29 It is an mAP (mean precision) plot. Detailed Implementation
[0063] This application presents a gas turbine blade defect identification method based on an improved YOLOv8 network. Leveraging deep learning technology, this method significantly improves detection efficiency and reduces manual intervention, which is of great significance for gas turbine inspection. By optimizing and improving the deep learning model, it can better achieve automatic identification and classification of gas turbine blade defects, reducing human error and missed detections, improving the accuracy and reliability of inspection, reducing reliance on professional inspection personnel, and lowering labor costs. The method's high efficiency and accuracy can reduce equipment downtime and lower maintenance costs, which is conducive to further promoting the intelligent development of the gas turbine inspection field and provides a technical foundation for the intelligent inspection of other equipment.
[0064] The present invention will be described in detail below with reference to specific embodiments.
[0065] The basic steps of the gas turbine blade defect identification method based on the improved YOLOV8 network of the present invention are as follows:
[0066] Step 1, Image Acquisition:
[0067] Image acquisition and recording are fundamental steps in digital image processing, and their quality directly affects the accuracy of subsequent analysis, recognition, and decision-making.
[0068] The probe acquires images from multiple angles within the detection area, capturing three sets of images at each detection point. These images are positioned at 0° (front view), 45° (oblique view), and 90° (side view) relative to the perpendicular bisector of the defect plane. Simultaneously, the probe is extended and rotated 360° to minimize blind spots. For blade crack detection, operators use a high-resolution probe, manually focusing to capture and save the defect images.
[0069] Step 2: Image Preprocessing
[0070] Image preprocessing refers to a series of operations performed on the original image to improve image quality, extract useful information, or adapt to the needs of subsequent tasks such as object detection, classification, and segmentation. It is a fundamental step in computer vision and image processing, completed before feature extraction or model training. In this application, it mainly refers to image denoising, enhancement, and normalization processing implemented using OpenCV library functions. OpenCV, as a mature image recognition algorithm library, can quickly achieve object processing, recognition, and geometric feature calculation and extraction through built-in functions, demonstrating high efficiency, especially in the statistical analysis of defect morphology features. Specifically, it includes:
[0071] Image denoising (2a) refers to the process of removing random interference signals (i.e., noise) from an image by means of algorithms, which are introduced by sensor noise, transmission interference, or environmental factors, while retaining the useful information of the original image. Its core objective is to improve image quality, making the image more conducive to recognition and providing clearer input data for subsequent tasks such as image segmentation, feature extraction, and target recognition. Noise is random interference in an image that is unrelated to the real signal, and it usually manifests as abnormal fluctuations in pixel values, including Gaussian noise and salt-and-pepper noise.
[0072] Gaussian noise refers to a type of noise whose probability density function follows a Gaussian distribution (normal distribution). In digital images, the main source of Gaussian noise occurs during the acquisition period. Gaussian filtering is used to process images by weighted averaging of image pixels. Specifically, the new value of each pixel in the image is obtained by weighted averaging of the pixel's own value and the values of other pixels in its neighborhood.
[0073] Taking a common 3×3 convolution kernel as an example, the values within this kernel are generated by a Gaussian function. Its characteristic is that the value reaches its maximum at the center point, and gradually decreases as the distance from the center point increases. The calculation process is as follows... Figure 1 As shown, by performing a matrix multiplication operation between the convolution kernel and the pixel matrix in the image, the new value of each pixel is finally determined through this calculation method. For example, the original value of the center pixel is 226, and after filtering, its new value is 164.
[0074] Salt-and-pepper noise, also known as impulse noise, manifests as randomly appearing white or black pixels, such as black pixels in bright areas, white pixels in dark areas, or both. To address salt-and-pepper noise, this application employs median filtering of the image. This involves analyzing the sampled values in the input signal to determine if they truly represent the signal characteristics. Using an observation window composed of an odd number of sampled values, the values within the window are first sorted, and the median value is used as the output value. The earliest sampled value in the window is discarded, and new sampled values are added. This sorting and calculation process is repeated until the entire image is processed. After median filtering, the image effectively eliminates noise and significantly improves clarity, laying a solid foundation for subsequent models to more accurately and quickly identify defects. Figure 2 and Figure 3 As shown.
[0075] 2b image enhancement,
[0076] In practical applications, images often become blurred during processing or transmission due to various factors, leading not only to a decrease in image quality but also potentially obscuring key features and hindering subsequent analysis. Image enhancement technology, by applying information additions or data transformations to the original image, selectively highlights features of interest and suppresses irrelevant information. This improves image clarity while adapting to human visual perception characteristics and transforms the image into a form more suitable for machine analysis. Through technical means, it strengthens the effective information in the image and optimizes its visual presentation based on the specific application scenario. The image enhancement methods used in this application include contrast enhancement, color enhancement, and brightness adjustment.
[0077] Contrast enhancement refers to visual optimization achieved by adjusting the brightness differences between different areas of an image. It is suitable for image scenes with uneven brightness distribution. The core principle is to reconstruct the image histogram, making the pixel values more evenly distributed across the entire grayscale range, thereby significantly improving image contrast and enhancing detail recognition. The steps are as follows: first, calculate the histogram; then, calculate the cumulative distribution function; then, map it to a new grayscale level; finally, generate the equalized image. Table 1 shows the histogram distribution of the equalized image after grayscale transformation through histogram equalization calculation.
[0078] Table 1. Histogram equalization calculation process
[0079]
[0080] Color enhancement modifies the colors of an image using methods such as saturation adjustment and color balance. Saturation enhancement increases the S (saturation) component value in the HSV or HSL color space to make the colors more vibrant. Color balance corrects color casts caused by the light source color, making white objects appear white in the image.
[0081] Brightness adjustment is used to adjust the brightness of an image to make it clearer.
[0082] Figure 4 , Figure 5 The comparison shows the results after image enhancement processing. It can be seen that after enhancement processing, the image's recognizability and contrast are improved compared to the original image, and the image feature information is clearer.
[0083] 2c. Normalization processing
[0084] Image normalization is the process of converting the original image into a unique standard form through a series of standardization transformations. The processed standard image is called a normalized image. It has invariant properties to affine transformations such as translation, rotation, and scaling. The purpose of normalization is to map data to a specific range, making the data easier to process and compare. In machine learning and deep learning, normalizing input data can accelerate the model training process and improve the model's generalization ability.
[0085] Taking min-max normalization as an example, this operation calculates the minimum and maximum values in the image data, applies a linear transformation to each pixel value, and scales it to a specified range, typically [0,1] or [-1,1]. The formula is as follows: ;
[0086] Step 3: Image Data Enhancement
[0087] Data augmentation refers to the process of expanding the quantity and diversity of training data to improve the performance and robustness of machine learning models. Data, as a core element of model training, is in extremely high demand. More abundant and diverse data helps models enhance their generalization ability, thus better adapting to new datasets. Real-world gas turbine blade defect samples are too few to meet the large amount of data required for model building. Therefore, this application augments existing data through geometric transformations and color perturbations to improve model generalization ability, making the model more accurate and faster, and able to adapt to complex changes in real-world conditions. Data augmentation also allows the model to "see" more variant versions of the same type, forcing the model to learn more robust features of defects, rather than relying solely on certain fixed pixels or textures. Specific augmentation methods involved in this application include geometric transformations and color perturbations.
[0088] Geometric transformations refer to changing the spatial position of pixels in an image through mathematical mapping, thereby adjusting the shape, viewpoint, or spatial relationships of the image. These transformations include rotation, flipping, cropping, scaling, and shifting operations.
[0089] Rotation refers to rotating an image at random angles to simulate different viewing angles. Rotating the image enhances the model's robustness to rotating objects and maintains stable recognition capabilities. Flipping refers to horizontally or vertically flipping an image to help the model recognize symmetrical objects and increases data diversity without changing the image content. Cropping refers to cropping a region from the original image while discarding irrelevant parts, increasing image diversity and simulating changes in object position in different scenes. Scaling refers to randomly adjusting the size or scale of an image to help the model learn the features of objects of different sizes. Shifting refers to randomly translating an image horizontally or vertically to simulate objects appearing in different positions.
[0090] like Figure 8 It is by Figure 6 Obtained after cutting Figure 7 It is then rotated to make the target defect more prominent through geometric transformation, which facilitates the training of subsequent models.
[0091] Color perturbation generates diverse images by adjusting their color attributes, simulating different lighting conditions and color configurations. This includes brightness adjustment, contrast adjustment, saturation adjustment, and hue adjustment. For example, by enhancing brightness, contrast, and saturation, it improves the visibility of defect features, making them easier to identify.
[0092] Step 4: Image annotation
[0093] Data annotation refers to adding structured labels or annotations to images, endowing them with semantic information so that machine learning models can understand and utilize it. This facilitates the extraction of data information through computing power, which is then transformed into a knowledge system by algorithms and ultimately applied to model recognition training tasks. By adding semantic meaning to images through annotation, algorithms and computing power can be combined to achieve scene recognition and task execution. Annotated images are used to train and validate deep learning models, helping them learn how to extract meaningful patterns and information from raw data. The workflow of data annotation is shown in the diagram below. Figure 9 As shown.
[0094] Specifically, in this embodiment, LabelMe is selected to create the dataset. In LabelMe, target defects are selected using polygon boxes. When annotating, the last point should be connected end to end, and all points should be located as precisely as possible at the edge of the defect. After completion, the labels are entered, and the generated label JSON file is saved in the directory. In order to meet the training requirements of the model, the annotated JSON data needs to be converted to TXT format. Finally, all the annotated data is used to build a dataset, and the dataset is divided into training set, validation set and test set in a ratio of 8:1:1. The training set is used to train the model, the validation set is used to verify the performance of the model, and the model parameters are continuously adjusted and modified according to the results to find the optimal model parameters. Then the hyperparameters of the best model are recorded, and finally the test set is used to evaluate the final model.
[0095] Step 5: Model Optimization
[0096] In the field of industrial equipment operation and maintenance, blades are key components of ship gas turbines, and their defect detection is crucial for the safe operation and performance assurance of the equipment. This application focuses on the pixel-level accurate identification of blade defects. By constructing a detection scheme based on the YOLOv8 instance segmentation model, and by analyzing the model architecture, optimizing the training process, and conducting multi-dimensional performance evaluation, the application potential of the scheme in complex scenarios is optimized, providing technical support for the efficient and accurate detection of blade defects.
[0097] Instance segmentation is a complex task that requires models to be able to identify different categories of objects in an image and classify each individual object at the pixel level. Instance segmentation not only needs to distinguish between different categories, but also to identify different individuals within the same category. For each type of object, the instance segmentation algorithm needs to determine their location and type and generate a unique binary mask for each individual object in order to distinguish different instances within the same category.
[0098] The instance segmentation method currently used in YOLOv8 utilizes the largest feature map in Head1 as input to the Mask branch. After processing by the proto_pre convolutional layer, a mask_feature with shape (B, mask_channel, H, W) is obtained. The prediction branch for the detection boxes is essentially the same as the YOLOv5 Head in object detection, except that parameters for calculating the mask for each instance are added to the channels of the feature_map. The number of parameters is the same as the mask_channel output by proto_pred. Therefore, for an 80x80 / 40x40 / 20x20 feature_map, the number of channels is 4 + 1 + numclasses + mask_channel. After obtaining the decoded detection boxes, they are processed by NMS to obtain the final detection boxes. The corresponding mask_channel coeffs are multiplied and weighted with the mask_feature to obtain the final instance segmentation result. The complete process is as follows: Figure 10 As shown.
[0099] Although YOLOv8 can be applied to defect detection, its real-time performance and multi-scale processing still have limitations under complex defect conditions in this application. Therefore, based on YOLOv8, this application proposes the following improvements to enable the YOLOv8 model to achieve better detection and recognition performance in the gas turbine blade defect detection of this application. The specific improvements include:
[0100] 5a. A layer-by-layer pooling module is added at the end of the backbone network. This module improves the model's ability to capture and fuse defect features from different spatial scales, avoiding the loss of subtle defect image features when extracting and fusing feature map information. The specific principle is as follows:
[0101] The layer-by-layer pooling module includes three branches and a CBS module that performs secondary extraction on the outputs of the three branches;
[0102] Branch 1 uses a spatial pyramid pooling module to perform layer-by-layer max pooling on feature maps of different scales, thereby generating fixed-length feature vectors. This process handles input images of different sizes, aggregates the semantic features above and below defects, and improves the model's ability to detect targets of different sizes.
[0103] Branch 2 uses convolutional layers, batch normalization layers, and activation function layers to extract feature map information from the input features, thereby improving the expressive power of the features and the generalization ability of the network, enhancing the distinguishability of the features, and thus improving the accuracy of small target recognition in target detection tasks.
[0104] Branch 3 employs a fusion of cross-directional average pooling and depthwise convolution to mine spatial information in feature maps, enhance the ability to extract contextual information, and alleviate the problem of information loss in feature maps.
[0105] First, the input feature map is averaged in the x and y directions to capture its spatial features and fill in any missing smoothness. Then, the spatial features are analyzed and fused using the MPConv convolution module to enrich the feature representation. Finally, the feature distribution is standardized by a batch normalization layer in each convolutional layer, and nonlinearity is introduced through the SiLU activation function to improve the discriminative power of the features and achieve accurate recognition in complex scenes.
[0106] After the three branches are combined, the fused feature map information is extracted again by the CBS module to enhance the module's ability to aggregate contextual information from the feature map.
[0107] 5b. Optimize the neck network structure by replacing the Bottleneck structure in the original C2f module with a DBB+ structure. In the combined structure, the BN module in the original Dynamic Multi-Branch (DBB) structure is replaced with a Plug and Play Self-Attention Module (CBAM). The CBAM adaptively adjusts the correlation and importance between channels and the spatial weights of feature maps, thereby improving the information representation ability of features. This enables the network to better focus on small target defect information, reduce information loss, omission, and interference from background noise, and thus more efficiently fuse defect information of different levels and sizes.
[0108] 5c. Optimize the detection frame structure by replacing the YOLOv8 detection frame with an oriented bounding box (OBB). The θ angle is adaptively adjusted by rotating the bounding box, improving the detection accuracy of defects in any direction. The oriented bounding box can be represented as... ,in Indicates the center coordinates of the orientation detection box. This indicates the width and height of the detection frame. Indicates the rotation angle of the detection frame;
[0109] Step 6: Training and Prediction Analysis. The collected training and validation datasets are used to train the aforementioned model on a distributed heterogeneous computing framework and then used for prediction tasks.
[0110] This embodiment uses a distributed heterogeneous computing framework to complete the training and prediction tasks of the aforementioned model.
[0111] The hardware environment configuration is shown in Table 2.
[0112] Table 2 Hardware Environment Configuration
[0113]
[0114] The software environment is based on CUDA and cuDNN to build a deep learning stack. It uses Anaconda+PyCharm virtual environment to manage dependency libraries and PyTorch to implement the underlying model computation. The software environment is deployed in a Docker containerized manner, and the base image is pytorch / pytorch-cuda. It integrates the following key components: UltralyticsYOLOv8Segmentation module, OpenCV and LabelMe (for dataset labeling).
[0115] Model training learns the inherent patterns in the data, then optimizes the algorithm to adjust network parameters, establishing a mapping function from input data to the output target. The operation involves creating a .py file in the root directory for training. The advantage of this is that it avoids typing commands in the terminal, saving some workload. Create a file named `run.py` in the root directory using the following command:
[0116] from ultralyticsimportYOLO
[0117] if __name__=='__main__':
[0118] model=YOLO("YOLOv8-seg.yaml")
[0119] model=YOLO("YOLOv8s-seg.pt")
[0120] model.train(data="crack.yaml",batch=2,epochs=300,workers=0,iou=0.25);
[0121] Where `batch` is the batch size, i.e., how many images are input for training in a single run; `epochs` is the total number of training epochs; `workers` is the number of worker threads for loading data; and `iou` is the IoU threshold. The YOLOv8s.yaml file corresponds to the model used in this study; for example, YOLOv8s-seg.pt corresponds to YOLOv8s.yaml.
[0122] Model validation and testing are used to evaluate a model’s generalization ability, quantify model performance on independent datasets, and guide hyperparameter tuning.
[0123] First, import the YOLO class from Ultralytics. This is a tool for building and using YOLO models, allowing you to load pre-trained models and perform object detection tasks. Then, load the model, create a YOLO object, and load a pre-trained model file, YOLOv8s.pt. This model file contains the structure of the YOLOv8n model and the pre-trained weights. Next, perform batch inference, using the model to perform inference on a list of images (e.g., 'im1.jpg', 'im2.jpg'). This will process each image and return a list containing the results. Finally, process the result list by looping through it.
[0124] The established model is evaluated using various evaluation metrics for deep learning models, and its performance is comprehensively analyzed by plotting curves based on the data from two metrics. For example, the Precision-Recall curve (PR curve) is used to measure the trade-off between precision and recall at different confidence thresholds.
[0125] The main evaluation metrics for the model include F1 score, confidence score, precision, recall, average precision (AP), mean average precision (mAP), etc.
[0126] The F1 score is a harmonic mean of precision and recall, taking into account both. It provides a single metric for evaluating the balance between precision and recall. The formula is:
[0127] ;
[0128] Confidence score is the level of confidence a model has in predicting a bounding box or segmentation mask, typically ranging from 0 to 1. YOLOv8 optimizes confidence score through adaptive calibration using temperature scaling or online hard example mining (OHEM) to reduce false positives with low confidence. It also automatically adjusts the confidence score threshold (e.g., a default of 0.25) based on task requirements, balancing false negatives and false positives. Confidence score is a single probability value representing the model's confidence in a specific prediction.
[0129] Precision reflects the model's ability to correctly predict a sample as positive. It is calculated as the percentage of correctly predicted positive samples out of all correctly predicted positive samples, reflecting the average prediction accuracy of a single class at different confidence thresholds.
[0130] Recall measures a model's ability to retrieve true positive samples. It is calculated as the ratio of correctly detected targets to the total number of actual targets. In object detection tasks, a sample is considered correctly recalled when the predicted bounding box and the true bounding box achieve a preset overlap.
[0131] In object detection, average precision (AP) usually refers to the area under the precision-recall curve, which is used to comprehensively evaluate the performance of the model.
[0132] Mean Average Precision (mAP) refers to the average AP of each class in a multi-class object detection task. It is a core metric for object detection, representing the average precision of the model under different IoU thresholds. YOLOv8's mAP supports multi-scale IoU calculation, providing a more comprehensive evaluation of model robustness, and introduces FocalLoss to optimize class imbalance and improve the accuracy of small object detection.
[0133] The model is evaluated using a test set. Various curves and graphs are plotted using evaluation metrics such as F1 score, precision, confidence, recall, mean precision, and mAP average over an IoU threshold ranging from 50% to 95% to assess the model's performance.
[0134] In the graph, 0 represents the trend of notch defects, 1 represents the trend of crack defects, and allclasses represents the trend of all categories.
[0135] The F1-Confidence curve is a metric for evaluating model accuracy by combining precision and recall. Figure 11 The curve shows the trend of F1 score changing with confidence level. The peak point in the curve corresponds to the optimal confidence level threshold. At this point, the F1 score reaches its maximum value of 0.66, corresponding to a confidence level of 0.35. This point is the optimal operating point of the model.
[0136] The precision-confidence curve shows the trend of the reliability of predicting positive class samples as confidence changes. Figure 12 To illustrate the trend of accuracy changing with confidence level, the data shows that accuracy always increases as confidence level increases; when the confidence level is increased to 0.823, the accuracy reaches 100%, but it shows a downward trend after the confidence level exceeds 0.60. Therefore, it is recommended to set the threshold to 0.60 to balance reliability and stability.
[0137] Precision-Recall curves reveal the trade-off between precision and recall in a model. Ideally, a model should achieve a balance in the high-value region of the curve. The overall performance of a model is usually evaluated by the area under the curve (AUC). Figure 13 This chart illustrates the trend of precision versus recall, and the performance differences of the model across different classes. For class 0 (gap), the AP is 0.51, with precision decreasing rapidly as recall increases. For class 1 (crack), the AP is 0.74, with higher initial precision and recall, and a more gradual decrease in precision. Therefore, the crack class performs well, while the gap class requires optimization. Future improvements could include data augmentation, feature engineering, or adjusting the loss function to balance class weights to address the gap class's shortcomings and improve overall performance.
[0138] The recall-confidence curve shows that recall typically increases as the confidence threshold decreases. Considering both detection reliability and recall efficiency, a confidence range of 0.4-0.6 is considered the ideal threshold range that balances high recall with reasonable confidence. Figure 14 The curve shows the trend of recall as confidence level changes. The overall trend is that recall decreases as confidence level increases, which is consistent with the general relationship between recall and confidence level. However, the recall rate for class 1 (cracks) is relatively high at low confidence levels (initially performing better than class 0 (gap). As confidence level increases, the recall rate decreases slowly and then stabilizes before decreasing rapidly in the later stages. This indicates that the model has a relatively stronger ability to identify crack-type samples.
[0139] The confusion matrix (confusion_matrix.png) visually presents the prediction results of a classification model in matrix form. High values in the diagonal elements represent classification accuracy, while off-diagonal elements reflect class confusion. Compared to a single accuracy metric, this tool reveals the types of errors the model makes in more detail. Figure 15 Each row represents the predicted category, and each column represents the true category. For example, in the first column, there are five samples whose true value is 0, and five of them were predicted to be 0. That is, out of the samples whose true value is 0, five were correctly identified as 0.
[0140] A comprehensive analysis shows that 7 out of 1 true samples (0 gaps) and 4 out of 1 true samples (1 crack) were misclassified, indicating that the two types of samples have somewhat similar features, making it difficult for the model to distinguish them. Among the true samples (1 crack), the number of correct predictions (13) exceeded the number of incorrect predictions (4+2=6), indicating that the model's ability to identify cracks is better than that of gaps, but overall performance is still hampered by background misclassifications. Future work could involve re-defining the "background" definition, clarifying the boundary between background and target classes, and increasing the diversity of background samples by collecting more background scene data or using data augmentation to generate background variants.
[0141] The normalized confusion matrix (confusion_matrix_normalized.png) further improves the comparability of classification performance across different categories through normalization. For example... Figure 16 Each "row" represents a prediction, and each "column" represents the true value. For example, in the case where the true value in the first column is 0: the first cell is predicted as 0, which is 0.33, meaning that 33% of the samples with a true value of 0 were correctly predicted as 0. Overall analysis shows that when the true value is 1 (crack category), the correct prediction percentage (0.68%) is the highest, indicating that the model is "accurate in identifying" this category.
[0142] The label distribution (labels.jpg) uses a combination of bar charts and scatter plots to show the distribution of the number of instances of each target category in the dataset and the spatial distribution of the samples, providing visualization support for understanding the structural features of the dataset. Figure 17 For the statistics of the number of instances of each category, Figure 18 For bounding box distribution, Figure 19 The target center coordinates are distributed. Figure 20 The image shows the aspect ratio distribution of the target. This image indicates that the dataset has characteristics of class imbalance (more class 0), concentrated target distribution (mainly in the center of the image), and diverse shapes (dispersed aspect ratio).
[0143] The label correlation plot (labels_correlogram.jpg) is used to depict the correlation between predicted labels by the object detection algorithm during training. The color depth in the plot maps the degree of correlation, with dark areas representing strong positive correlations and light areas representing low or negative correlations. By analyzing label correlations, the model structure can be optimized (e.g., merging highly correlated categories) to improve training efficiency and prediction accuracy. Figure 21 This includes univariate distributions (diagonal subplots: histograms) and bivariate correlations (off-diagonal subplots: 2D histograms / scatter plots). The images show that the target is concentrated in the center of the image, and attention should be paid to data augmentation in the edge regions during training.
[0144] The curves in Mask_.png and Box_.png are similar; one represents the object detection bounding box, and the other represents instance segmentation.
[0145] The mask F1-Confidence curve and the mask Precision-Recall curve correspond to the F1 score and recall rate evaluation in the instance segmentation task, respectively. Their analysis logic is the same as that of similar curves in the object detection task. The difference is that the former is for pixel-level classification scenarios.
[0146] Figure 22The F1-confidence curves for the mask show that the detection of class 1 (cracks) targets is more stable (F1 decays slowly in the high confidence interval), indicating that the model has learned crack-type features sufficiently. Furthermore, the average F1 score is 0.63, which is usable for basic detection tasks. Figure 23 The mask recall-confidence curve shows that for class 0 (gap), after Recall > 0.5, Precision drops rapidly to below 0.2, indicating that the false positive rate for the gap class increases sharply with the increase in recall.
[0147] The accuracy-confidence curve represents the accuracy at different confidence thresholds. The horizontal axis represents the confidence threshold, and the vertical axis represents the accuracy. By observing the curve, one can obtain the model's accuracy performance at different confidence thresholds, which helps in selecting an appropriate confidence threshold. Figure 24 The curves show the precision performance at different confidence thresholds. In the high confidence interval (>0.8), the precision is close to 1.0, indicating that the model's high-confidence predictions for Class 1 (crack) targets are very reliable. This also reflects that the model's overall prediction quality is extremely high under strict thresholds, but it sacrifices recall and misses more samples.
[0148] The recall-confidence curve illustrates how the model's recall changes at different confidence thresholds. Attention should be paid to the choice of confidence threshold while maintaining high recall. The optimal operating point is typically the confidence value before recall begins to decline significantly. Figure 25 The recall-confidence curves are shown. By comparing the curves for 0 (gap) and 1 (crack), we can see the difference in the performance of different categories of samples in the model prediction. Obviously, the recall rate of the crack category curve is higher.
[0149] The training and validation metrics chart (results.png) presents the dynamic changes of the loss function and performance metrics (such as precision and mAP) in a multi-panel line graph format. A decreasing loss curve and rising performance metrics indicate that the model is in an effective learning state, and the smooth curve shape helps to identify training trends. In practical applications, it is important to focus on the fluctuations in precision and recall, as well as the evaluation value of key metrics such as mAP50 and mAP50-95 for the model's generalization ability. Figure 26 The training loss includes bounding box loss, segmentation loss, classification loss, and regression loss. Figure 27 To verify the loss, Figure 28 To evaluate the precision and recall of the metrics, Figure 29mAP (mean precision). A continuous decrease in training loss indicates that the model has "learned" on the training set and its fitting ability is fine; the validation loss decreases in tandem with the training loss and the difference between them is not significant, indicating that the model's generalization is acceptable; the overall increase in precision, recall, and mAP indicates that the model's ability to "find, classify accurately, and box correctly" is improving.
[0150] Finally, the model performance was further analyzed by changing the IoU threshold, a parameter used in model training. The analysis showed that within a certain range, the model's accuracy increases with the increase of the IoU threshold, but the increase is limited. Furthermore, as mentioned in the theoretical section, the IoU threshold should not be too high. Therefore, appropriately increasing the IoU threshold during model training can help improve model performance.
[0151] This application employs an improved YOLOv8 network-based structure to identify and analyze defects in gas turbine blades. By reading metrics such as F1 score, confidence level, precision, recall, mean precision, and mAP, various curves, including F1-confidence curves, precision-confidence curves, and precision-recall curves, are plotted to analyze model performance. A confusion matrix visually displays classification accuracy, while label distribution and correlation graphs aid in analyzing data characteristics. Training and validation metric graphs show the trends of loss reduction and performance improvement. Analysis of various curves and graphs shows that the model achieves high precision in detecting crack-type defects, with an mAP of 0.737, while the precision for notch-type defects is slightly lower, with an mAP of 0.513. The overall model accuracy is acceptable, with an overall mAP of 0.625, meeting the needs of daily detection. Simultaneously, the precision and recall rates reach 1.0 and 0.7 respectively, balancing detection accuracy and real-time performance. Overall, the model performs better in detecting crack-type defects, and the identification of notch-type defects can be optimized by adjusting parameters. This shows that the model effectively learns the inherent laws of defect characteristics and has both accuracy and efficiency in blade defect detection, which can meet the actual application needs of ship gas turbines.
[0152] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit the scope of protection of the present invention. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the essence and scope of the technical solutions of the present invention.
Claims
1. A method for identifying defects in gas turbine blades based on an improved YOLOv8 network, characterized in that, The steps include: Step 1, Image Acquisition: Use a high-resolution probe, manually focus to capture and save defect images; adopt a multi-angle acquisition method in the detection area, take 3 sets of images at each detection point, at 0°, 45° and 90° with the vertical line of the defect plane respectively, and at the same time reduce blind spots by extending and rotating the probe 360°. Step 2, image preprocessing, refers to optimizing the original image to improve image quality, extract useful information, or adapt to the needs of subsequent target detection, classification, and segmentation tasks; Step 3: Image data augmentation. Based on the original data, data augmentation is performed through geometric transformation and color perturbation to improve the model's generalization ability, making the model more accurate and faster, and able to adapt to complex changes in real-world conditions. Step 4, image annotation, refers to adding structured labels or annotations to images to give them semantic information, enabling machine learning models to understand and utilize them, so as to extract data information through computing power; Step 5: Model Optimization Based on YOLOv8, the following improvements are proposed to improve the detection and identification performance of the YOLOv8 model in gas turbine blade defect detection. Specific improvements include: 5a. A layer-by-layer pooling module is added at the end of the backbone network. This module improves the model’s ability to capture and fuse defect features from different spatial scales. The layer-by-layer pooling module includes three branches and a CBS module that performs secondary extraction on the outputs of the three branches. Branch 1 uses a spatial pyramid pooling module to perform layer-by-layer max pooling on feature maps of different scales, thereby generating fixed-length feature vectors. It processes input images of different sizes, aggregates the semantic feature information above and below defects, and improves the model's ability to detect targets of different sizes. Branch 2 uses convolutional layers, batch normalization layers, and activation function layers to extract feature map information from the input features, thereby improving the expressive power of the features and the generalization ability of the network, enhancing the distinguishability of the features, and thus improving the accuracy of small target recognition in target detection tasks. Branch 3 employs a fusion of cross-directional average pooling and depthwise convolution to mine spatial information in feature maps, enhance the ability to extract contextual information, and alleviate the problem of information loss in feature maps. After the three branches are combined, the fused feature map information is extracted again by the CBS module to enhance the module's ability to aggregate contextual information of the feature map. 3b. Optimize the neck network structure by replacing the Bottleneck structure in the original C2f module with the DBB+ structure. In the DBB+ structure, the BN module in the original dynamic multi-branch structure is replaced with a plug-and-play self-attention module. 3c. Optimize the detection frame structure by replacing the original detection frame with an oriented detection frame. The angle is adaptively adjusted by rotating the boundary frame to improve the detection accuracy of defects in any direction. Step 6: Training and Prediction Analysis. The collected training and validation datasets are used to train the aforementioned model on a distributed heterogeneous computing framework and then used for prediction tasks.
2. The gas turbine blade defect identification method based on the improved YOLOv8 network according to claim 1, characterized in that, Step 2, the image preprocessing, includes image noise reduction, image enhancement, and normalization; specifically: 2a Image denoising refers to removing noise from an image using algorithms, including Gaussian noise and salt-and-pepper noise; 2b Image enhancement refers to the targeted highlighting of features of interest and suppression of irrelevant information, improving image clarity while adapting to human visual perception characteristics, and transforming it into a form that is easier for machine analysis. 2c. Normalization refers to converting the original image into a unique standard form through a series of standardized processing transformations, so that it has invariant properties to translation, rotation, scaling, and affine transformations.
3. The gas turbine blade defect identification method based on the improved YOLOv8 network according to claim 1, characterized in that, The specific methods for image data enhancement in step 3 include geometric transformation and color perturbation. Geometric transformations refer to changing the spatial position of pixels in an image through mathematical mapping, thereby adjusting the shape, viewpoint, or spatial relationships of the image. These transformations include rotation, flipping, cropping, scaling, and shifting operations. Color perturbation generates diverse images by adjusting the color attributes of an image, simulating different lighting conditions and color configurations, including brightness adjustment, contrast adjustment, saturation adjustment, and hue adjustment.
4. The gas turbine blade defect identification method based on the improved YOLOv8 network according to claim 1, characterized in that, In step 4, the image annotation tool is selected to annotate the target defects using a polygonal outline. After completion, the label is entered, and the generated label JSON file is saved in the directory after confirmation. Finally, all the labeled data were constructed into a dataset, which was then divided into a training set, a validation set, and a test set in an 8:1:1 ratio. The training set was used to train the model, the validation set was used to validate the model's performance, and the model parameters were continuously adjusted and modified based on the results to find the optimal model parameters. The hyperparameters of the best model were then recorded, and the test set was used to evaluate the final model.
5. The gas turbine blade defect identification method based on the improved YOLOv8 network according to claim 1, characterized in that, The third branch first performs average pooling on the input feature map along the x and y axes to capture the spatial features of the feature map and fill in the missing smoothness of the feature map. Then, the spatial features are analyzed and fused through the MPConv convolution module to enrich the feature representation. Finally, the feature distribution is standardized through a batch normalization layer in each convolution layer, and nonlinearity is introduced through the SiLU activation function to improve the discriminative ability of the features and achieve accurate recognition in complex scenes.
6. The gas turbine blade defect identification method based on the improved YOLOv8 network according to claim 2, characterized in that, In step 2a, Gaussian filtering is used to process the image for Gaussian noise. The new value of each pixel in the image after processing is obtained by weighted averaging of the pixel's own value and the values of other pixels in its neighborhood. Median filtering is used to process the image for salt-and-pepper noise. This involves analyzing the sampled values in the input signal to determine whether they truly represent the signal characteristics. Using an observation window composed of an odd number of sampled values, the values in the observation window are first sorted, and then the median value in the middle position is used as the output value. The earliest sampled value in the window is discarded, and new sampled values are included. The above sorting and calculation process is repeated until the processing of the entire image is completed.
7. The gas turbine blade defect identification method based on the improved YOLOv8 network according to claim 2, characterized in that, The image enhancement methods used in step 2b include contrast enhancement, color enhancement, and brightness adjustment. Contrast enhancement refers to calculating the histogram, then calculating the cumulative distribution function, mapping it to a new gray level, and finally generating an equalized image. Color enhancement modifies the colors of an image using methods such as saturation adjustment and color balance. Saturation enhancement increases the saturation component value in the HSV or HSL color space to make the colors more vibrant. Color balance corrects color casts caused by the light source color, making white objects appear white in the image. Brightness adjustment is used to adjust the brightness of an image to make it clearer.
Citation Information
Cited By
Method and system for monitoring battery health state of uninterruptible power supply
CN116385956A
Method and system for battery state of health monitoring of an uninterruptible power supply
CN116385956B
Magnet appearance defect detection method and device, medium and program product
CN121563956A
Substation metal expander top rushing detection method based on fine grit identification
CN121564511A