An insulator defect detection method based on multi-layer perception and shape guidance

CN122967151APending Publication Date: 2026-10-23CHINA THREE GORGES UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611038008.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-13
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0004]本发明的目的是为了解决现有的基于深度学习的目标检测技术在特征提取与融合过程中,难以兼顾复杂环境下的抗干扰能力与模型轻量化的问题,从而导致在实际的绝缘子缺陷检测任务中,由于真实巡检场景存在杆塔、导线、植被等复杂背景的严重遮挡和干扰,加之绝缘子缺陷如破损、微小裂纹多属于细长结构的小目标,致使现有技术面临小目标检测精度低包括易发生漏检、误检以及模型计算开销过大包括难以在算力受限的无人机等边缘设备上进行实时部署的技术问题,而提出本发明一种基于多层感知与形状引导的轻量化绝缘子缺陷检测方法

Benefits of technology

在主干网络阶段引入多层感知特征聚焦模块(MPFFM),通过多尺度感受野融合机制,有效抑制了无人机巡检视角下杆塔、植被等复杂背景的干扰,并显著增强了模型对绝缘子及其缺陷等关键区域的主干网络响应能力;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122967151A_ABST
    Figure CN122967151A_ABST
Patent Text Reader

Abstract

The application relates to an insulator defect detection method based on multilayer perception and shape guidance, relates to the technical field of computer vision and intelligent power inspection, is constructed based on a target detection framework, is improved on the basis of a YOLOv8 architecture, and adopts a backbone network-neck-detection head structure.In the backbone network stage, a multilayer perception feature focusing module is introduced, a multiscale receptive field fusion and a feature focusing mechanism are adopted, complex background interference is effectively inhibited, and key region response is enhanced; in the neck stage, a half-path aggregation network is designed, the feature propagation path is shortened, frequency dynamic convolution is combined, balance between light weight and information retention is realized; in the detection head stage, a shape guidance detection head is proposed, the elongated structure of an insulator is modeled through sequence orthogonal strip convolution, and structure-dependent modeling and accurate positioning between defects and the insulator body are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision technology, and in particular to a lightweight insulator defect detection method that combines computer vision and deep learning technologies and is based on multilayer perception and shape guidance. Background Technology

[0002] Insulators, as key components simultaneously providing electrical insulation and mechanical support, directly impact the safety and stability of transmission lines. They are typically installed between conductors at different potentials or between conductors and grounding structures to provide electrical insulation and mechanical support. However, prolonged exposure to harsh environments and geographical conditions can lead to the gradual accumulation of contaminants on their surfaces, potentially resulting in flashovers, fractures, and component loss. These defects not only alter their geometric and structural characteristics but also cause local electric field distortion and significantly increase the electric field strength, thereby increasing the risk of flashover. Furthermore, mechanical impacts, ice loads, and manufacturing defects can all induce insulator damage, cracks, and even spontaneous explosions. Once these defects occur, the electrical performance of the insulator will significantly deteriorate, easily causing short circuits, tripping, or even large-scale power outages. Decreased mechanical strength can also lead to serious consequences such as broken strings and conductor falls, posing a significant threat to power grid safety and public infrastructure. Therefore, accurately detecting defective areas in insulators and conducting efficient and reliable regular inspections have become crucial tasks in the inspection of intelligent transmission lines and an important component in building a power system safety monitoring system.

[0003] In current technologies, power transmission lines are mostly inspected using drones. However, images of insulator defects acquired from the drone's perspective often face occlusion and interference from complex backgrounds such as towers, conductors, and vegetation. The overlapping of background textures and insulator appearance features leads to unclear target boundaries and the obscuring of local details. Traditional detection methods, such as those described in the paper "Fast detection method of insulator fault based on image processing technology," employ edge detection and watershed algorithms to detect insulator defects, often relying on manual intervention and having limited adaptability. In contrast, while deep learning-based methods have achieved significant performance improvements, existing models still generally suffer from insufficient generalization ability, weak robustness, and low defect recognition rates in real-world inspection scenarios. Summary of the Invention

[0004] The purpose of this invention is to address the problem that existing deep learning-based target detection technologies struggle to balance anti-interference capabilities in complex environments with lightweight models during feature extraction and fusion. This leads to difficulties in actual insulator defect detection tasks. Real-world inspection scenarios often involve severe occlusion and interference from complex backgrounds such as towers, conductors, and vegetation. Furthermore, insulator defects, such as breaks and microcracks, are often small, elongated structures. Consequently, existing technologies suffer from low accuracy in small target detection, leading to frequent missed and false detections, as well as excessive computational overhead, making real-time deployment on edge devices with limited computing power, such as drones, difficult. Therefore, this invention proposes a lightweight insulator defect detection method based on multi-layer perception and shape guidance.

