Insulator defect detection positioning method and system based on cross-scale feature fusion

Through the detection method of cross-scale feature fusion, combined with multi-scale detection and dynamic threshold determination, and using Canny edge detection and pyramid fusion strategy, the accuracy and real-time positioning problems of insulator defect detection in complex environments are solved, the detection accuracy and positioning accuracy are improved, and the stability of the power system is guaranteed.

CN120471997BActive Publication Date: 2025-10-10NORTH CHINA ELECTRIC POWER UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510546592.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-10-10
Estimated Expiration
2045-04-28

AI Technical Summary

Technical Problem

Existing insulator defect detection technology has low detection accuracy in complex environments, is difficult to adapt to diverse defect forms, and lacks real-time positioning accuracy, affecting the stability and timeliness of the power system.

Method used

A detection method based on cross-scale feature fusion is adopted, combined with multi-scale detection and dynamic threshold determination. The Canny edge detection algorithm is used to extract edge features. Feature fusion is performed through the pyramid fusion strategy and the BiFPN_CBAM model. Combined with real-time detection and positioning compensation feedback mechanism, high-precision and real-time positioning is achieved.

Benefits of technology

It improves the accuracy of insulator defect detection and real-time positioning accuracy, enhances the detection capability in complex environments, and ensures the stable operation of the power system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120471997B_ABST
    Figure CN120471997B_ABST
Patent Text Reader

Abstract

The application discloses an insulator defect detection positioning method and system based on cross-scale feature fusion, belongs to the field of intelligent inspection of distribution network lines, and comprises the following steps: S1, acquiring image data containing various insulator defects of the distribution network lines in real time and performing pretreatment; S2, image enhancement; S3, adopting a pyramid fusion strategy, fusing the enhanced results under multiple scales obtained through the step S2 to obtain a fusion image; S4, inputting the fusion image into a pre-trained defect detection model based on cross-scale feature fusion to output defect features; and S5, based on the detection time and real-time speed of the defect features, and considering a delay time, predicting a defect feature position coordinate. The insulator defect detection positioning method and system based on cross-scale feature fusion have the advantages that high-precision, strong robustness and adaptive processing of insulator defect detection are realized, and the intelligent detection and maintenance of insulator defects of the distribution network lines are of great significance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent inspection of distribution network lines, and in particular to a method and system for detecting and locating insulator defects based on cross-scale feature fusion. Background Art

[0002] As a key component of the power supply architecture, the inspection and maintenance of distribution network line insulators are crucial for ensuring a secure and stable power supply. Traditional manual inspection methods are inefficient, subject to significant errors and high risk. Comprehensive inspection data collection is difficult in complex terrain and harsh environments, making them inadequate for the large-scale and diverse inspection needs of modern distribution networks. Consequently, intelligent inspection technology based on image recognition and edge computing has emerged and is becoming mainstream. This technology automatically identifies defects in distribution network line insulators by building target detection models, effectively improving inspection efficiency and accuracy.

[0003] With the application of intelligent inspection technology, new problems have also emerged. On the one hand, existing insulator defect detection technology has extremely high requirements for the quality and diversity of input data. In the complex distribution network environment found in most urban and rural residential areas, interference such as changes in ambient lighting, haze, rain and snow often cause overexposure or underexposure of key defect areas, significantly reducing the quality of collected data and seriously affecting detection accuracy. On the other hand, defects in distribution network line insulators come in various forms, and defects of different scales place significant differences in the requirements for detection technology. Small-scale defects such as fine electrical corrosion pits require high-resolution features to accurately capture details; medium-scale defects such as contamination coverage rely on macroscopic semantic features for rapid location and identification; and large-scale defects such as stress damage on the insulator surface require the integration of feature information within a certain range to accurately determine their form and scope, which undoubtedly increases the complexity and difficulty of detection.

[0004] Furthermore, after detecting a damaged insulator, its location needs to be accurately and real-timely fed back to the inspection platform to facilitate timely replacement. However, in dynamic environments, real-time detection is susceptible to interference from positioning drift, making it difficult to ensure the stability of defect feedback, significantly impacting the timeliness and effectiveness of power operations and maintenance. Summary of the Invention

[0005] The purpose of the present invention is to provide an insulator defect detection and positioning method and system based on cross-scale feature fusion to solve the above technical problems.

[0006] To achieve the above objectives, the present invention provides an insulator defect detection and positioning method based on cross-scale feature fusion, comprising the following steps:

[0007] S1. Real-time acquisition of image data containing various distribution network line insulator defects and pre-processing;

[0008] S2. Combining multi-scale detection and dynamic threshold determination methods, the Canny edge detection algorithm is used to extract edge features of insulators from the preprocessed image data, and image processing parameters are dynamically adjusted based on the edge features to achieve image enhancement;

[0009] S3, using a pyramid fusion strategy to fuse the multi-scale enhancement results obtained in step S2 to obtain a fused image;

[0010] S4. Input the fused image into the pre-trained cross-scale feature fusion defect detection model and output the defect features;

