An insulator defect detection method based on improved YOLOv11n

By improving the backbone network and feature fusion network of the YOLOv11n model, the problems of missed detection and misclassification of small defects in insulator defect detection are solved, achieving high-precision and low-computational-complexity insulator defect detection.

CN120563418BActive Publication Date: 2025-11-18PINGXIANG ANYUANHONG ELECTRIC PORCELAIN MFG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510588954.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-08
Publication Date
2025-11-18
Estimated Expiration
2045-05-08

AI Technical Summary

Technical Problem

Existing convolutional neural networks suffer from problems such as missing small defects and misclassification in insulator defect detection, and the models have insufficient generalization performance in complex power scenarios, making it difficult to meet real-time processing requirements.

Method used

An improved YOLOv11n model is adopted, and the backbone network is constructed by introducing the SCConv and SPCSPC modules to enhance the ability to extract local defect features. Furthermore, the SBA module and the improved Strip Pool module are used in the feature fusion network to improve the detection accuracy and robustness of insulator defect boundaries.

Benefits of technology

It effectively reduces the missed and false detections of insulator defects, improves detection accuracy, and meets the computational complexity requirements for real-time detection of transmission lines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120563418B_ABST
    Figure CN120563418B_ABST
Patent Text Reader

Abstract

The application discloses an insulator defect detection method based on improved YOLOv11n, and specifically comprises the following steps: step 1: obtaining an insulator defect image dataset, dividing the dataset into a training set, a verification set and a test set, and performing pretreatment; step 2: in the YOLOv11n network, replacing the C3k2 module with the SCConv module, replacing the SPPF module with the SPPCSPC module, replacing the Upsample module with the SBA module, and adopting a new LXMstrip Pool module to obtain an improved YOLOv11n model; step 3: training the improved detection model using the training set and the verification set, and saving the optimal model obtained through training; step 4: performing precision testing on the optimal model using the test set, and obtaining a final insulator defect detection model when the precision requirement is met. Compared with the prior art, the insulator defect detection method based on the improved YOLOv11n can effectively improve the detection precision of insulator defects and avoid the problems of defect omission and false detection in actual detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence, and more specifically to an insulator defect detection method based on an improved YOLOv11n. Background Technology

[0002] With the continuous expansion of the power system and the in-depth advancement of smart grid construction, the safe and stable operation of power equipment has become a core element in ensuring the reliability of energy supply. Insulators, as key components in transmission lines that provide mechanical support and electrical isolation, directly affect the insulation strength and lightning protection capability of the power grid. Insulators exposed to complex natural environments for extended periods are susceptible to contamination accumulation, material aging, and mechanical stress, leading to defects such as surface cracks, damage, and flashover marks. In severe cases, these defects can cause insulation failure, line tripping, or even large-scale power outages, threatening the safe and economical operation of the power system.

[0003] Traditional insulator defect detection mainly relies on manual inspection, infrared imaging, or drone aerial photography combined with visual interpretation, which suffers from low efficiency, high cost, strong subjectivity, and poor adaptability to high-altitude and high-risk environments. In recent years, the integration of computer vision and deep learning technologies has provided a new direction for automated insulator inspection. Defect recognition methods based on convolutional neural networks have achieved higher detection robustness than traditional image processing algorithms under complex background interference through feature self-learning capabilities. However, existing methods still face significant challenges in engineering applications: First, the scale differences of insulator defects are significant, and fine cracks and local damage are easily interfered with by background noise, leading to an increased false negative rate; second, the lighting conditions in transmission line scenarios are variable, and there are complex obstructions such as bird nests and vegetation, resulting in insufficient generalization performance of existing models and frequent false positives; third, the contradiction between the need for lightweight detection and the computational complexity of the models is prominent, making it difficult to meet the real-time processing requirements of transmission tower edge equipment.

[0004] Although mainstream object detection frameworks, such as the YOLO series and RetinaNet, have been applied to insulator defect identification, their pre-defined anchor frame mechanism and fixed receptive field design struggle to effectively capture the diverse features of defects, especially when detecting cracks with abnormal aspect ratios or heavily soiled areas with blurred edges, resulting in a significant drop in accuracy. Furthermore, existing methods often use general datasets for training, failing to adequately consider the reflective properties of insulator surfaces and the imbalance of defect samples, which are specific to power scenarios, leading to performance degradation in practical deployments. Therefore, developing an insulator defect detection method that balances high accuracy, strong robustness, and low computational cost is of significant engineering and social value for achieving intelligent perception of transmission line conditions and preventing cascading accidents caused by insulation faults.

[0005] However, the application of convolutional neural networks in insulator defect detection has long faced problems such as missing small defects and misclassifying defect types, leading to low accuracy. Therefore, it is necessary to propose an effective insulator defect detection method to address these issues. Summary of the Invention