[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A method for detecting insulator defects based on multilayer sensing and shape guidance includes the following steps: Step 1: Construct an image dataset of insulator defects covering complex backgrounds, denoted as the first dataset; Step 2: Add multi-class annotation information to the images in the first dataset and perform data augmentation to form the second dataset, which is then divided into training and test sets according to a preset ratio; Step 3: Construct a lightweight insulator defect detection model based on multilayer sensing and shape guidance; Step 4: Use the training set obtained in Step 2 to train the lightweight insulator defect detection model based on multilayer sensing and shape guidance constructed in Step 3, and save the optimal model; Step 5: Use the test set obtained in Step 2 to perform accuracy testing on the optimal model obtained in Step 4, and obtain an insulator defect detection model that meets the accuracy requirements; Step 6: Obtain the actual inspection image to be detected and input it into the insulator defect detection model that meets the accuracy requirements obtained in Step 5. The model outputs the category information and location bounding box of the insulator and its defects, thereby realizing the automated detection of insulator defects.

[0006] In step 1, due to severe occlusion and interference in the real inspection scene, the first dataset not only includes insulator images under a single background, but also drone inspection images with complex background interference such as towers, wires, vegetation, sky and buildings.

[0007] In step 1, the images were acquired under various lighting conditions, including sunny, cloudy, and backlighting, as well as from various shooting angles, including eye-level, overhead, and upward views. The insulator defects in the dataset mainly focus on small target defects in slender structures, including insulator breakage, micro-cracks in insulators, and insulator self-explosion / missing parts. All images were acquired by a high-definition gimbal camera mounted on a drone, and extremely blurry or invalid images were removed to form the original first dataset.

[0008] Step 2 includes the following steps: Step 2.1) Use image annotation tools such as LabelImg to annotate the insulator body and defect area in the first dataset with rectangular boxes; generate corresponding XML or TXT format label files for the annotation information. Each label file contains the category index number of the target category and the center point coordinates, width and height of the bounding box; Step 2.2) To further improve the model's detection accuracy for small target defects and prevent model overfitting, perform offline or online data augmentation operations on the labeled images; data augmentation operations include one or more of Mosaic data augmentation, random flipping, random scaling, and color dithering.

[0009] Step 2.3) The annotated and enhanced images and their corresponding label files are used as the second dataset. To ensure the objectivity of the model evaluation, the second dataset is randomly divided into training set and test set according to a certain ratio.

[0010] In step 3, the lightweight insulator defect detection model based on multilayer sensing and shape guidance consists of three parts: the backbone network, the neck network, and the head network. In the backbone network, the insulator defect image is input to the first convolutional module Conv to obtain feature B1; feature B1 is fed into the second convolutional module to obtain feature B2; feature B2 is fed into the first C2f module, and its output feature is fed into the third convolutional module to obtain feature B3; feature B3 is fed into the second C2f module, and its output feature is fed into the fourth convolutional module to obtain feature B4; feature B4 is fed into the first multilayer perceptron feature focusing module MPFFM to obtain the first enhanced feature; the first enhanced feature is fed into the fifth convolutional module to obtain feature B5; feature B5 is fed into the second multilayer perceptron feature focusing module MPFFM to obtain the second enhanced feature; the second enhanced feature is input into the spatial pyramid pooling module SPPF to finally obtain the backbone network output feature.

[0011] In the neck network, the multi-scale features extracted from the backbone network are fed into the half-path aggregation network HPAN for feature fusion, specifically performing the following operations: The output features of the SPPF module are input to the first upsampling module Upsample to obtain the first upsampled features; the first upsampled features and the output features of the first multilayer perceptual feature focusing module MPFFM in the backbone network are input to the first concatenation module Concat for concatenation; the output of the first concatenation module is sent to the third C2f module to obtain feature P4_1; subsequently, feature P4_1 is sent to the second upsampling module to obtain the second upsampled features; the second upsampled features and the output features of the second C2f module in the backbone network are input to the second concatenation module for concatenation; The output of the second concatenation module is fed into the fourth C2f module to obtain the first-scale output feature P3 of the neck network. Simultaneously, feature P3 is fed into the first frequency dynamic convolution module FDConv for downsampling to obtain dynamic downsampling features. This dynamic downsampling feature, together with feature P4_1, is input into the third concatenation module for concatenation. The output of the third concatenation module is fed into the fifth C2f module to obtain the second-scale output feature P4 of the neck network. The half-path aggregation network (HPAN) designed in the above neck network stage, combined with the frequency dynamic convolution (FDConv) technology, significantly reduces network parameters while maintaining key feature information, achieving a perfect balance between lightweight design and information preservation. This effectively solves the technical problem that existing large models are difficult to deploy on edge devices such as drones with limited computing power.

[0012] In the Head section of the network, the first-scale output features P3 and the second-scale output features P4 from the neck network, as well as the output features from the SPPF module of the backbone network, are fed into the first, second, and third shape-guided insulator detection heads, respectively. The three detection heads have the same structure and are collectively referred to as SIDH. They predict the features they receive and output the category and location bounding boxes of the insulator and its defects.