[0011] S5. Based on the detection time and real-time speed of the defect feature and taking the delay time into consideration, the defect feature position coordinates are predicted.

[0012] Preferably, in step S1, Gaussian filtering is used to smooth the image data:

[0013] I filtered =I×G 2D (1);

[0014] Where, I filtered represents the image after Gaussian filtering; I represents the original image; G 2D represents a two-dimensional Gaussian kernel;

[0015] in,

[0016]

[0017] Where G 2D (x,y) represents the value of the two-dimensional Gaussian kernel at the coordinate (x,y); σ Gk represents the standard deviation of the two-dimensional Gaussian kernel.

[0018] Preferably, step S2 specifically includes the following steps:

[0019] S21. Combining multi-scale detection and dynamic threshold determination methods, the Canny edge detection algorithm is used to extract edge features of insulators from the pre-processed image data:

[0020] S211. Calculate the edge gradient magnitude and direction: Use the Sobel operator to calculate the difference of the image grayscale value in the horizontal and vertical directions to obtain the edge gradient magnitude G(x,y) and direction θ(x,y):

[0021]

[0022] Where G x , G y Represent the gradient of the image in the horizontal and vertical directions respectively;

[0023] S212, determine the threshold: use the dynamic threshold adjustment strategy based on Otsu algorithm and local gradient histogram statistics to determine the high threshold T high and low threshold T low :

[0024]

[0025] Where μ G represents the gradient mean; k represents the empirical coefficient; δ G represents the standard deviation of the gradient;

[0026] S213, extracting edge features of the insulator using a Canny edge detection algorithm;

[0027] S22, morphological closing operation processing: using morphological closing operation to fill the detected fracture edges, generating a local feature mask, and treating the area marked by the local feature mask as a key area;

[0028] S23, decompose the image into multiple scales, construct an image pyramid, and adjust the image processing parameters at each scale to obtain enhanced images I at multiple scales enhanced , and the image processing parameters include brightness, contrast and saturation;

[0029] Among them, the brightness is processed by piecewise linear transformation: the gradient amplitude is set to be greater than the high threshold T high The area is divided into strong edge areas, and the gradient amplitude is less than the low threshold T low The area is divided into weak detail areas, and the grayscale distribution of pixels in the local feature mask is dynamically adjusted as follows:

[0030]

[0031] Where I′(x,y) and I(x,y) represent the dynamically adjusted image pixel value and the original image pixel value respectively; β represents the brightness gain coefficient; Δ represents the offset;

[0032] Adaptive stretching adjustment of contrast based on grayscale variance in edge areas:

[0033] C enhance =α·(I(x,y)-μ R )+μ R (7);

[0034] Where C enhance Represents the adjusted contrast value; α represents the contrast enhancement coefficient, and α=σ original / σ target , σ original represents the standard deviation of the critical area, σtarget Indicates the preset target standard deviation; μ R Represents the grayscale mean of the key area;

[0035] Perform nonlinear mapping on the edge area in the HSV color space to adjust the saturation of the edge area:

[0036]

[0037] Where S′(x,y) and S(x,y) represent the saturation value of the image at (x,y) after nonlinear mapping adjustment and the saturation value of the original image at (x,y), respectively; γ represents the saturation gain factor; G max Indicates the maximum gradient magnitude.

[0038] Preferably, step S3 specifically includes the following steps:

[0039] S31, set the number of layers of the image pyramid to L, and calculate the corresponding l-th layer weight ω according to the edge density of each layer l :

[0040]

[0041] Where, ω l represents the fusion weight of the lth layer; λ represents the edge density influence factor, which is 2.2 and is used to control the amplification strength of the edge density on the weight; Represents the exponential weighted summation of the L layer, which is used to achieve weight normalization; E l represents the edge density of layer l;

[0042] And the edge density E of the lth layer l The calculation formula is:

[0043]

[0044] Where N edge Indicates the number of edge pixels in the edge area of ​​layer l; N total Indicates the total number of pixels in the image:

[0045] S32, perform weighted summation on the enhanced images of each layer according to the weights to obtain the final fused image I final :

[0046]

[0047] Where, Represents the enhanced image of the lth layer;

[0048] S33, the enhanced fusion image I finalPerform detail processing to enhance the image detail performance, where detail processing includes the fusion image I final Perform sharpening and grain adjustment.

[0049] Preferably, the defect detection model described in step S4 is a model architecture that introduces a bidirectional feature pyramid module, a convolutional block attention module, and an adaptive spatial feature fusion module on the basis of the YOLO11 architecture.

[0050] Preferably, the feature connection pyramid structure of the YOLO11 architecture is replaced with a bidirectional feature pyramid module embedded with a convolutional block attention module to obtain a BiFPN_CBAM structure, and a weighted feature fusion method is introduced into the BiFPN_CBAM structure:

[0051]

[0052] Where O represents the output feature; ω i and ω j Both represent weights; I i represents input features; ε represents a constant;