[0006] To address the issues of low accuracy caused by missed detection of small defects and misclassification of defect types in the application of convolutional neural networks for insulator defect detection, this invention proposes an insulator defect detection method based on an improved YOLOv11n. By suppressing the influence of background and other irrelevant information, the method improves the model's adaptability to the shape and distribution of the target, thus solving the problems of low accuracy caused by missed detection of small defects and misclassification of defect types in previous techniques.

[0007] The technical solution provided by this invention includes the following steps:

[0008] Step 1: Obtain the insulator defect image dataset, divide the dataset into training set, validation set and test set, and perform preprocessing;

[0009] Specifically, in step 1, the images of insulator defects in the dataset are collected by aerial photography from a camera deployed on a drone at high altitude; the LabelImg annotation tool is used to add annotation information to the insulator defects.

[0010] Step 2: Construct an insulator defect detection model based on the improved YOLOv11n. The improved detection model includes an improved backbone network, an improved feature fusion network, and a head network.

[0011] Furthermore, step 2 specifically includes steps 2.1 to 2.3:

[0012] Step 2.1: In the improved backbone network, replace the C3k2 module with the SCConv module, and replace the original SPPF module in the YOLO11n model backbone network with the SPPCSPC module to form a new backbone structure;

[0013] Furthermore, the SCConv module is composed of an SRU module and a CRU module connected in this way. The input feature map x is processed by the SRU to separate the feature maps with rich information from those with less spatial content information, and then the CRU module performs feature extraction.

[0014] Furthermore, the SRU module performs group normalization on the feature map x using the Group Normalization module. The specific operation of the Group Normalization module can be expressed as follows:

[0015]

[0016] Where μ and σ are the mean and standard deviation of X, ε is a small positive constant added for division stability, and γ and β are trainable affine transformations.

[0017] The processed image is then reweighted, which can be represented as follows:

[0018]

[0019] Where, γ i This represents the spatial information richness of the i-th image. It is aggregated with the unweighted feature map using the Multiplication module, mapped to the range (0,1) using the sigmoid function, and then gating by a threshold using the Threshold module. Weights above the threshold are set to 1 to obtain the information weight W1, while weights below the threshold are set to 0 to obtain the non-information weight W2. The input feature x is multiplied by W1 and W2 respectively to obtain two weighted features: the information-rich feature and the non-information feature. and less information Will and Separately into and The Summary module encapsulates information-rich features. Features with less information Summing them together gives x w1 and x w2 The feature x reconstructed through the Concatenation module w1 and x w2 Connecting them together yields a spatially refined feature map x. w .

[0020] Furthermore, the CRU module will x w The channel is divided into two parts, with αC channel and (1-α)C channel, which are respectively passed through a 1×1 convolution module to form X. up X low Two parts; X up Convolution operations are performed using the GWC and PWC modules respectively, followed by aggregation using the Element-Wise Summation module to obtain Y1 and X. low Convolution is performed using the PwC module, and the result is compared with the original X. low Y2 is obtained by aggregation using the Element-Wise multiplication module, and then global average pooling is applied. The specific operation can be represented as follows:

[0021]

[0022] We obtain S1 and S2, stack them together using global upper and lower channels, and use channel soft attention to generate feature importance vectors β1 and β2. The specific operation can be represented as follows:

[0023]

[0024] Guided by the feature importance vectors β1 and β2, the Element-Wise Summation module merges the upper feature Y1 and the lower feature Y2 in a channel-wise manner to obtain the channel-refined feature Y. The specific operation can be represented as follows:

[0025] Y = β1Y1 + β2Y2 (5)

[0026] Furthermore, the SPPCSPC module inputs the feature map x into two branches. In one branch, the feature map x is processed sequentially through a 1×1 convolutional module, a 3×3 convolutional module, and a 1×1 convolutional module to obtain the feature map x′. The feature map x′ is then input into a three-branch structure with a max-pooling module for pooling to obtain the feature map x″. The feature map x″ and feature map x′ are concatenated using a Concat module to obtain the feature map x″′. The concatenated feature map x″′ is then processed sequentially through a 1×1 convolutional module and a 3×3 convolutional module to obtain x. n The other branch processes the feature map x through a 1×1 convolutional module to obtain x. m The obtained feature map x n and feature map x m x is obtained by concatenating the components using the Concat module. mn The output is processed by a 1×1 convolutional module.

[0027] Step 2.2: The improved feature fusion network, based on the YOLOv11n neck network, replaces the Upsample module with SBA module 1 and SBA module 2, and adds newly designed LXMstrip Pool module 1 and LXMStrip Pool module 2 to improve the model's ability to detect irregular targets, forming a new feature fusion network;

[0028] Furthermore, the SBA module is used to fuse boundary information from low-level features and semantic information from high-level features to obtain finer-grained object contours and recalibrate object positions. The fusion method in the SBA module uses a recalibrated attention unit (RAU) module. This module adaptively extracts two inputs before fusion, and the shallow and deep information are transmitted to the two RAU modules in different ways. The outputs of the two RAU modules are then concatenated and input into a 1×1 Conv module. The specific operation of the RAU module is as follows:

