Insulator defect detection model for power transmission line based on improved YOLOv11n

By improving the YOLOv11n model and combining multi-branch asymmetric convolution with enhanced attention modules, a lightweight detection head, and efficient upsampling convolution, the accuracy and real-time performance issues of insulator defect detection in transmission line inspections were solved, achieving efficient and lightweight insulator defect detection.

CN122156732APending Publication Date: 2026-06-05CHINA THREE GORGES UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA THREE GORGES UNIV
Filing Date
2026-02-09
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Traditional power transmission line inspection relies on manual methods, which are inefficient and pose safety hazards. In complex environments, the detection accuracy of insulator defects is insufficient, and image processing for drone inspections faces network bandwidth pressure and real-time issues.

Method used

It adopts an improved YOLOv11n model, combining multi-branch asymmetric convolution with enhanced attention module (MACEA), C2PSA_DDRM, lightweight detector head (LSCD) and efficient upsampling convolution module (EUCB), and introduces the I-PIoUv2 loss function to optimize feature extraction and bounding box regression, making it suitable for edge computing devices.

Benefits of technology

It improves the accuracy and robustness of insulator defect detection in complex environments, reduces model complexity, meets real-time detection requirements, and is suitable for edge devices and drone platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122156732A_ABST
    Figure CN122156732A_ABST
Patent Text Reader

Abstract

The power line insulator defect detection model based on improved YOLOv11n comprises a multi-branch asymmetric convolution and enhanced attention module (MACEA), and is encapsulated as C3K2_MACEA to enhance the recognition ability of the model to the small defects and shape abnormalities of the insulator; the C2PSA_DDRM module is used to enhance the feature robust modeling ability of the insulator defects under the conditions of complex background and low contrast in the unmanned aerial vehicle inspection scene of the power line; the up-sampling convolution module EUCB is used to reconstruct the spatial detail information of the power line insulator defects in the multi-scale feature fusion and decoding stage; the lightweight detection head LSCD is used to reduce the parameter quantity and the calculation complexity of the detection head under the premise of ensuring the detection accuracy of the power line insulator defects; and the I-PIoUv2 loss function is used to optimize the boundary box regression process in the detection of the power line insulator defects. Through optimization of the network structure and feature extraction, the model complexity is reduced while the multi-scale target detection accuracy in the complex scene is improved, and efficient and lightweight detection is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of insulator defect detection technology, and specifically to a transmission line insulator defect detection model based on an improved YOLOv11n. Background Technology

[0002] With the continuous and rapid development of the power industry and the advancement of new power system construction, the scale of transmission lines is constantly expanding, their structure is becoming increasingly complex, and their operating environment is becoming more diversified. Inspection work is rapidly evolving from traditional manual methods towards automation and intelligence. As a crucial component of the power system, the operational reliability of transmission lines directly affects the safe and stable operation of the power grid. Insulators are one of the key basic components of transmission lines, primarily responsible for supporting conductors, maintaining safe electrical clearances, and achieving current isolation. Their health largely determines the operational safety and reliability of the line. However, during long-term service, insulators are typically exposed to complex and harsh natural environments, enduring the combined effects of wind and rain erosion, strong sunlight, diurnal temperature variations, industrial pollution, and lightning strikes. This makes them highly susceptible to various defects such as cracks, aging, flashover, breakage, and foreign object adhesion. If these defects are not detected and addressed in a timely manner, they can lead to a decline in insulation performance, resulting in flashover, tripping, or even equipment damage. In severe cases, they can cause widespread power outages, posing significant risks and losses to the safe operation of the power system and socio-economic development.

[0003] Traditional power transmission line inspections primarily rely on manual ground patrols or high-altitude operations. This method is not only labor-intensive and inefficient, but also poses significant safety hazards in complex terrains such as mountainous areas and those crossing rivers and valleys, making it difficult to meet the current demands for large-scale, high-frequency inspections. In recent years, with the rapid maturation of drone and sensor technologies, drone inspection has gradually become an important technical means for power transmission line inspection due to its advantages such as high mobility, flexible deployment, high operational efficiency, and the ability to perform multi-angle, close-range observations. Drones can be equipped with high-resolution visible light cameras or infrared imaging equipment to acquire a large number of clear inspection images. Combined with intelligent analysis methods such as deep learning, this enables automatic identification and location of insulator defects, significantly improving inspection efficiency and detection accuracy while effectively reducing labor costs and safety risks.

[0004] However, in practical inspection applications, insulator defect detection still faces many challenges. On the one hand, the environment of transmission lines is complex and variable, and insulator targets are often obscured by foreground or background elements such as trees and buildings, as well as by factors such as ground shadows, strong light reflection, fog, and changes in lighting, resulting in unclear target features or missing information. On the other hand, due to differences in drone flight altitude, shooting angle, and flight path planning, the scale of insulators in images varies greatly, ranging from tens to hundreds of pixels, which places higher demands on the multi-scale feature representation capabilities of detection algorithms. In addition, as the scale of inspection tasks continues to expand, uploading all massive inspection images to the cloud for centralized processing can easily increase network bandwidth pressure and data transmission latency, making it difficult to meet real-time requirements.

[0005] Against this backdrop, deploying lightweight, high-efficiency deep learning models on drones or edge computing devices to perform image analysis and defect identification close to the data source has become an important development trend in intelligent power transmission line inspection. Edge deployment not only effectively reduces data transmission volume and alleviates network congestion, but also enables real-time or near-real-time defect detection and early warning, improving the response speed and overall operational efficiency of the inspection system. Therefore, researching lightweight insulator defect detection models that combine high detection accuracy and low computational complexity for complex inspection scenarios has significant theoretical and practical value for promoting the intelligent, real-time, and engineering applications of power line inspection. Summary of the Invention

[0006] To address the issues of noise interference affecting small targets and accuracy degradation due to obstruction and irregular shapes in transmission line insulator defect detection under complex backgrounds, this invention proposes a transmission line insulator defect detection model based on an improved YOLOv11n. By optimizing the network structure and feature extraction, the model improves detection accuracy in complex scenarios and for multi-scale targets while reducing model complexity; achieving efficient and lightweight detection suitable for edge deployment and engineering applications.

[0007] The technical solution adopted in this invention is as follows:

[0008] A defect detection model for transmission line insulators based on the improved YOLOv11n is presented. This model includes: A multi-branch asymmetric convolution and enhanced attention (MACEA) module is encapsulated as C3K2_MACEA, which integrates MEEM and CASAB mechanisms. This module is used to improve the model's ability to model multi-scale features and detect in complex degradation scenarios, and enhance the model's ability to identify minor defects and shape anomalies in insulators.

[0009] The C2PSA_DDRM (C2f-based Partial Spatial Attention with Dynamic DefensiveRefinement Module) module improves the representation of local details, edge structures, and cross-channel interactions with almost no increase in model parameters and computational cost. It is used to enhance the feature robust modeling capability of insulator defects under complex backgrounds and low contrast conditions in UAV inspection scenarios of power transmission lines, suppress the interference of haze, shadows and background clutter, and improve the perception and differentiation of fine-grained defects such as cracks and flashovers, thereby reducing the false negative rate of small target defects.

[0010] The high-efficiency upsampling convolution module EUCB is used to replace Upsample in the original YOLOv11n structure. It is used to efficiently reconstruct the spatial detail information of transmission line insulator defects in the multi-scale feature fusion and decoding stage, enhance the edge and texture expression of small-scale defects such as minor damage and mild flashover, alleviate the detail smoothing problem caused by traditional interpolation upsampling, and improve the defect localization accuracy.

[0011] The original YOLOv11n detection head is replaced with a lightweight detection head LSCD (Lightweight Shared Convolutional Detection Head). While maintaining detection accuracy, the model complexity is reduced. This is used to reduce the number of parameters and computational complexity of the detection head while ensuring the accuracy of insulator defect detection in transmission lines. It also improves the real-time inference capability of the model on edge devices such as drones, meeting the actual needs of inspection scenarios for high efficiency and lightweight deployment.