[0053] The convolution block attention module includes a channel attention module and a spatial attention module. The channel attention module is used to process the channel dimension of the input feature map F:

[0054]

[0055] Where M c (F) represents the channel attention weight map; σ represents the activation function sigmoid; W0 and W1 represent the two convolution operations in the neural network of the channel attention module respectively; and They represent the feature maps generated by global average pooling and global maximum pooling in the channel attention module respectively; MLP(·) represents the convolution operation; F' represents the feature map obtained by the weighting of the channel attention module;

[0056] The spatial attention module is used to process the spatial dimensions of the input feature map:

[0057]

[0058] Where M s (F') represents the spatial attention weight map; F 7×7 Indicates a convolution operation with a convolution kernel size of 7×7; and They represent the feature maps generated by global average pooling and global maximum pooling in the spatial attention module respectively; represents the feature map concatenated in the channel dimension; F" represents the final feature map;

[0059] The adaptive spatial feature fusion module is introduced into the detection head of the YOLO11 architecture. It is used to match the spatial dimension and calculate the spatial importance weight of the feature map at each scale to perform adaptive fusion of different features:

[0060]

[0061] Where, and Both represent the spatial importance weights obtained through network learning and satisfy Represents the value of the feature vector at position (i, j) of the first level, second level and third level respectively; For fusion features.

[0062] Preferably, step S5 specifically includes the following steps:

[0063] S51. Set the starting position of the inspection to (x0, y0), and calculate the travel distance based on the starting position (x0, y0) and the real-time speed v(τ):

[0064]

[0065] Where, (x(t), y(t)) represents the position coordinates of the defect feature; θ(τ) represents the heading angle at time τ;

[0066] S52, calculate total delay time T total :

[0067] T total =T collect +T preprocess +T process +T tramsmit +T response (19);

[0068] Where, T collect Indicates the data collection delay time; T preprocess Indicates the preprocessing delay time; T process Denotes the defect detection delay time; T tramsmit Indicates the communication delay time; T response Indicates the mechanical response delay time;

[0069] S53, predict the defect feature position coordinates (x corrected ,y corrected ):

[0070]

[0071] Where θ(t) represents the heading angle at time t.

[0072] A system for performing an insulator defect detection and positioning method based on cross-scale feature fusion includes an inspection robot for inspecting along a distribution network line and a camera, an odometer, and an inertial navigation sensor mounted on the inspection robot. The camera, odometer, and inertial navigation sensor all communicate with a remote terminal, which is equipped with a data preprocessing module, an image enhancement module, a multi-scale fusion module, a defect detection model, and a positioning module.

[0073] The camera is used to collect images of insulators, the odometer is used to collect the real-time speed of the inspection robot, and the inertial navigation sensor is used to collect the heading angle of the inspection robot.

[0074] The data preprocessing module is used to smooth the collected insulator image; the image enhancement module is used to combine multi-scale detection and dynamic threshold determination methods, use the Canny edge detection algorithm to extract the edge features of the insulator in the preprocessed image data, and dynamically adjust the image processing parameters based on the edge features to achieve image enhancement; the multi-scale fusion module is used to adopt a pyramid fusion strategy to fuse the enhancement results at multiple scales obtained in step S2 to obtain a fused image; the defect detection model is used to output defect features after inputting the fused image; the positioning module is used to predict the position coordinates of the defect features based on the detection time and real-time speed of the defect features, and taking into account the delay time.

[0075] Therefore, the present invention adopts the above-mentioned insulator defect detection and positioning method and system based on cross-scale feature fusion, which has the following beneficial effects:

[0076] 1. Utilizing an adaptive image parameter adjustment method driven by edge features, this method breaks through the limitations of traditional global enhancement methods and innovatively uses edge feature strength as a guide to achieve precise optimization of key areas of insulators. By accurately extracting and analyzing edge information, it can adaptively adjust enhancement parameters based on the edge features of different areas, effectively solving the problems of key area feature loss or noise amplification that may occur during the enhancement process of traditional methods. This improves contaminated data, provides high-quality image data for subsequent defect detection, and enhances image quality and defect detection accuracy.

[0077] 2. A distribution network line insulator defect detection model that utilizes cross-scale feature fusion. By introducing the Bi-directional Feature Pyramid Fusion Module (BiFPN_CBAM) with an integrated attention mechanism and a detection head, it can effectively extract cross-scale insulator defect features, suppress background interference, accurately capture key defect features, significantly improve detection accuracy, and adapt to complex scenarios and defect detection needs at different scales.

[0078] 3. Utilizing the real-time detection and positioning compensation feedback mechanism, by recording the dynamic driving path and delay time compensation of the inspection robot, combined with the inspection robot's operating position, speed and other information, the coordinates of the damaged insulator position are accurately calculated and fed back in real time, effectively improving the inspection efficiency and providing a strong guarantee for the stable operation of the power system.

[0079] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] Figure 1 This is a flow chart of the insulator defect detection and positioning method based on cross-scale feature fusion according to the present invention;