[0029] T′1=W θ (T1) (6)

[0030]

[0031] RAU(T1,T2)=T′1⊙T1+T′2⊙T2⊙(θ(T′1))+T1 (8)

[0032] Where T1 and T2 are the input features, and the two linear mappings and the Sigmoid function W are combined. θ , Applied to the input features, it reduces the channel dimension to 32, resulting in feature maps T1′ and T2′; ⊙ represents pointwise multiplication. It is a reverse operation achieved by subtracting feature T1′, which optimizes the imprecise and coarse estimate into an accurate and complete prediction map. It uses a convolution operation with a kernel size of 1×1 as a linear mapping process. The specific operation of SBA is as follows:

[0033]

[0034] Among them, C 3×3 (·) is a 3×3 convolution with batch normalization and ReLU activation layers. It contains deep features of the image. Concat(·) is a concatenation operation along the channel dimension, containing rich shallow features of the image. This is the output of the SBA module;

[0035] Furthermore, the LXMstrip Pool module has one input, the input feature map x, which is passed through Conv module 1, Conv module 5 and Conv module 10 respectively; wherein, Conv module 1 is a convolutional block with a convolutional kernel of 1×1, which plays the role of compressing the number of channels and reducing the amount of computation, and the feature map output by Conv module 1 is denoted as x′, which serves as the input to Pool module 1, Pool module 2 and DeformableConv module;

[0036] Pool module 1 performs adaptive average pooling on the feature map x′. The specific operation of adaptive average pooling can be expressed as follows:

[0037]

[0038] in, X u,v H represents the value of the input feature map at position (u,v); (i,j) is the output position; in and Win Given the height and width of the input image, W out and H out Output the height and width of the image, and Output(i,j) is the output feature map;

[0039] The output of Pool module 1 is used as the input of Conv module 2. Conv module 2 performs convolution operation on the input feature map, and then goes through Upsample module 1 for upsampling operation.

[0040] Pool module 2 performs adaptive average pooling on feature map x′. The output of Pool module 2 is used as the input of Conv module 3. Conv module 3 performs convolution on the input feature map and then goes through Upsample module 2 for upsampling.

[0041] The DeformableConv module 1 extracts dynamic features from the feature map x′ through deformable convolution:

[0042] x″=DeformableConv(Conv 1×1 (x′)) (11) where DeformableConv represents deformable convolution, and the specific operation of deformable convolution is expressed as:

[0043]

[0044] in, It is the sampling grid of the convolution kernel, p n It is a predefined fixed offset, w(p) n ) represents the convolution kernel weights, x(p0+p n ) is the input feature map at position p0+p n The value of Δp n It is the offset learned from the input feature map;

[0045] The outputs of Upsample module 1, Upsample module 2, and DeformableConv module 1 are fused using multi-scale features, and then smoothed using the ARelu activation function. The specific operation of ARelu is as follows:

[0046]

[0047] Where α and β are learnable parameters, Clamp(α) restricts α to [0.01, 0.99], and σ(β) is the Sigmoid function, which achieves adaptive activation by amplifying and suppressing positive and negative values ​​respectively;

[0048] The result processed by ARelu is input into Conv module 4;

[0049] Furthermore, the input feature map x is processed through Conv module 5, which is a convolutional block with a 1×1 kernel, which compresses the number of channels and reduces the amount of computation. The output of Conv module 5, denoted as x′, is input to Adaptive_Pool module 1, Adaptive_Pool module 2, and DeformableConv module 2.

[0050] Adaptive_Pool module 1 performs horizontal strip pooling on the feature map x′ and reduces its height space dimension to 1. The horizontal strip pooling operation can be represented as:

[0051]

[0052] Among them, y h ∈R H , x∈R H×w H is the height of the feature map, W is the width of the feature map, and (i,j) corresponds to the position of the feature map;

[0053] The output of Adaptive_Pool module 1 is used as the input of Conv module 6. Conv module 6 performs convolution operation on the input feature map, and then goes through Upsample module 3 for upsampling operation.

[0054] Adaptive_Pool module 2 performs vertical strip pooling on the feature map x′ and reduces its width dimension to 1. The vertical strip pooling operation can be represented as:

[0055]

[0056] Among them, y v ∈R w , x∈R H×w H is the height of the feature map, W is the width of the feature map, and (i,j) corresponds to the position of the feature map;

[0057] The output of Adaptive_Pool module 2 is used as the input of Conv module 7. Conv module 7 performs convolution operation on the input feature map, and then goes through Upsample module 4 for upsampling operation.

[0058] The DeformableConv module 2 extracts dynamic features from the feature map through deformable convolution;

[0059] The outputs of Upsample module 3, Upsample module 4, and DeformableConv module 2 are fused at multiple scales and then smoothed using the ARelu activation function; the result after ARelu processing is used as the input to Conv module 8.