[0013] like Figure 2 As shown, the Multilayer Perception Feature Focusing Module (MPFFM) is specifically as follows: The input feature F of the Multi-Level Perception (MPFFM) feature focusing module is divided into three branches: the first feature is directly fed into the Multi-Level Perception module; the second feature is fed into the reshape module; and the third feature is fed directly into the summation module at the end of the network as a residual connection. In the Multi-Level Perception module, the first feature F is input to the first to fourth depthwise separable convolutional modules DWConv with kernel sizes of 1×1, 3×3, 5×5, and 7×7, respectively, to obtain feature maps with four different receptive fields. These four feature maps undergo operations such as concatenation and multiplication through an adaptive weighting mechanism, and are then weighted and fused to finally obtain the enhanced feature map of the multi-level perception module. In the Feature Focusing module, the second feature F is processed along the channel dimension by the reshape module to obtain grouped features G; the grouped features G are then further split and processed internally: On one hand, the grouped features G are subjected to global average pooling in the horizontal direction X Avg and the vertical direction Y Avg respectively. After concatenation, the pooled features are fed into the pointwise convolution module PConv and the sigmoid activation function in sequence to obtain spatial attention weights. These weights are multiplied with the original grouped features G in the re-weighting module Re-weighting to output the first sub-feature. On the other hand, the grouped features G are input to the sixth 3×3 convolution module to extract local context information and obtain the second sub-feature. Subsequently, the first sub-feature and the second sub-feature are fed into the interaction module containing the global average pooling module GAP and the multilayer perceptron module MLP to interactively extract cross-branch attention weights. Next, perform cross-branch multiplication and weighting operations respectively: The first sub-feature and its corresponding interaction attention weight are fed into the multiplication module for element-wise multiplication to obtain the first weighted feature; the second sub-feature and its corresponding interaction attention weight are fed into the multiplication module for element-wise multiplication to obtain the second weighted feature. Finally, the first weighted feature output by the upper multiplication module and the second weighted feature output by the lower multiplication module are fed into the addition module for feature addition, and then passed through the sigmoid activation function and the reshape operation to output the feature focusing map. The feature-focused map and the multilayer sensing enhanced feature map are multiplied together, and the multiplied feature is fed into the addition module along with the input feature F of the multilayer sensing feature-focused module MPFFM to finally obtain the output feature of the multilayer sensing feature-focused module MPFFM.

[0014] like Figure 3 As shown, the half-path aggregation network HPAN is specifically as follows: First, top-down feature upsampling and fusion are performed: Feature P5 output from the backbone network is input to the first upsampling module Upsample for processing to obtain the first upsampled feature; the first upsampled feature and Feature P4 output from the backbone network are fed into the first concatenation module Concat for channel-level concatenation; the output feature of the first concatenation module is then fed into the first feature extraction module to obtain the first-stage fused feature P4; next, the first-stage fused feature P4 is input to the second upsampling module for processing to obtain the second upsampled feature; the second upsampled feature and Feature P3 output from the backbone network are fed into the second concatenation module for concatenation; the output feature of the second concatenation module is fed into the second feature extraction module to finally obtain the feature P3 output from the neck network; Subsequently, bottom-up feature downsampling and aggregation are performed: the feature P3 output by the neck network is input to the frequency dynamic convolution module FDConv for downsampling to obtain dynamic downsampling features; this dynamic downsampling feature and the aforementioned first-stage fusion feature P4 are sent to the third splicing module for splicing; the output features of the third splicing module are sent to the third feature extraction module to finally obtain the feature P4 output by the neck network.

[0015] Compared to Figure 3 (a) shows the traditional path aggregation network (PAN). The half-path aggregation network (HPAN) of this invention removes the last fusion stage from the bottom up from the P4 layer to the P5 layer. By adopting this structure and combining the dynamic feature extraction capability of frequency dynamic convolution (FDConv), the network parameters and computational overhead are reduced while maintaining the key feature information. This achieves a balance between model lightweighting and information preservation, enabling existing large models to be deployed on edge devices such as drones with limited computing power.

[0016] like Figure 4 As shown, the input features of the detection head, i.e., the features P3 or P4 output by the neck network, are first divided into two paths and sent to the classification branch and the localization branch, respectively: 1) For classification branches (corresponding to) Figure 4 (Upper part) The input features are fed into the first 3×3 standard convolutional module for classification to obtain the first classification feature; the first classification feature is fed into the second 3×3 standard convolutional module for classification to obtain the second classification feature; the second classification feature is then fed into the first 1×1 standard convolutional module for classification to perform channel dimensionality reduction and integration, and finally outputs the classification prediction result Class of insulators and their defects. 2) Locating the branch (corresponding to) Figure 4 (Lower part) The input features are fed into the first 3×3 standard convolutional module for localization to obtain the initial localization features. Subsequently, the initial localization features are divided into two paths: one path is directly fed into the subsequent element-wise multiplication module as a residual connection, and the other path is fed into the Sequential Orthogonal Strip Module (SOSM) to extract attention weights. Inside the Sequence Orthogonal Striping (SOSM) module, the following strict serialization operation is performed: The initial features are sequentially fed into the first 5×5 depthwise convolution layer, the first 1×19 horizontal strip depthwise convolution layer, and the first 19×1 vertical strip depthwise convolution layer for feature extraction. Finally, they are fed into the first 1×1 standard convolution layer to generate an attention weight feature map with spatial shape awareness. Subsequently, the attention weight feature map output by the Sequence Orthogonal Strip Module (SOSM) and the initial localization features used as residual connections are fed together into the element-wise multiplication module for element-wise multiplication to obtain shape-weighted features. Finally, the shape-weighted features are fed into the localization second 1×1 standard convolution module to finally output the bounding box localization prediction result (bbox) of the defect target. This invention innovatively proposes a shape-guided insulator detection head (SIDH) in the detection head stage. Its core lies in the Sequence Orthogonal Strip Module (SOSM) introduced in the positioning branch. This module, through a special cascaded structure of "5×5 depth convolution + 1×19 horizontal strip depth convolution + 19×1 vertical strip depth convolution," accurately models the receptive field for the physical morphology of insulators and their slender structures, such as damage and micro-cracks, in real-world scenarios. This orthogonal strip convolution structure effectively filters out interference from the surrounding cluttered background, achieving efficient focusing on the features of small, slender defects, thus improving the model's accurate location and recall rate for small defects.