[0012] The I-PIoUv2 (Inner-PIoUv2) loss function is used to further improve the performance of transmission line defect detection. It is used to optimize the bounding box regression process in the defect detection of transmission line insulators, enhance the geometric alignment ability between the predicted box and the real defect area under complex background and target boundary ambiguity conditions, and improve the positioning accuracy and training stability of irregular defects such as cracks, breaks and broken strings.

[0013] In the multi-branch asymmetric convolution and enhanced attention module, firstly, the input X is processed through parallel three-branch convolutions and the results are fused to obtain the first-stage output X1, calculated as follows: (1); (2); (3); In the above formula, These are the features after processing through three different branches; For depthwise convolution; For depthwise separable convolution; This indicates that a depthwise separable convolution operation with a kernel size of 3×1 is used; For pointwise convolution; Features after fusion; For feature splicing operations; Output X1 is processed by the Multi-scale Edge Enhancement Module (MEEM) and then concatenated with its own residual to obtain output X2: (4); In equation (3), This represents the output obtained through the multi-scale edge enhancement module.

[0014] Subsequently, output X2 is processed by the Channel and Spatial Attention Block (CASAB) and concatenated with its own residual to obtain output X3: (5); In equation (5), This indicates that the output is obtained through the channel and spatial joint attention module.

[0015] Finally, the output X3 is passed through the SiLU activation function to obtain the final output Y: (6); In equation (6), This represents the activation function of the Sigmoid Linear Unit.

[0016] The multi-scale edge enhancement module (MEEM) includes: an average pooling layer (AP), an edge enhancer (EE), and a feature fusion module (Concat), as detailed below: (7); (8); In the above formula, This represents the input features mapped by a feature mapping function at a given scale. This represents a feature mapping function consisting of 1×1 convolution, batch normalization, and a sigmoid activation function, used for channel compression and non-linear enhancement; Represents the features at scale t+1; This indicates the use of 3×3 average pooling; This represents a 1×1 convolutional layer containing batch normalization and a Sigmoid activation function; Represents the features at scale t; Next, an edge enhancer is introduced to enhance the detail information at each scale: (9); In equation (9), This represents the features after edge enhancement; This represents an edge enhancement mapping function, used to enhance high-frequency edges and details in features at various scales; This represents the input features at the corresponding scale l; Indicates scale.

[0017] The formula for calculating the edge enhancer is as follows: (10); (11); In the above formula, This represents the edge features extracted from the first scale feature; This represents the enhanced feature representation after fusing edge features with the original features, used to highlight defect edges while preserving structural information.

[0018] Subsequently, these features are fused through channel concatenation and a 1×1 convolutional layer to obtain the output features of the multi-scale edge enhancement module (MEEM): (12); In equation (12), This represents the output features after passing through the multi-scale edge enhancement module.

[0019] In the aforementioned Channel and Spatial Joint Attention Module (CASAB), The convolutional blocks first employ 3×3 depth-separable convolutions. Extracting spatial features; Subsequently, through 1×1 convolution Adjust the number of feature channels to enhance feature fusion capabilities.

[0020] Both of the above convolutional layers introduce batch normalization (BN) and Leaky ReLU (LR) activation functions in sequence; among them, the Leaky ReLU (LR) activation function ensures the stability of the gradient during backpropagation by introducing a non-zero slope in the negative input interval.

[0021] The mathematical expression for this convolutional block is: (13); In equation (13), The output features of the convolutional block; This represents the Leaky ReLU activation function; This indicates a batch normalization operation; This represents a 1×1 convolution operation; This represents a 3×3 depthwise separable convolution.

[0022] After the convolutional block, the spatial features then enter the Channel Attention Module (CAM), which captures the overall feature context and key activation responses through Global Average Pooling (GAP) and Global Max Pooling (GMP), respectively. The pooled features are then combined and fed into two fully connected layers, where the Swish activation function is used to introduce non-linearity while maintaining gradient smoothness. Finally, attention weights are generated through a fully connected layer with a Sigmoid activation function to scale the original feature map to highlight key channels. The mathematical expression for the Channel Attention Module (CAM) is: (14); In equation (14), This represents the output features of the channel attention module; This represents the input feature map; σ represents the Sigmoid activation function. Indicates a fully connected layer; This represents the Swish activation function, used to enhance non-linear expressiveness while maintaining gradient smoothness; This indicates a global average pooling operation; This represents the global max pooling operation.

[0023] In the Spatial Attention (SAM) module, the input feature map is simultaneously subjected to mean pooling (MP) and max pooling (MP). α Minimum pooling (MP) β The mean response, salient features, weakest response, and overall intensity of spatial features are captured using the summation pooling (SM) operation, respectively. The calculation process is described as follows: (15); In equation (15), This represents the spatial features after being spliced ​​together by multiple pooling operations; Indicates a channel splicing operation; This indicates the mean pooling operation; This represents the max pooling operation; This represents the minimum pooling operation; This indicates a summation pooling operation.

[0024] These spliced ​​features are refined through 7×7 depth convolutions to capture broader contextual information, as shown in Equation (16); Subsequently, a spatial attention map is generated using the Swish activation function and the Sigmoid activation function, which is used to scale the input feature map and highlight key spatial regions.

[0025] The mathematical expression for the Spatial Attention Module (SAM) is: (16); In equation (16), This represents the output obtained after passing through the spatial attention module; This represents the Sigmoid activation function; This represents a 1×1 convolution operation; This represents the Swish activation function; This indicates a 7×7 depth separable convolution operation.

[0026] The outputs of the Channel and Spatial Joint Attention Module (CASAB) are fused by element-wise addition, specifically as follows: (17); In equation (17), This represents the output feature obtained after passing through the channel and spatial joint attention module.

[0027] The C2PSA_DDRM module integrates Dynamic Tanh (DyT) and Defensive Refinement Module (DRM), which effectively enhances the dynamic adaptability and fine-grained robustness of feature representation while ensuring consistency between input and output scales. The implementation of dynamic non-normalization (Dynamic Tanh, DyT) is shown in formula (18): (18); In equation (18), Output the results for the DyT module; It is a learnable scaling parameter used to linearly scale the features after tanh transformation, restoring or adjusting the overall amplitude of the features; It is a learnable scaling parameter used to dynamically adjust the amplitude range of input features and control the intensity of nonlinear compression, thereby adapting to features of different scales and distributions. These are learnable bias parameters used to translate features, thereby enhancing the flexibility of feature representation. The hyperbolic tangent function is used to perform nonlinear compression on the input features, mapping them to ( The interval is 1,1).

[0028] The Defensive Refinement Module (DRM) consists of five adversarial residual blocks (ARBs) connected in series, and incorporates multi-scale features from U-Net to perform more robust self-attention modeling, as shown in Equation (19): (19); In equation (19), Represents the input features of DRM; For the first Output characteristics of each ARB block; and These represent encoded or decoded features from different scales of U-Net; This represents a feature concatenation operation along the channel dimension; Indicates the first A nonlinear mapping function for an anti-adversarial residual block.

[0029] Through multiple sampling and residual mapping, the DRM module introduces Pixel Shuffle / Pixel Unshuffle for upsampling and downsampling operations. Pixel Shuffle achieves lossless high-resolution reconstruction by rearranging subpixels in the channel dimension to the spatial dimension; Pixel Unshuffle maps local spatial blocks to the channel dimension for a structured downsampling process. As shown in formula (20): (20); In equation (20), This represents the input feature map at the current scale; This represents the output characteristics after upsampling, downsampling, and residual fusion; This indicates the Pixel Shuffle operation, which rearranges the sub-pixel information in the channel dimension to the spatial dimension to achieve upsampling. This indicates the Pixel Unshuffle operation, which maps local spatial blocks to the channel dimension to achieve downsampling.