[0060] Furthermore, the outputs of Conv module 8 and Conv module 4 are concatenated using Concat. The concatenated result is input into Conv module 9. After the convolution operation of Conv module 9, the convolution result is aggregated with the result of Conv module 10, and then output after smoothing by the ARelu activation function.

[0061] Step 2.3: In the head network, the features fused in Step 2.2 are input into the head network of the YOLOv11n model to predict and filter the insulator defect detection results, and obtain the final prediction results of the insulator defect detection, thereby realizing the insulator defect detection.

[0062] The detection head 1 receives the feature map output by the C3k2 module 2; the detection head 2 receives the feature map output by the LXMstrip Pool module 2; and the detection head 3 receives the feature map output by the LXMstrip Pool module 1.

[0063] Step 3: Train the insulator defect detection model based on the improved YOLOv11n using the training set and validation set, and save the optimal trained model;

[0064] Specifically, in step 3, training the insulator defect detection model based on the improved YOLOv11n requires setting the training parameters of the improved YOLOv11n model, including the number of iterations, batch size, optimizer, learning rate, momentum, weight decay, and number of threads. The labeled training set and validation set are input into the improved detection model, the gradient of the loss function is calculated through backpropagation, and the parameters are updated using the optimizer. The iteration continues until the loss function of the training set and validation set and the evaluation metrics accuracy P, recall R, and mAP all tend to stabilize and no longer improve. Finally, the optimal model parameters are saved.

[0065] Furthermore, in step 3, the testing and evaluation method for the insulator defect detection model based on the improved YOLOv11n involves inputting the test set into the optimal model described in step 3; calculating the model performance indicators: accuracy P, recall R, and mAP, with the specific calculation formulas as follows:

[0066]

[0067] Where P is precision, R is recall, mAP is the mean precision across all classes, AP is the mean precision, m is the number of classes, TP represents the number of positive samples correctly identified as positive samples, FP represents the number of negative samples incorrectly identified as positive samples, and FN represents the number of positive samples incorrectly identified as negative samples. When the performance indicators meet the accuracy requirements, the final insulator defect detection model based on the improved YOLOv11n is obtained.

[0068] Step 4: Use a test set to test the accuracy of the optimal model and obtain an insulator defect detection model that meets the accuracy requirements.

[0069] Compared with the prior art, the beneficial effects of the present invention are:

[0070] This invention discloses an insulator defect detection method based on an improved YOLOv11. A new backbone network is constructed by introducing the SCConv and SPPCSPC modules. The SCConv module replaces the original C3k2 module to reduce redundant features and lower computational complexity. In the final stage of feature extraction, the SPPCSPC module replaces the original SPPF model to enhance the model's ability to extract local defect features, which is beneficial for extracting small target defect features. A new feature fusion network is constructed by introducing the SBA and an improved Strip Pool module. The SBA module focuses on the boundary region of insulator defects, suppressing the influence of background and other irrelevant information. The improved Strip Pool module enhances the model's adaptability to target shape and distribution, thereby reducing missed and false detections of insulator defects and improving detection accuracy. Attached Figure Description

[0071] Figure 1 This is a structural diagram of the insulator defect detection model based on the improved YOLOv11n of this invention;

[0072] Figure 2 This is a schematic diagram of the SCConv module structure;

[0073] Figure 3 This is a schematic diagram of the SPPC module structure;

[0074] Figure 4 This is a schematic diagram of the SBA module structure;

[0075] Figure 5 This is a schematic diagram of the LXMStrip Pool module structure; Detailed Implementation

[0076] To make the technical solution, structural features, achieved objectives, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to specific embodiments and accompanying drawings. It should be noted that the specific embodiments described herein are only for clearer explanation of the present invention and are not intended to limit the present invention.

[0077] This invention discloses an insulator defect detection method based on an improved YOLOv11n, the implementation process of which is as follows:

[0078] Step 1: Obtain the insulator defect image dataset, divide the dataset into training set, validation set and test set, and perform preprocessing;

[0079] In this embodiment, in order to better evaluate the detection effect of the insulator defect detection method based on the improved YOLO11n disclosed in this invention, the publicly available dataset IDD (Insulator-Defect Detection) insulator defect dataset was adopted;

[0080] In this example, the publicly available dataset IDD already contains labeled information. The IDD dataset contains 5000 precisely labeled images, of which 3522 are used for training, 1105 for validation, and 373 are used as the test set.

[0081] Step 2: Construct an insulator defect detection model based on the improved YOLO11n. The model includes an improved backbone network, an improved feature fusion network, and a head network. The structure of the improved YOLO11n model is as follows: Figure 1 As shown, the construction of the improved detection model further includes steps 3.1 to 3.3:

[0082] Step 2.1: In the backbone network, replace the C3k2 module with the SCConv module, and replace the original SPPF module in the YOLO11n model backbone network with the SPPCSPC module to form a new backbone structure;