[0017] Compared with the prior art, the present invention has the following technical effects: In the backbone network stage, a multilayer perceptual feature focusing module (MPFFM) is introduced. Through a multi-scale receptive field fusion mechanism, the interference of complex backgrounds such as towers and vegetation under the perspective of UAV inspection is effectively suppressed, and the model’s backbone network response capability to key areas such as insulators and their defects is significantly enhanced. A half-path aggregation network (HPAN) was designed in the neck network stage. Combined with frequency dynamic convolution technology, the network parameters were significantly reduced while maintaining key feature information. This achieved a perfect balance between lightweight design and information preservation, and solved the problem that existing large models are difficult to deploy at the edge. In the detection head stage, a shape-guided insulator detection head (SIDH) is proposed. It uses a sequence of orthogonal strip convolutional structures to accurately model the slender physical morphology of the insulator body and defects, thereby achieving precise location of minute defects. Experimental results show that, after integrating the three core modules mentioned above, the complete model of this invention achieves a detection accuracy of 87.3% and a precision of 88.0% with an extremely low overhead of only 6.3M parameters and a computational cost of only 22.7 GFLOPs. This represents a significant and comprehensive improvement in both accuracy and computational efficiency compared to mainstream baseline models. Attached Figure Description

[0018] The present invention will be further described below with reference to the accompanying drawings and embodiments: Figure 1 This is a schematic diagram of the overall structure of the lightweight insulator defect detection method framework based on multilayer sensing and shape guidance provided in Embodiment 1 of the present invention. Figure 2 This is a schematic diagram of the internal structure of the Multilayer Sensing Feature Focusing Module (MPFFM) provided in Embodiment 1 of the present invention; Figure 3 This is a schematic diagram of the structure of the half-path aggregation network HPAN provided in Embodiment 1 of the present invention; Figure 4 This is a schematic diagram of the internal structure of the shape-guided insulator detection head SIDH provided in Embodiment 1 of the present invention; Figure 5 This is a visualization comparison of Embodiment 1 of the present invention and the baseline in a variety of challenging scenarios, including cluttered backgrounds, multiple perspectives, and diverse samples. Figure 6 This is an overall flowchart of the lightweight insulator defect detection method based on multilayer sensing and shape guidance provided in Embodiment 1 of the present invention. Detailed Implementation

[0019] A method for detecting insulator defects based on multilayer sensing and shape guidance includes the following steps: Step 1: Construct an image dataset of insulator defects covering complex backgrounds, denoted as the first dataset; Step 2: Label and augment the images in the first dataset to obtain the second dataset, and divide it into training and test sets in an 8:2 ratio; In this embodiment, the dataset contains a total of 2834 images, including 2267 training set images and 567 test set images. The dataset labels are divided into flashovered, broken, lost, and insulator according to the defect type. Step 3: Construct a lightweight insulator defect detection model based on multilayer sensing and shape guidance. The detection model includes a backbone network, a feature fusion network, and a head network. The construction of the model further includes steps 3.1 to 3.3. Step 3.1: Based on the YOLOv8 architecture, the backbone network replaces the C2f modules in the last two stages with newly designed MPFFM modules 1 and 2, which have the same structure and are used to improve the model's ability to perceive the features of insulators and their defects in complex environments. The backbone network consists of Conv module 1, Conv module 2, C2f module 1, Conv module 3, C2f module 2, Conv module 4, MPFFM module 1, Conv module 5, MPFFM module 2, and SPPF module connected in sequence. The MPFFM module has one input and three branches. The input feature map F is processed through a multilayer sensing branch and a feature focusing branch to obtain multilayer sensing enhanced features Y and feature sensing map I. The multilayer sensing enhanced features Y and feature sensing map I are then multiplied element-wise. Subsequently, a residual connection branch is introduced to add the feature map F to the original feature map to obtain the final feature map. .