[0030] Within each adversarial residual block, the input features are first mapped to query (Q), key (K), and value (V) vectors, and the Mercer kernel function is used instead of traditional dot-product attention to enhance the model's stability under adversarial perturbation conditions. Since the product of K and V is performed before attention normalization, this design reduces the computational complexity from O(N^2) to O(N^2). 2The computational efficiency of the adversarial training phase is significantly improved by reducing the computational cost to O(N). The supplemented and refined features are then passed to the decoder to generate a more detailed and robust fusion result, as shown in Equation (21). (twenty one); In equation (21), This represents the self-attention output based on the kernel function; query (Q), key (K), and value (V) represent the query, key, and value vectors, respectively. This represents the matrix transpose operation; This represents the feature mapping function corresponding to the Mercer kernel function; This represents the key-value aggregation terms completed before attention normalization.

[0031] After the output of the DRM module is processed by a second 1×1 convolution and a lightweight depthwise separable convolution (DW+PW, DSConv), it is fed into the Dynamic Tanh (DyT) module to form a two-stage "dynamic-robust" joint modeling path. This dual-path structure effectively enhances the cross-scale dependent modeling capability and further improves the recognition performance of insulator cracks, damaged edges, and abnormal brightness areas on the surface. Finally, the shallow features at the input end are fed into the end of the DRM module through residual connections, thereby enhancing the stability of gradient propagation while preserving high-frequency texture information. As shown in Equation (22): (twenty two); In equation (22), This represents the shallow features at the module input. This represents the deep robustness features output by the DRM module; This indicates the final output characteristics of the module; Represents the hyperbolic tangent activation function; This represents a dynamic adjustment function used to adaptively generate feature amplitude scaling factors.

[0032] In the upsampling convolution module EUCB, the input feature map is first upsampled using bilinear interpolation, doubling its spatial resolution to achieve initial resolution restoration. Then, a 3×3 depthwise separable convolution (DWConv) is introduced to spatially enhance the upsampled features, modeling neighborhood context information through local receptive fields to compensate for potential texture detail loss during upsampling. Next, batch normalization (BN) is used to normalize the features, mitigating distribution shifts between features at different scales and improving training stability. Subsequently, the ReLU activation function is used to introduce nonlinear mapping capabilities, thereby enhancing the network's sensitivity to small defect regions. Finally, 1×1 convolution is used to achieve channel compression and linear feature recombination, ensuring that the output feature dimension is consistent with the skip connection branch, thereby guaranteeing the structural compatibility and information alignment of the upsampling and downsampling paths. As shown in Equation (23): (twenty three); In equation (23), This represents the input feature map of the EUCB module; This indicates the upsampling characteristics output by the EUCB module; This indicates a bilinear interpolation upsampling operation; This represents the depthwise convolution operation in a 3×3 depthwise separable convolution; Indicates batch normalization; Represents the ReLU activation function; This represents a 1×1 convolution used for channel compression and linear recombination of features.

[0033] The I-PIoUv2 (Inner-PIoUv2) loss function, Using PIoUv2 as the basic loss form, and further introducing Inner-IoU for constraints and optimization, the Inner-PIoUv2 loss function was finally constructed. The expression for calculating Inner-IoU is as follows: (twenty four); In equation (24), The core metric representing the degree of overlap between the predicted bounding box and the true bounding box; This represents the area of ​​the overlap between the predicted bounding box and the ground truth bounding box; This represents the total area covered by the combined predicted and ground truth bounding boxes.

[0034] (25); In equation (25), Indicates the width of the actual bounding box; Indicates the height of the actual bounding box; Indicates the scaling factor; Indicates the width of the prediction box; Indicates the height of the prediction box; (26); In equation (26), This means taking the leftmost x-coordinate value between the right boundary of the ground truth box and the right boundary of the predicted box; The x-coordinate of the right boundary of the true bounding box; Indicates the x-coordinate of the right boundary of the prediction box; This means taking the rightmost x-coordinate value between the left boundary of the ground truth bounding box and the left boundary of the predicted bounding box; The x-coordinate of the left boundary of the true bounding box; Indicates the x-coordinate of the left boundary of the prediction box; This indicates that the y-coordinate value is taken from the uppermost of the actual bottom boundary and the predicted bottom boundary; This represents the y-coordinate of the lower boundary of the prediction box; This means taking the lower y-coordinate value between the top boundary of the actual bounding box and the top boundary of the predicted bounding box; This represents the y-coordinate of the upper boundary of the prediction box.

[0035] (27); (28); (29); (30); (31); (32); (33); (34); Inner-IoU generates auxiliary boxes using a ratio scaling factor. The ratio is set based on the parameters of the ground truth box and the predicted box to obtain the corresponding auxiliary box size, where: ( , () is the center point of the target box, , () represents the center point of the prediction box; w and h represent the width and height of the prediction box, respectively; , The actual frame width and height; denoted by , where b represents the upper and lower boundaries of the ground truth bounding box, and b represents the boundary of the predicted bounding box. When ratio < 1, the size of the auxiliary box shrinks, and its absolute IoU value increases, which can accelerate the regression of high-precision samples; when ratio > 1, the auxiliary box expands, effectively expanding the regression range and helping the model to quickly locate the target.

[0036] The formula for calculating PioU is: (35); In equation (30), This represents the normalized average localization deviation between the predicted bounding box and the ground truth bounding box. and These represent the horizontal distance deviations between the predicted bounding box and the ground truth bounding box on the left and right, respectively. and These represent the vertical distance deviations between the predicted bounding box and the ground truth bounding box at the top and bottom, respectively. and These represent the width and height of the actual bounding box, respectively.

[0037] (36); In equation (31), This represents the final calculated value of the PIOU loss function; This represents the traditional IoU loss; This represents the natural constant, approximately equal to 2.71828.

[0038] To make the loss function more focused on medium-quality anchor boxes, a non-monotonic attention layer is introduced. To study the focusing mechanism, we obtained the PIoUv2 loss function, calculated as follows: (37); In equation (32), q is the mass of an anchor frame; Indicates anchor frame quality The definition of .

[0039] (38); In equation (33), This represents the input variable of the non-monotonic attention function m(x).

[0040] (39); In equation (34), This represents the value of the PIoUv2 loss function; This represents a non-monotonic attention function; λ is a hyperparameter that controls attention. Combining the Inner-IoU and PIoUv2 loss functions, the definition of Inner-PIoUv2 is as follows: (40); In equation (35), This represents the final value of the Inner-PIoUv2 loss function; The core metric representing the degree of overlap between the predicted bounding box and the actual bounding box.

[0041] In the lightweight detection head LSCD, the input feature map is first compressed through a 1×1 convolution (Conv_GN, 1×1) to reduce redundant features and computational overhead. Then, a 3×3 convolution (Conv_GN, 3×3) with shared parameters is introduced to further refine the features and enhance spatial context modeling capabilities. Next, the features are fed into the classification (Cls) and regression (Box) branches to improve the accuracy of target category discrimination and location regression. Finally, the feature map at different scales is adaptively weighted through a dynamic scaling (Scale) module to achieve more effective multi-scale target detection. As shown in formula (41): (41); in: This represents the feature map input to the LSCD detector head; This represents a 1×1 convolution, used for channel compression and feature recombination; This represents a 3×3 convolution with shared parameters, used for spatial context feature extraction; Indicates the classification branch and outputs the target category prediction result; This indicates the regression branch, which outputs the regression results for the target location. This indicates the final classification prediction result; This represents the final bounding box regression prediction result; This represents the dynamic scaling module, which is used to adaptively weight the prediction results of features at different scales.

[0042] This invention provides a defect detection model for transmission line insulators based on an improved YOLOv11n, with the following technical advantages: 1) The MACEA module of this invention significantly improves the modeling ability for fine-grained features of insulator defects by synergistically designing a multi-branch asymmetric convolutional structure and an enhanced attention mechanism, while ensuring the model's lightweight nature. This module utilizes asymmetric convolutional kernels of different directions and scales to process input features in parallel, effectively capturing the directional features of defects such as insulator cracks, damaged edges, and contamination deposits in their spatial structure. Simultaneously, an enhanced attention mechanism is introduced to adaptively weight the multi-branch features, enabling the network to focus on defect regions and suppress interference from complex backgrounds. Compared to traditional single-branch convolutional structures, the MACEA module of this invention significantly improves the discriminativeness and robustness of feature representation without substantially increasing the number of parameters or computational complexity. 2) The C2PSA_DDRM module of this invention deeply integrates channel grouping feature interaction (C2), pixel-level self-attention mechanism (PSA), and defense refinement module (DRM) to form a composite structure that balances fine feature modeling and adversarial robustness. This module reduces computational redundancy through grouped feature mapping and introduces self-attention modeling at the pixel scale, effectively enhancing the response capability to minor defects and local anomalies in insulators. Simultaneously, DRM refines features layer by layer through a multi-level adversarial residual structure, significantly improving model stability under complex environmental interference conditions (such as haze, strong light reflection, and background noise). Compared with existing attention modules, the C2PSA_DDRM of this invention, while maintaining its lightweight advantage, further enhances the model's generalization ability and reliability in complex transmission line inspection scenarios. 3) The upsampling convolution module EUCB of this invention employs a combined strategy of interpolation upsampling, depthwise separable convolution, and channel reorganization, effectively compensating for the loss of detail information during the upsampling process while improving feature resolution. This module first achieves parameter-free resolution restoration through bilinear interpolation, avoiding the introduction of additional computational burden; then, it utilizes depthwise separable convolution to perform spatial enhancement modeling of the local neighborhood, strengthening the expression of insulator edge contours and texture details; finally, it achieves channel compression and feature reorganization through 1×1 convolution, ensuring consistency between the output features and skip connection branches. Compared to traditional deconvolution or single interpolation methods, the EUCB module of this invention significantly improves the semantic consistency of high-resolution features while suppressing artifact effects. 4) The Inner-PIoUv2 loss function of this invention, based on the traditional bounding box regression loss, introduces internal region constraints and a center consistency measurement mechanism, thereby more accurately characterizing the geometric relationship between the predicted box and the real defect region. This loss function not only focuses on the degree of overlap of the bounding boxes, but also effectively alleviates the problem of unstable localization caused by the small scale and irregular shape of insulator defect targets by constraining the matching degree of the target's internal region. Compared with conventional IoU-type loss functions, Inner-PIoUv2 provides more stable and physically meaningful gradient information during training, accelerates the model convergence speed, and significantly improves the localization accuracy of small targets and slender structural defects; 5) The lightweight detection head LSCD of this invention effectively reduces the model complexity and computational overhead of the detection head through parameter sharing and a depthwise separable convolutional structure. This detection head introduces a shared feature extraction mechanism in the classification and regression branches, enabling different tasks to maintain feature consistency while reducing the number of redundant parameters, thereby significantly improving inference efficiency. Combined with a lightweight convolutional design, LSCD can meet the real-time and computationally limited requirements of edge devices and UAV platforms while ensuring detection accuracy. Compared to traditional detection head structures, the LSCD of this invention exhibits superior speed-accuracy balance characteristics in transmission line insulator defect detection tasks. 6) While ensuring detection accuracy, this invention optimizes the model structure for lightweighting and efficiency, significantly reducing the model's parameter size and computational overhead. This lowers the performance requirements for computing hardware and improves overall inference efficiency and deployment adaptability. The model can run stably on edge computing devices and mobile inspection platforms, demonstrating strong engineering feasibility and practical application value. Attached Figure Description