[0083] Furthermore, the SCConv module is composed of an SRU module and a CRU module connected in sequence. The input feature map x is processed by the SRU to separate feature maps with rich information from those with less information corresponding to spatial content. Then, the CRU module performs feature extraction. The structure of the SCConv module is as follows: Figure 2 As shown;

[0084] Furthermore, the SRU module performs group normalization on the feature map x using the Group Normalization module. The specific operation of the Group Normalization module can be expressed as follows:

[0085]

[0086] Where μ and σ are the mean and standard deviation of X, ε is a small positive constant added for division stability, and γ and β are trainable affine transformations.

[0087] The processed image is then reweighted, which can be represented as follows:

[0088]

[0089] Where, γ i This represents the spatial information richness of the i-th image. It is aggregated with the unweighted feature map using the Multiplication module, mapped to the range (0,1) using the sigmoid function, and then gating by a threshold using the Threshold module. We set weights above the threshold to 1 to obtain the information weight W1, and weights below the threshold to 0 to obtain the non-information weight W2. The input feature x is multiplied by W1 and W2 respectively to obtain two weighted features: the information-rich feature and the non-information feature. and less information Will and Separately into and The Summary module encapsulates information-rich features. Features with less information Summing them together gives x w1 and x w2 The feature x reconstructed through the Concatenation module w1 and x w2 Connecting them together yields a spatially refined feature map x. w ;

[0090] Furthermore, the CRU module will x w The channel is divided into two parts, with αC channel and (1-α)C channel, which are respectively passed through a 1×1 convolution module to form X. up X low Two parts; X up Convolution operations are performed using the GWC and PWC modules respectively, followed by aggregation using the Element-Wise Summation module to obtain Y1 and X. low Convolution is performed using the PwC module, and the result is compared with the original X. low Y2 is obtained by aggregation using the Element-Wise multiplication module, and then global average pooling is applied. The specific operation can be represented as follows:

[0091]

[0092] We obtain S1 and S2, stack them together using global upper and lower channels, and use channel soft attention to generate feature importance vectors β1 and β2. The specific operation can be represented as follows:

[0093]

[0094] Guided by the feature importance vectors β1 and β2, the Element-Wise Summation module merges the upper feature Y1 and the lower feature Y2 in a channel-wise manner to obtain the channel-refined feature Y. The specific operation can be represented as follows:

[0095] Y = β1Y1 + β2Y2 (5)

[0096] Furthermore, the SPPC module inputs the feature map x into two branches. In one branch, the feature map x is processed sequentially through a 1×1 convolutional module, a 3×3 convolutional module, and a 1×1 convolutional module to obtain the feature map x′. The feature map x′ is then input into a three-branch structure with a max-pooling module for pooling to obtain the feature map x″. The feature map x″ and feature map x′ are concatenated using the Concat module to obtain the feature map x″′. The concatenated feature map x″′ is then processed sequentially through a 1×1 convolutional module and a 3×3 convolutional module to obtain x. n The other branch processes the feature map x through a 1×1 convolutional module to obtain x. m The obtained feature map x n and feature map x m x is obtained by concatenating the components using the Concat module. mn The output is processed by a 1×1 convolutional module. The SPC module structure is as follows: Figure 3 As shown;

[0097] Step 2.2: In the feature fusion network, based on the YOLOv11n neck network, the Upsample module is replaced with SBA module 1 and SBA module 2. The SBA module structure is as follows: Figure 4 As shown; newly designed LXMStrip Pool module 1 and LXMStrip Pool module 2 have been added. The structure of the LXMStrip Pool module is as follows. Figure 5 As shown, this improves the model's ability to detect irregular targets and forms a new feature fusion network;

[0098] Furthermore, the SBA module is used to fuse boundary information from low-level features and semantic information from high-level features to obtain finer-grained object contours and recalibrate object positions. The fusion method in the SBA module uses a recalibrated attention unit (RAU) module. This module adaptively extracts two inputs before fusion, and the shallow and deep information are transmitted to the two RAU modules in different ways. The outputs of the two RAU modules are then concatenated and input into a 1×1 Conv module. The specific operation of the RAU module is as follows:

[0099] T′1=W θ (T1) (6)

[0100]

[0101] Where T1 and T2 are the input features, and the two linear mappings and the Sigmoid function W are combined. θ , Applied to the input features, it reduces the channel dimension to 32, resulting in feature maps T1′ and T2′; ⊙ represents pointwise multiplication. It is a reverse operation achieved by subtracting feature T1′, which optimizes the imprecise and coarse estimate into an accurate and complete prediction map. It uses a convolution operation with a kernel size of 1×1 as a linear mapping process. The specific operation of SBA is as follows:

[0102]

[0103] Among them, C 3×3 (·) is a 3×3 convolution with batch normalization and ReLU activation layers. It contains deep features of the image. Concat(·) is a concatenation operation along the channel dimension, containing rich shallow features of the image. This is the output of the SBA module;