[0081] Figure 2 This is a schematic structural diagram of a system for executing an insulator defect detection and positioning method based on cross-scale feature fusion according to the present invention.

[0082] 1. Insulator; 2. Inspection robot; 3. Camera; 4. Distribution network line; 5. Odometer; 6. Inertial navigation sensor; 7. Remote terminal. DETAILED DESCRIPTION

[0083] In order to make the purposes, technical solutions and advantages disclosed in the embodiments of the present invention clearer, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the embodiments of the present invention and are not intended to limit the embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. Examples of the embodiments are shown in the accompanying drawings, where the same or similar numbers throughout represent the same or similar elements or elements with the same or similar functions.

[0084] It should be noted that the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products or devices.

[0085] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0086] like Figure 1 As shown, a method for detecting and locating insulator defects based on cross-scale feature fusion includes the following steps:

[0087] S1. Real-time acquisition of image data containing various distribution network line insulator defects and pre-processing;

[0088] In step S1, Gaussian filtering is used to smooth the image data:

[0089] I filtered =I×G 2D (1);

[0090] Where, I filtered represents the image after Gaussian filtering; I represents the original image; G 2D represents a two-dimensional Gaussian kernel;

[0091] in,

[0092]

[0093] Where G 2D (x,y) represents the value of the two-dimensional Gaussian kernel at the coordinate (x,y); σ Gk represents the standard deviation of the two-dimensional Gaussian kernel, and σ Gk =1.5.

[0094] S2. Combining multi-scale detection and dynamic threshold determination methods, the Canny edge detection algorithm is used to extract edge features of insulators from the preprocessed image data, and image processing parameters are dynamically adjusted based on the edge features to achieve image enhancement;

[0095] Step S2 specifically includes the following steps:

[0096] S21. In the field of image processing, edge information contains the main object structure and key morphological features. For insulators, a key power component with a specific geometric shape, accurately extracting its edge features is the basis for achieving precise image analysis. Therefore, combining multi-scale detection and dynamic threshold determination methods, the Canny edge detection algorithm is used to extract the edge features of insulators from preprocessed image data:

[0097] S211. Calculate the edge gradient magnitude and direction: Use the Sobel operator to calculate the difference of the image grayscale value in the horizontal and vertical directions to obtain the edge gradient magnitude G(x,y) and direction θ(x,y):

[0098]

[0099] Where G x , G y Represents the gradient of the image in the horizontal and vertical directions respectively; the Sobel operator can accurately capture the gradient information of the image grayscale change by calculating the difference of the image grayscale value in the horizontal and vertical directions, thereby comprehensively describing the edge feature information of each pixel in the image, providing a key basis for the subsequent image enhancement strategy formulation.

[0100] S212, determine the threshold: use the dynamic threshold adjustment strategy based on the Otsu algorithm and local gradient histogram statistics to determine the high threshold T high and low threshold T low :

[0101]

[0102] Where μ G represents the gradient mean; k represents the empirical coefficient; δ G represents the standard deviation of the gradient; the dynamic threshold determination method can adaptively adjust the threshold size according to the actual edge feature distribution of the image, effectively avoiding the inaccurate edge detection problem that may occur in the fixed threshold method in different image scenes, and improving the robustness and accuracy of edge detection.

[0103] S213, extracting edge features of the insulator using a Canny edge detection algorithm;

[0104] S22, morphological closing operation processing: using morphological closing operation to fill the detected fracture edges, generating a local feature mask, and treating the area marked by the local feature mask as a key area;

[0105] S23, decompose the image into multiple scales, construct an image pyramid, and adjust the image processing parameters at each scale to obtain enhanced images I at multiple scales enhanced , and the image processing parameters include brightness, contrast and saturation;

[0106] Among them, piecewise linear transformation is used for brightness processing (by performing piecewise linear transformation on overexposed or underexposed areas, the brightness characteristics of local areas of the image are quantitatively compensated, providing a key quantitative indicator for adaptive image brightness enhancement): setting the gradient amplitude to be greater than the high threshold T high The area is divided into strong edge areas, and the gradient amplitude is less than the low threshold T low The area is divided into weak detail areas, and the grayscale distribution of pixels in the local feature mask is dynamically adjusted as follows:

[0107]

[0108] Where I′(x,y) and I(x,y) represent the dynamically adjusted image pixel values ​​and the original image pixel values, respectively; β represents the brightness gain coefficient, and β∈[0.5,1.5]; Δ represents the offset, which is determined by the peak-to-valley difference of the local grayscale histogram. The piecewise linear transformation brightness compensation method can adjust the image brightness in a targeted manner according to the edge intensity, effectively solving the overexposure and underexposure problems, while avoiding the problem of detail loss or noise amplification that may be caused by blindly adjusting the overall image brightness.

[0109] Adaptive stretching and contrast adjustment based on grayscale variance in edge regions provides key quantitative indicators for adaptive image contrast adjustment:

[0110] C enhance =α·(I(x,y)-μ R )+μ R (7);