[0043] The present invention will be further described below with reference to the accompanying drawings and examples; Figure 1 This is a diagram of the YOLOv11 model network structure.

[0044] Figure 2 This is a network structure diagram of the MD-YOLO model of the present invention.

[0045] Figure 3 This is a network structure diagram of the MACEA module.

[0046] Figure 4 This is a network structure diagram of the MEEM module in the MACEA module.

[0047] Figure 5 This is a network structure diagram of the CASAB module in the MACEA module.

[0048] Figure 6 This is a diagram showing the results of the DRM module within the DDRM module.

[0049] Figure 7 This is a diagram of the EUCB network structure.

[0050] Figure 8 This is the variable defined for PIOU.

[0051] Figure 9 This is a diagram of the LSCD network structure. Detailed Implementation

[0052] Based on the improved YOLOv11n transmission line insulator defect detection model, this invention proposes the C3K2_MACEA model, which integrates MEEM and CASAB mechanisms, within the YOLOv10n framework. It also proposes the C2PSA_DDRM module, which effectively enhances the modeling capabilities of local details and edge structures, as well as cross-channel feature interaction representation, with almost no increase in model parameters or computational overhead. The invention replaces the original Upsample operation with the efficient upsampling convolution module EUCB, which improves feature resolution while supplementing semantic information, significantly improving the multi-scale feature fusion effect. Furthermore, it introduces a lightweight detection head, LSCD, to replace the original detection head. Through shared convolution and structural simplification, it effectively reduces model complexity and inference overhead while maintaining detection accuracy. Finally, it proposes the I-PIoUv2 loss function, which further improves the localization accuracy and detection performance of small target defects by strengthening the overlap constraint between the core regions of the predicted and ground truth boxes, thereby achieving more efficient, accurate, and robust detection of transmission line defects.

[0053] (I): This invention proposes a multi-branch asymmetric convolution and enhanced attention (MACEA) module and encapsulates it as C3K2_MACEA to improve the model's multi-scale feature modeling ability and detection performance in complex degradation scenarios; We propose the C2PSA_DDRM (C2f-based Partial Spatial Attention with DynamicDefensive Refinement Module) module, which improves the representation of local details, edge structures and cross-channel interactions with almost no increase in model parameters and computational cost. The efficient upsampling convolution module EUCB is used to replace Upsample in the original YOLOv11n structure; The original YOLOv11n detection head is replaced with a lightweight detection head LSCD (Lightweight Shared Convolutional Detection Head), which reduces model complexity while maintaining detection accuracy; The I-PIoUv2 (Inner-PIoUv2) loss function is proposed to further improve the defect detection performance of transmission lines.

[0054] The MACEA module is specifically as follows: The specific implementation method of MACEA is as follows: Figure 3 As shown.

[0055] First, the input X is processed through parallel three-branch convolutions, and the results are fused to obtain the first-stage output X1, calculated as follows: (1); (2); (3); Where: PWconv is pointwise convolution; DWconv is depthwise convolution; DSconv is depthwise separable convolution; These are the features after processing through three different branches; For feature splicing operations; These are the features after fusion.

[0056] Output X1 is processed by the Multi-scale Edge Enhancement Module (MEEM) and then residually concatenated with itself to obtain output X2. (4); Subsequently, X2 is processed by the Channel and Spatial Attention Block (CASAB) and concatenated with its own residual to obtain output X3: (5); Finally, X3 is activated by the SiLU function to obtain the final output Y.

[0057] (6).

[0058] The MEEM module is implemented as follows.

[0059] The MEEM module structure diagram is as follows: Figure 4 As shown.

[0060] The MEEM module consists of an Average Pooling Layer (AP), an Edge Enhancer (EE), and a Feature Fusion Module (Concat). The MEEM processing flow is as follows: (7); (8); in, This indicates the use of 3×3 average pooling. This represents a 1×1 convolutional layer that includes batch normalization and a sigmoid activation function. These are features at scale t. These are features at scale t+1.

[0061] A 1×1 convolutional layer of the function, It is a feature at scale t.

[0062] Next, an edge enhancer is introduced to enhance the detail information at each scale: (9); in, These are the features after edge enhancement. The module structure diagram of the edge enhancer is as follows: Figure 4 As shown, the calculation formula is as follows: (10); (11); in, Edge features extracted from the first scale feature Subsequently, these features are fused through channel concatenation and a 1×1 convolutional layer to obtain the output features of MEEM: (12); The CASAB module is implemented as follows: The CASAB module structure diagram is as follows: Figure 5 As shown. The processing flow of the CASAB module begins with a convolutional block (ConvBlock), which first uses a 3×3 depthwise separable convolution (…). This method extracts spatial features, significantly reducing the number of parameters and computational complexity compared to standard convolution while maintaining feature representation capabilities. Subsequently, a 1×1 convolution (…) is used to… The number of feature channels is adjusted to enhance feature fusion capabilities. Batch Normalization (BN) and Leaky ReLU (LR) activation functions are introduced sequentially after the two convolutional layers. Leaky ReLU introduces a non-zero slope in the negative input region to ensure gradient stability during backpropagation. The mathematical expression for this convolutional block can be represented as: (13); in: For output features.