[0104] Furthermore, in the LXMstrip Pool module, the input feature x passes through Conv module 1. Conv module 1 is a convolutional block with a 1×1 kernel, which compresses the number of channels and reduces the amount of computation. The output of Conv module 1 is used as the input of Pool module 1, Pool module 2 and DeformableConv module 1, denoted as x′.

[0105] Pool module 1 performs adaptive average pooling on the feature map x′. The specific operation of adaptive average pooling can be expressed as follows:

[0106]

[0107] in, X u,v H represents the value of the input feature map at position (u,v); (i,j) is the output position; in and W in Given the height and width of the input image, W out and H out Output the height and width of the image, and Output(i,j) is the output feature map;

[0108] The output of Pool module 1 is used as the input of Conv module 2 for convolution operation, and the output of Conv module 2 is used as the input of Upsample module 1 for upsampling operation.

[0109] Pool module 2 performs adaptive average pooling on feature map x′. The output of Pool module 2 is used as the input of Conv module 3 for convolution operation. The output of Conv module 3 is used as the input of Upsample module 2 for upsampling operation.

[0110] Specifically, the DeformableConv module 1 extracts dynamic features from the feature map x″ through deformable convolution:

[0111] x″=DeformableConv(Cnov 1×1 (x′)) (11)

[0112] Where DeformableConv represents deformable convolution, and the specific operation of deformable convolution is represented as follows:

[0113]

[0114] in, It is the sampling grid of the convolution kernel, p n It is a predefined fixed offset, w(p) n ) represents the convolution kernel weights, x(p0+p n ) is the input feature map at position p0+p n The value of Δp n It is the offset learned from the input feature map;

[0115] The outputs of Upsample module 1, Upsample module 2, and DeformableConv module 1 are fused at multiple scales and then smoothed using the ARelu activation function. The formula for ARelu is:

[0116]

[0117] Where α and β are learnable parameters, Clamp(α) restricts α to [0.01, 0.99], and σ(β) is the Sigmoid function, which achieves adaptive excitation by amplifying and suppressing positive and negative values ​​respectively;

[0118] The result processed by ARelu is used as the input to Conv module 4;

[0119] Furthermore, the LXMstrip Pool module has one input, the input feature map x; through the Conv module 5, which is a convolutional block with a 1×1 kernel, it plays the role of compressing the number of channels and reducing the amount of computation. The output of the Conv module 5, denoted as x′, is input to the Adaptive_Pool module 1, Adaptive_Pool module 2 and DeformableConv module 2;

[0120] Adaptive_Pool module 1 performs horizontal strip pooling on the feature map x′ and reduces its height space dimension to 1. The horizontal strip pooling operation can be represented as:

[0121]

[0122] Among them, y h ∈R H , x∈R H×w H is the height of the feature map, W is the width of the feature map, and (i,j) corresponds to the position of the feature map;

[0123] The output of Adaptive_Pool module 1 is used as the input of Conv module 6, which then performs convolution operations and upsampling operations on the input of Upsample module 3.

[0124] Adaptive_Pool module 2 performs vertical strip pooling on the feature map x′ and reduces its width dimension to 1. The vertical strip pooling operation can be represented as:

[0125]

[0126] Among them, y v ∈R w , x∈R H×W H is the height of the feature map, W is the width of the feature map, and (i,j) corresponds to the position of the feature map;

[0127] The output of Adaptive_Pool module 2 is used as the input of Conv module 7, which then performs convolution operations and upsampling operations on the input of Upsample module 4.

[0128] The DeformableConv module 2 extracts dynamic features from the feature map through deformable convolution;

[0129] The outputs of Upsample module 3, Upsample module 4, and DeformableConv module 2 are fused at multiple scales and then smoothed using the ARelu activation function; the result after ARelu processing is used as the input to Conv module 8.

[0130] Furthermore, the outputs of Conv module 8 and Conv module 4 are concatenated using Concat. The concatenated result is input into Conv module 9. After the convolution operation of Conv module 9, the convolution result is aggregated with the original feature map and then output after smoothing by the ARelu activation function.

[0131] Step 2.3: In the head network, the features fused in Step 2.2 are input into the head network of the YOLOv11n model to predict and filter the insulator defect detection results, and obtain the final prediction results of the insulator defect detection, thereby realizing the insulator defect detection.

[0132] The detection head 1 receives the feature map output by the C3k2 module 2; the detection head 2 receives the feature map output by the LXMstrip Pool module 2; the detection head 3 receives the feature map output by the LXMstrip Pool module 1.

[0133] Step 3: Input the training set and validation set into the insulator defect detection model based on the improved YOLOv11n described in Step 2 for training. In this embodiment, the experimental settings are set with an initial learning rate of 0.01, SGD optimizer, batch size of 32, and a total number of training rounds of 150. The improved model calculates the gradient of the loss function through the backpropagation algorithm, uses the chain rule to propagate the error layer by layer and generate parameter gradients. The magnitude of the gradient reflects the degree of influence of the parameters on the loss. The optimizer updates the parameters according to the gradient direction. When the gradient is large, the adjustment range is large, and vice versa. During the iteration process, the loss function value is continuously reduced so that the improved model predicts closer to the true label. When the loss function and evaluation metrics mAP, recall R, and accuracy P of the training set and validation set are stable and no longer improve, training is stopped, and the optimal model parameters at this time are saved.