[0111] Where C enhance Represents the adjusted contrast value; α represents the contrast enhancement coefficient, and α=σ original / σ target , σ original Indicates the standard deviation of key areas (such as insulator sheds, core rods, etc.), σ target Indicates the preset target standard deviation; μ R Represents the grayscale mean of the key area; this method can dynamically adjust the contrast according to the actual grayscale distribution of the key area, making the defect characteristics of the insulator more distinct from the normal area in contrast, which is conducive to the accurate judgment of the subsequent defect recognition algorithm.

[0112] Perform nonlinear mapping on the edge area in the HSV color space to adjust the saturation of the edge area:

[0113]

[0114] Where S′(x,y) and S(x,y) represent the saturation value of the image at (x,y) after nonlinear mapping adjustment and the saturation value of the original image at (x,y), respectively, which reflects the purity of the image color; γ represents the saturation gain factor, and γ = 1.2; G max Represents the maximum gradient amplitude. This saturation correction method can highlight the color characteristics of key areas of the insulator, making the color changes in defective areas more obvious, helping to improve the accuracy of defect identification while avoiding the color distortion that may be caused by uniformly adjusting the saturation of the entire image.

[0115] S3, using a pyramid fusion strategy to fuse the multi-scale enhancement results obtained in step S2 to obtain a fused image (which can retain global consistency while highlighting local details);

[0116] Step S3 specifically includes the following steps:

[0117] S31, set the number of layers of the image pyramid to L, and calculate the corresponding l-th layer weight ω according to the edge density of each layer l :

[0118]

[0119] wherein ω l denotes the fusion weight of the lth layer; λ denotes an edge density influence factor, and is taken as 2.2, for controlling the amplification strength of the edge density on the weight; denotes an exponentially weighted summation of L layers, for realizing weight normalization; E l denotes the edge density of the lth layer;

[0120] and the edge density E l The calculation formula is:

[0121]

[0122] wherein N edge denotes the number of edge pixels in the edge region of the lth layer; N total denotes the total number of pixels in the image:

[0123] S32, weighting and summing the enhanced images of each layer according to the weight to obtain a final fusion image I final :

[0124]

[0125] wherein, denotes the enhanced image of the lth layer;

[0126] S33, performing detail processing on the enhanced fusion image I final to enhance the image detail performance, wherein the detail processing includes sharpening and granularity adjustment processing on the fusion image I final . The image data adjusted by the method is transmitted to the defect detection model, so as to improve the accuracy of the detection model and avoid the false detection and missed detection problems caused by image quality problems.

[0127] S4, inputting the fusion image into a pre-trained cross-scale feature fusion defect detection model to output a defect feature;

[0128] The defect detection model described in step S4 is a model architecture in which a bidirectional feature pyramid module, a convolution block attention module and an adaptive spatial feature fusion module are introduced on the basis of a YOLO11 architecture.

[0129] The feature connection pyramid structure of the YOLO11 architecture is replaced with a bidirectional feature pyramid module embedded with a convolutional block attention module to obtain the BiFPN_CBAM structure (this structure eliminates nodes that only receive a single input, thereby reducing unnecessary repeated information. At the same time, it enables the model to prioritize defect features on insulators in complex recognition environments, reduce complex background interference, enhance feature extraction and learning capabilities, and deepen the integration of features by repeatedly applying bidirectional fusion steps, promoting the flow of information in the network). A weighted feature fusion method is introduced in the BiFPN_CBAM structure:

[0130]

[0131] Where O represents the output feature; ω i and ω j Both represent weights; I i represents the input feature; ε represents a constant, and ε=0.0001;

[0132] The convolution block attention module includes a channel attention module and a spatial attention module. The channel attention module is used to process the channel dimension of the input feature map F:

[0133]

[0134] Where M c (F) represents the channel attention weight map; σ represents the activation function sigmoid; W0 and W1 represent the two convolution operations in the neural network of the channel attention module respectively; and They represent the feature maps generated by global average pooling and global maximum pooling in the channel attention module respectively; MLP(·) represents the convolution operation; F' represents the feature map obtained by the weighting of the channel attention module;

[0135] From formula (11) and formula (12), we can see that for the input feature map F, we first perform global average pooling and global maximum pooling operations to obtain two feature maps: and The two feature maps are then input into a shared two-layer neural network (MLP), which is responsible for learning the weights of each channel. The two features output by the MLP are then added element by element to obtain a new feature map, which is then processed by the sigmoid activation function to generate the channel attention weight map M. c (F), and finally the output channel attention weight map is multiplied element-wise with the original feature map F to generate the weighted feature map F'.

[0136] The spatial attention module is used to process the spatial dimensions of the input feature map:

[0137]