[0020] The multilayer sensing branch has one input, the input feature map F, which is passed through four different DWConv modules to obtain four different features. The multi-layer perceptual enhancement feature Y is obtained through an adaptive weighting mechanism. The specific operation of the adaptive weighting mechanism can be expressed as follows: ; ; ; in This indicates a global average pooling operation, used to extract channel-level description information; This represents a fully connected layer used for dimensionality reduction. This represents a fully connected layer used for dimensionality upscaling to generate weight vectors corresponding to different receptive fields; normalized weights for each branch are obtained through a Softmax operation, and the features of different receptive fields are weighted and fused to finally obtain the multilayer perceptual enhancement feature Y; The feature map representing the output of depthwise separable convolution (DWConv) i The subscript of the branch index of the feature map takes the values ​​0, 1, 2, and 3, which correspond to separable convolutional branches with kernel sizes of 1×1, 3×3, 5×5, and 7×7, respectively. This indicates an element-wise summation operation on the four feature maps from i=0 to i=3; This represents the attention weight vector output by the i-th receptive field branch after passing through the fully connected layer and before normalization; The feature focusing branch has one input, the feature map F, which is divided into g groups along the channel dimension by a reshape operation to obtain grouped features. The inputs are divided into two branches, with directional pooling and feature recalibration operations performed in the upper branch. The specific operations can be represented as follows: ; ; ; ; in, and These represent the global average pooling outputs along the horizontal and vertical directions, respectively. Represents a 1×1 convolution. This represents the sigmoid activation function. and These are the attention weights corresponding to the two spatial directions. The feature map is obtained through enhancement. In the next branch, a 3×3 convolution is used to extract local contextual information to obtain features. W represents the width of the grouped feature map G, H represents the height of the grouped feature map G; h represents the coordinate index in the vertical direction (height); w represents the coordinate index in the horizontal direction (width); i represents the horizontal coordinate placeholder index when integrating / summing along the width direction; j represents the vertical coordinate placeholder index when integrating / summing along the height direction. This represents the feature vector of the grouped feature map G at the height coordinate h and the width coordinate i. This represents the feature vector of the grouped feature map G at the height coordinate j and the width coordinate w; , These represent the one-dimensional feature vectors obtained after global average pooling along the horizontal and vertical directions, respectively. This indicates an operation that concatenates two feature vectors. This represents a standard convolution operation with a kernel size of 1×1. Attention weights corresponding to the two spatial directions; This represents the first sub-feature output in the next branch (i.e., the reweighted feature). right and Cross-branch feature interaction and fusion are performed, and the final MPFFM output is obtained through residual connections. The specific operation can be represented as follows: ; ; ; ; in and These represent the results obtained from the interaction of features between the upper and lower branches. This is the feature focus map obtained after fusing the upper and lower parts. The output feature of MPFFM is obtained by performing element-wise multiplication between the multilayer sensing enhancement feature Y and the feature sensing map I. Grouped feature maps G The second sub-feature obtained after extracting local context information through a 3×3 convolution module; This represents a reshaping operation that alters the dimensions of a tensor. This represents the original input features initially introduced by the MPFFM module; The final MPFFM output is then obtained by adding the residual connection branch to the original feature map F.

[0021] Step 3.2: The feature fusion network is a half-path aggregation network HPAN. Based on the YOLOv8 path aggregation network PAN, the last fusion stage of the neck network is removed, and a frequency dynamic convolution module is introduced to replace standard downsampling to enhance the network's ability to dynamically extract features. The output of the SPPF module serves as the input of Upsample module 1; The Concat module 1 receives the outputs from the MPFFM module 1 and Upsample 1 as inputs, and then passes through the C2f module 3 and Upsample module 2 in sequence; The Concat module 2 receives the outputs from the C2f module 2 and the Upsample module 2 as inputs, and then passes through the C2f module 4 and the FDConv module in sequence; The Concat module 3 receives the output from the C2f module 3 as input, and then passes it through the C2f module 5; Step 3.3: Input the fused features from Step 3.2 into the head network to predict and filter the insulator detection results. The head includes three detection heads, namely the Shape Guided Insulator Detection Head (SIDH), used to enhance the structural modeling of insulators and their defects. The SIDH detection head includes a classification branch and a localization branch; the classification branch consists of two cascaded 3×3 convolutions and one 1×1 convolution; the localization branch includes a 3×3 convolution, a Sequence Orthogonal Strip Module (SOSM), and a 1×1 convolution; the SOSM module processes features sequentially using 5×5 depthwise convolution, horizontal strip convolution, and vertical strip convolution, and uses the generated feature map as attention weights to weight the input features; Detection head 1 receives the feature map output by C2f module 4, detection head 2 receives the feature map output by C2f module 5, and detection head 3 receives the feature map output by SPPF module. Step 3.4: The bounding box loss function is CIoU, and the total loss formula is: ; in This represents the bounding box regression loss. Represents classification loss. Indicates object-oriented loss; , and These represent the corresponding weighting coefficients; ; ; ; in, Used to measure the degree of overlap between the predicted bounding box and the ground truth bounding box. This represents the squared Euclidean distance between the center points of the predicted bounding box and the ground truth bounding box. This represents the square of the length of the diagonal of the smallest bounding rectangle of both. This represents the aspect ratio difference between the predicted bounding box and the ground truth bounding box. This represents its weight, that is, the weight coefficient (or trade-off parameter) representing the consistency of aspect ratio. This refers to the Complete Intersection over Union (CIO) index. , These represent the bounding box regions predicted by the model and the ground truth bounding box regions, respectively. This indicates the operation for calculating the area of ​​the corresponding region. , These represent the operations for calculating the intersection and union regions of two regions, respectively. It represents the square of the diagonal length of the smallest bounding rectangle that can simultaneously contain both the predicted bounding box and the ground truth bounding box. ; in, Represents the number of positive samples. This indicates whether the actual category label is correct. This represents the class probability predicted by the model.