[0134] Step 4: Test the optimal model described in Step 3 using the test set, evaluate the test results, and if the accuracy requirements are met, the final insulator defect detection model based on the improved YOLOv11n is obtained. Input the test set into the optimal model described in Step 3; calculate the model performance indicators: accuracy P, recall R, and mAP, using the following formulas:

[0135]

[0136] Where P is precision, R is recall, mAP is the mean precision across all classes, AP is the mean precision, m is the number of classes, TP represents the number of positive samples correctly identified as positive samples, FP represents the number of negative samples incorrectly identified as positive samples, and FN represents the number of positive samples incorrectly identified as negative samples. When the performance indicators meet the accuracy requirements, the final insulator defect detection model based on the improved YOLOv11n is obtained.

[0137] In this embodiment, to verify the effectiveness of the detection model disclosed in this patent, the YOLOv11n model, YOLOv10n model, YOLOv8n model, YOLOv7-tiny model, YOLOv11n model + SCConv + SPPCSPC + SBA, and the detection model proposed in this patent were tested on the IDD dataset. The evaluation results are shown in Table 1. Among them, the insulator defect detection model based on the improved YOLOv11n proposed in this paper outperforms other comparative models in terms of accuracy P, recall R, mAP@0.5, and mAP@0.5:0.95.

[0138] Table 1 Comparison of experimental results

[0139]

