Distribution line skeleton type defect troubleshooting method, system, device and medium
By combining a skeleton region detection model with a large and small target recognition model, the problem of serious false alarms in the inspection of power distribution lines by drones was solved, achieving efficient and accurate defect troubleshooting and improving the detection accuracy and efficiency of power inspection.
Patent Information
- Application Number
- CN202511715666.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-21
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2045-11-21
AI Technical Summary
There are a large number of false alarms for defects in the current distribution network line drone inspections. The false alarms are serious and the detected defect locations are inaccurate, which poses a great challenge to the staff.
By combining a skeleton region detection model with large and small target recognition models, and through skeleton region detection, merging, and individual bounding box marking, combined with filtering fusion and error correction rules, false alarm defects are accurately eliminated, and the final error correction results of distribution network lines are obtained.
It significantly improves the troubleshooting efficiency of power line inspection work, effectively prevents false detections, and improves the accuracy and efficiency of detection.
Smart Images

Figure CN121170613B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, and in particular to a distribution network line skeleton type defect troubleshooting method, system, device and medium. BACKGROUND
[0002] At present, the unmanned aerial vehicle inspection task of the distribution network line is numerous, and the unmanned aerial vehicle inspection defect image data needs to be processed urgently. When the conventional distribution network line defect detection model detects the distribution network line defect image, a large amount of false information will be generated. On the one hand, many detected defects are not on the distribution network line, but in other background areas; on the other hand, although many detected defects are on the distribution network line, according to the prior knowledge of the actual defect of the distribution network line, the position of the detection frame does not belong to the actual defect area. In this way, a large number of false reports need to be debugged, which brings great challenges to the staff.
[0003] The existing distribution network line defect recognition method often uses YOLO series, DETR series and other detection algorithms, but due to the non-obvious defect features of the distribution network line, the numerous defect types and the complex and variable scenes, directly using YOLO series, DETR series and other detection algorithms often presents the phenomenon of insufficient detection and high false report. SUMMARY
[0004] Therefore, the purpose of the present application is to overcome the shortcomings of the prior art and provide a distribution network line skeleton type defect troubleshooting method, system, device and medium.
[0005] The present application provides the following technical solutions:
[0006] In a first aspect, the present application provides a distribution network line skeleton type defect troubleshooting method, which comprises:
[0007] Obtaining a distribution network line inspection image, inputting the distribution network line inspection image into a skeleton region detection model to obtain a plurality of skeleton region rectangular frames and a plurality of skeleton region types, marking each skeleton region rectangular frame with a combined frame to obtain a first troubleshooting area and a first troubleshooting area image, marking each skeleton region rectangular frame with an individual frame to obtain a plurality of second troubleshooting areas and a plurality of second troubleshooting area types;
[0008] Inputting the distribution network line inspection image into a large target recognition model to obtain a plurality of large target defect rectangular frames and a plurality of large target defect types, inputting the first troubleshooting area image into a small target recognition model to obtain a plurality of small target defect rectangular frames and a plurality of small target defect types;
[0009] filtering and fusing each of the large target defect rectangular frame and each of the large target defect type, each of the small target defect rectangular frame and each of the small target defect type, to obtain a plurality of first remaining defect rectangular frames and corresponding first remaining defect types thereof;
[0010] using a first error correction rule to correct each of the first remaining defect rectangular frame and the corresponding first remaining defect type thereof, to obtain a plurality of second remaining defect rectangular frames and corresponding second remaining defect types thereof, using a second error correction rule to correct each of the second remaining defect rectangular frame and the corresponding second remaining defect type thereof, to obtain a plurality of third remaining defect rectangular frames and corresponding third remaining defect types thereof, and determining each of the third remaining defect rectangular frame and the corresponding third remaining defect type thereof as a distribution network line defect error correction result;
[0011] determining whether the distribution network line defect error correction result is empty, if yes, recording the error correction result defect list of the distribution network line inspection image as empty, if not, recording each of the third remaining defect rectangular frame and the corresponding third remaining defect type thereof in the error correction result defect list, and saving.
[0012] In an optional implementation, the using a first error correction rule to correct each of the first remaining defect rectangular frame and the corresponding first remaining defect type thereof, to obtain a plurality of second remaining defect rectangular frames and corresponding second remaining defect types thereof, comprises:
[0013] for each of the first remaining defect type, setting a corresponding first variation overlap rate threshold;
[0014] traversing each of the first remaining defect rectangular frame, calculating the variation overlap rate of each of the first remaining defect rectangular frame and the first error correction area, and using a first error correction formula to exclude a first target remaining defect rectangular frame, the variation overlap rate of the first target remaining defect rectangular frame being less than the first variation overlap rate threshold of the first remaining defect type corresponding thereto, to obtain a plurality of second remaining defect rectangular frames and corresponding second remaining defect types thereof;
[0015] wherein, the first error correction formula is:
[0016]
[0017] wherein, indicates whether to exclude the first remaining defect type from the first remaining defect rectangular frame ; when is 1, the corresponding first remaining defect rectangular frame is taken as the first target remaining defect rectangular frame, and is excluded, and when When the value is 0, the corresponding first remaining defect rectangle is... reserve; This indicates that the first remaining defect type is The The first remaining defect rectangle With the first error correction area The overlap rate of the variation, This indicates that the first remaining defect type is The first variation overlap rate threshold.
[0018] In an optional implementation, the step of using a second error-correction rule to correct errors in each of the second remaining defect rectangles and their corresponding second remaining defect types to obtain multiple third remaining defect rectangles and their corresponding third remaining defect types includes:
[0019] For each second remaining defect type, multiple second error-correction region types are associated, and for each second error-correction region type, a corresponding second variation overlap rate threshold is set;
[0020] Traverse each second remaining defect rectangle, and search for the second error correction regions of multiple second error correction region types associated with each second remaining defect rectangle according to the second remaining defect type, to obtain the search results of the second error correction region list;
[0021] Determine whether the search results of the second error-correction area list are empty. If so, retain each second remaining defect rectangle and its corresponding second remaining defect type. Otherwise, obtain the corresponding second error-correction area list and the corresponding second error-correction area type list. The second error-correction area type list includes multiple second error-correction area types.
[0022] Traverse each second error correction region in the second error correction region list, calculate the variation overlap rate of each second remaining defect rectangle and its corresponding multiple second error correction regions, and use the second error correction formula to exclude the second target remaining defect rectangle. The variation overlap rate of the second target remaining defect rectangle is less than the second variation overlap rate threshold of the multiple second error correction region types associated with its corresponding second remaining defect type, and obtain multiple third remaining defect rectangles and their corresponding third remaining defect types.
[0023] The second error-correction formula is as follows:
[0024]
[0025] In the formula, Indicate whether to exclude the second residual defect type. The The second remaining defect rectangle When the corresponding second remaining defect rectangular frame is the second target remaining defect rectangular frame, and is excluded when is 0, the corresponding second remaining defect rectangular frame is retained; indicates that the second remaining defect type is the associated second bug area type list, indicates that the second remaining defect type is associated with the second bug area type, indicates that the second remaining defect type is the second remaining defect rectangular frame has a variant overlap rate with the second bug area of the second bug area type indicates that the second remaining defect type is the associated second bug area type is a second variant overlap rate threshold value.
[0026] In an optional embodiment, the filtering and merging of each of the large target defect rectangular frame and each of the large target defect type, each of the small target defect rectangular frame and each of the small target defect type, to obtain a plurality of first remaining defect rectangular frames and their corresponding first remaining defect types, comprises:
[0027] Obtain the confidence of each of the large target defect rectangular frame, and delete the rectangular frame whose confidence is lower than the first preset confidence threshold value, to obtain a plurality of first large target defect rectangular frames;
[0028] Calculate the overlap rate of each of the first large target defect rectangular frame by using a non-maximum suppression processing algorithm, and delete the rectangular frame whose overlap rate is greater than a preset overlap rate threshold value, to obtain a plurality of second large target defect rectangular frames;
[0029] Obtain the confidence of each of the small target defect rectangular frame, and delete the rectangular frame whose confidence is lower than the second preset confidence threshold value, to obtain a plurality of first small target defect rectangular frames;
[0030] Calculate the variant overlap rate of each of the first small target defect rectangular frame by using an area non-maximum suppression processing algorithm, and delete the rectangular frame whose variant overlap rate is greater than a preset variant overlap rate threshold value, to obtain a plurality of second small target defect rectangular frames;
[0031] Merging the second large target defect rectangular frame and the corresponding large target defect type thereof, and the second small target defect rectangular frame and the corresponding small target defect type thereof, to obtain a plurality of first remaining defect rectangular frames and a plurality of first remaining defect types corresponding thereto.
[0032] In an optional implementation, the inputting of the distribution network line inspection image into the large target recognition model to obtain a plurality of large target defect rectangular frames and a plurality of large target defect types, and the inputting of the first troubleshooting area image into the small target recognition model to obtain a plurality of small target defect rectangular frames and a plurality of small target defect types, comprises:
[0033] Inputting the distribution network line inspection image into the large target recognition model, and performing target defect detection by using the large target recognition model to obtain a plurality of large target defect rectangular frames and a plurality of large target defect types;
[0034] Cropping the first troubleshooting area image according to a preset cropping resolution by using a sliding window to obtain a sliding window image set, inputting the sliding window image set into the small target recognition model, performing target defect detection by using the small target recognition model to obtain defect rectangular frames and defect types of the sliding window image set, and mapping coordinates of the defect rectangular frames of the sliding window image set back to coordinates of the distribution network line inspection image to obtain a plurality of small target defect rectangular frames and a plurality of small target defect types.
[0035] In an optional implementation, the skeleton region detection model is based on an improved YOLO11 detection algorithm, the improved YOLO11 detection algorithm comprises a backbone network, a feature pyramid network and a decoupling head, the feature pyramid network comprises a first self-attention convolution module, a second self-attention convolution module, a first convolution module, a second convolution module, a first efficient attention convolution module, a second efficient attention convolution module and a third efficient attention convolution module, the decoupling head comprises a first classification regression module, a second classification regression module and a third classification regression module, and the inputting of the distribution network line inspection image into the skeleton region detection model to obtain a plurality of skeleton region rectangular frames and a plurality of skeleton region types comprises:
[0036] Inputting the distribution network line inspection image into the backbone network to obtain a first layer feature map, a second layer feature map and a third layer feature map;
[0037] Inputting the third layer feature map and the second layer feature map into the first self-attention convolution module to obtain a first self-attention convolution feature map, and concatenating the first self-attention convolution feature map and the second layer feature map to obtain a first fusion feature map;
[0038] input the first fusion feature map and the first layer feature map into the second self-attention convolution module to obtain a second self-attention convolution feature map, and concatenate the second self-attention convolution feature map and the first layer feature map to obtain a second fusion feature map;
[0039] input the second fusion feature map into the first convolution module to obtain a first feature map, and concatenate the first feature map and the first fusion feature map to obtain a third fusion feature map;
[0040] input the third fusion feature map into the second convolution module to obtain a second feature map, and concatenate the second feature map and the third layer feature map to obtain a fourth fusion feature map;
[0041] input the second fusion feature map into the first efficient attention convolution module to obtain a first efficient attention convolution feature map, input the third fusion feature map into the second efficient attention convolution module to obtain a second efficient attention convolution feature map, and input the fourth fusion feature map into the third efficient attention convolution module to obtain a third efficient attention convolution feature map;
[0042] input the first efficient attention convolution feature map, the second efficient attention convolution feature map and the third efficient attention convolution feature map into the first classification regression module, the second classification regression module and the third classification regression module respectively to obtain a plurality of the skeleton region rectangular frames and a plurality of the skeleton region types.
[0043] In an optional implementation, the inputting the third layer feature map and the second layer feature map into the first self-attention convolution module to obtain a first self-attention convolution feature map comprises:
[0044] performing 1x1 convolution on the second layer feature map twice respectively to obtain a first projection matrix and a second projection matrix respectively;
[0045] performing similarity matching on the first projection matrix and the second projection matrix to obtain a similarity matching matrix, and processing the similarity matching matrix through an activation function to obtain an attention weighting matrix;
[0046] performing 1x1 convolution and up-sampling on the third layer feature map in sequence to obtain an up-sampled feature map, and performing 1x1 convolution on the up-sampled feature map to obtain a third projection matrix;
[0047] performing matrix multiplication operation on the third projection matrix and the attention weighting matrix to obtain the first self-attention convolution feature map;
[0048] The second fusion feature map is input into the first efficient attention convolution module to obtain a first efficient attention convolution feature map.
[0049] According to the number of channels of the second fusion feature map, the second fusion feature map is evenly divided into two fusion feature subgraphs, spatial maximum pooling and spatial average pooling are respectively performed on the two fusion feature subgraphs, and channel splicing is performed to obtain a channel feature map.
[0050] The channel feature map is subjected to 1*1 convolution and a Relu activation function to obtain a channel weighting feature map, and matrix multiplication is performed on the second fusion feature map and the channel weighting feature map to obtain a channel attention feature map.
[0051] According to the number of channels of the channel attention feature map, the channel attention feature map is evenly divided into two channel attention feature subgraphs, channel maximum pooling and channel average pooling are respectively performed on the two channel attention feature subgraphs, and channel splicing is performed to obtain a spatial feature map.
[0052] The spatial feature map is subjected to 1*1 convolution and the Relu activation function to obtain a spatial weighting feature map, and matrix multiplication is performed on the channel attention feature map and the spatial weighting feature map to obtain the first efficient attention convolution feature map.
[0053] In a second aspect, the present application provides a distribution network line skeleton type defect troubleshooting system, which comprises:
[0054] A marking module is configured to acquire a distribution network line inspection image, input the distribution network line inspection image into a skeleton region detection model to obtain a plurality of skeleton region rectangular frames and a plurality of skeleton region types, mark each of the skeleton region rectangular frames to obtain a first troubleshooting region and a first troubleshooting region image, and mark each of the skeleton region rectangular frames individually to obtain a plurality of second troubleshooting regions and a plurality of second troubleshooting region types.
[0055] An identification module is configured to input the distribution network line inspection image into a large target identification model to obtain a plurality of large target defect rectangular frames and a plurality of large target defect types, and input the first troubleshooting region image into a small target identification model to obtain a plurality of small target defect rectangular frames and a plurality of small target defect types.
[0056] A fusion module is configured to filter and fuse each of the large target defect rectangular frames and each of the large target defect types, each of the small target defect rectangular frames and each of the small target defect types to obtain a plurality of first remaining defect rectangular frames and corresponding first remaining defect types.
[0057] The error elimination module is configured to eliminate errors of each of the first remaining defect rectangular frame and the corresponding first remaining defect type by using a first error elimination rule to obtain a plurality of second remaining defect rectangular frames and corresponding second remaining defect types, eliminate errors of each of the second remaining defect rectangular frame and the corresponding second remaining defect type by using a second error elimination rule to obtain a plurality of third remaining defect rectangular frames and corresponding third remaining defect types, and determine each of the third remaining defect rectangular frame and the corresponding third remaining defect type as the distribution network line defect error elimination result.
[0058] The recording module is configured to determine whether the distribution network line defect error elimination result is empty, record the error elimination result defect list of the distribution network line inspection image as empty if the distribution network line defect error elimination result is empty, and record each of the third remaining defect rectangular frame and the corresponding third remaining defect type in the error elimination result defect list and save if the distribution network line defect error elimination result is not empty.
[0059] In a third aspect, a computer device is provided in the embodiments of the present disclosure. The computer device includes a memory and a processor. The memory stores a computer program. The processor implements the steps of the distribution network line skeleton type defect error elimination method in the first aspect when executing the computer program.
[0060] In a fourth aspect, a computer readable storage medium is provided in the embodiments of the present disclosure. The computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the steps of the distribution network line skeleton type defect error elimination method in the first aspect.
[0061] The present application has the following beneficial effects:
[0062] The distribution network line skeleton type defect error elimination method provided by the embodiments of the present application is based on a deep learning algorithm. The skeleton region detection model is used to obtain a skeleton region rectangular frame and a skeleton region type, and then a first error elimination region, a first error elimination region image, a second error elimination region and a second error elimination region type are obtained. Then, a large target defect detection model is used to detect a large target defect type, a small target defect detection model is used to detect a small target defect type, and finally a first error elimination rule and a second error elimination rule are used to eliminate errors of the large target defect type and the small target defect type, so as to obtain a final distribution network line defect error elimination result. The error elimination efficiency of power inspection work can be greatly improved, and the false detection phenomenon can be effectively prevented.
[0063] In order to make the above-mentioned objectives, characteristics and advantages of the present application more apparent and easy to understand, the following preferred embodiments are described in detail below, and the accompanying drawings are described as follows. BRIEF DESCRIPTION OF DRAWINGS
[0064] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort. In the various drawings, similar components are numbered similarly.
[0065] Figure 1 A flowchart of a method for troubleshooting defects in a distribution network line skeleton provided in an embodiment of this application is shown;
[0066] Figure 2 A schematic diagram of the network structure of an improved YOLO11 detection algorithm provided in an embodiment of this application is shown;
[0067] Figure 3 This illustration shows a schematic diagram of the network structure of a first self-attention convolutional module provided in an embodiment of this application;
[0068] Figure 4 This illustration shows a schematic diagram of the network structure of a first high-efficiency attention convolutional module provided in an embodiment of this application;
[0069] Figure 5 This paper shows a schematic diagram of a distribution network line skeleton-type defect troubleshooting system provided in an embodiment of this application. Detailed Implementation
[0070] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0071] Example 1
[0072] like Figure 1 The diagram shown is a flowchart of a method for troubleshooting skeleton-type defects in distribution network lines according to an embodiment of this application. The method for troubleshooting skeleton-type defects in distribution network lines provided in this embodiment includes the following steps:
[0073] Step S110: Obtain the distribution network line inspection image, input the distribution network line inspection image into the skeleton area detection model to obtain multiple skeleton area rectangles and multiple skeleton area types, merge and mark the skeleton area rectangles to obtain the first error correction area and the first error correction area image, and mark the skeleton area rectangles individually to obtain multiple second error correction areas and multiple second error correction area types.
[0074] In this embodiment, first, a distribution network line inspection image is acquired, and according to the distribution network line inspection image, skeletonization is performed on components of the distribution network line to obtain various skeleton regions (including a power pole region, a cross arm device region in which many devices are hung on a cross arm, a transformer region in which many devices are hung on a transformer, a vacuum device region in which many devices are hung on a vacuum device, a connecting fitting region, a wire region, and the like) distributed on the distribution network line. In the distribution network line inspection image, rectangular frames and types are labeled for the various skeleton regions to obtain a skeleton region original sample library; and according to the skeleton region original sample library, a skeleton region augmented sample library is constructed (augmentation methods include left-right flipping, angle rotation, Gaussian noise, image mixing (mixup), and the like). The skeleton region original sample library and the skeleton region augmented sample library are merged to obtain a skeleton region sample library, and then according to the skeleton region sample library, an improved YOLO11 detection algorithm is trained to obtain a skeleton region detection model.
[0075] Understandably, the distribution network inspection image has high resolution and a variety of scenes, and various skeleton regions distributed on the distribution network line have different target sizes and complex shape textures. In order to accurately detect the skeleton regions of the distribution network line, the improved YOLO11 detection algorithm is adopted to build the skeleton region detection model, which can not only effectively cover the scale range of the various skeleton regions, but also effectively perceive the features of the various skeleton regions.
[0076] In order to accurately obtain high-level detailed features and quickly extract the skeleton regions of the distribution network line, a self-attention convolution module (SACM) is introduced into a feature pyramid network part of the original YOLO11 detection algorithm, so that the network pays more attention to the skeleton regions, and an efficient attention convolution module (EACM) is introduced, so that the network can quickly capture detailed features of the skeleton regions.
[0077] As shown in Figure 2 , the improved YOLO11 detection algorithm includes a backbone network, a feature pyramid network, and a decoupled head, the feature pyramid network includes a first self-attention convolution module, a second self-attention convolution module, a first convolution module, a second convolution module, a first efficient attention convolution module, a second efficient attention convolution module, and a third efficient attention convolution module, and the decoupled head includes a first classification regression module, a second classification regression module, and a third classification regression module.
[0078] Understandably, the distribution network line inspection image is input into the skeleton region detection model to obtain a plurality of skeleton region rectangular frames and a plurality of skeleton region types, and the specific process is as follows:
[0079] First, as shown in Figure 2 First, as shown in Figure 2 The distribution network line inspection image is obtained through the backbone network (Conv3~Conv5) constructed by the C3K2 module to obtain the first layer feature map F3, the second layer feature map F4 and the third layer feature map F5; then, F3~F5 are input into the feature pyramid network PA-SACM-FPN, wherein the third layer feature map F5 and the second layer feature map F4 pass through the first self-attention convolution module to generate the first self-attention convolution feature map SACF4, and then the first self-attention convolution feature map SACF4 and the second layer feature map F4 are cascaded to generate the first fusion feature map P4; then, the first fusion feature map P4 and the first layer feature map F3 pass through the second self-attention convolution module to generate the second self-attention convolution feature map SACF3, and then the second self-attention convolution feature map SACF3 and the first layer feature map F3 are cascaded to generate the second fusion feature map P3; then, the second fusion feature map P3 passes through the first convolution module to generate the first feature map PAF4 with the same resolution as the first fusion feature map P4, and the first feature map PAF4 is further cascaded with the first fusion feature map P4 to generate the third fusion feature map P4; then, the third fusion feature map P4 passes through the second convolution module to generate the second feature map PAF5 with the same resolution as the third layer feature map F5, and the second feature map PAF5 is further cascaded with the third layer feature map F5 to generate the fourth fusion feature map P5; then, the second fusion feature map P3, the third fusion feature map P4 and the fourth fusion feature map P5 pass through the first efficient attention convolution module, the second efficient attention convolution module and the third efficient attention convolution module respectively to generate the first efficient attention convolution feature map T3, the second efficient attention convolution feature map T4 and the third efficient attention convolution feature map T5 respectively, so that the cross-layer detail feature maps (T3~T5) from top to bottom and from bottom to top are obtained; finally, the first efficient attention convolution feature map T3, the second efficient attention convolution feature map T4 and the third efficient attention convolution feature map T5 pass through the first classification regression module, the second classification regression module and the third classification regression module in the decoupling head for classification and regression to obtain a plurality of skeleton area rectangular frames and a plurality of skeleton area types, thereby completing the detection task of the distribution network line skeleton area.
[0080] It should be noted that, in Figure 2 concat means concatenating multiple images along a certain dimension to facilitate subsequent calculation.
[0081] Understandably, as Figure 3As shown, the working principle of the self-attention convolution module in the above process is as follows (taking the third layer feature map F5 and the second layer feature map F4 as input of the first self-attention convolution module, and taking the first self-attention convolution feature map SACF4 as an example): first, the low layer high resolution feature map (the second layer feature map F4) is subjected to two 1x1 convolutions respectively, and the first projection matrix Q and the second projection matrix K are obtained respectively; the similarity matching matrix is obtained by similarity matching the first projection matrix Q and the second projection matrix K, and the attention weighting matrix W is obtained by processing the similarity matching matrix through the activation function; then, the high layer low resolution feature map (the third layer feature map F5) is subjected to 1x1 convolution and up-sampling in turn, and the up-sampling feature map with the same resolution as the low layer high resolution feature map (the second layer feature map F4) is obtained, and the up-sampling feature map is subjected to 1x1 convolution to obtain the third projection matrix V; the third projection matrix V and the attention weighting matrix W are subjected to matrix multiplication operation, and then the first self-attention convolution feature map SACF4 is obtained, and the specific formula is as follows:
[0082]
[0083] In the formula, SACF4 is the first self-attention convolution feature map SACF4, K is the vector dimension of the similarity matching in the second projection matrix K.
[0084] It should be noted that in the process of inputting the first fusion feature map ~P4 and the first layer feature map F3 into the second self-attention convolution module to obtain the second self-attention convolution feature map SACF3, the first fusion feature map ~P4 is a high layer low resolution feature map, and the first layer feature map F3 is a low layer high resolution feature map, and the principle is the same as that of the above first self-attention convolution module, which will not be described herein.
[0085] Understandably, as Figure 4As shown, the working principle of the high-efficiency attention convolution module in the above process is as follows (taking the second fusion feature map P3 inputting the first high-efficiency attention convolution module to obtain the first high-efficiency attention convolution feature map T3 as an example): first, according to the channel number c of the second fusion feature map P3, the second fusion feature map P3 is evenly divided into two fusion feature subgraphs, and the channel numbers of the two fusion feature subgraphs are c / 2 and c / 2 respectively; the two fusion feature subgraphs are respectively subjected to spatial maximum pooling and spatial average pooling, and are subjected to channel splicing to obtain a channel feature map with a channel number of c; then, the channel feature map is subjected to 1x1 convolution and is activated by a Relu function to obtain a channel weighting feature map, and the second fusion feature map P3 and the channel weighting feature map are subjected to matrix multiplication operation to obtain a channel attention feature map; then, according to the channel number c of the channel attention feature map, the channel attention feature map is evenly divided into two channel attention feature subgraphs, and the channel numbers of the two channel attention feature subgraphs are c / 2 and c / 2 respectively; the two channel attention feature subgraphs are respectively subjected to channel maximum pooling and channel average pooling, and are subjected to channel splicing to obtain a spatial feature map with a channel number of 2; the spatial feature map is subjected to 1x1 convolution and is activated by a Relu function to obtain a spatial weighting feature map with a channel number of 1, and finally the channel attention feature map and the spatial weighting feature map are subjected to matrix multiplication operation to obtain the first high-efficiency attention convolution feature map T3.
[0086] It should be noted that the principle of inputting the third fusion feature map P4 into the second high-efficiency attention convolution module to obtain the second high-efficiency attention convolution feature map T4, and inputting the fourth fusion feature map P5 into the third high-efficiency attention convolution module to obtain the third high-efficiency attention convolution feature map T5 is consistent with the principle of the first high-efficiency attention convolution module, and this embodiment will not be repeated here.
[0087] After obtaining the multiple skeleton region rectangular frames and the multiple skeleton region types through the skeleton region detection model, the multiple skeleton region rectangular frames are marked with a merged frame to obtain a first error area and a first error area image of the distribution network line, and each skeleton region rectangular frame is marked with an individual frame to obtain multiple second-level error areas and multiple second-level error area types of the distribution network line.
[0088] The above steps employ a skeleton region detection model for distribution network line skeletonization, effectively separating the background region from the distribution network line region (the first error correction region) and refining the distribution area of each distribution network device (the second error correction region). This not only narrows the detection range for both small and large target defects but also plays a crucial role in subsequent defect target error correction. Furthermore, the skeleton region detection model uses an improved YOLO11 detection network, utilizing a self-attention convolution module to impart detail attention to lower-level feature maps within high-level feature maps, and employing an efficient attention convolution module for rapid detail learning of target features. This not only enhances the high-level semantic feature representation of the target but also effectively controls the computational efficiency of target features, laying the foundation for both the accuracy and speed of skeleton region detection.
[0089] Step S120: Input the distribution network line inspection image into the large target recognition model to obtain multiple large target defect rectangles and multiple large target defect types; input the first error correction area image into the small target recognition model to obtain multiple small target defect rectangles and multiple small target defect types.
[0090] Furthermore, after the error-checking area marking process is completed, large target defect detection and small target defect detection can be performed simultaneously. First, the distribution network line inspection images are input into the large target defect detection model, and the large target recognition model is used to detect target defects, resulting in multiple large target defect rectangles and multiple large target defect types (including tower top damage, crossarm bending deformation, tower bird nests, conductor foreign objects, missing drop-out fuses, transformer bushings lacking insulation covers, vacuum bushings lacking insulation covers, etc.). Then, the first error-checking area image is cropped into a sliding window according to a preset resolution size (1500×1500 in this embodiment) to obtain a sliding window image set (in this embodiment, if the width or height of the first-level error-checking area is less than 1500 pixels, it will be expanded outward; if the width and height of the image are less than 1500 pixels, padding will be performed); the sliding window image set is input into the small target defect detection model, and the small target recognition model is used to detect target defects to obtain the defect rectangle and defect type of the sliding window image set; the coordinates of the defect rectangle of the sliding window image set are mapped back to the coordinates of the distribution network line inspection image to obtain multiple small target defect rectangles and multiple small target defect types (including safety pin detachment, connecting hardware ball head corrosion, spring pin detachment, etc.).
[0091] It should be noted that in the present embodiment, the large target defect detection model training process is as follows: obtaining a large target defect original sample library, constructing a large target defect augmented sample library (the augmentation methods include left-right flipping, angle rotation, Gaussian noise, image mixing (mixup), etc.); merging the large target defect original sample library and the large target defect augmented sample library to obtain a large target defect training sample library; training the YOLO11 detection algorithm according to the large target defect training sample library to obtain a large target defect detection model.
[0092] It should be noted that in the present embodiment, the small target defect detection model training process is as follows: according to the small target defect original sample library, image cropping is performed through a sliding window (in the present embodiment, the cropping resolution is 1500 pixels x 1500 pixels, if the cropped image width or height is less than 1500 pixels, it will be expanded outward; if the width and height of the original image are less than 1500 pixels, padding filling processing will be performed), and a small target defect original subgraph library is obtained; according to the small target defect original sample library, a small target defect augmented sample library is constructed (the augmentation methods include left-right flipping, angle rotation, Gaussian noise, image mixing (mixup), etc.), and image cropping is performed through a sliding window (in the present embodiment, the cropping resolution is 1500 pixels x 1500 pixels, if the cropped image width or height is less than 1500 pixels, it will be expanded outward; if the width and height of the original image are less than 1500 pixels, padding filling processing will be performed), and a small target defect augmented subgraph library is obtained; merging the small target defect original subgraph library and the small target defect augmented subgraph library to obtain a small target defect training sample library; training the YOLO11 detection algorithm according to the small target defect training sample library to obtain a small target defect detection model.
[0093] The above steps adopt the strategy of large target defect classification detection + small target defect classification detection, and specifically solve the core problem of large / small target feature weak detection in distribution network line inspection images, realizing full coverage detection of different scale defects of distribution network lines, and providing comprehensive and accurate initial detection results for subsequent defect filtering and troubleshooting.
[0094] In step S130, each large target defect rectangular frame and each large target defect type, each small target defect rectangular frame and each small target defect type are filtered and fused to obtain a plurality of first remaining defect rectangular frames and their corresponding first remaining defect types.
[0095] Specifically, for the large target defect rectangular frame and the large target defect type: (1) first, for different large target defect types, different first preset confidence threshold values are set, the confidence of each large target defect rectangular frame is obtained, and the rectangular frame whose confidence is lower than the first preset confidence threshold value (for example, 0.30) of the corresponding large target defect type is deleted, to obtain a plurality of first large target defect rectangular frames; (2) then, for different large target defect types, different preset overlap rate threshold values are set, the overlap rate of each first large target defect rectangular frame is calculated by using a non-maximum suppression processing algorithm (NMS) and a preset overlap rate formula, and the rectangular frame whose overlap rate is greater than the preset overlap rate threshold value (for example, 0.70) is deleted, to obtain a plurality of second large target defect rectangular frames.
[0096] Understandably, the preset overlap rate formula is:
[0097]
[0098] In the formula, represents the overlap rate of the rectangular frame ABCD and the rectangular frame EFGH, is the intersection area of the rectangular frame ABCD and the rectangular frame EFGH, is the area of the rectangular frame ABCD, is the area of the rectangular frame EFGH, is the horizontal coordinate of the top-left point A of the rectangular frame ABCD, is the vertical coordinate of the top-left point A of the rectangular frame ABCD, is the horizontal coordinate of the bottom-right point C of the rectangular frame ABCD, is the vertical coordinate of the bottom-right point C of the rectangular frame ABCD, is the horizontal coordinate of the top-left point E of the rectangular frame EFGH, is the vertical coordinate of the top-left point E of the rectangular frame EFGH, is the horizontal coordinate of the bottom-right point G of the rectangular frame EFGH, is the vertical coordinate of the bottom-right point G of the rectangular frame EFGH.
[0099] Further, for the small target defect rectangular frame and the small target defect type: (1) first, different second preset confidence thresholds are set for different small target defect types, the confidence of each small target defect rectangular frame is obtained, and the rectangular frame with a confidence lower than the second preset confidence threshold (for example, 0.30) is deleted to obtain a plurality of first small target defect rectangular frames; (2) then, different preset variation overlap rate thresholds are set for different small target defect types, the variation overlap rate of each first small target defect rectangular frame is calculated by using an area non-maximum suppression processing algorithm (ANMS), and the rectangular frame with a variation overlap rate greater than the preset variation overlap rate threshold (for example, 0.80) is deleted to obtain a plurality of second small target defect rectangular frames.
[0100] In the above process, since the small target defect detection model detects the sliding window image, some sliding window images contain complete target contours, but some sliding window images only contain partial target contours. Thus, after detection by the small target defect detection model, the rectangular frame of the complete target contour and the rectangular frame of the partial target contour are obtained. Therefore, it is necessary to retain the rectangular frame of the complete target contour detected by the small target defect detection model and delete the rectangular frame of the partial target contour detected by the small target defect detection model by using the area non-maximum suppression processing algorithm.
[0101] Preferably, the flow of the area non-maximum suppression processing algorithm is as follows: first, all rectangular frames are sorted in descending order (or in ascending order) according to the area of the rectangular frame, then the rectangular frame with the largest area is selected as the registration rectangular frame, the variation overlap rate of each remaining rectangular frame and the registration rectangular frame is calculated by using the preset variation overlap rate formula, so that each remaining rectangular frame corresponds to a variation overlap rate. If the variation overlap rate is greater than the preset variation overlap rate threshold (for example, 0.80), the corresponding remaining rectangular frame is deleted. If the variation overlap rate is less than or equal to the preset variation overlap rate threshold, the corresponding remaining rectangular frame is retained. Then, the rectangular frame with the largest area is selected again from the plurality of remaining rectangular frames as a new round of registration rectangular frame, the variation overlap rate of the other remaining rectangular frames and the new round of registration rectangular frame is calculated by using the preset variation overlap rate formula, the other remaining rectangular frame with the variation overlap rate greater than the preset variation overlap rate threshold is deleted, and the other remaining rectangular frame with the variation overlap rate less than or equal to the preset variation overlap rate threshold is retained. The above steps are continued to be repeated until there is no rectangular frame with a variation overlap rate greater than the preset variation overlap rate threshold in all selected registration rectangular frames. Finally, all selected registration rectangular frames are taken as the output rectangular frame of the final algorithm.
[0102] Understandably, the preset variation overlap rate formula is:
[0103]
[0104] In the formula, denotes the variation overlap rate of the rectangular frame ABCD and the rectangular frame EFGH, denotes the intersection area of the rectangular frame ABCD and the rectangular frame EFGH, is the area of the rectangular frame ABCD, is the area of the rectangular frame EFGH, is the horizontal coordinate of the top-left point A of the rectangular frame ABCD, is the vertical coordinate of the top-left point A of the rectangular frame ABCD, is the horizontal coordinate of the bottom-right point C of the rectangular frame ABCD, is the vertical coordinate of the bottom-right point C of the rectangular frame ABCD, is the horizontal coordinate of the top-left point E of the rectangular frame EFGH, is the vertical coordinate of the top-left point E of the rectangular frame EFGH, is the horizontal coordinate of the bottom-right point G of the rectangular frame EFGH, is the vertical coordinate of the bottom-right point G of the rectangular frame EFGH.
[0105] It should be noted that the first preset confidence threshold and the second preset confidence threshold can be the same or different, and the preset overlap rate threshold and the preset variation overlap rate threshold can be the same or different, which is not limited in the embodiment.
[0106] Finally, the second large target defect rectangular frame and the corresponding large target defect type, the second small target defect rectangular frame and the corresponding small target defect type are merged to obtain a plurality of first remaining defect rectangular frames and corresponding first remaining defect types.
[0107] The above step removes low-confidence false detection frames through differential confidence thresholds, and adopts NMS and ANMS deduplication strategies for large / small target characteristics to effectively delete redundant repeated frames and small target partial contour frames, so as to finally obtain high-confidence and non-redundant first remaining defect data, greatly reduce the subsequent troubleshooting burden, and lay a high-quality data foundation for accurate troubleshooting.
[0108] In step S140, the first troubleshooting rule is used to troubleshoot each first remaining defect rectangular frame and the corresponding first remaining defect type to obtain a plurality of second remaining defect rectangular frames and corresponding second remaining defect types. The second troubleshooting rule is used to troubleshoot each second remaining defect rectangular frame and the corresponding second remaining defect type to obtain a plurality of third remaining defect rectangular frames and corresponding third remaining defect types. Each third remaining defect rectangular frame and the corresponding third remaining defect type are determined as the distribution network line defect troubleshooting result.
[0109] Understandably, when the large target defect detection model and the small target defect detection model perform target defect detection, many detected defects are not on the distribution network line, but in other background areas. In order to exclude this obvious false alarm, the present application designs a first error elimination rule. Since the first error elimination area is the merged frame of the skeleton area, the range of the first error elimination area is relatively large, and due to the influence of the skeleton area, the range of the first error elimination area fluctuates greatly. The detection frame range of the first remaining defect type (including tower top damage, cross arm bending deformation, tower bird nest, conductor foreign matter, drop type fuse missing, transformer sleeve missing insulation cover, vacuum sleeve missing insulation cover, safety pin falling off, connection fitting ball head rust, spring pin falling out, etc.) is relatively small, and is not affected by other areas. In order to exclude the first remaining defect detection frame outside the first error elimination area and obtain a reasonable quantization overlap rate, the present application eliminates the first error elimination area outside the first error elimination area through the first error elimination rule for each first remaining defect rectangular frame and its corresponding first remaining defect type, which can effectively eliminate the defect detection frame outside the first error elimination area. The specific process of the first error elimination rule is as follows:
[0110] (1) For each first remaining defect type, a corresponding first variation overlap rate threshold is set;
[0111] (2) Each first remaining defect rectangular frame is traversed, the variation overlap rate of each first remaining defect rectangular frame and the first error elimination area is calculated, and the first target remaining defect rectangular frame is eliminated by using the first error elimination formula. The variation overlap rate of the first target remaining defect rectangular frame is less than the first variation overlap rate threshold of the corresponding first remaining defect type;
[0112] (3) After all the first remaining defect rectangular frames are operated, the remaining first remaining defect rectangular frames and their corresponding first remaining defect types are determined as a plurality of second remaining defect rectangular frames and their corresponding second remaining defect types, and the error elimination process of the first remaining defect rectangular frame ends.
[0113] Wherein, the first error elimination formula is:
[0114]
[0115] In the formula, indicates whether to exclude the first remaining defect type of the th first remaining defect rectangular frame , when is 1, the corresponding first remaining defect rectangular frame is taken as the first target remaining defect rectangular frame and is excluded, and when is 0, the corresponding first remaining defect rectangular frame is retained; a first remaining defect type is a first remaining defect type is a first remaining defect type is a first remaining defect type is a first remaining defect type is a first remaining defect type is a first remaining defect type is
[0116] It should be noted that the specific positional relationship between the first error area and the first remaining defect rectangular frame is as follows: generally speaking, tower top damage, cross arm bending deformation, drop-out fuse missing, transformer sleeve missing insulation cover, vacuum sleeve missing insulation cover, safety pin falling off, connection fitting ball head corrosion, spring pin falling out and the like are faults of the components of the distribution network line, and the corresponding positions are relatively fixed, almost all of which are located inside the first error area, so for these defect types, the first variation overlap rate threshold is generally high. The tower nest and the wire foreign matter are not defects of the distribution network line itself, but external hazards, and the corresponding positions are not fixed and not necessarily completely inside the first error area, but part of the area of these defects is located inside the first error area, so for these defect types, the first variation overlap rate threshold is relatively low.
[0117] Understandably, since the large target defect detection model and the small target defect detection model detect target defects, many detected defects are on the distribution network line, but according to the prior knowledge of the actual defects of the distribution network line, the position of the detection frame does not belong to the actual defect area. In order to exclude this common false alarm, the second error correction rule is designed. Since the second error correction area is an independent frame of the skeleton area, different second error correction areas of different second error correction area types (the second error correction area types include the pole area, the cross arm equipment area, the transformer area, the vacuum equipment area, the connection fitting area, the wire area, etc.) will be involved. At the same time, the defects of the distribution network line are also independent frames, so different defect rectangular frames of different defect types (the defect types include tower top damage, cross arm bending deformation, tower nest, wire foreign matter, drop-out fuse missing, transformer sleeve missing insulation cover, vacuum sleeve missing insulation cover, safety pin falling off, connection fitting ball head corrosion, spring pin falling out, etc.) will be involved. In order to exclude the second remaining defect detection frame outside the second error correction area and obtain a reasonable quantitative overlap rate, the second error correction rule is used to correct each second remaining defect rectangular frame and its corresponding second remaining defect type, which can effectively exclude the defect detection frame outside the second error correction area, and the specific process of the second error correction rule is as follows:
[0118] (1) Associate multiple second error correction region types with each second residual defect type, and set a corresponding second variation overlap rate threshold for each second error correction region type;
[0119] (2) Traverse each second remaining defect rectangle, and search for the second error correction area of the multiple second error correction area types associated with each second remaining defect rectangle according to the second remaining defect type, and obtain the search results of the second error correction area list;
[0120] (3) Determine whether the search results of the second error correction area list are empty. If so, retain each second remaining defect rectangle and its corresponding second remaining defect type, and the error correction process of the second remaining defect rectangle ends. Otherwise, obtain the corresponding second error correction area list and the corresponding second error correction area type list. The second error correction area type list includes multiple second error correction area types.
[0121] (4) Traverse each second error correction region in the second error correction region list, calculate the variation overlap rate of each second remaining defect rectangle and its corresponding multiple second error correction regions, and use the second error correction formula to exclude the second target remaining defect rectangle. The variation overlap rate of the second target remaining defect rectangle is less than the second variation overlap rate threshold of the multiple second error correction region types associated with its corresponding second remaining defect type.
[0122] (5) After all the second remaining defect rectangles have completed the above operations, the remaining second remaining defect rectangles and their corresponding second remaining defect types are determined as multiple third remaining defect rectangles and their corresponding third remaining defect types. The troubleshooting process of the second remaining defect rectangles ends. Finally, the multiple third remaining defect rectangles and their corresponding third remaining defect types are determined as the troubleshooting results of the distribution network line defects.
[0123] The second error correction formula is:
[0124]
[0125] In the formula, Indicate whether to exclude the second residual defect type. The The second remaining defect rectangle ,when When the value is 1, the corresponding second remaining defect rectangle is... As the second objective, the remaining defect rectangle is excluded when... When the value is 0, the corresponding second remaining defect rectangle is... reserve; Indicates the second residual defect type as The associated list of second error correction region types, represents the second remaining defect type the second error area type associated with represents the second remaining defect type the second error area type associated with the second remaining defect rectangular frame the second error area type associated with the second error area type associated with represents the second remaining defect type the second error area type associated with the second variation overlap rate threshold value of the second error area type associated with
[0126] It should be noted that the specific positional relationship between the second error area and the second remaining defect rectangular frame is as follows: generally, the tower top damage is located in the pole area, the cross arm bending deformation and the drop-out fuse are located in the cross arm equipment area, the transformer sleeve lacks the insulating cover and is located at the edge of the transformer area, the vacuum sleeve lacks the insulating cover and is located near the vacuum equipment area, the safety pin falls off, the connecting hardware ball head rusts, the spring pin comes out, and the like are located in the connecting hardware area, the wire foreign matter is located around the wire area, and the tower bird nest corresponds to multiple second error area types, which can be located around the pole area, the cross arm equipment area, the transformer area, the vacuum equipment area, and the like. Therefore, for these defect types, different second error area types are associated with each defect type according to the different positional relationship between the defect area and the second error area, and different second variation overlap rate threshold values are set for each second error area type.
[0127] The above steps use the first error correction rule and the second error correction rule, which can not only effectively filter the defect mis-detection frames (defect detection frames outside the first error area) in a large number of background areas, but also effectively eliminate the defect mis-detection frames (defect detection frames outside the second error area) that do not belong to the actual defect occurrence area, thereby obtaining an effective and correct defect error correction result.
[0128] In step S150, it is judged whether the distribution network line defect error correction result is empty. If yes, the error correction result defect list of the distribution network line inspection image is recorded as empty. If no, each third remaining defect rectangular frame and the corresponding third remaining defect type are recorded in the error correction result defect list and saved.
[0129] Understandably, after obtaining the distribution network line defect troubleshooting result, it is judged whether the distribution network line defect troubleshooting result is empty. If the distribution network line defect troubleshooting result is empty, it proves that the third residual defect rectangular frame and the third residual defect type are not detected, at this time, the defect list record of the distribution network line inspection image troubleshooting result is recorded as empty, and the corresponding record is saved; if the distribution network line defect troubleshooting result is not empty, it proves that the third residual defect rectangular frame and the third residual defect type are detected, at this time, each third residual defect rectangular frame and its corresponding third residual defect type are recorded in the defect list of the troubleshooting result, and the corresponding record is saved, and the distribution network line inspection image troubleshooting process ends.
[0130] The above steps form a "detection-troubleshooting-recording" inspection closed loop by judging the troubleshooting result and standardizing the record saving, which not only ensures that each inspection image result can be traced back, but also provides accurate defect position and type information for the operation and maintenance personnel, and the sedimentary structured data can also support preventive maintenance and model iteration, helping to standardize the distribution network inspection and continuously optimize the performance.
[0131] The distribution network line skeleton type defect troubleshooting method provided by the embodiment of the application is based on a deep learning algorithm, uses a skeleton region detection model to obtain a skeleton region rectangular frame and a skeleton region type, and then obtains a first-level troubleshooting region, a first troubleshooting region image, a second-level troubleshooting region and a second troubleshooting region type. Then, a large target defect detection model is used to detect a large target defect type, and a small target defect detection model is used to detect a small target defect type. Finally, a first troubleshooting rule and a second troubleshooting rule are used in sequence to perform troubleshooting processing on the large target defect type and the small target defect type, and a final distribution network line defect troubleshooting result is obtained, which can greatly improve the troubleshooting efficiency of power inspection work and effectively prevent false detection.
[0132] Embodiment 2
[0133] As shown in Figure 5 FIG. 1 is a structural schematic diagram of a distribution network line skeleton type defect troubleshooting system 500 in the embodiment of the application, and the system includes:
[0134] The marking module 510 is configured to obtain a distribution network line inspection image, input the distribution network line inspection image into a skeleton region detection model, obtain a plurality of skeleton region rectangular frames and a plurality of skeleton region types, mark each skeleton region rectangular frame as a combined frame to obtain a first troubleshooting region and a first troubleshooting region image, and mark each skeleton region rectangular frame as an individual frame to obtain a plurality of second troubleshooting regions and a plurality of second troubleshooting region types.
[0135] The identification module 520 is configured to input the power distribution line inspection image into a large target identification model to obtain a plurality of large target defect rectangular frames and a plurality of large target defect types, and input the first fault area image into a small target identification model to obtain a plurality of small target defect rectangular frames and a plurality of small target defect types.
[0136] The fusion module 530 is configured to filter and fuse each large target defect rectangular frame and each large target defect type, each small target defect rectangular frame and each small target defect type, to obtain a plurality of first remaining defect rectangular frames and corresponding first remaining defect types.
[0137] The fault elimination module 540 is configured to eliminate faults of each first remaining defect rectangular frame and the corresponding first remaining defect type by using a first fault elimination rule to obtain a plurality of second remaining defect rectangular frames and corresponding second remaining defect types, eliminate faults of each second remaining defect rectangular frame and the corresponding second remaining defect type by using a second fault elimination rule to obtain a plurality of third remaining defect rectangular frames and corresponding third remaining defect types, and determine each third remaining defect rectangular frame and the corresponding third remaining defect type as the power distribution line defect elimination result.
[0138] The recording module 550 is configured to determine whether the power distribution line defect elimination result is empty, and if yes, record the fault elimination result defect list of the power distribution line inspection image as empty, and if not, record each third remaining defect rectangular frame and the corresponding third remaining defect type in the fault elimination result defect list and save.
[0139] The power distribution line skeleton type defect elimination system provided in the embodiments of the present application can implement each process of the power distribution line skeleton type defect elimination method corresponding to the embodiment 1, and achieve the same technical effects. To avoid repetition, details are not described herein.
[0140] The power distribution line skeleton type defect elimination system provided in the embodiments of the present application is based on a deep learning algorithm, uses a skeleton area detection model to obtain a skeleton area rectangular frame and a skeleton area type, and then obtains a first-level fault area, a first fault area image, a second-level fault area and a second fault area type. Then, a large target defect detection model is used to detect a large target defect type, a small target defect detection model is used to detect a small target defect type, and finally, a first fault elimination rule and a second fault elimination rule are used to eliminate faults of the large target defect type and the small target defect type in sequence to obtain a final power distribution line defect elimination result. The elimination efficiency of power inspection work can be greatly improved, and the false detection phenomenon can be effectively prevented.
[0141] In the embodiments of the present disclosure, a computer device is also provided, which includes a memory and a processor. The memory stores a computer program, and the processor implements the steps of the power distribution line skeleton type defect elimination method described in the embodiment 1 when executing the computer program.
[0142] The disclosure also provides a computer readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the steps of the network configuration line skeleton type defect troubleshooting method in the embodiment 1.
[0143] The above merely provides a specific implementation of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application.
Claims
1. A network configuration line skeleton type defect troubleshooting method, characterized in that, The method comprises: obtaining a distribution network line inspection image, inputting the distribution network line inspection image into a skeleton region detection model to obtain a plurality of skeleton region rectangular frames and a plurality of skeleton region types, marking each skeleton region rectangular frame with a combined frame to obtain a first fault region and a first fault region image, marking each skeleton region rectangular frame with an individual frame to obtain a plurality of second fault regions and a plurality of second fault region types; inputting the distribution network line inspection image into a large target recognition model to obtain a plurality of large target defect rectangular frames and a plurality of large target defect types, inputting the first fault region image into a small target recognition model to obtain a plurality of small target defect rectangular frames and a plurality of small target defect types; filtering and fusing each large target defect rectangular frame, each large target defect type, each small target defect rectangular frame and each small target defect type to obtain a plurality of first remaining defect rectangular frames and corresponding first remaining defect types; using a first fault elimination rule to eliminate faults of each first remaining defect rectangular frame and corresponding first remaining defect type to obtain a plurality of second remaining defect rectangular frames and corresponding second remaining defect types, using a second fault elimination rule to eliminate faults of each second remaining defect rectangular frame and corresponding second remaining defect type to obtain a plurality of third remaining defect rectangular frames and corresponding third remaining defect types, and determining each third remaining defect rectangular frame and corresponding third remaining defect type as a distribution network line defect elimination result; judging whether the distribution network line defect elimination result is empty, if yes, recording an elimination result defect list of the distribution network line inspection image as empty, if not, recording each third remaining defect rectangular frame and corresponding third remaining defect type in the elimination result defect list and saving; the first fault elimination rule comprises: setting a corresponding first variation overlap rate threshold for each first remaining defect type; traversing each first remaining defect rectangular frame, calculating a variation overlap rate of each first remaining defect rectangular frame and the first fault region, and using a first fault elimination formula to exclude a first target remaining defect rectangular frame, the variation overlap rate of the first target remaining defect rectangular frame being less than the first variation overlap rate threshold of the first remaining defect type corresponding to the first target remaining defect rectangular frame, to obtain a plurality of second remaining defect rectangular frames and corresponding second remaining defect types; wherein the first fault elimination formula is: In the formula, indicates whether the first remaining defect type is excluded from the first remaining defect type of the first remaining defect rectangular frame When is 1, the corresponding first remaining defect rectangular frame is taken as the first target remaining defect rectangular frame, and is excluded when is 0, the corresponding first remaining defect rectangular frame is retained; indicates the first variation overlap rate of the first remaining defect type of the first remaining defect rectangular frame with the first error correction area , indicates the first variation overlap rate threshold of the first remaining defect type of the first remaining defect type . 2. The network provisioning line skeleton type defect troubleshooting method according to claim 1, characterized by, the second fault elimination rule comprises: associating a plurality of second fault region types with each second remaining defect type, and setting a corresponding second variation overlap rate threshold for each second fault region type; traversing each of the second remaining defect rectangular frames, according to the second remaining defect type corresponding to each of the second remaining defect rectangular frames, searching for the second error correction area of the plurality of second error correction area types associated therewith to obtain a second error correction area list search result; determining whether the second error correction area list search result is empty, if yes, retaining each of the second remaining defect rectangular frames and the second remaining defect type corresponding thereto, if not, obtaining a corresponding second error correction area list and a corresponding second error correction area type list, the second error correction area type list including a plurality of the second error correction area types; traversing each of the second error correction areas in the second error correction area list, calculating the variation overlap rate of each of the second remaining defect rectangular frames and the plurality of second error correction areas corresponding thereto, and using a second error correction formula to exclude a second target remaining defect rectangular frame, the variation overlap rate of the second target remaining defect rectangular frame being less than the second variation overlap rate threshold of the plurality of second error correction area types associated with the second remaining defect type corresponding thereto, to obtain a plurality of third remaining defect rectangular frames and third remaining defect types corresponding thereto; wherein the second error correction formula is: In the formula, indicates whether to exclude the second remaining defect type of the first second remaining defect rectangular frame When is 1, the corresponding second remaining defect rectangular frame is taken as the second target remaining defect rectangular frame, and is excluded, and when is 0, the corresponding second remaining defect rectangular frame is retained; indicates the second remaining defect type associated second error area type list, indicates the second remaining defect type associated first second error area type, indicates the second remaining defect type of the first second remaining defect rectangular frame and the second error area type of the first second error area second variation overlap rate, indicates the second remaining defect type associated second error area type second variation overlap rate threshold.
3. The network provisioning line skeleton type defect troubleshooting method according to claim 1, characterized by, the filtering and fusion of each of the large target defect rectangular frames and each of the large target defect types, each of the small target defect rectangular frames and each of the small target defect types, to obtain a plurality of first remaining defect rectangular frames and first remaining defect types corresponding thereto, including: obtaining the confidence of each of the large target defect rectangular frames, and deleting the rectangular frame with a confidence lower than a first preset confidence threshold to obtain a plurality of first large target defect rectangular frames; calculating the overlap rate of each of the first large target defect rectangular frames using a non-maximum suppression processing algorithm, and deleting the rectangular frame with an overlap rate greater than a preset overlap rate threshold to obtain a plurality of second large target defect rectangular frames; obtaining the confidence of each of the small target defect rectangular frames, and deleting the rectangular frame with a confidence lower than a second preset confidence threshold to obtain a plurality of first small target defect rectangular frames; calculating the variation overlap rate of each of the first small target defect rectangular frames using an area non-maximum suppression processing algorithm, and deleting the rectangular frame with a variation overlap rate greater than a preset variation overlap rate threshold to obtain a plurality of second small target defect rectangular frames; merging each of the second large target defect rectangular frames and the large target defect type corresponding thereto, each of the second small target defect rectangular frames and the small target defect type corresponding thereto, to obtain a plurality of first remaining defect rectangular frames and first remaining defect types corresponding thereto.
4. The network provisioning line skeleton type defect troubleshooting method according to claim 1, characterized by, the input of the distribution network line inspection image into a large target recognition model to obtain a plurality of large target defect rectangular frames and a plurality of large target defect types, the input of the first error correction area image into a small target recognition model to obtain a plurality of small target defect rectangular frames and a plurality of small target defect types, including: inputting the distribution network line inspection image into the large target recognition model, and performing target defect detection using the large target recognition model to obtain a plurality of the large target defect rectangular frames and a plurality of the large target defect types; The first error region image is cropped by a sliding window according to a preset cropping resolution to obtain a sliding window image set, the sliding window image set is input into the small target recognition model, target defect detection is performed by using the small target recognition model, and a defect rectangular frame and a defect type of the sliding window image set are obtained. The coordinates of the defect rectangular frame of the sliding window image set are mapped back to the coordinates of the network distribution line inspection image to obtain a plurality of small target defect rectangular frames and a plurality of small target defect types.
5. The network provisioning line skeleton type defect troubleshooting method according to claim 1, characterized by, The skeleton region detection model is based on an improved YOLO11 detection algorithm, the improved YOLO11 detection algorithm includes a backbone network, a feature pyramid network and a decoupling head, the feature pyramid network includes a first self-attention convolution module, a second self-attention convolution module, a first convolution module, a second convolution module, a first efficient attention convolution module, a second efficient attention convolution module and a third efficient attention convolution module, the decoupling head includes a first classification regression module, a second classification regression module and a third classification regression module, and the network distribution line inspection image is input into the skeleton region detection model to obtain a plurality of skeleton region rectangular frames and a plurality of skeleton region types, including: The network distribution line inspection image is input into the backbone network to obtain a first layer feature map, a second layer feature map and a third layer feature map; The third layer feature map and the second layer feature map are input into the first self-attention convolution module to obtain a first self-attention convolution feature map, and the first self-attention convolution feature map and the second layer feature map are concatenated to obtain a first fusion feature map; The first fusion feature map and the first layer feature map are input into the second self-attention convolution module to obtain a second self-attention convolution feature map, and the second self-attention convolution feature map and the first layer feature map are concatenated to obtain a second fusion feature map; The second fusion feature map is input into the first convolution module to obtain a first feature map, and the first feature map and the first fusion feature map are concatenated to obtain a third fusion feature map; The third fusion feature map is input into the second convolution module to obtain a second feature map, and the second feature map and the third layer feature map are concatenated to obtain a fourth fusion feature map; The second fusion feature map is input into the first efficient attention convolution module to obtain a first efficient attention convolution feature map, the third fusion feature map is input into the second efficient attention convolution module to obtain a second efficient attention convolution feature map, and the fourth fusion feature map is input into the third efficient attention convolution module to obtain a third efficient attention convolution feature map; The first efficient attention convolution feature map, the second efficient attention convolution feature map and the third efficient attention convolution feature map are respectively input into the first classification regression module, the second classification regression module and the third classification regression module to obtain a plurality of skeleton region rectangular frames and a plurality of skeleton region types.
6. The network provisioning line skeleton type defect troubleshooting method according to claim 5, wherein, The third layer feature map and the second layer feature map are input into the first self-attention convolution module to obtain a first self-attention convolution feature map, including: The second layer feature map is subjected to 1*1 convolution twice respectively to obtain a first projection matrix and a second projection matrix respectively; The first projection matrix and the second projection matrix are subjected to similarity matching to obtain a similarity matching matrix, and the similarity matching matrix is processed by an activation function to obtain an attention weighting matrix; The third layer feature map is subjected to 1*1 convolution and up-sampling in sequence to obtain an up-sampled feature map, and the up-sampled feature map is subjected to 1*1 convolution to obtain a third projection matrix; The third projection matrix and the attention weighting matrix are subjected to matrix multiplication operation to obtain the first self-attention convolution feature map; The second fusion feature map is input into the first efficient attention convolution module to obtain a first efficient attention convolution feature map, including: According to the number of channels of the second fusion feature map, the second fusion feature map is evenly divided into two fusion feature subgraphs, the two fusion feature subgraphs are subjected to spatial maximum pooling and spatial average pooling respectively, and channel splicing is performed to obtain a channel feature graph; The channel feature graph is subjected to 1*1 convolution and is processed by a Relu activation function to obtain a channel weighting feature graph, and the second fusion feature graph and the channel weighting feature graph are subjected to matrix multiplication operation to obtain a channel attention feature graph; According to the number of channels of the channel attention feature graph, the channel attention feature graph is evenly divided into two channel attention feature subgraphs, the two channel attention feature subgraphs are subjected to channel maximum pooling and channel average pooling respectively, and channel splicing is performed to obtain a spatial feature graph; The spatial feature graph is subjected to 1*1 convolution and is processed by the Relu activation function to obtain a spatial weighting feature graph, and the channel attention feature graph and the spatial weighting feature graph are subjected to matrix multiplication operation to obtain the first efficient attention convolution feature graph.
7. A network configuration line skeleton type defect troubleshooting system characterized by comprising: The system comprises: A marking module is configured to acquire a distribution network line inspection image, input the distribution network line inspection image into a skeleton region detection model, obtain a plurality of skeleton region rectangular frames and a plurality of skeleton region types, mark each skeleton region rectangular frame with a combined frame to obtain a first fault area and a first fault area image, and mark each skeleton region rectangular frame with an individual frame to obtain a plurality of second fault areas and a plurality of second fault area types. An identification module is configured to input the distribution network line inspection image into a large target identification model to obtain a plurality of large target defect rectangular frames and a plurality of large target defect types, and input the first fault area image into a small target identification model to obtain a plurality of small target defect rectangular frames and a plurality of small target defect types. A fusion module is configured to filter and fuse each large target defect rectangular frame and each large target defect type, each small target defect rectangular frame and each small target defect type to obtain a plurality of first residual defect rectangular frames and corresponding first residual defect types. The error elimination module is configured to eliminate errors of each of the first remaining defect rectangular frame and the corresponding first remaining defect type by using a first error elimination rule to obtain a plurality of second remaining defect rectangular frames and corresponding second remaining defect types, eliminate errors of each of the second remaining defect rectangular frame and the corresponding second remaining defect type by using a second error elimination rule to obtain a plurality of third remaining defect rectangular frames and corresponding third remaining defect types, and determine each of the third remaining defect rectangular frame and the corresponding third remaining defect type as the distribution network line defect elimination result. The recording module is configured to determine whether the distribution network line defect elimination result is empty, and if yes, record the error elimination result defect list of the distribution network line inspection image as empty, and if not, record each of the third remaining defect rectangular frame and the corresponding third remaining defect type in the error elimination result defect list and save. The error elimination module is configured to eliminate errors of each of the first remaining defect rectangular frame and the corresponding first remaining defect type by using a first error elimination rule to obtain a plurality of second remaining defect rectangular frames and corresponding second remaining defect types, eliminate errors of each of the second remaining defect rectangular frame and the corresponding second remaining defect type by using a second error elimination rule to obtain a plurality of third remaining defect rectangular frames and corresponding third remaining defect types, and determine each of the third remaining defect rectangular frame and the corresponding third remaining defect type as the distribution network line defect elimination result. For each of the first remaining defect types, a corresponding first variation overlap rate threshold is set. Each of the first remaining defect rectangular frame is traversed, the variation overlap rate of each of the first remaining defect rectangular frame and the first error elimination area is calculated, and a first target remaining defect rectangular frame is excluded by using a first error elimination formula, the variation overlap rate of the first target remaining defect rectangular frame is less than the first variation overlap rate threshold of the corresponding first remaining defect type, to obtain a plurality of second remaining defect rectangular frames and corresponding second remaining defect types. The first error elimination formula is: In the formula, Indicate whether to exclude the first remaining defect type. The The first remaining defect rectangle ,when When the value is 1, the corresponding first remaining defect rectangle is... As the remaining defect rectangle of the first target, and excluded, when When the value is 0, the corresponding first remaining defect rectangle is... reserve; This indicates that the first remaining defect type is The The first remaining defect rectangle With the first error correction area The overlap rate of the variation, This indicates that the first remaining defect type is The first variation overlap rate threshold.
8. A computer device, comprising: The computer readable storage medium stores a computer program, and the computer program is executed by the processor to realize the steps of the distribution network line skeleton type defect elimination method in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to realize the steps of the distribution network line skeleton type defect elimination method in any one of claims 1-6.
Citation Information
Patent Citations
Power grid equipment defect detection method based on multi-level multi-scale feature fusion
CN116739963A
Distribution network line multi-scale target defect identification method, device, equipment and medium
CN120431086A