[0022] ; in, This indicates the total number of predicted bounding boxes. Indicates whether an object exists. This represents the confidence score of the predicted object.

[0023] Step 4: Train the lightweight insulator defect detection model based on multilayer sensing and shape guidance constructed in Step 3 using the training set, and save the optimal model; this step specifically includes steps 4.1 to 4.4: Step 4.1: Set the model training parameters, including the number of training epochs, batch size, optimizer, learning rate, momentum, weight decay coefficient, and number of threads; Step 4.2: Input the training set images and their corresponding labels into the model, use the backpropagation algorithm to calculate the gradient of the loss function with respect to the model parameters, and update the parameters accordingly to gradually reduce the loss function; Step 4.3: Monitor the loss value and performance metrics during the training process. When the training set loss value no longer decreases and the accuracy P, recall R, mean precision mAP, and F1 score no longer improve, terminate the training. Step 4.4: After training is complete, save the parameters of the model with the best performance; Step 5: Use the test set to perform accuracy testing on the optimal model to obtain an insulator defect detection model that meets the accuracy requirements. Step 5 further includes steps 5.1 to 5.3: Step 5.1: Input the test set into the optimal model obtained in Step 4 for testing; Step 5.2: Calculate the model's performance metrics, including accuracy (P), recall (R), F1 score, and mean precision (mAP). The calculation formulas are as follows: ; ; ; ; ; Where AP represents the average accuracy, N is the total number of classes; TP is the number of correctly identified positive samples, FP is the number of incorrectly identified positive samples, FN is the number of incorrectly identified negative samples; and F1 score is the harmonic mean of precision and recall, used to comprehensively evaluate model performance. Step 5.3: Evaluate the performance metrics on the test set. If the accuracy of the test set is close to that of the training set, the model is deemed to meet the accuracy requirements, and the final lightweight insulator defect detection model based on multilayer sensing and shape guidance is obtained.

[0024] Table 1: Comparative experimental results;

[0025] As shown in Table 1, the proposed MPSL-Net algorithm significantly improves detection performance compared to Faster R-CNN, YOLOv5, and YOLOv8. In terms of detection accuracy, the algorithm achieves an mAP50 of 87.3%, which is 1.2, 1.8, and 1.7 percentage points higher than Faster R-CNN, YOLOv5, and YOLOv8, respectively. Its precision reaches 88.0%, outperforming all compared methods. Regarding model complexity, the algorithm has only 6.3M parameters, a reduction of 35.1M, 21.1M, and 4.8M compared to Faster R-CNN, CACS-YOLO, and YOLOv8, respectively. Compared to YOLOv10, the algorithm has fewer parameters and a 4.3 percentage point improvement in mAP50, demonstrating its superiority in insulator defect detection. In summary, MPSL-Net achieves an optimal balance between detection accuracy and lightweight model, meeting the application requirements of practical engineering.

[0026] at the same time, Figure 5 The presentation shows a visual comparison of the proposed method with the baseline model YOLOv8 in two different scenarios (A and B). It can be seen that YOLOv8 suffers from missed detections and positioning errors in complex backgrounds, while the proposed method can accurately locate insulator defects of different scales and morphologies, demonstrating superior detection accuracy and positioning completeness compared to YOLOv8.

[0027] Table 2: Ablation Experiment Results;

[0028] As shown in Table 2, the effectiveness of each core module was verified through ablation experiments in this embodiment. Using Base as the baseline model, its mAP50 was 85.6%, and the number of parameters was 11.13M. Introducing MPFFM alone improved the mAP50 to 85.9% and reduced the number of parameters to 8.86M; introducing SIDH alone improved the precision to 88.6% and increased the mAP50 to 86.3%; introducing HPAN alone reduced the number of parameters to 8.57M. The complete model Base+MPFFM+SIDH+HPAN achieved the best performance, with an mAP50 of 87.3%, a precision of 88.0%, a parameter count reduced to 6.3M, and a computational cost reduced to 22.7 GFLOPs. Experimental results show that all three core modules contribute positively to performance and together constitute a high-precision and lightweight insulator defect detection framework.

[0029] In summary, this invention discloses a lightweight insulator defect detection method based on multilayer sensing and shape guidance. In the backbone network stage, a multilayer sensing feature focusing module is introduced to suppress complex background interference and enhance the backbone network response in key areas through multi-scale receptive field fusion. In the neck network stage, a half-path aggregation network is designed, combining frequency dynamic convolution to achieve a balance between lightweight design and information preservation. In the detection head stage, a shape-guided detection head is proposed, which models the slender structure of the insulator through sequential orthogonal strip convolution, achieving structural dependency modeling and precise localization of defects and the insulator body. This invention effectively solves the technical problems of low detection accuracy and high computational cost for small targets such as insulator defects in complex backgrounds through three-stage collaborative optimization.