[0140] The above description is merely one embodiment of the present invention and does not limit the patent scope of the present invention. For those skilled in the art, the present invention can have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for detecting insulator defects based on an improved YOLOv11n, characterized in that, Specifically, the following steps are included: Step 1: Obtain the insulator defect image dataset, divide the dataset into training set, validation set and test set, and perform preprocessing; Step 2: Construct an insulator defect detection model based on the improved YOLOv11n. The improved detection model includes an improved backbone network, an improved feature fusion network, and a head network. The construction of the improved detection model further includes steps 2.1 to 2.3: Step 2.1: The improved backbone network consists of Conv module 1, Conv module 2, SCConv module 1, Conv module 3, SCConv module 2, Conv module 4, SCConv module 3, Conv module 5, SCConv module 4, SPPFCSPC module, and C2PSA module connected in sequence, thus forming a new backbone network structure. The training and validation sets in the dataset are used as inputs to the backbone network; The improved backbone network outputs feature information at three different scales through SCConv module 2, SCConv module 3 and C2PSA module respectively; Step 2.2: The improved feature fusion network, based on the YOLOv11n neck network, replaces the original Upsample module with SBA module 1 and SBA module 2, and adds newly designed LXMstrip Pool module 1 and LXMstripPool module 2. LXMstrip Pool module 1 and LXMstrip Pool module 2 have identical structures. The internal flow of the LXMstripPool module further includes steps 2.2.1 to 2.2.3: Step 2.2.1: The LXMstrip Pool module has one input, the input feature map x, which is passed through Conv module 1, Conv module 5, and Conv module 10 respectively; among them, Conv module 1 is a convolutional block with a 1×1 kernel, which compresses the number of channels and reduces the amount of computation. The feature map output by Conv module 1 is denoted as... As input to Pool module 1, Pool module 2, and DeformableConv module; Pool module 1 processes feature maps Perform adaptive average pooling operation, which can be represented as follows: ; in, , , , X u,v H represents the value of the input feature map at position (u,v); (i,j) is the output position; in and W in Given the height and width of the input image, W out and H out Output the height and width of the image, and Output(i,j) is the output feature map; The output of Pool module 1 is used as the input of Conv module 2. Conv module 2 performs convolution operation on the input feature map, and then goes through Upsample module 1 for upsampling operation. Pool module 2 for feature maps Adaptive average pooling is performed. The output of Pool module 2 is used as the input of Conv module 3. Conv module 3 performs convolution on the input feature map, and then goes through Upsample module 2 for upsampling. The DeformableConv module 1 extracts feature maps through deformable convolution. Dynamic characteristics: ; Where DeformableConv represents deformable convolution, and the specific operation of deformable convolution is represented as follows: ; in, It is the sampling grid of the convolution kernel, p n It is a predefined fixed offset, w(p) n ) represents the convolution kernel weights, x(p0+p n ) is the input feature map at position p0+p n The value of Δp n It is the offset learned from the input feature map; The outputs of Upsample module 1, Upsample module 2, and DeformableConv module 1 are fused using multi-scale features, and then smoothed using the ARelu activation function. The specific operation of ARelu is as follows: ; Where α and β are learnable parameters, Clamp(α) restricts α to [0.01, 0.99], and σ(β) is the Sigmoid function, which achieves adaptive activation by amplifying and suppressing positive and negative values ​​respectively; The result processed by ARelu is input into Conv module 4; Step 2.2.2: Input feature map x, pass it through Conv module 5. Conv module 5 is a convolutional block with a 1×1 kernel, which compresses the number of channels and reduces the computational load. The output of Conv module 5 is denoted as... Input is sent to Adaptive_Pool module 1, Adaptive_Pool module 2, and DeformableConv module 2; Adaptive_Pool module 1 for feature maps Performing horizontal strip pooling and reducing its height space dimension to 1, the horizontal strip pooling operation can be represented as: ; in, , H is the height of the feature map, W is the width of the feature map, and (i,j) corresponds to the position of the feature map; The output of Adaptive_Pool module 1 is used as the input of Conv module 6. Conv module 6 performs convolution operation on the input feature map, and then goes through Upsample module 3 for upsampling operation. Adaptive_Pool module 2 for feature maps Performing vertical strip pooling and reducing its width dimension to 1, the vertical strip pooling operation can be represented as: ; in, , H is the height of the feature map, W is the width of the feature map, and (i,j) corresponds to the position of the feature map; The output of Adaptive_Pool module 2 is used as the input of Conv module 7. Conv module 7 performs convolution operation on the input feature map, and then goes through Upsample module 4 for upsampling operation. The DeformableConv module 2 extracts dynamic features from the feature map through deformable convolution; The outputs of Upsample module 3, Upsample module 4, and DeformableConv module 2 are fused at multiple scales and then smoothed using the ARelu activation function; the result after ARelu processing is used as the input to Conv module 8. Step 2.2.3: The outputs of Conv module 8 and Conv module 4 are concatenated using Concat. The concatenated result is input into Conv module 9. After the convolution operation of Conv module 9, the convolution result is aggregated with the result of Conv module 10, and then output after smoothing by the ARelu activation function. The output of the C2PSA module serves as the input of the SBA module 1; Concat module 1 receives the output from SCConv module 3 and SBA module 1 as input, and then passes through C3k2 module 1 and SBA module 2 in sequence. Concat module 2 receives the output from SCConv module 2 and SBA module 2 as input, and then passes through C3k2 module 2 and Conv module 6 in sequence; Concat module 3 receives the output from Conv module 6 and C3k2 module 1 as input, and then passes through C3k2 module 3 and Conv module 7 in sequence; Concat module 4 receives the output from Conv module 7 and C2PSA module as input, and then passes through C3k2 module 4 in sequence. The LXMStrip Pool module 1 and LXMStrip Pool module 2 respectively receive the outputs from the C3k2 module 4 and the Concat module 3 as inputs; Step 2.3: Input the fused features from Step 2.2 into the head network of the YOLOv11n model to predict and filter the insulator defect detection results, and obtain the final prediction results of the insulator defect detection, thereby realizing the insulator defect detection. The head network of the YOLOv11n model includes three detection heads; Detection head 1 receives the feature map output by C3k2 module 2; detection head 2 receives the feature map output by LXMStrip Pool module 2; detection head 3 receives the feature map output by LXMStrip Pool module 1. Step 3: Train the insulator defect detection model based on the improved YOLOv11n using the training set and validation set, and save the optimal trained model; Step 4: Use the test set to perform accuracy testing on the optimal model. If the accuracy requirements are met, the final insulator defect detection model is obtained.

2. The improved YOLOv11n insulator defect detection method according to claim 1, characterized in that, The preprocessing involves manually labeling the training set, validation set, and test set.

3. The insulator defect detection method based on the improved YOLOv11n according to claim 1, characterized in that, Step 3 further includes setting the training parameters of the improved YOLOv11n model, including the number of iterations, batch size, optimizer, learning rate, momentum, weight decay, and number of threads. The labeled training set and validation set are input into the improved detection model. The gradient of the loss function is calculated through backpropagation and the parameters are updated using the optimizer. The iteration continues until the loss function of the training set and validation set and the evaluation metrics accuracy P, recall R, and mAP all tend to stabilize and no longer improve. Finally, the optimal model parameters are saved.

4. The insulator defect detection method based on the improved YOLOv11n according to claim 1, characterized in that, Input the test set into the optimal model described in step 3; calculate the model performance metrics: accuracy (P), recall (R), and mAP, using the following formulas: ; ; ; ; Where P is precision, R is recall, mAP is the mean precision across all classes, AP is the mean precision, m is the number of classes, TP represents the number of positive samples correctly identified as positive samples, FP represents the number of negative samples incorrectly identified as positive samples, and FN represents the number of positive samples incorrectly identified as negative samples. When the performance indicators meet the accuracy requirements, the final insulator defect detection model based on the improved YOLOv11n is obtained.

Citation Information

Patent Citations

  • Insulator defect detection method and system based on YOLO detector

    CN117455923A

  • Lightweight insulator defect detection method based on improved YOLOv5 network

    CN118967550A