[0063] After the convolutional block, the data enters the Channel Attention Module (CAM). This module captures the overall feature context and key activation responses through Global Average Pooling (GAP) and Global Max Pooling (GMP), respectively. The combination of GAP and GMP provides a more balanced set of information, helping the network decide which channels need to be enhanced or suppressed. These pooled features are then combined and fed into two fully connected layers, where a Swish activation function is used to introduce non-linearity while maintaining gradient smoothness. Finally, attention weights are generated through a fully connected layer with a Sigmoid activation function, scaling the original feature map to highlight key channels. The mathematical expression of CAM is: (14); Where σ represents the Sigmoid activation function. This outputs features for the channel attention module.

[0064] In the Spatial Attention (SAM) module, the input feature map is simultaneously subjected to mean pooling (MP) and max pooling (MP). α Minimum pooling (MP) β The mean response, salient features, weakest response, and overall intensity of spatial features are captured using the summation pooling (SM) operation, respectively. The calculation process is described as follows: (15); These concatenated features are refined through 7×7 depthwise convolutions to capture broader contextual information, and then spatial attention maps are generated using Swish and Sigmoid activation functions to scale the input feature map and highlight key spatial regions. The mathematical expression of the SAM module is: (16); The outputs of the channel and spatial attention modules are fused by element-wise addition, specifically as follows: (17); (ii): The C2PSA_DDRM module is specifically as follows: The specific implementation of the C2PSA_DDRM module is as follows: Figure 2 As shown, this module integrates Dynamic Tanh (DyT) and the Defensive Refinement Module (DRM), effectively enhancing the dynamic adaptability and fine-grained robustness of feature representation while ensuring consistency between input and output scales.

[0065] The implementation of DyT is shown in formula (18).

[0066] (18); In the formula, Output the results for the DyT module; It is a learnable scaling parameter used to linearly scale the features after tanh transformation, restoring or adjusting the overall amplitude of the features; It is a learnable scaling parameter used to dynamically adjust the amplitude range of input features and control the intensity of nonlinear compression, thereby adapting to features of different scales and distributions. These are learnable bias parameters used to translate features, thereby enhancing the flexibility of feature representation. The hyperbolic tangent function is used to perform nonlinear compression on the input features, mapping them to ( The interval is 1,1).

[0067] The DRM module is implemented as follows: The DRM module structure diagram is as follows: Figure 6 As shown, DRM consists of five adversarial residual blocks (ARBs) concatenated together, and incorporates multi-scale features from U-Net to perform more robust self-attention modeling. Through multiple sampling and residual mapping, DRM can effectively preserve key information of the input image during adversarial training, while suppressing the layer-by-layer propagation of attack perturbations.

[0068] To enhance feature reconstruction and detail recovery capabilities, the module introduces Pixel Shuffle / Pixel Unshuffle for upsampling and downsampling operations. This preserves the integrity of structural and texture details while promoting robust feature expression. Specifically, Pixel Shuffle rearranges subpixels in the channel dimension to the spatial dimension, achieving lossless high-resolution reconstruction; Pixel Unshuffle maps local spatial blocks to the channel dimension for a structured downsampling process.

[0069] Within each ARB, the input features are first mapped to query (Q), key (K), and value (V) vectors, and the Mercer kernel function is used instead of traditional dot-product attention to enhance the model's stability under adversarial perturbation conditions. Since the product of K and V is performed before attention normalization, this design reduces the computational complexity from O(N^2) to O(N^2). 2 The computational efficiency of the adversarial training phase is significantly improved by reducing the computational complexity to O(N). The supplemented and refined features are then passed to the decoder to generate a more detailed and robust fusion result.

[0070] The output of the DRM, after undergoing a second 1×1 convolution and a lightweight depthwise separable convolution (DW+PW, DSConv), is fed back into the DyT module, forming a two-stage "dynamic-robust" joint modeling path. This dual-path structure effectively enhances cross-scale dependent modeling capabilities, further improving the recognition performance of insulator cracks, damaged edges, and abnormal brightness regions on the surface. Finally, the shallow features from the input are merged into the end of the module through residual connections, thereby enhancing the stability of gradient propagation while preserving high-frequency texture information.

[0071] (III): High-efficiency upsampling convolutional block (EUCB): In its structural design, EUCB first upsamples the input feature map using bilinear interpolation, doubling its spatial resolution to achieve initial resolution restoration. Subsequently, a 3×3 depthwise separable convolution (DWConv) is introduced to spatially enhance the upsampled features. By modeling neighborhood context information through local receptive fields, it compensates for potential loss of texture details during upsampling. This convolution only performs operations within each channel, significantly reducing computational overhead while maintaining channel independence and effectively minimizing interference from redundant features.

[0072] Next, batch normalization (BN) is used to normalize the features, mitigating distribution shifts between features at different scales and improving training stability. Then, the ReLU activation function is used to introduce non-linear mapping capabilities, enhancing the network's sensitivity to small defect regions. Finally, 1×1 convolutions are used to achieve channel compression and linear feature recombination, ensuring that the output feature dimension matches the skip connection branch, thereby guaranteeing structural compatibility and information alignment between the upsampling and downsampling paths.

[0073] (iv): Loss function Inner-PIoUv2: This loss function integrates the core design ideas of Inner-IoU and PIoUv2. Compared to CIoU, PIoUv2 can effectively avoid the problem of abnormal expansion of the predicted box into the target region during the bounding box regression stage, thereby alleviating the resulting decrease in convergence speed. Based on this, this invention uses PIoUv2 as the basic loss form and further introduces Inner-IoU for constraints and optimization, ultimately constructing the Inner-PIoUv2 loss function.