Claims

1. A method for detecting insulator defects based on multilayer sensing and shape guidance, characterized in that, Includes the following steps: Step 1: Construct an image dataset of insulator defects covering complex backgrounds, denoted as the first dataset; Step 2: Add multi-class annotation information to the images in the first dataset and perform data augmentation to form the second dataset, which is then divided into training and test sets according to a preset ratio; Step 3: Construct a lightweight insulator defect detection model based on multilayer sensing and shape guidance; Step 4: Use the training set obtained in Step 2 to train the lightweight insulator defect detection model based on multilayer sensing and shape guidance constructed in Step 3, and save the optimal model; Step 5: Use the test set obtained in Step 2 to perform accuracy testing on the optimal model obtained in Step 4, and obtain an insulator defect detection model that meets the accuracy requirements; Step 6: Obtain the actual inspection image to be detected and input it into the insulator defect detection model that meets the accuracy requirements obtained in Step 5. The model outputs the category information and location bounding box of the insulator and its defects, thereby realizing the automated detection of insulator defects.

2. The method according to claim 1, characterized in that, In step 1, due to severe occlusion and interference in the real inspection scene, the first dataset not only includes insulator images under a single background, but also drone inspection images with complex background interference such as towers, wires, vegetation, sky and buildings.

3. The method according to claim 2, characterized in that, In step 1, the images were acquired under various lighting conditions, including sunny days, cloudy days, and backlighting, as well as from various shooting angles, including eye-level, overhead, and upward views. The insulator defects in the dataset mainly focus on small target defects in slender structures, including insulator breakage, micro-cracks in insulators, and insulator self-explosion / missing parts. All images were acquired by a high-definition gimbal camera mounted on a drone, and extremely blurry or invalid images were removed to form the original first dataset.

4. The method according to claim 1, characterized in that, Step 2 includes the following steps: Step 2.1) Use image annotation tools such as LabelImg to annotate the insulator body and defect area in the first dataset with rectangular boxes; generate corresponding XML or TXT format label files for the annotation information. Each label file contains the category index number of the target category and the center point coordinates, width and height of the bounding box; Step 2.2) To further improve the model's detection accuracy for small target defects and prevent model overfitting, offline or online data augmentation operations are performed on the labeled images; data augmentation operations include one or more of the following: Mosaic data augmentation, random flipping, random scaling, and color dithering; Step 2.3) The annotated and enhanced images and their corresponding label files are used as the second dataset. To ensure the objectivity of the model evaluation, the second dataset is randomly divided into training set and test set according to a certain ratio.

5. The method according to claim 1, characterized in that, In step 3, the lightweight insulator defect detection model based on multilayer sensing and shape guidance is constructed and consists of three parts: the backbone network, the neck network, and the head network. In the backbone network, the insulator defect image is input to the first convolutional module Conv to obtain feature B1; feature B1 is fed into the second convolutional module to obtain feature B2; feature B2 is fed into the first C2f module, and its output feature is then fed into the third convolutional module to obtain feature B3; feature B3 is fed into the second C2f module, and its output feature is then fed into the fourth convolutional module to obtain feature B4; feature B4 is fed into the first multilayer perceptron feature focusing module MPFFM to obtain the first enhanced feature. The first enhanced feature is fed into the fifth convolutional module to obtain feature B5; feature B5 is fed into the second multilayer perceptron feature focusing module (MPFFM) to obtain the second enhanced feature. The second enhanced feature is input into the Spatial Pyramid Pooling Module (SPPF) to finally obtain the output features of the backbone network.

6. The method according to claim 5, characterized in that, In the neck network, the multi-scale features extracted from the backbone network are fed into the half-path aggregation network HPAN for feature fusion, specifically performing the following operations: The output features of the SPPF module are input to the first upsampling module Upsample to obtain the first upsampled features; the first upsampled features and the output features of the first multilayer perceptual feature focusing module MPFFM in the backbone network are input to the first concatenation module Concat for concatenation; the output of the first concatenation module is sent to the third C2f module to obtain feature P4_1; subsequently, feature P4_1 is sent to the second upsampling module to obtain the second upsampled features; the second upsampled features and the output features of the second C2f module in the backbone network are input to the second concatenation module for concatenation; The output of the second splicing module is fed into the fourth C2f module to obtain the first-scale output feature P3 of the neck network. At the same time, feature P3 is fed into the first frequency dynamic convolution module FDConv for downsampling to obtain dynamic downsampling features. This dynamic downsampling feature and feature P4_1 are fed into the third splicing module for splicing. The output of the third splicing module is fed into the fifth C2f module to obtain the second-scale output feature P4 of the neck network.

7. The method according to claim 6, characterized in that, In the Head section of the network, the first-scale output features P3 and the second-scale output features P4 from the neck network, as well as the output features from the SPPF module of the backbone network, are fed into the first, second, and third shape-guided insulator detection heads, respectively. The three detection heads have the same structure and are collectively referred to as SIDH. They predict the features they receive and output the category and location bounding boxes of the insulator and its defects.

