Lightweight transmission line insulator defect detection method and system
By introducing the ADown module and the A2C2f-DFFN-DYT-Mona module into the YOLOv12n algorithm, and combining them with the DFocaler-GIoU loss function, the problems of low model efficiency and high false positive and false negative rates in the existing technology are solved, and accurate detection of insulator defects in transmission lines is achieved, improving detection accuracy and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID ANHUI ELECTRIC POWER CO LTD
- Filing Date
- 2026-04-09
- Publication Date
- 2026-06-16
AI Technical Summary
Existing technologies suffer from low model operating efficiency, high false positive and false negative rates, and are greatly affected by differences in sample quality, making it difficult to accurately detect defects in transmission line insulators under complex backgrounds.
The ADown module is used for feature compression, the A2C2f-DFFN-DYT-Mona module is introduced for feature enhancement, and the DFocaler-GIoU loss function is used for optimization to build a lightweight YOLOv12n algorithm. The detection accuracy and efficiency are improved through heterogeneous sampling strategy and dynamic weight allocation.
It enables accurate detection of insulator defects in complex environments, reduces false positive and false negative rates, improves the accuracy of small target location, mitigates the impact of sample quality differences, and ensures the stable operation of the power system.
Smart Images

Figure CN122223596A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system testing technology, specifically to a method and system for detecting defects in lightweight transmission line insulators. Background Technology
[0002] In the field of intelligent operation and maintenance of power transmission lines, insulators, as key equipment ensuring power transmission safety, are crucial for the stable operation of the power system through defect detection. Currently, insulator inspection mainly relies on drone aerial photography to collect images, combined with image processing algorithms for defect diagnosis. However, drone aerial images are characterized by small defect target scale, complex backgrounds, and numerous interferences. To ensure that the detection process accurately captures small-scale defect features, suppresses complex background interference, and maintains high processing speed, it is essential to facilitate maintenance personnel in quickly locating problematic insulators and promptly formulating repair plans to avoid power transmission safety accidents caused by missed defects or delayed processing.
[0003] Insulator defect detection is crucial for power system operation. While mainstream deep learning-based target detection algorithms have seen some improvements, they still have shortcomings. Taking YOLO as an example, existing insulator detection technologies suffer from the following deficiencies when processing images of transmission line insulators: First, the detection accuracy for small targets is low. Because small targets occupy a small percentage of pixels in the image, their features are easily obscured by the background, making it difficult for traditional algorithms to accurately capture their details and location information. Second, the feature map representation capability is weak, making it difficult to effectively distinguish target areas from complex backgrounds, leading to frequent false positives and false negatives. Third, key information extraction is insufficient; there is a lack of efficient aggregation and representation capabilities for features of different types of insulator defects. Furthermore, most methods assign equal weights to local regions, failing to dynamically adjust the contribution of key regions to the overall anomaly.
[0004] The existing invention patent application document CN120219919A, entitled "A Method, Apparatus, Medium, and Device for Insulator Defect Detection," describes a method comprising: integrating StarNet into a YOLO11n network, adding a small target feature pyramid network to the neck network of the YOLO11n network, applying an ADown module to the backbone and neck networks of the YOLO11n network, and replacing the IOU evaluation metric of the loss function of the YOLO11n network with the NWD evaluation metric to obtain an improved YOLO11n network; using a training dataset labeled with insulator state categories as input and the insulator state categories as output to train the improved YOLO11n network to obtain an insulator defect detection model; and inputting real-time acquired insulator image data into the insulator defect detection model to obtain the defect detection result of the insulator. The existing technology simply integrates the ADown module into the YOLO11n network without optimizing the feature compression and information preservation mechanism of ADown for insulator defect scenarios. The problem of feature loss for small targets is still significant. The NWD evaluation index it uses does not combine the scale difference of insulator defects for dynamic weight adaptation, which has limited improvement on the localization accuracy of small-scale defects. At the same time, it does not design a dedicated feature enhancement module, resulting in weak feature discrimination ability in complex backgrounds, insufficient model lightweightness, and low running efficiency.
[0005] The existing invention patent application document with publication number CN119445085A, entitled "A Method for Identifying Insulator Defects in UAVs Based on Improved YOLOv8n", includes the following steps: Step S10: Base Model Selection: Selecting YOLOv8n as the base model; Step S20: C2f Module Improvement: Designing and implementing the C2f-PKI module to replace the C2f module in the original YOLOv8n model to enhance feature extraction capabilities; Step S30: Downsampling Module Replacement: Integrating the Adown downsampling module of YOLOv9 into the improved model to replace the downsampling module of YOLOv8n to capture richer feature information; Step S40: Loss Function Optimization: Replacing the traditional CIoU loss function with the Focaler-SIoU loss function. Step S50: Model Pruning: Apply the LAMP algorithm to prune the improved model, removing redundant network connections and weights to reduce model size and computational cost; Step S60: Model Training: Train the pruned model using the training dataset, adjusting model parameters to improve performance; Step S70: Model Validation and Evaluation: Evaluate the model's performance on an independent validation dataset, including detection accuracy and model efficiency; Step S80: Result Analysis and Optimization: Analyze the evaluation results, compare the performance of the model before and after improvement, identify shortcomings, and further optimize the model as needed; Step S90: Final Model Deployment: Deploy the validated and optimized model to a drone platform for actual insulator defect detection tasks.
[0006] This existing technology is based on an improvement of YOLOv8n, with an outdated model architecture and inherent deficiencies in small target defect detection. Its C2fPKI module does not perform feature equalization for differentiated defects such as insulator breakage and flashover, making it prone to feature suppression issues. The FocalerSIoU loss function does not incorporate global geometric constraints and dynamic scale awareness, resulting in low bounding box regression accuracy and easy missed detection of small-scale defects. Model pruning is a post-processing method and does not achieve lightweighting at the network architecture level, thus offering limited improvement in inference efficiency.
[0007] The existing invention patent application document CN120708020A, entitled "A Method for Foreign Object Detection in Transmission Lines Based on Multi-Scale Fusion Enhancement and Adaptation," describes a method that includes: acquiring an image dataset of foreign object intrusions into transmission lines and classifying it; manually annotating the images and dividing them into training and validation sets; constructing a YOLOv8-ARD model based on the YOLOv8 model, replacing the downsampling layers at the Backbone and Head ends of the YOLOv8 model with ADown modules to fuse multi-scale features; replacing the C2F module in the YOLOv8 model with a RepNCSPELAN4 module to improve feature extraction efficiency and inference speed; adding an auxiliary detection head to the detection head at the Head end to assist the main detection head in completing the detection task of small targets; training the YOLOv8-ARD model: inputting the training set from the annotated dataset into the YOLOv8-ARD model for training, obtaining the YOLOv8-ARD.pt weight file; and using the trained YOLOv8... The ARD model is used to detect and locate foreign objects in images of foreign object intrusion into power transmission lines.
[0008] The existing technology is designed for foreign object detection in transmission lines, but it is poorly adapted to the scenario of insulator defect detection and lacks specificity in defect feature extraction. It only improves the detection capability of small targets by replacing the ADown module and the auxiliary detection head, without designing a region attention and scene filtering mechanism, resulting in poor suppression of interference from complex backgrounds. The loss function has not been optimized in a targeted manner, and it is greatly affected by the difference in sample quality, resulting in a high false detection rate.
[0009] In summary, existing technologies suffer from low model operating efficiency, high false positive and false negative rates, and are significantly affected by differences in sample quality. Summary of the Invention
[0010] The technical problem to be solved by this invention is: how to solve the technical problems of low model running efficiency, high false detection and false negative rates, and great influence of sample quality differences in the prior art.
[0011] This invention solves the above-mentioned technical problems by employing the following technical solution: A method for detecting defects in lightweight transmission line insulators, comprising:
[0012] S1. Input image of transmission line insulator; S2. Using the ADown module to replace the downsampling module, a dual-branch collaborative feature compression architecture is adopted. Through a heterogeneous sampling strategy, the feature map is efficiently reduced in dimension and discriminative information is preserved based on the transmission line insulator image. S3. Feature enhancement and fusion are performed using the A2C2f-DDM module. Specifically, the Ablock layer in the A2C2f module is replaced with the Ablock-DFFN-DYT-Mona module to form and utilize the A2C2f-DFFN-DYT-Mona module for feature enhancement. Under a pre-defined complex background, different defect features are learned. Within the A2C2f-DFFN-DYT-Mona module, internal operations of the submodule ABblock_DFFN_DYT and the overall A2C2f-DDM process are performed. S4. Introduce the Dfocaler-GIoU loss function to process and obtain the insulator defect prediction results. Specifically, use the dynamic Focaler-GIoU loss function to strengthen geometric constraints and obtain geometric constraint terms. Obtain dynamic scale weight terms through dynamic scale-aware weight allocation and obtain dynamic scale weight terms through adaptive focusing factor fusion. Aggregate the dynamic scale weight terms, dynamic scale weight terms, and dynamic scale weight terms using loss functions to construct the complete Dfocaler-GIoU loss function. Through the backpropagation process, complete the optimization of bounding box regression accuracy and small target localization. S5, Output the results of insulator defect detection for power transmission lines.
[0013] This invention achieves lightweight and accurate detection of insulator defects in transmission lines through an optimized network structure. The optimization of the backbone network preserves defect details while reducing the number of parameters and computational load, thus improving model efficiency. Feature enhancement and fusion mechanisms strengthen target discrimination and suppress background interference, reducing false positives and false negatives. An improved loss function enhances the localization accuracy of small targets and the alignment of bounding boxes, mitigating the impact of sample quality differences. The overall solution balances detection accuracy, efficiency, and lightweight design, effectively ensuring the reliability of power system operation and maintenance. This invention achieves accurate detection of insulator defects by processing and analyzing images of transmission line insulators, ensuring the safe and stable operation of the power system.
[0014] This invention achieves efficient dimensionality reduction and discriminative information preservation through the dual-branch collaborative feature compression architecture of the ADown module, and enhances feature fusion and background suppression by combining it with the A2C2f-DFFN-DYT-Mona module. Furthermore, it dynamically adapts the defect scale and sample quality through the DFocaler-GIoU loss function, thus solving the above defects from the entire link of feature extraction, feature enhancement and loss optimization, while taking into account both lightweight design and detection accuracy.
[0015] In a more specific technical solution, in S2, a feature map is input at the input end, and after a 2×2 average pooling operation with a preset step size, an average pooling feature map is obtained; the average pooling feature map is then segmented into two parts along the channel dimension, and the number of channels in each part is halved.
[0016] This invention is based on YOLOv12n and makes targeted innovative improvements, proposing the ADG-YOLOv12n algorithm. By introducing the ADown module to replace some CBS convolutions in the backbone network, and combining it with an appropriate adaptive loss function, details are preserved, accuracy is improved, and the number of parameters and computational cost are reduced, achieving lightweight optimization.
[0017] This invention is based on the YOLOv12n architecture and designs the A2C2f-DFFN-DYT-Mona module to balance the representation of multiple types of defect features. It uses the DFocaler-GIoU loss function to achieve geometric constraint strengthening and dynamic weight allocation, and achieves lightweight optimization from the bottom layer of the architecture, thus completely solving the problems of missed detection of small targets, false detection of background and low efficiency.
[0018] In a more specific technical solution, in S3, the sub-module ABlock_DFFN_DYT is used to perform basic transformations on the input features through the Dyt module. The Area-attention module then weights the feature space region information to highlight key regions. The input features are then residually connected with the original input features and transformed a second time through the second Dyt module. Finally, DFFN refines the features to complete single-path enhancement.
[0019] In a more specific technical solution, in the overall A2C2f-DDM process, the input features are reduced to C_in / 2 through Conv (K=1,S=1) convolution. The reduced features are divided into two paths and enhanced in parallel by the ABlock_DFFN_DYT_Mona submodule. The two features are concatenated and the channels are integrated through Conv (K=1,S=1) convolution. The scaling operation is used to adjust the amplitude. The feature is then residually connected to the initial input features to output the final feature. The Area-attention module uses an attention mechanism to weight the spatial region information of features to highlight the importance of key regions; the Mona module learns a specific pattern of insulator defects through training to filter inspection scenarios.
[0020] This invention designs an A2C2f-DFFN-DYT-Mona module, which integrates insulator feature information at different levels through a multi-scale information aggregation mechanism. Combined with dynamic feature adjustment technology, it effectively suppresses background noise interference, enhances the distinction between the target area and the background, and balances the feature expression of different types of insulator defects, significantly improving the algorithm's generalization ability to diverse defect types and complex scenarios.
[0021] In a more specific technical solution, in S4, the Area-attention module uses an attention mechanism to weight the spatial region information of features to highlight the importance of key regions; the Mona module learns a specific pattern of insulator defects through training to filter inspection scenarios. In the geometric constraint enhancement operation, global geometric position constraints are introduced by calculating the ratio of the minimum bounding rectangle area between the predicted box and the ground truth box. In the dynamic scale-aware weight allocation operation, an adaptive weight factor based on the target scale is designed. By extracting scale features such as the pixel ratio and bounding box area of the defect target, differentiated loss weights are assigned to defects of different scales to complete the training priority reinforcement operation for small-scale defects. In the adaptive focusing factor fusion operation, a dynamic focusing mechanism based on sample quality is introduced. The sample quality is quantified by calculating the IoU value between the predicted box and the ground truth box. A preset focusing weight is applied to low-quality samples, and the weight ratio of high-quality samples is reduced to complete the interference suppression operation of low-quality samples. In the loss function aggregation operation, the geometric constraint term, the dynamic scale weight term, and the adaptive focusing factor are weighted and fused to construct the complete DFocaler-GIoU loss function.
[0022] In a more specific technical solution, the loss function of GIoU is expressed using the following logic: (1) In the formula, The GIoU loss function represents the loss value; IoU is the intersection-to-union ratio; Δ, These represent the normalized center offsets of the predicted bounding box and the ground truth bounding box in the horizontal and vertical directions, respectively, with values ranging from [0,1], and are used to quantify the positional alignment of the bounding boxes.
[0023] In a more specific technical solution, dynamic scale-aware weights are introduced to address the differences in insulator defect scales. Based on the actual frame area, the following logic is used to adaptively allocate weights: high weights for small scales and low weights for large scales. (2) In the formula, Weights for dynamic scale perception; This is the weighting adjustment coefficient; The scale sensitivity coefficient; To train the minimum true frame area corresponding to the defects in the insulator; This represents the actual frame area corresponding to the current insulator defect. It is the minimum value; The weight is the basis of the weight.
[0024] This invention designs a DFocaler-GIoU loss function, using GIoU to accurately learn the geometric position of small targets, and leveraging dynamic Focal weights to prioritize and optimize their localization, forming a dual guarantee. This invention employs the DFocaler-GIoU loss function to accurately learn the geometric position information of small-scale insulator defects using GIoU loss, and utilizes a dynamic Focal weight mechanism to prioritize and optimize the localization accuracy of small target defects, forming a dual guarantee for small target detection and further improving the accuracy of small defect detection.
[0025] In a more specific technical solution, an adaptive focusing factor is designed, taking into account the prediction difficulty and scale characteristics of insulator defects, to enhance the gradient contribution of medium-quality samples: (3) in, Based on the focus coefficient, The actual frame area corresponding to the current insulator defect. To train the maximum true frame area of defects in the concentrated insulator. is the scale focusing coefficient.
[0026] In a more specific technical solution, the total loss formula for DFocaler-GIoU is: (4) In the formula, For dynamic focusing items.
[0027] This invention focuses on insulator defect-specific scenarios, using Area-attention to highlight key defect areas and Mona module to filter inspection scenarios, accurately adapting to insulator defect features; combined with DFocaler-GIoU loss function to suppress interference from low-quality samples, it solves the defects of the comparison file such as scenario mismatch, strong background interference, and sample sensitivity from three aspects: scenario adaptation, accurate feature extraction, and dynamic loss optimization.
[0028] In a more specific technical solution, the lightweight transmission line insulator defect detection system includes: An insulator image input module is used to input images of transmission line insulators; The ADown module replaces the downsampling module and adopts a dual-branch collaborative feature compression architecture. Through a heterogeneous sampling strategy, it performs efficient dimensionality reduction and discriminative information preservation operations on the feature map based on the transmission line insulator image. The ADown module is connected to the insulator image input module. The A2C2f-DDM module is used for feature enhancement and fusion. Specifically, the Ablock layer in the A2C2f module is replaced with the Ablock-DFFN-DYT-Mona module, forming and utilizing the A2C2f-DFFN-DYT-Mona module for feature enhancement. Under a pre-defined complex background, it learns different defect features. Within the A2C2f-DFFN-DYT-Mona module, the internal operations of the submodule ABblock_DFFN_DYT and the overall A2C2f-DDM process are performed. The A2C2f-DDM module is connected to the ADown module. The loss function module is used to introduce the Dfocaler-GloU loss function and process it to obtain the insulator defect prediction results. Specifically, the dynamic Focaler-GloU loss function is used to strengthen geometric constraints and obtain geometric constraint terms. Dynamic scale weight terms are obtained through dynamic scale-aware weight allocation and adaptive focusing factor fusion. The dynamic scale weight terms are then aggregated using loss functions to construct the complete Dfocaler-GloU loss function. Through the backpropagation process, the bounding box regression accuracy is optimized and the small target localization is optimized. The loss function module is connected to the A2C2f-DDM module. The detection result output module is used to output the detection results of defects in the insulators of the transmission line. The detection result output module is connected to the loss function module.
[0029] The present invention has the following advantages over the prior art: This invention achieves lightweight and accurate detection of insulator defects in transmission lines through an optimized network structure. The optimization of the backbone network preserves defect details while reducing the number of parameters and computational load, thus improving model efficiency. Feature enhancement and fusion mechanisms strengthen target discrimination and suppress background interference, reducing false positives and false negatives. An improved loss function enhances the localization accuracy of small targets and the alignment of bounding boxes, mitigating the impact of sample quality differences. The overall solution balances detection accuracy, efficiency, and lightweight design, effectively ensuring the reliability of power system operation and maintenance. This invention achieves accurate detection of insulator defects by processing and analyzing images of transmission line insulators, ensuring the safe and stable operation of the power system.
[0030] This invention is based on YOLOv12n and makes targeted innovative improvements, proposing the ADG-YOLOv12n algorithm. By introducing the ADown module to replace some CBS convolutions in the backbone network, and combining it with an appropriate adaptive loss function, details are preserved, accuracy is improved, and the number of parameters and computational cost are reduced, achieving lightweight optimization.
[0031] This invention designs an A2C2f-DFFN-DYT-Mona module, which integrates insulator feature information at different levels through a multi-scale information aggregation mechanism. Combined with dynamic feature adjustment technology, it effectively suppresses background noise interference, enhances the distinction between the target area and the background, and balances the feature expression of different types of insulator defects, significantly improving the algorithm's generalization ability to diverse defect types and complex scenarios.
[0032] This invention designs a DFocaler-GIoU loss function, using GIoU to accurately learn the geometric position of small targets, and leveraging dynamic Focal weights to prioritize and optimize their localization, forming a dual guarantee. This invention employs the DFocaler-GIoU loss function to accurately learn the geometric position information of small-scale insulator defects using GIoU loss, and utilizes a dynamic Focal weight mechanism to prioritize and optimize the localization accuracy of small target defects, forming a dual guarantee for small target detection and further improving the accuracy of small defect detection.
[0033] This invention solves the technical problems of low model running efficiency, high false positive and false negative rates, and significant impact from differences in sample quality in the prior art. Attached Figure Description
[0034] Figure 1 This is a schematic diagram of the basic steps of the lightweight transmission line insulator defect detection method according to Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the ADown module structure in Embodiment 1 of the present invention; Figure 3 This is a schematic diagram of the A2C2f-DFFN-DYT-Mona structure in Embodiment 1 of the present invention; Figure 4 This is a schematic diagram of the Area-attention structure in Embodiment 1 of the present invention. Detailed Implementation
[0035] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0036] Example 1 like Figure 1 As shown, the lightweight transmission line insulator defect detection method provided by the present invention includes the following basic steps: S1. Input image of transmission line insulator; The YOLOv12n network architecture comprises four parts. The input layer includes pixel mosaic data augmentation, adaptive anchor box calculation, and adaptive grayscale padding structures to scale image sizes for model training. The backbone consists of Conv (convolutional layers), C3k2, and A2C2f modules. C3k2, introduced in YOLOv11, assists in feature extraction, while A2C2f, first introduced in YOLOv12, is used for feature extraction, further processing and refining features. The neck layer includes Concat (stitching layer), Upsample (upsampling layer), and A2C2f modules. It fuses and adjusts the features extracted by the backbone, integrating feature information from different levels through upsampling and stitching operations to enhance feature representation. The head layer has the same structure as YOLOv11, consisting of multiple Detect layers, responsible for the final object detection task, outputting the category and location information of detected objects.
[0037] S2. Feature extraction after replacing part of the CBS convolution with the Adown module; In this embodiment, for small defect targets, the ADown module is introduced into the backbone network to avoid losing image detail information through pooling and convolution operations, while improving the detection performance of the model and reducing the number of model parameters and computational cost. In real-world transmission line insulator anomaly detection scenarios, when the target and its features are relatively inconspicuous, the standard convolutional model uses a large stride for sampling during feature extraction in the backbone network. This may cause some subtle features to be missed, resulting in incomplete feature extraction. To address this issue, this paper introduces the ADown module proposed in YOLOv9 to replace some traditional downsampling modules, achieving better detection results and a lighter model. A comparison of the network structures of ordinary CBS convolutional and ADown convolutional modules is provided below. Figure 2 .
[0038] The ADown downsampling module innovatively adopts a dual-branch collaborative feature compression architecture, achieving efficient dimensionality reduction and discriminative information preservation of feature maps through a heterogeneous sampling strategy. Its working mechanism is as follows: Figure 3 As shown on the right. First, the input feature map undergoes a 2×2 average pooling operation with a stride of 1, effectively reducing edge artifacts while preserving spatial information. In this way, the ADown module can significantly improve the retention rate of small target features, ensuring the integrity of information. Subsequently, the feature map is uniformly divided into two parts along the channel dimension, with the number of channels in each part halved, in order to further reduce computational overhead.
[0039] exist Figure 2As can be seen, by segmenting the input feature map and applying two paths for processing, the ADown module successfully optimizes the computational cost of each path. Compared to traditional single convolution operations, channel segmentation and pooling strategies effectively reduce the number of parameters in convolution operations, thereby reducing the computational overhead of the model. Simultaneously, it reduces the amount of detail information that might be lost during feature extraction of transmission line insulator anomalies. This design improves the accuracy and robustness of the model in anomaly detection.
[0040] S3. Feature enhancement and fusion are performed using the A2C2f-DDM module; In this embodiment, to address the challenges of complex and varied backgrounds and numerous interfering targets, a reconstructed region attention mechanism, the A2C2f-DFFN-DYT-Mona module, is proposed. This module can more accurately locate target regions and suppress background noise and redundant information. It enables the network model to focus more effectively on key targets in images with complex and varied backgrounds and abundant interference, reducing false positives and false negatives, and further improving the model's detection performance. Specifically, in UAV inspection images, the complexity of detecting defects in transmission line insulators stems not only from the multi-scale characteristics of the target morphology but also from the uneven expression of different types of defect features under complex background interference. Transmission line insulator damage manifests as sharp edges with abrupt local structural changes, while flashover damage presents as a blurred, gradual texture. During feature extraction, the A2C2f module, due to the lack of dynamic weight adjustment in its dual-channel interaction mechanism, tends to overemphasize one type of defect feature, leading to the suppression of another type of feature expression, thus reducing the feature extraction effect. When the model focuses on the high-frequency edges of the defect, the gradient texture of the flashover is easily submerged by background noise. If the focus is on global semantic features, detailed information about the defective region may be lost. Therefore, this paper replaces the Ablock layer in the A2C2f module with Ablock-DFFN-DYT-Mona, redesigning the A2C2f-DFFN-DYT-Mona module to achieve effective learning of different defect features in complex backgrounds. The structure of the A2C2f-DFFN-DYT-Mona module is as follows: Figure 3 .
[0041] A2C2f-DFFN-DYT-Mona is a feature enhancement module structure designed to improve feature representation capabilities. Its working mechanism consists of two parts: the internal operations of the sub-module (ABlock_DFFN_DYT) and the overall A2C2f-DDM process. ABlock_DFFN_DYT, the core functional unit of A2C2f-DDM, first performs a basic transformation on the input features using the Dyt module, then weights the feature space information using the Area-attention module to highlight key regions. This feature is then residually concatenated with the original input features and transformed a second time using the second Dyt module. Finally, DFFN refines the features to complete single-path enhancement. The A2C2f-DDM as a whole first reduces the dimensionality of the input features (number of channels C_in) to C_in / 2 using Conv (K=1, S=1) convolution. The dimensionality-reduced features are then divided into two paths, each enhanced in parallel by the ABlock_DFFN_DYT_Mona sub-module. Finally, the two features are concatenated and enhanced using Conv... (K=1, S=1) Convolution integrates channels, and after scaling to adjust the amplitude, it is residually connected to the initial input features to output the final features (number of channels C_out). This module uses a design of parallel enhancement of dual sub-modules + multi-stage feature fusion + residual connection, which not only strengthens the spatial channel information representation of features and avoids gradient vanishing, but also controls the computational cost through 1×1 convolution, making it suitable for tasks requiring high-precision feature extraction such as object detection and image segmentation.
[0042] Among them, Area-attention is the core underlying mechanism of the module, and its structure is as follows: Figure 4 As shown, the complete logic of generating regional attention weights from the dual-channel basic features output by A2C2f, and then strengthening defective regions and suppressing background regions through weights is clearly presented, providing a high signal-to-noise ratio foundation for subsequent feature optimization.
[0043] The Area-attention module uses an attention mechanism to weight spatial region information of features to highlight the importance of key regions. Its workflow is as follows: Input features are first processed by Conv (K=1, S=1) convolution to adjust channels, then split into three branches (Q, K, and V) through a Split operation. Subsequently, Q and K are processed by MatMul to obtain initial attention weights. These weights are then scaled and normalized using SoftMax to obtain the final spatial region attention weights. Simultaneously, the V branch first extracts local features using DWConv (K=7, S=1), then performs MatMul weighting with the normalized attention weights. Finally, the weighted features are residually connected to the V features processed by DWConv, and then the channels are integrated through Conv (K=1, S=1) convolution to output the enhanced features. This process leverages the attention mechanism to focus on key regions and combines depthwise separable convolution to strengthen local features, achieving precise weighting of spatial region information.
[0044] In images of power transmission line insulators taken by drones, the characteristics of damage and flashover defects differ significantly, making it easy for traditional A2C2f methods to miss one or the other. To address this, the Area-attention module achieves intelligent feature integration: it adaptively fuses global and local features. Global contextual features can accurately locate the overall region of the insulator in the image, eliminating background interference far from the insulator; while local detail features can capture subtle defects such as damage cracks and flashover spots.
[0045] The Mona module introduces a visual filter to replace the linear layer: the linear layer indiscriminately captures background interference, which is easily misidentified as flashover features; while Mona can learn the specific patterns of insulator defects through training, such as the ring texture of flashover and the linear edges of damage, and selectively filter out incompatible interference, adapting to diverse inspection scenarios such as bright sunlight, low light on cloudy days, and partial occlusion, thereby improving the accuracy of spatial feature extraction.
[0046] Through the synergistic effect of the A2C2f-DFFN-DYT-Mona module, insulator features can be aggregated at different scales, and the distribution of the fused features can be dynamically adjusted. This effectively suppresses background noise, enhances the distinction between the target area and the background, and balances the expression of two types of defects: damage and flashover. This significantly improves the model's generalization ability for insulator defect detection in complex inspection scenarios and reduces false detections and missed detections.
[0047] S4. Introduce the Dfocaler-GloU loss function to output the insulator defect prediction results; To address the issues of blurred target boundaries and unstable multi-scale target regression caused by background interference, a Focaler-GIoU loss function is designed to replace the CIoU loss function, thereby improving the geometric alignment accuracy of bounding boxes and mitigating the interference of sample quality differences on training.
[0048] DFocaler-GIoU loss function In the scenario of insulator defect detection in power transmission lines, UAV inspection images are subject to interference from non-static shooting, variable angles, and complex backgrounds, leading to problems such as blurred edges, partial occlusion, and unstable multi-scale regression, especially for small-scale defects, which have low pixel proportions and whose features are easily submerged by the background. Traditional CIoU loss functions suffer from inaccurate geometric position learning and dilution of gradient contributions from small targets by larger targets, making it difficult to meet detection accuracy requirements. To address these issues, this invention further optimizes Focaler-GIoU by proposing the DFocaler-GIoU (Dynamic Focaler-GIoU) loss function, the specific implementation steps of which are as follows: 1. Enhanced Geometric Constraints: Inheriting GIoU's ability to accurately model overlapping bounding box regions, center point distances, and scale differences, global geometric position constraints are introduced by calculating the minimum bounding rectangle area ratio between the predicted box and the real box, thereby improving the accuracy of geometric localization of defect areas and mitigating regression bias caused by edge blurring. 2. Dynamic scale-aware weight allocation: An adaptive weight factor based on the target scale is designed. By extracting scale features such as the pixel ratio and bounding box area of the defect target, differentiated loss weights are assigned to defects of different scales. Small-scale defects receive higher weights, while the weights of large-scale defects are appropriately reduced. This effectively solves the problem that the gradient contribution of small targets is diluted by large targets and strengthens the training priority of small-scale defects. 3 Adaptive Focusing Factor Fusion: A dynamic focusing mechanism based on sample quality is introduced. The sample quality is quantified by calculating the IoU value between the predicted box and the ground truth box. Higher focusing weights are applied to low-quality samples (such as severe occlusion and blurred edges), while the weight ratio of high-quality samples is reduced. This suppresses the interference of low-quality samples on the training process and improves the robustness of the model to defects in complex scenes. 4. Loss Function Aggregation: The geometric constraint term, dynamic scale weight term, and adaptive focusing factor mentioned above are weighted and fused to construct a complete DFocaler-GIoU loss function. The bounding box regression accuracy and small target localization performance are simultaneously optimized through the backpropagation process, achieving the dual guarantee of "accurate learning of small-scale defect geometric location + dynamic loss weight differential allocation", ultimately meeting the high-precision requirements of transmission line insulator defect detection for multi-scale and complex scenarios.
[0049] The loss function for GIoU is: (1) In the formula, The GIoU loss function represents the loss value used to quantify the geometric deviation between the predicted and actual insulator defect bounding boxes; IoU is the intersection-to-union ratio, which is the ratio of the intersection area to the union area of the predicted and actual boxes, and is a fundamental indicator for measuring the degree of overlap between them; △, These represent the normalized center offsets of the predicted bounding box and the ground truth bounding box in the horizontal and vertical directions, respectively, with values ranging from [0,1], and are used to quantify the positional alignment of the bounding boxes.
[0050] To address the differences in insulator defect scales, a dynamic scale-aware weighting is introduced. Based on the actual frame area, an adaptive allocation is achieved, with higher weights for small scales and lower weights for large scales. The formula is as follows: (2) in, Dynamic scale-aware weights are used to adaptively allocate loss weights based on the true scale of insulator defects. This is the weight adjustment coefficient, which controls the overall scaling of the dynamic weights. This is the scale sensitivity coefficient, which adjusts the sensitivity of the weights to changes in defect scale. To train the minimum true frame area corresponding to the defects in the insulator; This represents the actual frame area corresponding to the current insulator defect. This is the minimum value, usually taken as 10. -6 ,avoid The case where the denominator is 0 when the value approaches 0; The weighting is based on the fundamental weights to ensure that the loss weights for large-scale defects are within a reasonable range.
[0051] Considering the prediction difficulty and scale characteristics of insulator defects, an adaptive focusing factor is designed to enhance the gradient contribution of medium-quality samples, as shown in the following formula: (3) in, The basic focusing coefficient serves as the benchmark value for the adaptive focusing factor. The actual frame area corresponding to the current insulator defect. To train the maximum true frame area of defects in the concentrated insulator. This is the scale focusing coefficient, which enhances the focusing intensity corresponding to small-scale defects. Small, Great contribution Increase Based on the basic focusing coefficient, the focusing intensity is enhanced for defects with large prediction deviations. Major flaws Great contribution Increase.
[0052] In summary, the total loss formula for DFocaler-GIoU is: (4) in, As a dynamic focus item, with Synergistic effect: Small-scale, high-bias defects pass through Amplify the basic loss, and then through By strengthening the focusing effect and forming a dual-weighted approach, DFocaler-GIoU ensures that it receives priority optimization resources during training, thus meeting the core requirement of small-scale defect detection in transmission line insulators. Through dynamic parameter adaptive matching of optimization requirements for defects of different scales, DFocaler-GIoU eliminates the need for manual hyperparameter adjustment, enhancing the model's generalization ability in diverse inspection scenarios and providing strong support for lightweight and accurate defect detection in transmission line insulators.
[0053] S5, Output the results of insulator defect detection for power transmission lines.
[0054] In summary, this invention addresses the problem that standard convolution with large stride sampling easily misses subtle features and leads to incomplete feature extraction when the target and features are not obvious in the anomaly detection of insulators of transmission lines. It introduces an ADown downsampling module into the backbone network to replace part of the CBS convolution and designs a more suitable adaptive loss function to cooperate with the characteristics of the ADown module. This preserves image detail features to improve detection accuracy while reducing the number of model parameters and computational load, achieving lightweight basic optimization. To address the complexity of insulator defect detection in transmission lines, stemming from both the multi-scale nature of the targets and the uneven representation of different defect features against complex backgrounds, a novel A2C2f-DFFN-DYT-Mona module was designed. This module can aggregate information at different scales, dynamically adjust the distribution of the fused features, suppress background noise, enhance the ability to distinguish between target areas and backgrounds, and evenly represent the features of different types of defects, thereby further improving the model's generalization ability for insulator image defect detection in transmission lines. To address the issues of blurred defect edges, partial occlusion, and unstable multi-scale regression in insulator image processing during transmission line insulator anomaly detection due to non-static shooting, varying angles, and complex background interference, a novel DFocaler-GIoU loss function is designed to compensate for the shortcomings of the CIoU loss function in handling small-scale targets. This module can learn the geometric position of small-scale targets through GIoU and prioritize the allocation of computing power to the localization optimization of such targets through dynamic Focal weights, forming a dual guarantee of accurate geometric loss and differentiated loss weights.
[0055] In summary, this invention solves the technical problems of low model running efficiency, high false positive and false negative rates, and significant influence from differences in sample quality in the prior art.
[0056] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting defects in lightweight transmission line insulators, characterized in that, The method includes: S1. Input image of transmission line insulator; S2. Using the ADown module to replace the downsampling module, a dual-branch collaborative feature compression architecture is adopted. Through a heterogeneous sampling strategy, the feature map is efficiently reduced in dimension and retains discriminative information based on the transmission line insulator image. S3. Feature enhancement and fusion are performed using the A2C2f-DDM module; wherein, the Ablock layer in the A2C2f module is replaced with the Ablock-DFFN-DYT-Mona module to form and use the A2C2f-DFFN-DYT-Mona module for feature enhancement, and different defect features are learned under a preset complex background; in the A2C2f-DFFN-DYT-Mona module, the internal operations of the submodule ABblock_DFFN_DYT and the overall A2C2f-DDM process are performed; S4. Introduce the Dfocaler-GIoU loss function to process and obtain the insulator defect prediction results; wherein, the dynamic Focaler-GIoU loss function is used to strengthen geometric constraints and obtain geometric constraint terms, dynamic scale weight terms are obtained through dynamic scale-aware weight allocation, and dynamic scale weight terms are obtained through adaptive focusing factor fusion. The loss function is aggregated on the dynamic scale weight terms, the dynamic scale weight terms and the dynamic scale weight terms to construct the complete Dfocaler-GIoU loss function. Through the backpropagation process, the bounding box regression accuracy optimization and small target localization optimization are completed. S5, Output the results of insulator defect detection for power transmission lines.
2. The method for detecting defects in lightweight transmission line insulators according to claim 1, characterized in that, In step S2, a feature map is input at the input end, and an average pooling operation with a preset step size is performed to obtain an average pooling feature map. The average pooling feature map is then divided into two parts along the channel dimension, and the number of channels in each part is halved.
3. The method for detecting defects in lightweight transmission line insulators according to claim 1, characterized in that, In step S3, the submodule ABlock_DFFN_DYT is used to perform a basic transformation on the input features through the Dyt module. The Area-attention module then weights the feature space region information to highlight key regions. The input features are then residually connected with the original input features and transformed a second time through the second Dyt module. Finally, the DFFN refines the features to complete the single-path enhancement.
4. The method for detecting defects in lightweight transmission line insulators according to claim 3, characterized in that, In the overall A2C2f-DDM process, the input features are reduced to C_in / 2 through Conv (K=1,S=1) convolution. The reduced features are divided into two paths and enhanced in parallel by the ABlock_DFFN_DYT_Mona submodule. The two features are concatenated and the channels are integrated through Conv (K=1,S=1) convolution. The scaling operation is used to adjust the amplitude. The feature is then residually connected to the initial input features to output the final feature. The Area-attention module uses an attention mechanism to weight the spatial region information of features to highlight the importance of key regions; The Mona module learns specific patterns of insulator defects through training and then filters inspection scenarios.
5. The method for detecting defects in lightweight transmission line insulators according to claim 3, characterized in that, In S4, the Area-attention module uses an attention mechanism to weight the spatial region information of features to highlight the importance of key regions; the Mona module learns a specific pattern of insulator defects through training to filter inspection scenarios. In the geometric constraint enhancement operation, a global geometric position constraint is introduced by calculating the ratio of the area of the minimum bounding rectangle between the predicted box and the true box. In the dynamic scale-aware weight allocation operation, an adaptive weight factor based on the target scale is designed. By extracting scale features such as the pixel ratio and bounding box area of the defect target, differentiated loss weights are assigned to defects of different scales to complete the training priority enhancement operation for small-scale defects. In the adaptive focusing factor fusion operation, a dynamic focusing mechanism based on sample quality is introduced. The sample quality is quantified by calculating the IoU value between the predicted box and the real box. A preset focusing weight is applied to low-quality samples, and the weight ratio of high-quality samples is reduced to complete the low-quality sample interference suppression operation. In the loss function aggregation operation, the geometric constraint term, the dynamic scale weight term, and the adaptive focusing factor are weighted and fused to construct the complete DFocaler-GIoU loss function.
6. The method for detecting defects in lightweight transmission line insulators according to claim 5, characterized in that, Express the loss function of GIoU using the following logic: (1) In the formula, This represents the loss value of the GIoU loss function; IoU is the intersection-union ratio; △ These represent the normalized center offsets of the predicted bounding box and the ground truth bounding box in the horizontal and vertical directions, respectively, with values ranging from [0,1], and are used to quantify the positional alignment of the bounding boxes.
7. The method for detecting defects in lightweight transmission line insulators according to claim 5, characterized in that, To address the scale differences in insulator defects, a dynamic scale-aware weighting is introduced. Based on the actual frame area, an adaptive allocation is performed using the following logic: high weight for small scales and low weight for large scales. (2) In the formula, Weights for dynamic scale perception; This is the weighting adjustment coefficient; The scale sensitivity coefficient; To train the minimum true frame area corresponding to the defects in the insulator; This represents the actual frame area corresponding to the current insulator defect. It is the minimum value; The weight is the basis of the weight.
8. The method for detecting defects in lightweight transmission line insulators according to claim 5, characterized in that, Combining the prediction difficulty and scale characteristics of insulator defects, an adaptive focusing factor is designed to enhance the gradient contribution of medium-quality samples: (3) in, Based on the focus coefficient, The actual frame area corresponding to the current insulator defect. To train the maximum true frame area of defects in the concentrated insulator. is the scale focusing coefficient.
9. The method for detecting defects in lightweight transmission line insulators according to claim 5, characterized in that, The total loss formula for DFocaler-GIoU is as follows: (4) In the formula, For dynamic focusing items.
10. A lightweight transmission line insulator defect detection system, characterized in that, The system includes: Insulator image input module, used to input images of transmission line insulators; The ADown module is used to replace the downsampling module. It adopts a dual-branch collaborative feature compression architecture and uses a heterogeneous sampling strategy to perform efficient dimensionality reduction and discriminative information preservation operations on the feature map based on the transmission line insulator image. The ADown module is connected to the insulator image input module. The A2C2f-DDM module is used for feature enhancement and fusion. Specifically, the Ablock layer in the A2C2f module is replaced with the Ablock-DFFN-DYT-Mona module, forming and utilizing the A2C2f-DFFN-DYT-Mona module for feature enhancement. Under a pre-defined complex background, different defect features are learned. Within the A2C2f-DFFN-DYT-Mona module, the internal operations of the submodule ABlock_DFFN_DYT and the overall A2C2f-DDM process are performed. The A2C2f-DDM module is connected to the ADown module. The loss function module is used to introduce the Dfocaler-GIoU loss function and process it to obtain the insulator defect prediction results. Specifically, the dynamic Focaler-GIoU loss function is used to strengthen geometric constraints, resulting in geometric constraint terms. Dynamic scale weight terms are obtained through dynamic scale-aware weight allocation and adaptive focusing factor fusion. Loss function aggregation is performed on the dynamic scale weight terms, constructing a complete Dfocaler-GIoU loss function. Through backpropagation, bounding box regression accuracy optimization and small target localization optimization are achieved. The loss function module is connected to the A2C2f-DDM module. The detection result output module is used to output the detection results of defects in the insulators of the transmission line. The detection result output module is connected to the loss function module.