[0074] The expression for calculating Inner-IoU is as follows: (twenty four); (25); (26); (27); (28); (29); (30); (31); (32); (33); (34); Inner-IoU generates auxiliary boxes using a ratio scaling factor. The ratio is set based on the parameters of the ground truth box and the predicted box to obtain the corresponding auxiliary box size, where: ( , () is the center point of the target box, , () represents the center point of the prediction box; w and h represent the width and height of the prediction box, respectively; , The actual frame width and height; denoted by , where b represents the upper and lower boundaries of the ground truth bounding box, and b represents the boundary of the predicted bounding box. When ratio < 1, the size of the auxiliary box shrinks, and its absolute IoU value increases, which can accelerate the regression of high-precision samples; when ratio > 1, the auxiliary box expands, effectively expanding the regression range and helping the model to quickly locate the target.

[0075] The formula for calculating PioU is: (35); (36); In the formula: P is the penalty factor, and the variables are defined as follows: Figure 8 As shown.

[0076] To make the loss function more focused on medium-quality anchor boxes, a non-monotonic attention layer m is introduced. To study the focusing mechanism, we obtained the PIoUv2 loss function, calculated as follows: (37); (38); (39); In the formula, q is the mass of an anchor frame, and λ is a hyperparameter controlling attention.

[0077] Combining the Inner-IoU and PIoUv2 loss functions, the definition of Inner-PIoUv2 is as follows: (40).

[0078] (V): Lightweight LSCD detection head: The overall structure of LSCD is as follows Figure 9 As shown, after obtaining the input feature map, the model first performs channel compression using a 1×1 convolution (Conv_GN, 1×1) to reduce redundant features and lower computational overhead. Then, a 3×3 convolution (Conv_GN, 3×3) with two parameter-sharing iterations is introduced to further refine the features and enhance spatial context modeling capabilities. Next, the features are fed into the classification (Cls) and regression (Box) branches to improve the accuracy of target category discrimination and location regression. Finally, a dynamic scaling module adaptively weights the feature maps at different scales, achieving more effective multi-scale target detection.

[0079] Overall, the LSCD detection head maintains excellent target detection performance while significantly reducing the number of parameters and computational complexity.

[0080] The following is a further description of the present invention.

[0081] like Figure 2 As shown, this invention improves key modules based on YOLOv11 to effectively reduce the number of model parameters and computational overhead while improving detection accuracy.

[0082] (1) In the improvement of the C3K2 module, a multi-branch asymmetric convolution and enhanced attention module MACEA is proposed, which improves the detection capability of insulators in complex backgrounds.

[0083] The specific processing steps of the MACEA module are as follows: The input X is processed through parallel three-branch convolutions, and the results are then fused. PWconv is a pointwise convolution, Dwconv is a depthwise convolution, and DSconv is a depthwise separable convolution. The fused result is then processed by PWconv to extract multi-scale contextual features, which are then residually concatenated with the result obtained from the pointwise convolution of the input X to obtain the first-stage output X1.

[0084] Output X1 is processed by the Multi-Scale Edge Enhancement (MEEM) module and then residual-connected with itself to obtain output X2. Subsequently, X2 is processed by the Channel and Spatial Joint Attention (CASAB) module and residual-connected with itself to obtain output X3.

[0085] Finally, X3 is activated by the SiLU function to obtain the final output Y.

[0086] (2) In the C2PSA_DDRM module, the module combines dynamic non-normalization DyT and defense refinement module DRM, which significantly improves the dynamic adaptability and fine-grained robustness of feature representation while maintaining the consistency of input and output scale.

[0087] First, a DyT module is introduced to replace the traditional batch normalization operation to enhance the dynamic adjustment capability of features. Then, the features are channel-compressed using 1×1 convolutions to reduce redundant dimensions before being fed into the DRM module for feature refinement. The output after DRM processing undergoes a second 1×1 convolution and a lightweight depthwise separable convolution (DW+PWDSConv), before being input into the DyT module again, forming a two-stage dynamic-robust joint modeling path. This dual-path structure enhances the ability to capture cross-scale dependencies, thereby improving the recognition of insulator cracks, damaged edges, and abnormal brightness areas on the surface. Finally, the shallow features at the input end are merged into the end of the module through residual connections, preserving high-frequency texture information while enhancing the stability of gradient propagation.

[0088] (3) The steps for obtaining and creating the dataset are as follows: First, this study systematically organized and expanded the data during the data preparation phase. Based on publicly available online datasets, including the Chinese Power Line Insulator Dataset (CPLID) and IDID1.2 (Insulator Defect Image Dataset), a large number of insulator images covering different environments, lighting conditions, and defect types were collected. These images encompass various typical defects such as flashover, insulator string drop, and breakage, providing a rich sample distribution for model training. Building upon this, open-source images from the internet were further introduced to expand the diversity and scale of the dataset, compensating for the shortcomings of the original data, which focused on shooting angle, background complexity, and defect ratio. Through deduplication, annotation, and quality screening of these images, a high-quality comprehensive dataset for transmission line insulator defect detection was constructed, providing a solid data foundation for subsequent model training and performance evaluation, while also enhancing the model's generalization ability in complex scenarios.

[0089] After the dataset was created, it was first input into the original model for detection, and then different improved modules were added for detection in turn. The specific detection results are shown in Table 1.

[0090]

[0091] In Table 1, Group A replaces C3k2 with C3k2_MACEA, Group B replaces C2PSA with C2PSA_DDRM, Group C replaces Upsample with EUCB, Group D replaces the CIoU loss function with I-PIoUv2, and Group E replaces the dataset that comes with the baseline model with the LSCD lightweight detection head. The five improvement methods are independent of each other.

[0092] As shown in Table 1, in the baseline YOLOv11n model, replacing the C3k2 module with C3k2_MACEA improved mAP50 by 1.11%, and both accuracy and recall were improved, indicating enhanced ability to identify insulator defects. Further replacing the C2PSA module with C2PSA_DDRM resulted in even more significant performance improvements, with recall increasing by 3.53% and mAP50 reaching 95.35%, demonstrating that this module effectively reduces the false negative rate and enhances the separation of targets from complex backgrounds. Replacing the upsampling module with EUCB significantly accelerated detection speed, increasing FPS by 25 frames, while mAP50 improved by 2.89%, indicating that EUCB improves both feature reconstruction efficiency and detection accuracy. Changing the loss function to I-PIoUv2 resulted in continuous improvement in various model metrics, validating its role in enhancing bounding box regression quality. When using the lightweight detection head LSCD alone, the computational cost drops to 5.3G, demonstrating excellent lightweight characteristics while maintaining accuracy.

[0093] When C3k2_MACEA and C2PSA_DDRM are fused, the mAP50 improves by 3.01%, indicating that enhancing the ability to distinguish between the target and background during the feature extraction stage can further improve the defect detection effect. Adding EUCB further improves these metrics, with mAP50 reaching 95.32% and FPS remaining at 127.56, demonstrating that the model achieves an optimal balance between computational efficiency and representational capability while ensuring feature reconstruction quality. Finally, after integrating all the improved modules, the mAP50 cumulatively improves by 3.57%, and the FPS significantly increases to 156.85, further proving that each module has good synergistic gains: C3k2_MACEA strengthens feature representation capability, C2PSA_DDRM improves background suppression, EUCB and LSCD jointly improve inference speed, and I-PIoUv2 optimizes bounding box regression quality, collectively constructing an efficient insulator defect detection system. Experimental results show that the improved model achieves an excellent balance between accuracy and speed, with only 2.47M parameters, which can meet the real-time and high reliability requirements of UAV inspection scenarios for insulator defect detection.

[0094] To further verify the detection performance of MD-YOLO, the model was compared with the current mainstream object detection methods. The comparison results are shown in Table 2.

[0095]

[0096] In terms of detection accuracy, the proposed MD-YOLO model exhibits significant advantages. This model achieves an mAP50 of 95.72% with only 2.47M parameters, while maintaining accuracy and recall of 95.63% and 94.15% respectively, leading all compared methods. Compared to the lightweight model YOLOv5n with the closest parameter size, MD-YOLO improves mAP50 by 7.47% with fewer parameters, fully validating the effectiveness of the proposed improvement strategy in feature representation and target localization.

[0097] In terms of real-time performance, MD-YOLO also demonstrates excellent inference speed, achieving an FPS of 152.85, significantly enhancing the real-time detection capabilities of edge devices such as drones. Compared to the mainstream model YOLOv8n with a similar number of parameters, MD-YOLO reduces the number of parameters by 0.53M while improving mAP50 by 5.49% and maintaining a speed advantage of 20.64 FPS, showcasing its efficient inference capabilities under a lightweight design.

[0098] Considering both accuracy and speed, MD-YOLO achieves a good balance between lightweight design and high performance, with its mAP50 and FPS levels outperforming mainstream YOLO models of the same size. Overall, MD-YOLO achieves superior detection performance while maintaining extremely low parameter count and high-speed inference, fully demonstrating its application potential in UAV inspection and other scenarios where real-time performance and computing power are limited.

[0099] This invention, based on an improved YOLOv11n model for detecting defects in transmission line insulators, has the following characteristics: (1): The model of this invention is designed specifically for insulator inspection in complex backgrounds and can work stably under varying environmental conditions (such as changes in lighting, cluttered backgrounds, and weather effects). This method optimizes the feature extraction module, enhances the ability to distinguish between targets and backgrounds, and combines an efficient detection head with a bounding box regression strategy. This enables the accurate identification of defects such as cracks, damage, stains, and surface anomalies in insulators even in the presence of trees, buildings, power lines, or complex background textures. This significantly improves the reliability and practicality of the inspection, meeting the stringent requirements of high precision, real-time performance, and robustness for UAV inspections and daily maintenance of transmission lines.

[0100] (2): The MD-YOLO model of this invention achieves comprehensive performance improvements over other lightweight models and improved algorithms of the same scale. Compared with the baseline model, mAP50 is improved by 3.6%, reaching 95.7%, showing a significant advantage in target detection accuracy. At the same time, the model also achieves good results in lightweight design, with the number of parameters reduced to 2.47M and the computational load reduced to 5.8G, effectively reducing storage and computational overhead. This means that the model not only improves accuracy but is also more suitable for deployment on devices with limited computing power. In terms of inference speed, the model's FPS is improved by 27 frames, reaching 152 frames, greatly enhancing real-time detection capabilities and enabling it to meet the high-speed and high-efficiency application requirements of UAV inspection and online monitoring of power transmission lines. Overall, the improved model achieves an ideal balance between accuracy, efficiency, and lightweight design, fully demonstrating the effectiveness of the proposed optimization strategy in feature extraction, detection efficiency, and model lightweight design.

Claims

1. A defect detection model for transmission line insulators based on an improved YOLOv11n, characterized in that, The model includes: Multi-branch asymmetric convolution with enhanced attention module (MACEA), which is encapsulated as C3K2_MACEA and integrates MEEM and CASAB mechanisms to enhance the model's ability to identify minute defects and shape anomalies in insulators; The C2PSA_DDRM module is used to enhance the feature robust modeling capability of insulator defects under complex backgrounds and low contrast conditions in the scenario of UAV inspection of power transmission lines. An upsampling convolution module EUCB is used to replace Upsample in the original YOLOv11n structure to reconstruct spatial detail information of insulator defects in transmission lines during the multi-scale feature fusion and decoding stages. The original YOLOv11n detection head was replaced with a lightweight detection head LSCD to reduce the number of parameters and computational complexity of the detection head while ensuring the accuracy of insulator defect detection in transmission lines. The I-PIoUv2 loss function is used to optimize the bounding box regression process in the defect detection of transmission line insulators, and enhances the geometric alignment ability between the predicted box and the real defect area under complex background and blurred target boundary conditions.

2. The transmission line insulator defect detection model based on the improved YOLOv11n as described in claim 1, characterized in that: In the Multi-Branch Asymmetric Convolution and Enhanced Attention Module (MACEA), the input X is first processed through parallel three-branch convolutions, and the results are then fused to obtain the first-stage output X1, calculated as follows: (1); (2); (3); In the above formula, These are the features after processing through three different branches; For depthwise convolution; For depthwise separable convolution; This indicates that a depthwise separable convolution operation with a kernel size of 3×1 is used; For pointwise convolution; Features after fusion; For feature splicing operations; Output X1 is processed by the Multi-Scale Edge Enhancement Module (MEEM) and then concatenated with its own residual to obtain output X2: (4); In equation (3), This represents the output obtained through processing by the multi-scale edge enhancement module; Subsequently, output X2 is processed by the Channel and Spatial Joint Attention Module (CASAB) and concatenated with its own residual to obtain output X3: (5); In equation (5), This indicates that the output is obtained through the channel and spatial joint attention module; Finally, the output X3 is passed through the SiLU activation function to obtain the final output Y: (6); In equation (6), This represents the activation function of the Sigmoid Linear Unit.

3. The transmission line insulator defect detection model based on the improved YOLOv11n as described in claim 2, characterized in that: The multi-scale edge enhancement module (MEEM) includes: an average pooling layer (AP), an edge enhancer (EE), and a feature fusion module (Concat), as detailed below: (7); (8); In the above formula, This represents the input features mapped by a feature mapping function at a given scale. This represents a feature mapping function consisting of 1×1 convolution, batch normalization, and a sigmoid activation function, used for channel compression and non-linear enhancement; Represents the features at scale t+1; This indicates the use of 3×3 average pooling; This represents a 1×1 convolutional layer containing batch normalization and a Sigmoid activation function; Represents the features at scale t; Next, an edge enhancer is introduced to enhance the detail information at each scale: (9); In equation (9), This represents the features after edge enhancement; This represents an edge enhancement mapping function, used to enhance high-frequency edges and details in features at various scales; This represents the input features at the corresponding scale l; Indicates scale; Subsequently, these features are fused through channel concatenation and a 1×1 convolutional layer to obtain the output features of the multi-scale edge enhancement module (MEEM): (12); In equation (12), This represents the output features after passing through the multi-scale edge enhancement module.

4. The transmission line insulator defect detection model based on the improved YOLOv11n as described in claim 3, characterized in that: The formula for calculating the edge enhancer is as follows: (10); (11); In the above formula, This represents the edge features extracted from the first scale feature; This represents the enhanced feature representation after fusing edge features with the original features, used to highlight defect edges while preserving structural information.

5. The transmission line insulator defect detection model based on the improved YOLOv11n as described in claim 4, characterized in that: In the Channel and Spatial Joint Attention Module (CASAB), the convolutional blocks first employ 3×3 depthwise separable convolutions. Extracting spatial features; Subsequently, through 1×1 convolution Adjust the number of spatial feature channels to enhance feature fusion capabilities; Both of the above convolutional layers introduce batch normalization (BN) and Leaky ReLU (LR) activation functions in sequence; among them, the Leaky ReLU (LR) activation function ensures the stability of the gradient during backpropagation by introducing a non-zero slope in the negative input interval. The mathematical expression for a convolutional block is: (13); In equation (13), The output features of the convolutional block; This represents the Leaky ReLU activation function; This indicates a batch normalization operation; This represents a 1×1 convolution operation; This represents a 3×3 depthwise separable convolution.

6. The transmission line insulator defect detection model based on the improved YOLOv11n as described in claim 5, characterized in that: After the convolutional block, the spatial features then enter the Channel Attention Module (CAM), which captures the overall feature context and key activation responses through Global Average Pooling (GAP) and Global Max Pooling (GMP), respectively. The pooled features are then combined and fed into two fully connected layers, where the Swish activation function is used to introduce non-linearity while maintaining gradient smoothness. Finally, attention weights are generated through a fully connected layer with a Sigmoid activation function to scale the original feature map to highlight key channels. The mathematical expression for the Channel Attention Module (CAM) is: (14); In equation (14), This represents the output features of the channel attention module; This represents the input feature map; σ represents the Sigmoid activation function. Indicates a fully connected layer; This represents the Swish activation function, used to enhance non-linear expressiveness while maintaining gradient smoothness; This indicates a global average pooling operation; This represents the global max pooling operation; In the Spatial Attention (SAM) module, the input feature map is simultaneously subjected to mean pooling (MP) and max pooling (MP). α Minimum pooling (MP) β The summation pooling (SM) operation captures the mean response, salient features, weakest response, and overall intensity of spatial features, respectively; the calculation process is described as follows: (15); In equation (15), This represents the spatial features after being spliced ​​together by multiple pooling operations; Indicates a channel splicing operation; This indicates the mean pooling operation; This represents the max pooling operation; This represents the minimum pooling operation; This represents the summation pooling operation; Subsequently, a spatial attention map is generated using the Swish activation function and the Sigmoid activation function, which is used to scale the input feature map and highlight key spatial regions. The mathematical expression for the Spatial Attention Module (SAM) is: (16); In equation (16), This represents the output obtained after passing through the spatial attention module; This represents the Sigmoid activation function; This represents a 1×1 convolution operation; This represents the Swish activation function; This indicates a 7×7 depth separable convolution operation; The outputs of the Channel and Spatial Joint Attention Module (CASAB) are fused by element-wise addition, specifically as follows: (17); In equation (17), This represents the output feature obtained after passing through the channel and spatial joint attention module.

7. The transmission line insulator defect detection model based on the improved YOLOv11n as described in claim 6, characterized in that: The C2PSA_DDRM module integrates Dynamic Tanh (DyT) and Defensive Refinement Module (DRM), which effectively enhances the dynamic adaptability and fine-grained robustness of feature representation while ensuring consistency between input and output scales. The implementation of dynamic non-normalization (Dynamic Tanh, DyT) is shown in formula (18): (18); In equation (18), Output the results for the DyT module; It is a learnable scaling parameter used to linearly scale the features after tanh transformation, restoring or adjusting the overall amplitude of the features; It is a learnable scaling parameter used to dynamically adjust the amplitude range of input features and control the intensity of nonlinear compression, thereby adapting to features of different scales and distributions. These are learnable bias parameters used to translate features, thereby enhancing the flexibility of feature representation. The hyperbolic tangent function is used to perform nonlinear compression on the input features, mapping them to ( The interval is 1,1). The Defensive Refinement Module (DRM) consists of five adversarial residual blocks (ARBs) connected in series, and incorporates multi-scale features from U-Net to perform more robust self-attention modeling, as shown in Equation (19): (19); In equation (19): and These represent encoded or decoded features from different scales of U-Net; This represents a feature concatenation operation along the channel dimension; Indicates the first A nonlinear mapping function for an anti-adversarial residual block; Through multiple sampling and residual mapping, the DRM module introduces Pixel Shuffle / Pixel Unshuffle for upsampling and downsampling operations. Pixel Shuffle achieves lossless high-resolution reconstruction by rearranging subpixels in the channel dimension to the spatial dimension; Pixel Unshuffle maps local spatial blocks to the channel dimension for a structured downsampling process. As shown in formula (20): (20); In equation (20), This represents the input feature map at the current scale; This represents the output characteristics after upsampling, downsampling, and residual fusion; This indicates the Pixel Shuffle operation, which rearranges the sub-pixel information in the channel dimension to the spatial dimension to achieve upsampling. This indicates the Pixel Unshuffle operation, which maps local spatial blocks to the channel dimension to achieve downsampling; Within each adversarial residual block, the input features are first mapped to query (Q), key (K), and value (V) vectors, and the Mercer kernel function is used to replace the traditional dot product attention to enhance the stability of the model under adversarial perturbation conditions. Since the product of K and V is completed before attention normalization, the supplemented and refined features are then passed to the decoder, as shown in Equation (21). (21); In equation (21), This represents the self-attention output based on the kernel function; query (Q), key (K), and value (V) represent the query, key, and value vectors, respectively. This represents the matrix transpose operation; This represents the feature mapping function corresponding to the Mercer kernel function; This represents the key-value aggregation terms completed before attention normalization; After the output of the DRM module is processed by a second 1×1 convolution and a lightweight depthwise separable convolution (DW+PW, DSConv), it is fed into the Dynamic Tanh (DyT) module to form a two-stage dynamic-robust joint modeling path; finally, the shallow features at the input end are fed into the end of the DRM module through residual connections, as shown in Equation (22): (22); In equation (22), This represents the shallow features at the module input. This represents the deep robustness features output by the DRM module; This indicates the final output characteristics of the module; Represents the hyperbolic tangent activation function; This represents a dynamic adjustment function used to adaptively generate feature amplitude scaling factors.

8. The transmission line insulator defect detection model based on the improved YOLOv11n as described in claim 7, characterized in that: In the upsampling convolution module EUCB, firstly, the input feature map is upsampled by bilinear interpolation, expanding its spatial resolution to twice its original value; then, a 3×3 depthwise separable convolution (DWConv) is introduced to spatially enhance the upsampled features, modeling neighborhood context information through local receptive fields; next, batch normalization (BN) is used to normalize the features; then, the ReLU activation function is used to introduce nonlinear mapping capability; finally, 1×1 convolution is used to achieve channel compression and linear feature recombination, so that the output feature dimension is consistent with the skip connection branch; as shown in formula (23): (23); In equation (23), This represents the input feature map of the EUCB module; This indicates the upsampling characteristics output by the EUCB module; This indicates a bilinear interpolation upsampling operation; This represents the depthwise convolution operation in a 3×3 depthwise separable convolution; Indicates batch normalization; Represents the ReLU activation function; This represents a 1×1 convolution used for channel compression and linear recombination of features.

9. The transmission line insulator defect detection model based on the improved YOLOv11n as described in claim 8, characterized in that: Using PIoUv2 as the basic loss form, and further introducing Inner-IoU for constraints and optimization, the Inner-PIoUv2 loss function was finally constructed. The expression for calculating Inner-IoU is as follows: (24); In equation (24), The core metric representing the degree of overlap between the predicted bounding box and the true bounding box; This represents the area of ​​the overlap between the predicted bounding box and the ground truth bounding box; This represents the total area covered by the combined predicted and ground truth bounding boxes. (25); In equation (25), Indicates the width of the actual bounding box; Indicates the height of the actual bounding box; Indicates the scaling factor; Indicates the width of the prediction box; Indicates the height of the prediction box; (26); In equation (26), This means taking the leftmost x-coordinate value between the right boundary of the ground truth box and the right boundary of the predicted box; The x-coordinate of the right boundary of the true bounding box; Indicates the x-coordinate of the right boundary of the prediction box; This means taking the rightmost x-coordinate value between the left boundary of the ground truth bounding box and the left boundary of the predicted bounding box; The x-coordinate of the left boundary of the true bounding box; Indicates the x-coordinate of the left boundary of the prediction box; This indicates that the y-coordinate value is taken from the uppermost of the actual bottom boundary and the predicted bottom boundary; This represents the y-coordinate of the lower boundary of the prediction box; This means taking the lower y-coordinate value between the top boundary of the actual bounding box and the top boundary of the predicted bounding box; Represents the y-coordinate of the upper boundary of the prediction box; (27); (28); (29); (30); (31); (32); (33); (34); Inner-IoU generates auxiliary boxes using a ratio scaling factor. The ratio is set based on the parameters of the ground truth box and the predicted box to obtain the corresponding auxiliary box size, where: ( , () is the center point of the target box, , () represents the center point of the prediction box; w and h represent the width and height of the prediction box, respectively; , The actual frame width and height; denoted by ratio, the upper and lower boundaries of the ground truth bounding box are represented by r and the boundary of the predicted bounding box are represented by b. When ratio < 1, the size of the auxiliary box is reduced, and its absolute IoU value increases, which can accelerate the regression of high-precision samples. When ratio > 1, the auxiliary box is expanded, which effectively expands the regression range and helps the model to quickly locate the target. The formula for calculating PioU is: (35); In equation (30), This represents the normalized average localization deviation between the predicted bounding box and the ground truth bounding box. and These represent the horizontal distance deviations between the predicted bounding box and the ground truth bounding box on the left and right, respectively. and These represent the vertical distance deviations between the predicted bounding box and the ground truth bounding box at the top and bottom, respectively. and These represent the width and height of the actual bounding box, respectively. (36); In equation (31), This represents the final calculated value of the PIOU loss function; This represents the traditional IoU loss; Represents the natural constant; To make the loss function more focused on medium-quality anchor boxes, a non-monotonic attention layer is introduced. To study the focusing mechanism, we obtained the PIoUv2 loss function, calculated as follows: (37); In equation (32), q is the mass of an anchor frame; Indicates anchor frame quality Definition; (38); In equation (33), This represents the input variable of the non-monotonic attention function m(x); (39); In equation (34), This represents the value of the PIoUv2 loss function; This represents a non-monotonic attention function; λ is a hyperparameter that controls attention. Combining the Inner-IoU and PIoUv2 loss functions, the definition of Inner-PIoUv2 is as follows: (40); In equation (35), This represents the final value of the Inner-PIoUv2 loss function; The core metric representing the degree of overlap between the predicted bounding box and the actual bounding box.

10. The transmission line insulator defect detection model based on the improved YOLOv11n as described in claim 9, characterized in that: In the lightweight detection head LSCD, the input feature map is first compressed through a 1×1 convolution; then, a 3×3 convolution with shared parameters is introduced twice to further refine the features; next, the features are fed into the classification (Cls) and regression (Box) branches respectively; finally, the feature maps of different scales are adaptively weighted through the dynamic scaling (Scale) module, as shown in formula (41): (41); in: This represents the feature map input to the LSCD detector head; This represents a 1×1 convolution, used for channel compression and feature recombination; This represents a 3×3 convolution with shared parameters, used for spatial context feature extraction; Indicates the classification branch and outputs the target category prediction result; This indicates the regression branch, which outputs the regression results for the target location. This indicates the final classification prediction result; This represents the final bounding box regression prediction result; This represents the dynamic scaling module, which is used to adaptively weight the prediction results of features at different scales.