8. The method according to claim 5, characterized in that, The Multilayer Perceptual Feature Focusing Module (MPFFM) is specifically as follows: The input feature F of the Multi-Level Perception (MPFFM) module is divided into three branches: the first feature is directly fed into the Multi-Level Perception module. The second feature is fed into the reshape module; the third feature is fed directly into the summation module at the end of the network as a residual connection. In the Multi-Level Perception module, the first feature F is input to the first to fourth depthwise separable convolutional modules DWConv with kernel sizes of 1×1, 3×3, 5×5, and 7×7, respectively, to obtain feature maps with four different receptive fields. These four feature maps undergo operations such as concatenation and multiplication through an adaptive weighting mechanism, and are then weighted and fused to finally obtain the enhanced feature map of the multi-level perception module. In the Feature Focusing module, the second feature F is processed by the reshape module along the channel dimension to obtain the grouped feature G; The grouping feature G is further split and processed internally: On one hand, the grouped features G are subjected to global average pooling in the horizontal direction X Avg and the vertical direction Y Avg respectively. After concatenation, the pooled features are fed into the pointwise convolution module PConv and the sigmoid activation function in sequence to obtain spatial attention weights. These weights are multiplied with the original grouped features G in the re-weighting module Re-weighting to output the first sub-feature. On the other hand, the grouped features G are input to the sixth 3×3 convolution module to extract local context information and obtain the second sub-feature. Subsequently, the first sub-feature and the second sub-feature are fed into the interaction module containing the global average pooling module GAP and the multilayer perceptron module MLP to interactively extract cross-branch attention weights. Next, perform cross-branch multiplication and weighting operations respectively: The first sub-feature and its corresponding interaction attention weight are fed into the multiplication module for element-wise multiplication to obtain the first weighted feature; the second sub-feature and its corresponding interaction attention weight are fed into the multiplication module for element-wise multiplication to obtain the second weighted feature. Finally, the first weighted feature output by the upper multiplication module and the second weighted feature output by the lower multiplication module are fed into the addition module for feature addition, and then passed through the sigmoid activation function and the reshape operation to output the feature focusing map. The feature-focused map and the multilayer sensing enhanced feature map are multiplied together, and the multiplied feature is fed into the addition module along with the input feature F of the multilayer sensing feature-focused module MPFFM to finally obtain the output feature of the multilayer sensing feature-focused module MPFFM.

9. The method according to claim 5, characterized in that, The half-path aggregation network HPAN is specifically as follows: First, top-down feature upsampling and fusion are performed: Feature P5 output from the backbone network is input to the first upsampling module Upsample for processing to obtain the first upsampled feature; the first upsampled feature and Feature P4 output from the backbone network are fed into the first concatenation module Concat for channel-level concatenation; the output feature of the first concatenation module is then fed into the first feature extraction module to obtain the first-stage fused feature P4; next, the first-stage fused feature P4 is input to the second upsampling module for processing to obtain the second upsampled feature; the second upsampled feature and Feature P3 output from the backbone network are fed into the second concatenation module for concatenation; the output feature of the second concatenation module is fed into the second feature extraction module to finally obtain the feature P3 output from the neck network; Subsequently, bottom-up feature downsampling and aggregation are performed: the feature P3 output by the neck network is input to the frequency dynamic convolution module FDConv for downsampling to obtain dynamic downsampling features; this dynamic downsampling feature and the aforementioned first-stage fusion feature P4 are sent to the third splicing module for splicing; the output features of the third splicing module are sent to the third feature extraction module to finally obtain the feature P4 output by the neck network.

10. The method according to claim 7, characterized in that, The input features of the detection head, i.e., the features P3 or P4 output by the neck network, are first divided into two paths and sent to the classification branch and the localization branch, respectively: 1) For classification branches: The input features are fed into the first 3×3 standard convolutional module for classification to obtain the first classification feature; the first classification feature is fed into the second 3×3 standard convolutional module for classification to obtain the second classification feature; the second classification feature is then fed into the first 1×1 standard convolutional module for classification to perform channel dimensionality reduction and integration, and finally outputs the classification prediction result Class of insulators and their defects. 2) Locating the branch: The input features are fed into the first 3×3 standard convolutional module for localization to obtain the initial localization features; Subsequently, the initial localization feature is divided into two paths. One path is directly fed into the subsequent element-wise multiplication module as a residual connection, while the other path is fed into the Sequence Orthogonal Strip Module (SOSM) to extract attention weights. Inside the Sequence Orthogonal Striping (SOSM) module, the following strict serialization operation is performed: The initial features are sequentially fed into the first 5×5 depth convolution module, the first 1×19 horizontal strip depth convolution module, and the first 19×1 vertical strip depth convolution module for feature extraction. Finally, they are fed into the first 1×1 standard convolution module for positioning, and finally an attention weight feature map with spatial shape perception capability is generated. Subsequently, the attention weight feature map output by the Sequence Orthogonal Strip Module (SOSM) is fed together with the initial localization features used as residual connections into the element-wise multiplication module for element-wise multiplication to obtain shape-weighted features. Finally, the shape-weighted features are fed into the second 1×1 standard convolution module for localization, and the bounding box localization prediction result of the defect target is finally output.