[0138] In the formula, M s (F') represents a spatial attention weight map; F 7×7 represents a convolution operation with a convolution kernel size of 7x7; and respectively represent feature maps generated by global average pooling and global maximum pooling in the spatial attention module; represents a feature map spliced in the channel dimension; F" represents the final feature map;

[0139] As can be seen from formulas (13) and (14), for the feature map F' processed by the channel attention module, first, global average pooling and global maximum pooling operations in the channel direction are performed to obtain two feature maps and Then, the two feature maps are spliced in the channel dimension to form a spliced feature map. Then, a 7x7 convolution operation is performed to reduce the dimension of the feature map. Then, a sigmoid activation function is processed to generate a spatial attention weight map M s (F'). Finally, the weight map is multiplied element by element with the input feature map F' of the spatial attention module to generate the final feature map F".

[0140] The adaptive spatial feature fusion module is introduced into the detection head of YOLO11 architecture to solve the problem of inconsistent scales when recognizing defect features caused by different defect forms, enhance the ability of the model to extract features at different scales, and improve the detection ability of the model for multi-scale targets. It is used for matching in the spatial dimension, and the spatial importance weight of each scale of the feature map is calculated to adaptively fuse different features:

[0141]

[0142] In the formula, and both represent spatial importance weights learned by the network, and satisfy respectively represent the values of the feature vectors of the first level, the second level and the third level at position (i, j); The adaptive spatial feature fusion module adjusts the other scale feature layers based on the target scale of insulator defect detection, fusing low-level feature maps into high-level feature maps to achieve spatial matching. It then adaptively fuses different features. This adaptive fusion approach enables the model to automatically adjust the weight distribution of features at different scales based on their contribution to insulator defect detection. This adaptive adjustment of weights based on defect scale not only improves the model's detection accuracy for insulator defects of different scales, but also enhances the model's robustness, reducing false detections and missed detections due to scale variations.

[0143] During the training process of the defect detection model of this embodiment, the collected historical insulator defect image data is preprocessed (the collected images are size-normalized, and images of different resolutions are uniformly adjusted to a standard size of 640*640 suitable for model input. The images are then grayscaled to convert the color information of the images into grayscale information, simplifying the data volume while highlighting the texture and structural features of the images. The images are then filtered and denoised to remove noise interference introduced by factors such as the shooting equipment and the environment, so as to improve the clarity and quality of the images, making the key features of the distribution network line fault more prominent, which is conducive to the accurate identification and analysis of the subsequent model). The data is then input into the defect detection model. By setting hyperparameters such as the learning rate, training rounds, and training scale, the model weights are gradually optimized, so that the loss value of the model on the training data set is continuously reduced, while the accuracy on the verification data set is continuously improved, until the model reaches a convergence state, thereby obtaining a distribution network line insulator defect detection model with high detection accuracy.

[0144] S5. Based on the detection time and real-time speed of the defect feature and taking the delay time into consideration, the defect feature position coordinates are predicted.

[0145] Step S5 specifically includes the following steps:

[0146] S51. Set the starting position of the inspection to (x0, y0), and calculate the travel distance based on the starting position (x0, y0) and the real-time speed v(τ):

[0147]

[0148] Where, (x(t), y(t)) represents the position coordinates of the defect feature; θ(τ) represents the heading angle at time τ;

[0149] S52, calculate total delay time T total :

[0150] T total =T collect +T preprocess +Tprocess +T tramsmit +T response (19);

[0151] Where, T collect Indicates the data collection delay time; T preprocess Indicates the preprocessing delay time; T process Denotes the defect detection delay time; T tramsmit Indicates the communication delay time; T response Indicates the mechanical response delay time;

[0152] S53, predict the defect feature position coordinates (x corrected ,y corrected ):

[0153]

[0154] Where θ(t) represents the heading angle at time t.

[0155] By taking the delay time into account, real-time coordinate feedback of damaged insulators is achieved, which significantly improves the intelligence level of insulator inspection of distribution network lines, helps to repair damaged insulators in a timely manner, and effectively ensures the safe and stable operation of distribution network lines.

[0156] like Figure 2 As shown, a system for performing an insulator defect detection and positioning method based on cross-scale feature fusion includes an inspection robot 2 that inspects along a distribution network line 4, and a camera 3, an odometer 5, and an inertial navigation sensor 6 mounted on the inspection robot 2. The camera 3, the odometer 5, and the inertial navigation sensor 6 all communicate with a remote terminal 7. The remote terminal 7 is equipped with a data preprocessing module, an image enhancement module, a multi-scale fusion module, a defect detection model, and a positioning module.

[0157] Among them, the camera 3 is used to collect images of the insulator 1, the odometer 5 is used to collect the real-time speed of the inspection robot 2, and the inertial navigation sensor 6 is used to collect the heading angle of the inspection robot 2;

[0158] The data preprocessing module is used to smooth the collected image of the insulator 1; the image enhancement module is used to combine multi-scale detection and dynamic threshold determination methods, use the Canny edge detection algorithm to extract the edge features of the insulator 1 in the preprocessed image data, and dynamically adjust the image processing parameters based on the edge features to achieve image enhancement; the multi-scale fusion module is used to adopt a pyramid fusion strategy to fuse the enhancement results at multiple scales obtained in step S2 to obtain a fused image; the defect detection model is used to output defect features after inputting the fused image; the positioning module is used to predict the position coordinates of the defect feature based on the detection time and real-time speed when the defect feature is detected, and taking into account the delay time. In this embodiment, when a defect is detected, the positioning module is triggered, otherwise the positioning module is in a dormant state.

