A method for detecting a grading ring defect
By constructing a parallel-trained voltage equalization ring defect detection model and combining it with improved YOLOv7 and HRNet models, the problem of low efficiency in identifying multiple defects in voltage equalization rings during UAV power line inspection was solved, achieving high-precision detection of multiple defects and improving detection speed and accuracy.
Patent Information
- Application Number
- CN202310459251.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-26
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2043-04-26
AI Technical Summary
In UAV power line inspection, it is difficult to identify multiple defects in the equalizing ring at the same time, the identification accuracy of tilt defects is low, and the training process of cascaded network models is inefficient.
By labeling rectangular boxes and key points within the same region, a parallel-trained model for detecting equal pressure ring defects is constructed. This model is then combined with improved YOLOv7 and HRNet models to detect equal pressure ring regions and key points, respectively. Data augmentation methods are employed to enhance the robustness of the model, and suitable loss functions and feature fusion strategies are designed to achieve high-precision and efficient defect identification.
It achieves high-speed and high-precision identification of various defects in equalizing rings, improves the efficiency and accuracy of UAV power line inspection, simplifies the training process, and improves the detection speed and accuracy of the model.
Smart Images

Figure CN116503351B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image pattern recognition and transmission line device defect recognition, in particular to a grading ring defect detection method. BACKGROUND
[0002] As one of the important power devices in the transmission line, the grading ring plays an important role in improving the voltage distribution of the insulator string. However, due to its long-term exposure to the outside, the grading ring is prone to defects such as tilt, displacement, corrosion, etc., which can cause the spatial potential gradient of the insulator region connected to the grading ring to increase, and in the case of excessive voltage, the risk of breakdown in this region increases. Therefore, inspecting and maintaining the grading ring in the transmission line has become an important part of power inspection work.
[0003] In the initial transmission line inspection work, the staff needs to regularly visit specific locations to observe power equipment. In some harsh natural environments, manual inspection methods are not only risky but also inefficient. Therefore, with the advancement of robotics, various robots have been invented to identify multiple defects. Among them, drones are the most widely used. Through sensors mounted on drones, color pictures or infrared pictures of transmission lines, etc. are collected. Power line workers observe the pictures to determine whether there are defects. Therefore, in order to improve the inspection efficiency, deep learning-based network models are now commonly used to carry out transmission line power device inspection work.
[0004] There are already many methods for grading ring defect detection based on deep learning. For example, a target detection network is used to detect the area and direction of the grading ring and the insulator, and then calculate whether there is a defect. However, due to the interference of angle and object occlusion, this method has low accuracy. Another method uses a target detection network to detect the area and direction of the insulator and the area of the grading ring, and then uses a key point detection network to detect the direction of the grading ring to determine whether there is a tilt defect. However, the serial training makes this method inefficient and the performance is not ideal. Moreover, due to the constraint of network function, only a single defect can be detected.
[0005] In summary, although there are deep learning-based grading ring defect detection methods, there is still room for improvement. For example, the detection function is single and can only identify one type of defect. Or it can identify multiple defects, but the network model is too redundant. Or the accuracy and effect of defect recognition are not accurate enough. Therefore, it is urgent to propose a new high-precision lightweight grading ring multi-defect detection algorithm to solve the above problems. SUMMARY
[0006] The purpose of the present application is to solve the problems of the difficulty in simultaneously identifying various defects of the grading ring, the low recognition accuracy of the tilt defect of the grading ring, and the low efficiency of the training process of the cascade network model in the process of unmanned aerial vehicle power inspection. A grading ring defect detection method is proposed, which can effectively identify the defects of the grading ring in the image data collected by the unmanned aerial vehicle power inspection. The same area is marked by a rectangular frame and key points, so that one image file corresponds to one annotation file, and parallel training improves the model training efficiency. In addition, the target detection model is used to identify the shedding defect of the grading ring in advance, which improves the prediction speed. The key point detection model is used to accurately judge the tilt defect and displacement defect of the grading ring, and finally realizes the high-speed and high-precision grading ring defect recognition function, and improves the efficiency of the unmanned aerial vehicle power inspection of the grading ring.
[0007] To achieve the above purpose, the technical scheme provided by the present application is as follows: a grading ring defect detection method, comprising the following steps:
[0008] 1) Collect and organize the high-resolution images containing composite insulators and grading rings collected during unmanned aerial vehicle inspection of power transmission lines to construct a data set, and mark the rectangular area where the composite insulator is connected with the grading ring;
[0009] 2) In the data set where the rectangular area where the composite insulator is connected with the grading ring has been marked, mark the key points, mark the end points of the long axis of the grading ring, the midpoint of the metal rod of the composite insulator inside the elliptical shape of the grading ring, and the center point of the third large insulator sheet of the composite insulator connected with the grading ring as key points;
[0010] 3) Use data augmentation method to expand the data set with marked key points, and improve the robustness of the grading ring defect detection model to angle and scale;
[0011] 4) According to the Top-Down design method, a grading ring defect detection model suitable for detecting key points of the grading ring is designed, which includes a target detection model and a key point detection model; the target detection model is improved based on the YOLOv7 network model, which improves the detection accuracy of the detection model, and the purpose is to locate the grading ring area and judge the shedding defect of the grading ring; the key point detection model is improved based on the HRNet detection model, which reduces the complexity of the key point detection model and improves the accuracy of detecting the key points of the grading ring, and the purpose is to detect the key points of the grading ring;
[0012] 5) The data set after data enhancement is divided into a training set and a test set, a key point detection model loss function is designed, the training set is put into the target detection model and the key point detection model for parallel training, the parameters are adjusted during training, the performance of the model is verified in the test set, and the target detection model and the key point detection model with the best performance are saved, so as to obtain the optimal grading ring defect detection model;
[0013] 6) The optimal grading ring defect detection model is used for grading ring defect detection of the image to be tested containing the grading ring, and the area where the grading ring is located is located and whether there is a shedding defect is detected in the inference test stage of the target detection model;
[0014] 7) For the grading ring image without shedding defect, key point detection is performed, the included angle between the straight line of the two end points and the straight line of the two middle points is calculated according to the coordinates of the detected key points, the distance from the two end points to the center key point of the grading ring is calculated, and finally whether the grading ring has a tilt or displacement defect is judged according to the set threshold.
[0015] Further, in step 1), the labelme labeling software is used to label the rectangular frame of the grading ring and the connected part of the composite insulator, and is divided into two types of labels, normal and shedding defect, which are used for subsequent detection of the shedding defect of the grading ring.
[0016] Further, in step 2), the grading ring is a circular ring in reality, but it appears as an oval in the image taken from the angle of the unmanned aerial vehicle inspection, so there is a long axis; the key point labeling uses the labelme software, the labeling type is point, the end points of the long axis of the grading ring are labeled as point1 and point2 two key points, the center point of the metal rod of the composite insulator in the middle of the oval area of the grading ring is labeled as point3 key point, and the center point of the third large insulator sheet of the composite insulator connected with the corresponding grading ring is labeled as point4 key point, which is used for subsequent calculation of the tilt angle and displacement length of the grading ring; the key point labeling is based on the labeling of the rectangular frame in step 1), so one image file corresponds to one labeling file.
[0017] Further, in step 3), in order to improve the learning of more robust features by the grading ring defect detection model during training, data enhancement is performed on the labeled data, including random rotation or random scaling of geometric transformation, random noise blur of color transformation, and random color brightness transformation, so as to ensure the anti-interference of the grading ring defect detection model to different directions, scales, colors and brightness.
[0018] Further, in step 4), in order to realize the positioning function and the falling defect identification function of the grading ring defect detection model, the target detection model is based on the YOLOv7 network model, which is a one-stage target detection model. By optimizing the overall model architecture design and the training process, the model precision and inference real-time performance are improved. The target detection model proposes a new real-time detector architecture, which can improve the detection accuracy without increasing the inference cost by controlling the shortest and longest gradient paths. In order to improve the regression accuracy and speed up the convergence speed, the regression loss function CIoU Loss in the original YOLOv7 network model is replaced by EIoU Loss, which is composed of IoU Loss, center point loss, width loss and length loss. EIoU Loss considers the overlapping area, center point distance and length of the real difference, solves the ambiguous definition of aspect ratio, and the specific calculation formula is as follows:
[0019]
[0020]
[0021] In the formula, A represents the area of the predicted frame, B represents the area of the real frame, b represents the center point of the predicted frame, b gt represents the center point of the real frame, w represents the width midpoint of the predicted frame, w gt represents the width midpoint of the real frame, h represents the length midpoint of the predicted frame, h gt represents the length midpoint of the real frame, p represents the Euclidean distance between two points, c w represents the width of the minimum bounding box covering the predicted frame and the real frame, c h represents the length of the minimum bounding box covering the predicted frame and the real frame.
[0022] The input of the key point detection model is a small resolution image containing a grading ring and a composite insulator connected to it, and the detected key point coordinates are used for subsequent angle and length calculation. Therefore, a key point detection model with high accuracy needs to be designed. The model structure is divided into backbone structure and output structure. The backbone structure guarantees accurate and complete spatial position information through multi-resolution parallel flow architecture, realizes semantic fusion through cross-resolution feature fusion, increases the richness of semantics, and the output part outputs the prediction result through the average pooling layer.
[0023] The backbone structure of the key point detection model is divided into an input picture processing part and a feature extraction part. The input picture processing part is used to extract the shallow information of the image and convert it into a feature map, which is used for subsequent feature extraction and learning. First, the input picture resolution is scaled to 1333*800, and then the key point detection model is inputted to ensure the subsequent training efficiency. Two layers of convolutional layers with a step size of 2 and a convolution kernel size of 3*3 are used to downsample the input to a high-channel feature data stream for subsequent feature extraction and analysis. The feature extraction part is used to extract and fuse multi-level image features, which is composed of the stage structure in HRNet. The first three Residual Blocks in the stage structure are replaced by Inception Blocks. In the Inception Block, different convolutional layers with different kernel sizes are used to extract different feature information, which reduces the complexity of the key point detection model and preserves the fourth Residual Block to prevent gradient dissipation during training. With the increase in the number of stage structures, the number of parallel downsampled branches in the stage also increases. The first stage has only one main branch, which expands into two branches after the feature extraction is completed, one is the original resolution branch, and the other is the downsampled branch. This process is repeated in each stage structure. Cross-resolution fusion is performed in the middle of each stage structure, and the fusion method is as follows:
[0024] During each fusion, in addition to the feature output of the highest resolution main branch, the low resolution branches obtained by the main branch through downsample operation are fused through the cross-layer feature aggregation module CFA according to the adaptive generated fusion weight, and then the aggregated features are distributed back to the corresponding resolution branch through the cross-layer feature distribution module CFD. Then, the features are fused through the upsample processing from top to bottom and added to the main branch feature to input to the next stage. By keeping the highest resolution main branch, the spatial information of the key points is prevented from fading during training. By multi-scale feature fusion of high-level branches, the loss of semantic information and significant features is reduced. When downsampled, the convolutional pooling layer with the corresponding step size is used for downsample operation, and the deconvolution is used instead of bilinear interpolation for upsample operation, which reduces the training memory occupation and improves the detection speed and accuracy. Since the four key points of the equal pressure ring area are obvious, three stages are designed to meet the feature extraction requirements.
[0025] The purpose of the key point detection model output structure is to output the prediction results of the key point detection model. For key point detection tasks, only the high-resolution feature map is needed to obtain the output through the adaptive mean pooling layer. Because the key point detection model maintains the high-resolution feature branch from the beginning to the end, it has strong position sensitivity and can accurately locate the key point coordinates.
[0026] Further, in step 5), the training set is input into the equalizing ring defect detection model for training. Since the equalizing ring rectangular region and the equalizing ring key point position are labeled at the same time, the target detection model and the key point detection model can be trained in parallel, thereby saving training time and resources. In the key point detection model prediction, a Gaussian distribution heat map prediction method is adopted, that is, a corresponding Gaussian distribution heat map is predicted for each key point. Therefore, in the process of generating labels for training, a rectangular frame region with a length of M and a width of N is converted into a Gaussian distribution heat map with a length of m and a width of n. In order to balance the memory size and quantization error of the key point detection model, the size m and n of each Gaussian distribution heat map is one quarter of the size M and N of the input rectangular frame region. The probability of the predicted key point position is the Gaussian distribution value in the corresponding Gaussian distribution heat map. The value of each point (x, y) on the Gaussian distribution heat map is calculated as follows:
[0027]
[0028]
[0029] In the formula, G(x, y) is the value of the point (x, y) on the Gaussian distribution heat map, Z(x, y) is the lowest threshold of the probability in the Gaussian distribution heat map, i is the horizontal coordinate, j is the vertical coordinate, p` xk is the horizontal coordinate value of the key point in the kth Gaussian distribution heat map, p` yk is the vertical coordinate value of the key point in the kth Gaussian distribution heat map, and sigma represents the Gaussian kernel distribution factor, and delta represents the lowest threshold of the key point position prediction probability.
[0030] The loss function of the key point detection model calculates the distance difference between each predicted key point and the actual key point Gaussian distribution heat map point. One Gaussian distribution heat map predicts the position of one key point, so four Gaussian distribution heat maps are needed for subsequent loss function calculation, which is as follows:
[0031]
[0032] In the formula, G sum (x, y) represents the loss function of the f Gaussian distribution heat maps, G k (x, y) represents the Gaussian distribution heat map of the kth key point.
[0033] Considering the balanced number of four key point samples, the weighted mean square error MSE Loss is selected as the loss function for training the key point detection model, and the calculation formula is as follows:
[0034]
[0035] In the formula, loss represents the weighted loss function of the f key points, and lossmse The weighted mean square error of a single keypoint is represented by F, which represents the number of sample points in the Gaussian distribution heatmap, and h is the number of points in the heatmap. l This represents the predicted score for the l-th sample. λ represents the true score of the l-th sample. k This represents the weight value of the MSE Loss of the k-th keypoint.
[0036] Furthermore, in step 6), the optimal equalizing ring defect detection model is used to detect the image data with composite insulators collected during the UAV power inspection. The high-resolution image of the UAV power inspection to be detected is input, and the target detection model outputs the predicted rectangular frame coordinates and labels of the area containing the equalizing ring and the part of the insulator connected to it. If the label is detached, it is determined that there is an equalizing ring detachment defect.
[0037] Further, in step 7), key point detection is performed on the image of the equalizing ring without detachment defects, and the coordinate values of four key points are output: the left endpoint point1 (x1, y1), the right endpoint point2 (x2, y2), the center point point3 (x3, y3), and the center point point4 (x4, y4) of the third large insulator piece of the composite insulator connected to the equalizing ring. Under normal circumstances, the line connecting the two key points at both ends of the equalizing ring should be perpendicular to the line connecting the two key points in the middle. According to the pre-set threshold α, if the absolute value of the difference between the angle θ between the two connecting lines and 90° exceeds the threshold α, it is determined that the equalizing ring has a tilting defect. The specific calculation formula is as follows:
[0038]
[0039] In the formula, θ is the angle between the line connecting point1 and point2 and the line connecting point3 and point4; v1 is the slope of the line connecting point1 and point2; and v2 is the slope of the line connecting point3 and point4. The specific calculation formula is as follows:
[0040]
[0041] Under normal circumstances, the line lengths connecting the key points at both ends of the equalizing ring to the key point in the middle of the equalizing ring should be equal, based on the pre-designed threshold. If the ratio η of the length difference to the sum of the lengths of the two connecting lines exceeds the threshold... The equalizing ring is then determined to have a displacement defect. The specific calculation formula is as follows:
[0042]
[0043] In the formula, d1 is the distance between point1 and point3, and d2 is the distance between point2 and point3. The specific calculation formula is as follows:
[0044]
[0045] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0046] 1. The present invention uses a rectangular bounding box of the equalizing ring region and a method of labeling four key points in the region, which allows one image file to correspond to one label file. Instead of using two models for cascaded training, parallel training is used, which improves training efficiency and the convergence speed of the two models.
[0047] 2. This invention employs a target detection model with an improved loss function to detect the equalizing ring detachment defect in advance. If the defect exists, the result is directly output. At the same time, the regional resolution of key point detection is small, which improves the speed of model prediction in identifying the three types of defects.
[0048] 3. This invention designs a key point detection model suitable for detecting four key points in the equalization ring region, based on the characteristics of the equalization ring. Compared with other methods that use multiple models to detect the tilt angle of the equalization ring, this method has higher detection accuracy and faster detection speed.
[0049] 4. This invention can simultaneously detect common defects in equalizing rings, such as detachment, tilting, and displacement. Compared with some current methods, it provides a more comprehensive defect detection for equalizing rings. Attached Figure Description
[0050] Figure 1 This is a flowchart of the method of the present invention.
[0051] Figure 2 This is a flowchart of the training and prediction process for the equalizing ring defect detection model.
[0052] Figure 3 This is a diagram showing the equalizing ring.
[0053] Figure 4 This is a schematic diagram for judging the equalizing ring defect based on key points. In the diagram, d1 is the line connecting key points 1 and 3, and d2 is the line connecting key points 2 and 3. The displacement defect of the equalizing ring is judged by calculating the ratio of the length difference of the two connecting lines to the length sum. θ is the angle between the line connecting point 1 and point 2 and the line connecting point 3 and point 4. The tilt defect of the equalizing ring is judged by calculating |90°-θ|. Detailed Implementation
[0054] The present invention will be further described in detail below with reference to the embodiments and accompanying drawings, but the embodiments of the present invention are not limited thereto.
[0055] like Figure 1 and Figure 2As shown, this embodiment provides a method for detecting defects in equalizing rings, which includes the following steps:
[0056] 1) Organize the images collected during UAV power line inspections, selecting high-resolution images containing composite insulators to form a dataset. Use the labelme annotation tool to annotate the dataset, following the instructions... Figure 3 The connection area between the equalizing ring and the composite insulator is marked with a rectangle for locating key areas and detecting defects such as missing equalizing rings.
[0057] 2) After marking the rectangle, mark four key points within the rectangle: the left endpoint of the equipotential ring (point1), the right endpoint of the equipotential ring (point2), the center point of the equipotential ring area (point3), and the midpoint of the composite insulator connected to the equipotential ring (point4). Note that a composite insulator typically has two equipotential rings, an upper and a lower one. The upper equipotential ring area is assumed to face positive; therefore, the left endpoint of the lower equipotential ring is marked as point2, and the right endpoint as point1.
[0058] 3) Organize the labeled images and annotation files, and divide them into training and test sets proportionally. To ensure the model's robustness and prevent overfitting, data augmentation is required, including: random shifting (moving the image and bounding box randomly by a certain number of pixels in the top, bottom, left, and right directions); adding noise (Gaussian noise, impulse noise, etc.); random erasing (occluding the image with a fixed-size rectangle, setting all values within the rectangle to 0 or other solid color values); and random cropping. The corresponding label files are also transformed during the data augmentation process.
[0059] 4) To achieve the function of locating the equalization ring region and detecting whether there are missing defects in the equalization ring, a target detection model is built based on YOLOv7. This model is a one-stage real-time target detection model. By optimizing the overall model architecture, the detection accuracy of the network model is improved without increasing the number of network model parameters. To ensure the efficiency of subsequent training, the original high-resolution image needs to be scaled down to 1333*800 before being input into the network model for training. Considering the localization accuracy predicted by the target detection model, the regression loss function CIoU Loss in the original YOLOv7 model is replaced with EIoU Loss. Compared with the original regression loss function, EIoU Loss integrates the overlap area, center point distance, and true difference of length and width sides, solves the fuzzy definition of aspect ratio, and increases the accuracy of regression. The specific calculation formula is as follows:
[0060]
[0061]
[0062] In the formula, A represents the area of the predicted bounding box, B represents the area of the ground truth bounding box, and b represents the center point of the predicted bounding box. gt w represents the center point of the ground truth bounding box, and w represents the center point of the width of the predicted bounding box. gt h represents the width midpoint of the ground truth bounding box, and h represents the length midpoint of the predicted bounding box. gt The value represents the midpoint of the true bounding box, ρ represents the Euclidean distance between the two points, and c represents the distance between the two points. w c represents the width of the smallest bounding box that covers both the predicted and ground truth boxes. h This represents the length of the smallest bounding box that covers both the predicted and ground truth boxes.
[0063] The final loss function is obtained by combining the classification loss and the target confidence loss. The classification loss and the target confidence loss adopt BCEWithLogitsLoss.
[0064] 5) Considering the relatively small resolution of the keypoint detection area, and the fact that the detected keypoint coordinates are used for subsequent angle and length calculations, a high-precision keypoint detection model needs to be designed. The model employs a multi-resolution parallel flow architecture to ensure relatively accurate and complete spatial location information. Semantic fusion is achieved through cross-resolution interactive feature fusion, increasing semantic richness. The backbone of the keypoint detection model is composed of Stage structures from the HRNet model. Unlike typical keypoint detection models that require human keypoint detection, the four keypoints in the equalization ring region have relatively obvious features. Therefore, only three Stage modules need to be concatenated to extract features. During the forward propagation of the feature data stream, each Stage module needs to fuse features from different layers. The fusion method is as follows:
[0065] During each fusion, in addition to the feature output of the highest resolution main branch, the low-resolution branches obtained by downsampling from the main branch undergo multi-branch feature fusion through the cross-layer feature aggregation module (CFA) based on adaptively generated fusion weights. Then, the cross-layer feature allocation module (CFD) assigns the aggregated features back to the corresponding resolution branches. Finally, top-down upsampling is used for further feature fusion, which is then added to the main branch features and input to the next stage. Maintaining the highest resolution main branch prevents the fading of keypoint spatial information during training, while multi-scale feature fusion of high-level branches reduces the loss of semantic information and salient features. For feature downsampling, convolutional pooling layers with corresponding strides are used, and for upsampling, deconvolution replaces bilinear interpolation, reducing training memory usage and improving detection speed and accuracy. Because the four keypoint features in the equalization ring region are significant, three stages are sufficient to meet the feature extraction requirements.
[0066] 6) The output structure of the key point detection model is to output the network prediction results. For key point detection tasks, it is only necessary to obtain a high-resolution feature map and get the output through an adaptive mean pooling layer. This is because the neural network that maintains high resolution from beginning to end has strong position sensitivity and can accurately locate the coordinates of the key points.
[0067] 7) Since both bounding boxes for object detection and keypoint locations for keypoint detection are labeled simultaneously, to save training time and resources, two models can be trained in parallel. This means the same image file and label file are simultaneously input into both the object detection model and the keypoint detection model for training. The keypoint detection model's prediction is based on Gaussian heatmaps, specifically a Gaussian distribution heatmap prediction method. That is, a corresponding Gaussian distribution heatmap is predicted for each keypoint. Therefore, during the process of generating labels for training from the labeled data, a rectangular region of length M and width N is converted into four Gaussian distribution heatmaps of length m and width n. To balance the memory size and quantization error of the keypoint detection model, the Gaussian distribution heatmap sizes m and n are one-quarter of the input rectangular region sizes M and N. The probability of the predicted keypoint location is the corresponding Gaussian distribution value in the Gaussian distribution heatmap. The formula for calculating the value of each point (x, y) on the Gaussian distribution heatmap is as follows:
[0068]
[0069]
[0070] In the formula, G(x,y) is the value of point (x,y) on the Gaussian distribution heatmap, Z(x,y) is the minimum threshold of probability on the Gaussian distribution heatmap, i is the x-axis, j is the y-axis, and p` xk Let p' be the x-coordinate value of the key point in the k-th Gaussian distribution heatmap. yk Let σ represent the ordinate value of the key point in the k-th Gaussian distribution heatmap, where σ represents the Gaussian kernel distribution factor and δ represents the minimum threshold for predicting the key point's location probability.
[0071] The loss function of the keypoint detection model calculates the distance difference between each predicted keypoint and the actual keypoint in the Gaussian heatmap. Since one Gaussian heatmap predicts the location of one keypoint, four Gaussian heatmaps are needed for subsequent loss function calculations, as detailed below:
[0072]
[0073] In the formula, G sum (x,y) represents the loss function of f Gaussian distributed heatmaps, G k (x,y) represents the Gaussian distribution heatmap of the k-th key point.
[0074] Considering that the sample sizes of the four key points are basically balanced, the weighted mean square error (MSE) loss is chosen as the loss function for training the key point detection model. The calculation formula is as follows:
[0075]
[0076] In the formula, loss represents the weighted loss function for f key points. mse The weighted mean square error of a single keypoint is represented by F, which represents the number of sample points in the Gaussian heatmap, and h is the number of points in the Gaussian heatmap. l This represents the predicted score for the l-th sample. λ represents the true score of the l-th sample. k This represents the weight value of the MSE Loss of the k-th keypoint.
[0077] Compared to the two key points at both ends of the equalizing ring, the center point of the equalizing ring and the midpoint of the insulator section have less obvious characteristics and are more susceptible to interference. Therefore, the weight values of point3 and point4 are set to 0.085 and 0.089 respectively, and the weight values of point1 and point2 are set to 0.073 and 0.073 respectively, so that the key point detection model prediction is more accurate.
[0078] 8) Use a trained equalizing ring defect detection model to detect image data containing composite insulators collected during UAV power line inspections. Input the image to be detected into the equalizing ring defect detection model. The target detection model detects the rectangular frames at the top and bottom of the composite insulator and identifies whether an equalizing ring exists, i.e., whether an equalizing ring detachment defect exists. If an equalizing ring detachment defect is detected, it is determined that the composite insulator has an equalizing ring detachment defect, and the result is output; if an equalizing ring is detected, the coordinates of the equalizing ring area are input into the key point detection model to detect four key points in the equalizing ring area.
[0079] according to Figure 4 To determine whether the equipotential bonding ring has displacement or tilting defects, the four key points of the equipotential bonding ring are: the left endpoint point1 (x1, y1), the right endpoint point2 (x2, y2), the center point point3 (x3, y3), and the midpoint point4 (x4, y4) of the area where the equipotential bonding ring connects to the composite insulator. Under normal circumstances, the line connecting the two key points at the ends of the equipotential bonding ring should be perpendicular to the line connecting the two middle key points. Based on a pre-set threshold α, if the absolute value of the difference between the angle θ between the two connecting lines and 90° exceeds the threshold α, the equipotential bonding ring is considered to have a tilting defect. The specific calculation formula is as follows:
[0080]
[0081] Where θ is the angle between the line connecting point1 and point2 and the line connecting point3 and point4, v1 is the slope of the line connecting point1 and point2, and v2 is the slope of the line connecting point3 and point4. The specific calculation formula is as follows:
[0082]
[0083] Under normal circumstances, the line lengths connecting the key points at both ends of the equalizing ring to the key point in the middle of the equalizing ring should be equal, based on the pre-designed threshold. If the ratio η of the length difference to the sum of the lengths of the two connecting lines exceeds the threshold... The equipotential bonding ring is then determined to have a displacement defect, and the specific calculation formula is as follows:
[0084]
[0085] Where d1 is the distance between point1 and point3, and d2 is the distance between point2 and point3, the specific calculation formulas for both are as follows:
[0086]
[0087] The final output is the defect judgment result.
[0088] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.
Claims
1. A method for detecting defects in equalizing rings, characterized in that, Includes the following steps: 1) Collect and organize high-resolution images of composite insulators and equipotential rings collected by drones during power transmission line inspections to construct a dataset, and mark the rectangular areas where composite insulators and equipotential rings connect. 2) In the dataset where the rectangular area connecting the composite insulator and the equipotential ring has been marked, mark the key points. Mark the two ends of the major axis of the equipotential ring, the midpoint of the metal rod of the composite insulator inside the ellipse of the equipotential ring, and the center point of the third large insulator piece of the composite insulator connected to the equipotential ring as key points. The equalizing ring is a circular ring in reality, but appears as an ellipse in images taken from the perspective of a drone inspection, thus having a major axis. Key points were labeled using Labelme software, with the label type set to "point". The endpoints of the major axis of the equalizing ring were labeled as point1 and point2. The center point of the thin metal rod of the composite insulator in the middle of the elliptical region of the equalizing ring was labeled as point3. The center point of the third large insulator piece of the composite insulator connected to the corresponding equalizing ring was labeled as point4. These points are used for subsequent calculations of the tilt angle and displacement length of the equalizing ring. The labeling of key points is based on the rectangular box labeling in step 1), therefore, one image file corresponds to only one labeling file. 3) Use data augmentation methods to expand the dataset with labeled key points to improve the robustness of the equalizing ring defect detection model to angles and scales; 4) Design a voltage equalization ring defect detection model suitable for detecting key points of the voltage equalization ring based on the Top-Down design method. This voltage equalization ring defect detection model includes a target detection model and a key point detection model. The target detection model is an improvement based on the YOLOv7 network model, which improves the detection accuracy of the detection model. Its purpose is to locate the voltage equalization ring area and determine the detachment defect of the voltage equalization ring. The key point detection model is an improvement based on the HRNet detection model, which reduces the complexity of the key point detection model and improves the accuracy of detecting key points of the voltage equalization ring. Its purpose is to detect the key points of the voltage equalization ring. The regression loss function in the original YOLOv7 network model Replace with ; The feature extraction part is composed of the stage structure in HRNet, replacing the first three ResidualBlocks in the stage structure with Inception Blocks; 5) Divide the augmented dataset into training and testing sets, design a loss function for the key point detection model, put the training set into the target detection model and the key point detection model for parallel training, adjust the parameters during training, verify the performance of the model in the testing set, and save the target detection model and the key point detection model with the best performance, so as to obtain the optimal equalizing ring defect detection model. 6) Use the optimal equalizing ring defect detection model to detect the equalizing ring defect in the image to be tested containing the equalizing ring. In the inference test stage of the target detection model, locate the area where the equalizing ring is located and detect whether there is a detachment defect. 7) For images of equalizing rings without detachment defects, perform key point detection. Based on the coordinates of the detected key points, calculate the angle between the straight lines at the two endpoints and the straight lines at the two middle points. Calculate the distances from the two endpoints to the key point at the center of the equalization ring; finally, determine whether the equalization ring has tilted or shifted based on the set threshold.
2. The method for detecting defects in an equalizing ring according to claim 1, characterized in that, In step 1), the labelme annotation software is used to annotate the rectangular area of the equalizing ring and the composite insulator connected to it, and the labels are divided into two categories: normal and defective, which are used for subsequent detection of defects in the equalizing ring.
3. The method for detecting defects in an equalizing ring according to claim 2, characterized in that, In step 3), in order to improve the learning of more robust features during the training of the equalizing ring defect detection model, data augmentation is performed on the labeled data, including random rotation or random scaling of geometric transformations, random noise blurring of color transformations, and random color and brightness transformations, so as to ensure the anti-interference ability of the equalizing ring defect detection model against different directions, scales, colors and brightness.
4. The method for detecting defects in an equalizing ring according to claim 3, characterized in that, In step 4), in order to realize the localization function and the detachment defect identification function of the equalizing ring defect detection model, the target detection model is based on the YOLOv7 network model. This model is a one-stage target detection model. By optimizing the overall model architecture design and training process, the model accuracy and inference real-time performance are improved. This target detection model proposes a new real-time detector architecture. This real-time detector architecture improves the detection accuracy of real-time detection without increasing the inference cost by controlling the shortest and longest gradient paths. Depend on It consists of center point loss, width loss, and length loss. The overlapping area, center point distance, and actual difference between the length and width of the sides were considered, thus resolving the fuzzy definition of aspect ratio. The specific calculation formula is as follows: ; ; In the formula, Indicates the area of the prediction box. Represents the actual area of the bounding box. Indicates the center point of the prediction box. Represents the center point of the true bounding box. This indicates the midpoint of the width of the prediction box. This represents the midpoint of the width of the actual bounding box. This indicates the long midpoint of the prediction box. This represents the long midpoint of the true bounding box. This indicates the calculation of the Euclidean distance between two points. This represents the width of the smallest bounding box that covers both the predicted and ground truth boxes. This represents the length of the smallest bounding box that covers both the predicted and ground truth boxes. The input to the keypoint detection model is a small-resolution image containing an equalizing ring and a composite insulator connected to it. The coordinates of the detected keypoints are used for subsequent angle and length calculations, so a high-precision keypoint detection model needs to be designed. The model structure is divided into a backbone structure and an output structure. The backbone structure ensures accurate and complete spatial location information through a multi-resolution parallel flow architecture, and achieves semantic fusion through cross-resolution interactive feature fusion to increase semantic richness. The output part outputs the prediction results through an average pooling layer. The main structure of the key point detection model is divided into an input image processing part and a feature extraction part; The input image processing section extracts shallow information from the image and converts it into feature maps for subsequent feature extraction and learning. First, the input image resolution is scaled down to 1333*800 before being fed into the keypoint detection model to ensure efficient training. Two convolutional layers with a stride of 2 and a kernel size of 3*3 are used to downsample the input into a high-channel feature data stream for subsequent feature extraction and analysis. In the Inception Block, different feature information is extracted and superimposed using convolutional layers with different kernel sizes, reducing the complexity of the keypoint detection model. A fourth Residual Block is retained to prevent gradient vanishing during training. As the number of stage structures increases, the number of parallel downsampling branches within each stage also increases. The first stage has only one main branch. After feature extraction, each branch expands into two branches: one at the original resolution and one after downsampling, and so on. Cross-resolution fusion is performed between each stage structure, using the following method: During each fusion, in addition to the feature output of the highest resolution main branch, the low-resolution branches obtained by the main branch through downsampling operation are fused by the cross-layer feature aggregation module CFA according to the adaptively generated fusion weights. Then, the aggregated features are allocated back to the corresponding resolution branches by the cross-layer feature allocation module CFD. Finally, the features are fused by top-down upsampling and added to the main branch features before being input to the next stage. By maintaining the highest resolution main branch to prevent the fading of spatial information of key points during training, and by using multi-scale feature fusion of high-level branches to reduce the loss of semantic information and salient features, feature downsampling is performed using convolutional pooling layers with corresponding strides, and upsampling is performed by replacing bilinear interpolation with deconvolution, which reduces training memory usage and improves detection speed and accuracy. Since the four key point features in the equalization ring region are obvious, three stages are sufficient to meet the feature extraction requirements. The purpose of the keypoint detection model output structure is to output the prediction results of the keypoint detection model. For keypoint detection tasks, it is only necessary to obtain a high-resolution feature map and get the output through an adaptive mean pooling layer. Because the keypoint detection model maintains a high-resolution feature branch from beginning to end, it has strong position sensitivity and can accurately locate the coordinates of the keypoint.
5. The method for detecting defects in an equalizing ring according to claim 4, characterized in that, In step 5), the training set is input into the equalizing ring defect detection model for training. Since both the rectangular region of the equalizing ring and the key point positions of the equalizing ring are labeled simultaneously, the target detection model and the key point detection model can be trained in parallel, thus saving training time and resources. When predicting key points, a prediction method based on Gaussian distribution heatmaps is used, that is, a corresponding Gaussian distribution heatmap is predicted for each key point. Therefore, during the process of generating training labels from the labeled data, a long... Width The rectangular area is converted into a length of Width Gaussian distribution heatmaps are used to balance the memory size and quantization error of the keypoint detection model. The size of each Gaussian distribution heatmap is... and It is the size of the input rectangular area. and One-quarter; the probability of the predicted key point location is the corresponding Gaussian distribution value in the Gaussian distribution heatmap, and each point on the Gaussian distribution heatmap... The formula for calculating the value is as follows: ; ; In the formula, Points on the Gaussian distribution heatmap The value, This represents the minimum threshold of probability in the Gaussian distribution heatmap. The x-axis is... The vertical axis is , For the first The x-coordinate values of key points in a Gaussian distribution heatmap For the first The ordinate values of key points in a Gaussian distribution heatmap Represents the Gaussian kernel distribution factor. This represents the minimum threshold for predicting the location probability of key points. The loss function of the keypoint detection model calculates the distance difference between each predicted keypoint and the actual keypoint in the Gaussian heatmap. Since one Gaussian heatmap predicts the location of one keypoint, four Gaussian heatmaps are needed for subsequent loss function calculations, as detailed below: ; In the formula, express The loss function of a Gaussian heatmap. Indicates the first Gaussian distribution heatmap of key points; Considering the balanced sample size across the four key points, weighted mean square error was chosen. The loss function used for training the keypoint detection model is calculated as follows: ; In the formula, express The weighted loss function for each key point This represents the weighted mean square error of a single keypoint. This indicates the number of sample points in the Gaussian distribution heatmap. Indicates the first The predicted score for each sample. Indicates the first The true score of each sample Indicates the first Key points The weight value.
6. The method for detecting defects in an equalizing ring according to claim 5, characterized in that, In step 6), the optimal equalizing ring defect detection model is used to detect the image data with composite insulators collected during the UAV power inspection. The high-resolution image of the UAV power inspection to be detected is input, and the target detection model outputs the predicted rectangular frame coordinates and labels of the area containing the equalizing ring and the part of the insulator connected to it. If the label is detached, it is determined that there is an equalizing ring detachment defect.
7. The method for detecting defects in an equalizing ring according to claim 6, characterized in that, In step 7), key point detection is performed on the image of the equalizing ring without detachment defects, and the coordinate values of four key points are output, namely the left endpoint point1 of the equalizing ring. Point 2, the right end of the equalizing ring Point 3, the center point of the equalizing ring The center point 4 of the third large insulator disc of the composite insulator connected to the equalizing ring. Under normal circumstances, the line connecting the two key points at both ends of the equalizing ring should be perpendicular to the line connecting the two key points in the middle, based on a pre-set threshold. If the angle between the two connecting lines and The absolute value of the difference exceeds the threshold. The equalizing ring is then determined to have a tilting defect. The specific calculation formula is as follows: ; In the formula, It is the angle between the line connecting point 1 and point 2 and the line connecting point 3 and point 4. Let be the slope of the line connecting point1 and point2; The slope of the line connecting point 3 and point 4 is calculated using the following formula: ; Under normal circumstances, the line lengths connecting the key points at both ends of the equalizing ring to the key point in the middle of the equalizing ring should be equal, based on the pre-designed threshold. If the ratio of the difference in length of two connecting lines to the sum of their lengths... Exceeding the threshold The equalizing ring is then determined to have a displacement defect. The specific calculation formula is as follows: ; In the formula, Let be the distance between point1 and point3. The distance between point2 and point3 is calculated using the following formula: 。
Citation Information
Patent Citations
Grading ring inclination fault identification method and device based on key point detection
CN113034501A
Chemical process fault diagnosis method based on improved residual network
CN115457307A