Insulator damage fault detection method and device based on inspection image of power system
Patent Information
- Application Number
- CN202211287877.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-20
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2042-10-20
AI Technical Summary
[0004]本发明要解决的问题是:绝缘子图像在复杂背景下拍摄,具有不同光照条件,存在各种噪声,且绝缘子的破损故障区域占图像比例很小,属于小物体
[0018]1.本发明提供了一种解决绝缘子破损故障区域过小、图像场景复杂导致识别准确率低下问题的电力系统绝缘子破损故障检测方案。本发明同时考虑图像的通道关系和位置信息,并在图像特征中融合更多的语义信息,能够准确的检测绝缘子破损故障。
Smart Images

Figure CN117952889B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer vision technology and relates to object detection in images, specifically a method and device for detecting insulator damage faults in power systems based on inspection images. Background Technology
[0002] Insulators in power systems play a crucial role in overhead transmission lines and substations, supporting conductors and preventing current from returning to the ground. However, because insulators primarily operate in complex outdoor environments, most are directly exposed to strong sunlight, rain, and wind, making them susceptible to damage. Insulator failures pose a significant threat to power grid safety, sometimes even leading to substantial economic losses such as power outages. Therefore, early detection of such damage during power line inspections is essential to ensuring the normal operation of the entire power system.
[0003] Traditional power facility inspections are mostly conducted manually, requiring inspectors to pay close attention to insulators and other electrical components to prevent missed faults. This process relies heavily on the inspector's experience and sense of responsibility, and is relatively inefficient, resulting in significant subjectivity and instability in insulator defect detection. In recent years, the introduction of unmanned equipment has allowed automated inspection devices to gradually replace manual inspections, and the application of computer vision technology in insulator defect detection has become a research hotspot. Drones have shown promising prospects in insulator inspection due to their ease of operation and low cost. High-resolution images taken by drones during inspections have been used in many insulator defect detection tasks. Existing insulator defect detection methods often require manual design of defect target features, such as using Canny edge extraction and Hough transform to segment the contour features of insulators under specific environments and extracting features using accelerated robust features; or locating insulators based on their spatial morphology and color features, and then processing these insulators through morphological processing to analyze the location of faults. However, because insulator images are taken in complex environments, often with different backgrounds, lighting conditions, or noise, the effectiveness of traditional methods is limited to specific scenarios. Compared to existing methods, deep learning-based methods offer better performance because they can automatically learn and extract effective features of objects in images, reducing the impact of the aforementioned adverse conditions on detection results and thus improving the generality of the detection model. For example, classic one-stage detection models, such as the YOLOv3 network and related algorithms, and the SSD algorithm, can be improved to address the specific characteristics of insulator fault detection; or classic two-stage detection models, such as Faster R-CNN, can be used for targeted improvements. However, these methods are developed and modified based on older classic models, and therefore are limited by the old backbone network, resulting in relatively weak ability to extract effective features. Consequently, they cannot achieve satisfactory fault detection accuracy in insulator fault detection tasks. Furthermore, these techniques tend to treat insulator fault detection as a small target detection problem, and if feature fusion is used, features of different sizes are treated equally and fused, leading to a lack of specificity in the target detection within the given scenario. Summary of the Invention
[0004] The problem this invention aims to solve is that insulator images are taken against complex backgrounds, under varying lighting conditions, and contain various types of noise. Furthermore, the damaged or faulty areas of the insulators occupy a very small proportion of the image, representing small objects. These factors affect the performance of object detection models, and existing deep learning-based methods all have certain shortcomings. Therefore, model improvements are needed to address specific problems and more accurately detect insulator damage and faults.
[0005] The technical solution of this invention is as follows: a power system insulator damage fault detection method based on inspection images. The fault detection model is constructed based on the YOLOv7 model. The original backbone network of the YOLOv7 network is retained. The three output feature maps of different sizes are processed using the coordinate attention mechanism, and then input into the improved feature pyramid network for feature fusion. The three fused feature maps of different sizes are output. Finally, these feature maps are input into the head of the original network to perform prediction and output the prediction result of insulator damage.
[0006] The improved feature pyramid network is as follows: a weighted summation operation with learnable weights is used as the neck network of YOLOv7 for feature fusion. The weighted summation operation with learnable weights is represented by the following formula:
[0007]
[0008] ω is the learnable weight, I is the input feature map, and O is the output of the operation;
[0009] The symbols of the feature maps extracted from the outputs of each stage in the backbone network are C3, C4, and C5, and then processed by the coordinate attention mechanism. i The input is the neck network, i = 3, 4, 5. The neck network generates feature maps P4 and P5 from a top-down path. N3, N4, and N5 are used to represent the final feature maps obtained through the bottom-up path. N3 is generated by C3 and P4, N4 is generated by C4, P4, and N3, and N5 is generated by P5 and N4. The formula for generating the output from the two feature maps is as follows:
[0010] F out =Conv(w1·F1+w2·Resize(F2))
[0011] Where F1 represents the feature map input of the current layer size, F2 represents the feature map input of different sizes after fusion, and w1 and w2 are the weights of the two feature maps, respectively.
[0012] The operation of generating the output from three feature maps is represented by the following formula:
[0013] F out =Conv(w1′·F1+w2′·F2+w3′·Resize(F3))
[0014] Where F1 and F2 are the feature map inputs of the current layer scale, F3 represents the feature map inputs of different scales fused, and w1′, w2′, and w3′ are the weights corresponding to the three feature maps. The Resize operation in the above formula uses upsampling or downsampling to adjust the size of feature maps of different scales.
[0015] After constructing the fault detection model, an inspection image of the power system insulator is acquired to build a dataset. Data augmentation methods are used to expand the number of images in the dataset to obtain a training set for training the fault detection model. The trained detection model is then used to perform object detection, thereby realizing the detection of damage faults in the insulators in the newly acquired inspection images.
[0016] The present invention also proposes a power system insulator damage fault detection device based on inspection images, including a data processing module. The data processing module is equipped with a computer program, which implements the above-mentioned fault detection model and, when executed, implements the above-mentioned insulator damage fault detection method.
[0017] The advantages of this invention are:
[0018] 1. This invention provides a power system insulator damage fault detection scheme that addresses the problem of low recognition accuracy caused by excessively small fault areas and complex image scenes in insulators. This invention simultaneously considers the channel relationships and positional information of the image, and integrates more semantic information into the image features, enabling accurate detection of insulator damage faults.
[0019] 2. This invention incorporates weights into the feature fusion process of the neck network in the detection model, allowing the feature fusion network to automatically learn the importance of features at different scales, thus selectively fusing features. Furthermore, it directly incorporates the original input features into the output fusion result, adding more information to the features without significantly increasing computational load. Instead of directly using classic networks such as bidirectional feature pyramids during feature fusion, it improves upon the original feature pyramid network, effectively utilizing the advanced convolutional structures in the original network.
[0020] 3. This invention can effectively utilize the physical characteristics of the insulators being detected. Considering that insulators are generally distributed horizontally or vertically in images taken by UAVs along the line, the detection model is designed to enhance the extracted features using coordinate attention. As an attention mechanism, it can capture not only cross-channel information but also directional and positional awareness information, thereby effectively utilizing the physical characteristics of the target.
[0021] 4. Through the aforementioned improvements, this invention effectively enhances the network's target detection capability. When applied to insulator detection, a comparison between this invention and existing insulator detection algorithms shows a significant improvement in detection accuracy. This invention's method possesses good versatility and applicability. Attached Figure Description
[0022] Figure 1 This invention relates to an improved YOLOv7 architecture and an insulator damage detection process.
[0023] Figure 2This is a demonstration of the results of some practical applications of the insulator damage detection method of the present invention. Detailed Implementation
[0024] The present invention relates to an insulator damage fault detection based on an improved YOLOv7 model, which provides a power system insulator damage fault detection scheme that solves the problem of low recognition accuracy caused by the small fault area of insulators and the complexity of image scenes. It realizes the accurate detection of insulator damage faults by considering the channel relationship and position information of the image and integrating more semantic information into the image features, based on the most advanced object detection algorithm.
[0025] The implementation of this invention is described in detail below.
[0026] like Figure 1 As shown, firstly, various unmanned devices, such as unmanned inspection robots and drones, are used to obtain inspection images, construct a dataset, and perform preprocessing such as resolution adjustment. Next, data augmentation methods are used to expand the number of images in the insulator dataset. Then, the YOLOv7 model is improved by introducing a coordinate attention mechanism and a class-weighted bidirectional feature pyramid network, and the images are input into the improved YOLOv7 model for training to obtain the trained model. Finally, the fully trained detection model is used to perform object detection, realizing the detection of insulators and damage faults in the images.
[0027] The implementation of this invention is described in detail below. This invention includes the following steps:
[0028] 1) Adjust the resolution of insulator images with different resolutions in the obtained training data to a fixed resolution (640×640) insulator image.
[0029] 2) For the image processed in step 1), data augmentation techniques are used to increase the number of images. Specifically, rotation, brightness adjustment, flipping, and mosaic enhancement operations are used to expand the number of images:
[0030] 2.1) For the image processed in step 1), use a rotation operation to rotate the image by a random angle to obtain a new image.
[0031] 2.2) For the image processed in step 1), use the brightness adjustment operation to adjust the image brightness to obtain a new image.
[0032] 2.3) For the image processed in step 1), use the flip operation to flip it in a vertically symmetrical and horizontally symmetrical manner to obtain a new image.
[0033] 2.4) For the image processed in step 1), mosaic enhancement is used. The image is first enhanced, scaled and transformed, and the starting position is calculated to crop the image. Then, the processed images are stitched together to obtain a new image.
[0034] 3) For the insulator damage fault image dataset constructed in step 2), the YOLOv7 network is improved to build a fault detection model, which is then trained using the dataset.
[0035] 3.1) The original backbone network of YOLOv7 network remains unchanged.
[0036] 3.2) For the YOLOv7 network, a coordinate attention mechanism is added to the output of three feature maps of different sizes in the backbone network. When a drone inspects a line and takes pictures, the insulators in the image are affected by the shooting height, generally distributed horizontally or vertically. This feature is very obvious, but no one has made targeted adaptive improvements in deep learning. This invention designs a coordinate attention mechanism in the detection model, which has two steps: coordinate information embedding and coordinate attention generation.
[0037] First, coordinate information is embedded. For all feature maps, the global pooling method frequently used in channel attention is applied to embed spatial information, helping the enhanced features retain more location information. When processing the feature maps output by the backbone network, for a given input feature X, pooling kernels of size (H,1) and (1,W) are used to encode the horizontal and vertical coordinates of each channel, respectively, to obtain the output of the c-th channel with height h and width w. The calculation formula is as follows:
[0038]
[0039]
[0040] Next is coordinate attention generation. First, the two feature maps z obtained above in different directions are... h ,z w Connect them together, use the join operation, and perform a transformation using a shared 1×1 convolutional kernel F to obtain intermediate results. The calculation method is as follows:
[0041]
[0042] Where δ represents a nonlinear activation function. This represents the connection process, where r is the reduction ratio.
[0043] Next, we will split f into two spatial dimensions. and And use two 1×1 convolutions F respectively w and F hPerform the transformation and activate the output using the Sigmoid function δ to obtain g. w and g h The calculation method is as follows:
[0044] g h =δ(F h (f h ))
[0045] g w =δ(F w (f w ))
[0046] Finally, the feature map is compared with g. w g h Multiply to obtain the final feature map result processed by the attention mechanism:
[0047]
[0048] 3.3) This invention improves upon the original feature fusion network of the YOLOv7 network, which outputs feature maps of three sizes from the backbone network. During feature fusion, it additionally fuses a feature map of the original input at a medium size onto the original output of the medium-sized feature map, thereby achieving more information fusion. A weighted summation operation with learnable weights is used during the feature fusion process. Specifically... Figure 1 As shown, C3, C4, and C5 are used as symbols for the feature maps extracted at each stage of the original backbone network, and the three feature maps have different sizes. All connection operations in the original network are replaced with a weighted summation operation using learnable weights. The feature fusion operation with learnable weights is described by the following formula, where ω is the learnable weight, I is the input feature map, and O is the output of the operation:
[0049]
[0050] C processed by coordinate attention mechanism i The input is the neck region, and the neck network generates feature maps P4 and P5 via a top-down path. N3, N4, and N5 represent the final feature maps obtained via the bottom-up path, where N3 is generated from C3 and P4, N4 is generated from C4, P4, and N3, and N5 is generated from P5 and N4. The generation of N3, N4, and N5, specifically the operation of generating the output from two feature maps, is represented by the following formula.
[0051] F out =Conv(w1·F1+w2·Resize(F2))
[0052] Where F1 represents the feature map input of the current layer size, F2 represents the feature map input of different sizes fused, and w1 and w2 are the weights of the two feature maps respectively.
[0053] The operation of generating the output from three feature maps is represented by the following formula:
[0054] F out =Conv(w1′·F1+w2′·F2+w3′·Resize(F3))
[0055] Where F1 and F2 are the feature map inputs of the current layer scale, F3 represents the feature map inputs of different scales fused, and w1′, w2′, and w3′ are the weights corresponding to the three feature maps.
[0056] The Resize operation in the above formula uses upsampling or downsampling to resize feature maps of different sizes.
[0057] 4) After training the fault detection model, the images obtained by the unmanned equipment at the inspection site for actual detection are preprocessed to a resolution of 640×640 and then input into the trained model to obtain the fault detection results of the insulator.
[0058] The present invention relates to a method for detecting damaged insulators based on an improved YOLO v7 algorithm. This method combines the detection of damaged insulators in the safe operation of power grids with deep learning, providing an effective method for the automated detection of insulator defects. The specific results are shown in Table 1. The method can effectively detect damaged insulators in insulator images and improve the accuracy of the YOLO v7 detection model.
[0059] Table 1 shows the detection results of different methods on the China Transmission Line Insulator Dataset (CPLID).
[0060] SSD 0.6371 YOLOv4 0.6156 YOLOv5 0.7277 YOLOv7 0.7139 This method 0.7750
[0061] Figure 2 (a), (b), and (c) show the results of some practical applications of the insulator damage detection method of the present invention, which can effectively detect damage defects in power system insulators under complex backgrounds and lighting conditions.
Claims
1. A method for detecting insulator damage faults in power systems based on inspection images, characterized by: A fault detection model is built based on the YOLOv7 model. The original backbone network of the YOLOv7 network is retained. The three feature maps of different sizes are processed by the coordinate attention mechanism and then fed into the improved feature pyramid network for feature fusion. The three fused feature maps of different sizes are output. Finally, these feature maps are fed into the head of the original network to perform prediction and output the prediction result of insulator damage. The improved feature pyramid network is as follows: a weighted summation operation with learnable weights is used as the neck network of YOLOv7 for feature fusion. The weighted summation operation with learnable weights is represented by the following formula: These are learnable weights. It is the input feature map. This is the output of the operation; by The symbols of the feature maps extracted from the output of each stage in the backbone network are then processed by the coordinate attention mechanism. Input the neck network, i=3,4,5, the neck network generates feature maps from top to bottom. and , This is used to represent the feature map finally obtained through the bottom-up path, where Depend on and generate, Depend on , and generate, Depend on and The formula for generating the output from two feature maps is as follows: in The feature map input represents the current layer size. Inputs representing feature maps of different scales that represent fusion. , These are the weights corresponding to the two feature maps. The operation of generating the output from three feature maps is represented by the following formula: in , It is the feature map input at the current layer scale. Inputs representing feature maps of different scales that represent fusion. , , These are the weights corresponding to the three feature maps. The Resize operation in the above formula uses upsampling or downsampling to resize feature maps of different sizes; After constructing the fault detection model, an inspection image of the power system insulator is acquired to build a dataset. Data augmentation methods are used to expand the number of images in the dataset to obtain a training set for training the fault detection model. The trained detection model is then used to perform object detection, thereby realizing the detection of damage faults in the insulators in the newly acquired inspection images.
2. The method for detecting power system insulator damage faults based on inspection images according to claim 1, characterized in that: The coordinate attention mechanism includes two steps: coordinate information embedding and coordinate attention generation. Coordinate information embedding: For all feature maps input from the backbone network, global pooling in channel attention is decomposed to embed spatial information, helping the enhanced features retain more location information: for a given input Use size and The pooling kernels encode the horizontal and vertical coordinates of each channel, resulting in a height of... Width is The The output of each channel is calculated using the following formulas: Coordinate generation note: First, generate feature maps from two different directions. Connect, use connection operations, and use shared resources. convolution kernel Perform transformations to obtain intermediate results The calculation method is as follows: in Represents a non-linear activation function. Indicates a connection operation. It is the reduction ratio; Will Split into two spatial dimensions and and use two respectively convolution and Perform the transformation using the Sigmoid function. Activate the output to obtain and : Finally, the feature map is compared with... , Multiply to obtain the final feature map result processed by the attention mechanism: 。 3. The method for detecting power system insulator damage faults based on inspection images according to claim 1, characterized in that: The inspection images of insulators are obtained by unmanned inspection equipment. The resolution of insulator images with different resolutions in the obtained training data is adjusted to a fixed resolution. Data augmentation methods, including rotation, brightness adjustment, flipping and mosaic enhancement, are used to expand the number of images to obtain the training set.
4. A power system insulator damage fault detection device based on inspection images, characterized by: The system includes a data processing module, which is configured with a computer program. When the computer program is executed, it implements the power system insulator damage fault detection method based on inspection images as described in any one of claims 1-3.