[0159] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit the same. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solutions of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for detecting and locating insulator defects based on cross-scale feature fusion, characterized by: The following steps are involved: S1. Real-time acquisition of image data containing various distribution network line insulator defects and pre-processing; S2. Combining multi-scale detection and dynamic threshold determination methods, the Canny edge detection algorithm is used to extract edge features of insulators from the preprocessed image data, and image processing parameters are dynamically adjusted based on the edge features to achieve image enhancement; Step S2 specifically includes the following steps: S21. Combining multi-scale detection and dynamic threshold determination methods, using the Canny edge detection algorithm to extract edge features of the insulator in the preprocessed image data; S22, morphological closing operation processing: using morphological closing operation to fill the detected fracture edges, generating a local feature mask, and treating the area marked by the local feature mask as a key area; S23, decompose the image into multiple scales, construct an image pyramid, and adjust the image processing parameters at each scale to obtain enhanced images at multiple scales , and the image processing parameters include brightness, contrast and saturation; S3, using a pyramid fusion strategy to fuse the multi-scale enhancement results obtained in step S2 to obtain a fused image; Step S3 specifically includes the following steps: S31. Set the number of layers of the image pyramid to , calculate the corresponding first Layer weights ; S32, perform weighted summation on each layer of enhanced images according to the weights to obtain the final fused image ; S33, the enhanced fusion image Perform detail processing to enhance the image detail performance, including the fusion image Perform sharpening and grain adjustment processing; S4. Input the fused image into the pre-trained cross-scale feature fusion defect detection model and output the defect features; The feature connection pyramid structure of the YOLO11 architecture is replaced by a bidirectional feature pyramid module embedded with a convolutional block attention module to obtain the BiFPN_CBAM structure, and a weighted feature fusion method is introduced into the BiFPN_CBAM structure; The convolution block attention module includes a channel attention module and a spatial attention module, wherein the channel attention module is used to The spatial attention module is used to process the spatial dimension of the input feature map; An adaptive spatial feature fusion module is introduced into the detection head of the YOLO11 architecture. It is used to match the spatial dimensions and calculate the spatial importance weights of the feature maps at each scale to perform adaptive fusion of different features. S5. Based on the detection time and real-time speed of the defect feature and taking into account the delay time, predict the defect feature location coordinates; Step S5 specifically includes the following steps: S51, set the starting position of the inspection to , and based on the starting position and real-time speed Points are used to calculate driving distance; S52, calculate total delay time ; S53, predicting the defect feature position coordinates based on the total delay time .

2. The insulator defect detection and positioning method based on cross-scale feature fusion according to claim 1 is characterized in that: In step S1, Gaussian filtering is used to smooth the image data: (1); Where, Represents the image after Gaussian filtering; represents the original image; represents a two-dimensional Gaussian kernel; in, (2); Where, Represents a two-dimensional Gaussian kernel in coordinates The value of represents the standard deviation of the two-dimensional Gaussian kernel.

3. The insulator defect detection and positioning method based on cross-scale feature fusion according to claim 2 is characterized in that: Step S2 specifically includes the following steps: S21. Combining multi-scale detection and dynamic threshold determination methods, the Canny edge detection algorithm is used to extract edge features of insulators from the pre-processed image data: S211, calculate edge gradient amplitude and direction: use Sobel operator to calculate the difference of image gray value in horizontal and vertical directions to obtain edge gradient amplitude and direction : (3); (4); Where, 、 Represent the gradient of the image in the horizontal and vertical directions respectively; S212, determine the threshold: use the dynamic threshold adjustment strategy based on the Otsu algorithm and local gradient histogram statistics to determine the high threshold and low threshold : (5); Where, represents the mean gradient; represents the empirical coefficient; represents the standard deviation of the gradient; S213, extracting edge features of the insulator using a Canny edge detection algorithm; S22, morphological closing operation processing: using morphological closing operation to fill the detected fracture edges, generating a local feature mask, and treating the area marked by the local feature mask as a key area; S23, decompose the image into multiple scales, construct an image pyramid, and adjust the image processing parameters at each scale to obtain enhanced images at multiple scales , and the image processing parameters include brightness, contrast and saturation; Among them, piecewise linear transformation is used for brightness processing: the gradient amplitude is set to be greater than the high threshold The area is divided into strong edge areas, and the gradient amplitude is less than the low threshold The area is divided into weak detail areas, and the grayscale distribution of pixels in the local feature mask is dynamically adjusted as follows: (6); Where, and Represent the dynamically adjusted image pixel values ​​and the original image pixel values ​​respectively; represents the brightness gain coefficient; Indicates the offset; Adaptive stretching adjustment of contrast based on grayscale variance in edge areas: (7); Where, Indicates the adjusted contrast value; represents the contrast enhancement factor, and , represents the standard deviation of the critical area, Indicates the preset target standard deviation; Represents the grayscale mean of the key area; Perform nonlinear mapping on the edge area in the HSV color space to adjust the saturation of the edge area: (8); Where, and They represent the images after nonlinear mapping adjustment. The saturation value at and the original image at The saturation value at ; represents the saturation gain factor; Indicates the maximum gradient magnitude.

4. The insulator defect detection and positioning method based on cross-scale feature fusion according to claim 3 is characterized by: Step S3 specifically includes the following steps: S31. Set the number of layers of the image pyramid to , calculate the corresponding first Layer weights : (9); Where, Indicates the The fusion weight of the layer; Indicates the edge density influence factor, which is set to 2.2 to control the amplification strength of edge density on weight; Express Exponentially weighted summation of layers to achieve weight normalization; Indicates the the edge density of the layer; And the first Edge density of the layer The calculation formula is: (10); Where, Indicates the The number of edge pixels in the layer edge area; Indicates the total number of pixels in the image: S32, perform weighted summation on each layer of enhanced images according to the weights to obtain the final fused image : (11); Where, Indicates the The image after layer enhancement; S33, the enhanced fusion image Perform detail processing to enhance the image detail performance, including the fusion image Perform sharpening and grain adjustment.

5. The insulator defect detection and positioning method based on cross-scale feature fusion according to claim 4 is characterized in that: The feature connection pyramid structure of the YOLO11 architecture is replaced by a bidirectional feature pyramid module embedded with a convolutional block attention module to obtain the BiFPN_CBAM structure. The weighted feature fusion method is introduced into the BiFPN_CBAM structure: (12); Where, represents the output features; and All represent weights; Represents input features; represents a constant; The convolution block attention module includes a channel attention module and a spatial attention module, wherein the channel attention module is used to The channel dimension is processed: (13); (14); Where, represents the channel attention weight map; Represents the activation function sigmoid; and Represent the two convolution operations in the neural network of the channel attention module; and They represent the feature maps generated by global average pooling and global maximum pooling in the channel attention module respectively; Represents the convolution operation; Represents the feature map obtained by the weighted channel attention module; The spatial attention module is used to process the spatial dimensions of the input feature map: (15); (16); Where, represents the spatial attention weight map; Indicates a convolution operation with a convolution kernel size of 7×7; and They represent the feature maps generated by global average pooling and global maximum pooling in the spatial attention module respectively; Represents the feature map concatenated in the channel dimension; Represents the final feature map; The adaptive spatial feature fusion module is introduced into the detection head of the YOLO11 architecture. It is used to match the spatial dimension and calculate the spatial importance weight of the feature map at each scale to perform adaptive fusion of different features: (17); Where, 、 and Both represent the spatial importance weights obtained through network learning and satisfy , ; 、 、 Represents the feature vectors of the first, second and third levels at positions The value at For fusion features.

6. The insulator defect detection and positioning method based on cross-scale feature fusion according to claim 5 is characterized in that: Step S5 specifically includes the following steps: S51, set the starting position of the inspection to , and based on the starting position and real-time speed Calculate driving distance by points: (18); Where, Indicates the location coordinates of the defect feature; express The heading angle at the moment; S52, calculate total delay time : (19); Where, Indicates the data collection delay time; Indicates the preprocessing delay time; Indicates the defect detection delay time; Indicates the communication delay time; Indicates the mechanical response delay time; S53, predicting the defect feature position coordinates based on the total delay time : (20); Where, express The heading angle at the moment.

7. A system for executing the insulator defect detection and location method based on cross-scale feature fusion according to any one of claims 1 to 6, characterized in that: It includes an inspection robot that inspects along the distribution network lines, and a camera, odometer, and inertial navigation sensor mounted on the inspection robot. The camera, odometer, and inertial navigation sensor all communicate with a remote terminal, which is equipped with a data preprocessing module, an image enhancement module, a multi-scale fusion module, a defect detection model, and a positioning module. The camera is used to collect images of insulators, the odometer is used to collect the real-time speed of the inspection robot, and the inertial navigation sensor is used to collect the heading angle of the inspection robot. The data preprocessing module is used to smooth the collected insulator image; the image enhancement module is used to combine multi-scale detection and dynamic threshold determination methods, use the Canny edge detection algorithm to extract the edge features of the insulator in the preprocessed image data, and dynamically adjust the image processing parameters based on the edge features to achieve image enhancement; the multi-scale fusion module is used to adopt a pyramid fusion strategy to fuse the enhancement results at multiple scales obtained in step S2 to obtain a fused image; the defect detection model is used to output defect features after inputting the fused image; the positioning module is used to predict the position coordinates of the defect features based on the detection time and real-time speed of the defect features, and taking into account the delay time.

Citation Information

Patent Citations

  • Insulator defect detection method based on FPGA preprocessing and improved YOLOv5

    CN116523875A

  • Insulator defect detection method based on feature extraction and cross-scale fusion

    CN119251206A