Power distribution network inspection image defect detection method and system based on collaborative feature learning
By employing a collaborative feature learning approach, the problem of insufficient detection accuracy in low-resolution images and complex backgrounds during power distribution network inspections is solved. This approach enables efficient and accurate identification of minute defects and reduces false alarm rates, making it suitable for real-time processing by edge computing devices.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUANTAI POWER SUPPLY CO OF STATE GRID SHANDONG ELECTRIC POWER CO
- Filing Date
- 2026-01-28
- Publication Date
- 2026-05-05
AI Technical Summary
Existing power distribution network inspection technologies suffer from insufficient detection accuracy and high false alarm rates when faced with problems such as low-resolution images, complex backgrounds, and changes in lighting, making it difficult to meet the refined inspection needs of modern power distribution networks.
A collaborative feature learning-based approach is adopted, which uses multi-level and multi-scale feature enhancement and fusion mechanisms, including convolution to extract shallow features, residual feature block processing, multi-receptive field fusion and cross-scale attention mechanism, to generate high-resolution images and perform multi-scale defect detection.
It significantly improves the accuracy of identifying minute defects, reduces the false alarm rate, and enables efficient real-time processing on edge computing devices to meet the needs of on-site inspection.
Smart Images

Figure CN121982005A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image defect detection technology, specifically relating to a method and system for detecting image defects in power distribution network inspection based on collaborative feature learning. Background Technology
[0002] As a crucial component of the power system, the safe and stable operation of the distribution network directly determines the reliability of power supply and the safety of electricity consumption. Inspection is a core means of ensuring the normal operation of the distribution network. Traditional manual inspection methods are limited by factors such as manpower and environment, generally suffering from low efficiency, high costs, and strong subjectivity in inspection results. They are particularly difficult to accurately identify minute defects such as minor conductor damage and slight aging of insulators, and can no longer meet the large-scale and refined inspection needs of modern distribution networks. With the widespread application of technologies such as drone aerial photography and fixed camera monitoring in distribution network inspections, massive amounts of inspection images can be quickly acquired. Automatic defect detection technology based on computer vision has become a research hotspot in the industry due to its high efficiency and objectivity. Various deep learning object detection algorithms, such as YOLO and Faster R-CNN, are gradually being applied to this field.
[0003] However, the unique characteristics of power distribution network inspection scenarios pose multiple severe challenges to existing detection technologies, resulting in poor practical application performance. On the one hand, inspection images are often affected by factors such as the performance of the shooting equipment, flight altitude, and environmental occlusion, resulting in limited resolution and a very low proportion of minute defect features. At the same time, the surrounding environment of power distribution network equipment is subject to complex background interference such as trees, buildings, and intertwined cables. In addition, the lighting conditions vary drastically with weather and time of day, further exacerbating the confusion between defect features and the background, seriously affecting the stability of feature extraction. On the other hand, existing general-purpose target detection algorithms are not fully adapted to the specific needs of power distribution network inspection. They lack systematic design for low-resolution image enhancement, complex background suppression, and multi-scale fusion feature adaptation. Even if some improved methods specifically optimize a single aspect (such as only improving the detection capability of small targets or optimizing background segmentation), it is still difficult to overcome multiple scenario challenges simultaneously. Ultimately, this leads to insufficient detection accuracy, a high false alarm rate, and often high model complexity. The real-time processing performance on edge computing devices is difficult to match the actual field application needs of inspection. Summary of the Invention
[0004] In view of the shortcomings of the prior art, the purpose of this invention is to provide a method and system for detecting defects in distribution network inspection images based on collaborative feature learning. Through multi-level and multi-scale feature enhancement and fusion mechanisms, the accuracy and robustness of defect detection in distribution network inspection images can be significantly improved.
[0005] To achieve the above objectives, this invention provides a method for detecting defects in distribution network inspection images based on collaborative feature learning, comprising the following steps: S1. For the input power distribution network inspection image, extract shallow features F0 through convolution, and further process F0 using residual feature blocks. The processed residual feature blocks then generate the feature F0. RB Fusion with F0, and fusion feature F fusion Perform channel expansion and pixel rearrangement operations to generate a high-resolution image I. HR ; S2, I HR The process is split into two parallel branches, X1 and X2. X1 is divided into several non-overlapping sub-tensors and concatenated along the channel dimension to obtain the total tensor. The total tensor is convolved to obtain the output tensor Y1 of X1. At the same time, the output tensor Y2 of X2 is obtained through max pooling and convolution operations. Y1 and Y2 are connected along the channel dimension to obtain the first-level basic feature F1. S3. Based on S2, F1 is processed again to obtain the second-level basic feature F2. Based on S2, F2 is processed again to obtain the third-level basic feature F3. S4. For F1, F2, and F3, multi-receptive field fusion is performed based on channel normalization preprocessing, dynamic convolutional mixing block, and adaptive convolution, respectively, to generate adaptive features A1, A2, and A3 corresponding to F1, F2, and F3, respectively. The dynamic convolutional mixing block includes an Inception mixer and a convolutional gated linear unit. S5. Perform internal coarse-fine granular information exchange on A1, A2, and A3 respectively to generate interactive features I1, I2, and I3 corresponding to A1, A2, and A3; S6. Based on the cross-scale attention mechanism, generate multi-scale fusion features C1, C2, and C3 corresponding to I1, I2, and I3; S7. Set up three detection heads with different resolutions to perform defect detection on C1, C2 and C3 respectively, and output the defect category, location and confidence information.
[0006] As a preferred embodiment of the present invention, in S1, for the input distribution network inspection image I LR Generate I HR The process is as follows: F0 is extracted through convolution, and is represented as: ; In the formula, This represents a 3×3 convolution; F0 is further processed by a single-layer residual feature block, and expressed as follows: ; In the formula, Represents a 1×1 convolution; Represents the ReLU activation function; F RBFeature fusion with F0 yields F fusion , is represented as: ; F is processed through channel expansion and pixel rearrangement operations. fusion , to obtain I HR , is represented as: ; In the formula, This indicates a pixel rearrangement operation.
[0007] As a preferred embodiment of the present invention, the process of obtaining F1 in S2 is specifically as follows: I is obtained through average pooling and splitting operations. HR It can be split into two parallel branches, X1 and X2, as follows: ; In the formula, Represents a splitting operation; This represents the average pooling operation; For X1, the input tensor is divided into four non-overlapping sub-tensors by splitting the spatial dimension. Then, the four sub-tensors are concatenated along the channel dimension to obtain the total tensor. Finally, Y1 is obtained through convolution, as follows: ; In the formula, Represents a 1×1 convolution; Indicates a connection along the channel dimension; For X2, Y2 is obtained through max pooling and convolution operations, represented as: ; In the formula, This represents the max pooling operation; Connecting Y1 and Y2 along the channel dimension yields F1.
[0008] As a preferred embodiment of the present invention, I HR The shape is Where b represents the batch size, c represents the number of input channels, and w and h represent the spatial dimensions; the shapes of X1 and X2 are... When splitting X1, the shape of each subtensor is as follows: The shape of the total tensor is .
[0009] As a preferred embodiment of the present invention, the process of generating A1 in S4 is specifically as follows: After channel normalization preprocessing F1, it is expressed as: ; In the formula, Indicates the SiLU activation function; This indicates a batch normalization operation; F represents a 1×1 convolution; CBS This represents the features after feature channel normalization preprocessing; F CBS Segmentation is the main path F main and jump connection path F shortcut , is represented as: ; In the formula, Represents a splitting operation; By using three consecutive dynamic convolutional mixing blocks, F main The processing is represented as follows: ; In the formula, Represents a dynamic convolutional hybrid block; , , These represent the output results of the three dynamic convolutional hybrid blocks; right , , After performing adaptive convolution, we obtain A1, which is represented as: ; In the formula, Indicates a connection along the channel dimension; Similarly, A2 and A3 are generated based on F2 and F3.
[0010] As a preferred embodiment of the present invention, in the dynamic convolutional mixing block, the dynamic Inception mixer... Represented as: ; ; In the formula, , These represent the input and output characteristics of the dynamic Inception mixer, respectively. , They represent splitting. The two intermediate features obtained; and These represent depthwise separable convolutions with kernels of 3 and 5, respectively. Convolution-gated linear units Represented as: ; In the formula, W1, B1, W2, and B2 represent learnable parameters; Represents the GRLU activation function; This indicates element-wise multiplication; Represents depthwise convolution; , These represent the input and output features of the convolutional gated linear unit, respectively. The output features of the dynamic convolutional hybrid block are obtained and represented as follows: ; In the formula, This indicates standardized operations; , , These represent the input, intermediate, and output features of the dynamic convolutional hybrid block, respectively.
[0011] As a preferred embodiment of the present invention, the process of generating I1 in S5 is specifically as follows: Processing A1 yields coarse-grained memory m. c and fine-grained memory m f , is represented as: ; In the formula, This represents a 3×3 convolution; Indicates a linear layer; Generate m using the Softmax activation function c m f The attention weight is expressed as: ; ; In the formula, , They represent m respectively c m f The weight of attention; This represents the Softmax activation function; This indicates element-wise multiplication; Will , Adding them together, we get I1, which can be represented as: ; Similarly, I2 and I3 are generated based on A2 and A3.
[0012] As a preferred embodiment of the present invention, the process of generating C1 in S6 is specifically as follows: Extract the query features, key features, and value features of I1, represented as follows: ; In the formula, q represents a dilated convolution with a dilation rate of s; s k sv s These represent the query features, key features, and value features extracted when the expansion rate is s, respectively. Computation of augmented post-value features at scale s , is represented as: ; ; In the formula, W represents the Sigmoid activation function. a Represents the adaptive weight matrix; This indicates element-wise multiplication; Indicates pooling operation; This represents the attention weight coefficient with a scale of s; The cross-scale attention features are calculated and represented as follows: ; In the formula, S represents the total number of scales involved in cross-scale attention fusion, which is the maximum value of s; This represents the Softmax activation function; the superscript T indicates transpose; d k Indicates k s Feature dimensions; Represents cross-scale attention features; Combining linear transformations, we obtain C1, which is expressed as: ; In the formula, Indicates a linear layer; Similarly, C2 and C3 are generated based on I2 and I3.
[0013] As a preferred embodiment of the present invention, the specific process of defect detection of C1, C2, and C3 in S7 is as follows: High-resolution, medium-resolution, and low-resolution detection heads are set up to perform parallel defect detection on C1, C2, and C3, respectively, as shown below: ; In the formula, K represents the index of the detection head, which can be 1, 2 or 3; Indicates the Kth detector head; C K Indicates C1, C2, or C3; This represents the classification probability of the Kth detector head; This represents the bounding box regression of the Kth detector head; This indicates the confidence level of the target being detected by the Kth detector. Represented as: ; In the formula, This indicates that the input is C. K time ; This represents the Sigmoid activation function; This indicates element-wise multiplication; This indicates a batch normalization operation; This represents a 3×3 convolution; This represents the convolution weight matrix of the classification branch of the Kth detector head; Represented as: ; In the formula, This indicates that the input is C. K time ; Represents a 1×1 convolution; Represented as: ; In the formula, This indicates that the input is C. K time ; This represents the convolution weight matrix of the target confidence branch of the Kth detector head.
[0014] A distribution network inspection image defect detection system based on collaborative feature learning, used to implement the above method, includes: The super-resolution reconstruction module is used to extract shallow features F0 from the input power distribution network inspection image through convolution, and further process F0 using residual feature blocks to obtain the feature F0 after the residual feature blocks are processed. RB Fusion with F0, and fusion feature F fusion Perform channel expansion and pixel rearrangement operations to generate a high-resolution image I. HR ; The downsampling compression module is used to convert I HR The process is split into two parallel branches, X1 and X2. X1 is divided into several non-overlapping sub-tensors and concatenated along the channel dimension to obtain the total tensor. The total tensor is convolved to obtain the output tensor Y1 of X1. At the same time, the output tensor Y2 of X2 is obtained through max pooling and convolution operations. Y1 and Y2 are connected along the channel dimension to obtain the first-level basic feature F1. The downsampling compression module processes F1 again to obtain the second-level basic feature F2, and the downsampling compression module processes F2 again to obtain the third-level basic feature F3. The dynamic kernel adaptive convolution module performs multi-receptive field fusion based on channel normalization preprocessing, dynamic convolutional mixing block and adaptive convolution for F1, F2 and F3 respectively, generating adaptive features A1, A2 and A3 corresponding to F1, F2 and F3 respectively. The dynamic convolutional mixing block includes an Inception mixer and a convolutional gated linear unit. The hierarchical granularity interaction module is used to perform internal coarse-fine granular information exchange between A1, A2, and A3 respectively, and generate the interaction features I1, I2, and I3 corresponding to A1, A2, and A3. The cross-resolution attention module, based on the cross-scale attention mechanism, generates multi-scale fusion features C1, C2, and C3 corresponding to I1, I2, and I3; The multi-scale parallel detection module is equipped with three detection heads of different resolutions to perform defect detection on C1, C2, and C3 respectively, and output the defect category, location, and confidence information.
[0015] The beneficial effects of this invention are: This invention addresses the problems of limited resolution in inspection images, low proportion of minute defect features, severe interference from complex backgrounds, and drastic changes in lighting. The super-resolution reconstruction module can restore image details, and the dynamic kernel adaptive convolution module, hierarchical granularity interaction module, and cross-resolution attention module work together to achieve adaptive feature enhancement, multi-granularity information interaction, and cross-scale fusion. This significantly improves the recognition accuracy of minute defects such as minor wire damage and slight aging of insulators, while also enhancing the system's robustness to complex scenarios and significantly reducing the false alarm rate.
[0016] This invention balances practicality and adaptability while ensuring detection performance. The downsampling compression module optimizes system complexity during the generation of the multi-scale fused feature pyramid, and the multi-scale parallel detection head accurately detects features at different resolutions, enabling the system to achieve efficient real-time processing on edge computing devices, meeting the application requirements of on-site inspections. The output includes an anomaly list containing defect categories, locations, and confidence levels, along with corresponding compliance assessments and professional handling suggestions. This provides precise support for distribution network fault diagnosis, risk assessment, and operation and maintenance decisions, effectively replacing the inefficient traditional manual inspection mode, reducing inspection costs, and meeting the large-scale and refined inspection needs of modern distribution networks. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the principle of the method of the present invention; Figure 2 This is a schematic diagram of the system architecture of the present invention. Detailed Implementation
[0018] The embodiments of the present invention will be further described below with reference to the accompanying drawings: Example 1: As Figure 1 As shown, the defect detection method for distribution network inspection images based on collaborative feature learning includes the following steps: S1. For the input power distribution network inspection image, extract shallow features F0 through convolution, and further process F0 using residual feature blocks. The processed residual feature blocks then generate the feature F0. RB Fusion with F0, and fusion feature F fusion Perform channel expansion and pixel rearrangement operations to generate a high-resolution image I. HR ; S2, I HR The process is split into two parallel branches, X1 and X2. X1 is divided into several non-overlapping sub-tensors and concatenated along the channel dimension to obtain the total tensor. The total tensor is convolved to obtain the output tensor Y1 of X1. At the same time, the output tensor Y2 of X2 is obtained through max pooling and convolution operations. Y1 and Y2 are connected along the channel dimension to obtain the first-level basic feature F1. S3. Based on S2, F1 is processed again to obtain the second-level basic feature F2. Based on S2, F2 is processed again to obtain the third-level basic feature F3. S4. For F1, F2, and F3, multi-receptive field fusion is performed based on channel normalization preprocessing, dynamic convolutional mixing block, and adaptive convolution, respectively, to generate adaptive features A1, A2, and A3 corresponding to F1, F2, and F3, respectively. The dynamic convolutional mixing block includes an Inception mixer and a convolutional gated linear unit. S5. Perform internal coarse-fine granular information exchange on A1, A2, and A3 respectively to generate interactive features I1, I2, and I3 corresponding to A1, A2, and A3; S6. Based on the cross-scale attention mechanism, generate multi-scale fusion features C1, C2, and C3 corresponding to I1, I2, and I3; S7. Set up three detection heads with different resolutions to perform defect detection on C1, C2 and C3 respectively, and output the defect category, location and confidence information.
[0019] In S1, for the input distribution network inspection image I LR Generate I HR The process is as follows: F0 is extracted through convolution, and is represented as: ; In the formula, This represents a 3×3 convolution; F0 is further processed by a single-layer residual feature block, and expressed as follows: ; In the formula, Represents a 1×1 convolution; Represents the ReLU activation function; F RB Feature fusion with F0 yields F fusion , is represented as: ; F is processed through channel expansion and pixel rearrangement operations. fusion , to obtain I HR , is represented as: ; In the formula, This indicates the pixel shuffle operation.
[0020] In S2, the process of obtaining F1 is as follows: I is obtained through average pooling and splitting operations. HR It can be split into two parallel branches, X1 and X2, as follows: ; In the formula, Represents a splitting operation; This represents the average pooling operation; For X1, the input tensor (X1) is divided into four non-overlapping sub-tensors by splitting the spatial dimension. Then, the four sub-tensors are concatenated along the channel dimension to obtain the total tensor. Finally, Y1 is obtained through convolution, as follows: ; In the formula, Indicates a connection along the channel dimension; I HR The shape is Where b represents the batch size, c represents the number of input channels, and w and h represent the spatial dimensions; the shapes of X1 and X2 are... When splitting X1, the shape of each subtensor is as follows: The shape of the total tensor is ; For X2, Y2 is obtained through max pooling and convolution operations, represented as: ; In the formula, This represents the max pooling operation; Connecting Y1 and Y2 along the channel dimension yields F1.
[0021] In S4, the process of generating A1 is as follows: After channel normalization preprocessing F1, it is expressed as: ; In the formula, Indicates the SiLU activation function; Indicates batch normalization operation; F CBS This represents the features after feature channel normalization preprocessing; F CBS Segmentation is the main path F main and jump connection path F shortcut , is represented as: ; By using three consecutive dynamic convolutional mixing blocks, F main The processing is represented as follows: ; In the formula, Represents a dynamic convolutional hybrid block; , , These represent the output results of the three dynamic convolutional hybrid blocks; right , , After performing adaptive convolution, we obtain A1, which is represented as: ; Similarly, A2 and A3 are generated based on F2 and F3.
[0022] Dynamic Inception Mixer in Dynamic Convolutional Mixing Blocks Represented as: ; ; In the formula, , These represent the input and output characteristics of the dynamic Inception mixer, respectively. , They represent splitting. The two intermediate features obtained; and These represent depthwise separable convolutions with kernels of 3 and 5, respectively. Convolution-gated linear units Represented as: ; In the formula, W1, B1, W2, and B2 represent learnable parameters; Represents the GRLU activation function; This indicates element-wise multiplication; This represents depthwise convolution. , These represent the input and output features of the convolutional gated linear unit, respectively. The output features of the dynamic convolutional hybrid block are obtained and represented as follows: ; In the formula, This indicates standardized operations; , , These represent the input, intermediate, and output features of the dynamic convolutional hybrid block, respectively.
[0023] In S5, the process of generating I1 is as follows: Processing A1 yields coarse-grained memory m. c and fine-grained memory m f , is represented as: ; In the formula, Indicates a linear layer; Generate m using the Softmax activation function c m f The attention weight is expressed as: ; ; In the formula, , They represent m respectively c m f The weight of attention; This represents the Softmax activation function; Will , Adding them together, we get I1, which can be represented as: ; Similarly, I2 and I3 are generated based on A2 and A3.
[0024] In S6, the process of generating C1 is as follows: Extract the query features, key features, and value features of I1, represented as follows: ; In the formula, q represents a dilated convolution with a dilation rate of s (used for scale-specific feature extraction); s k s v s These represent the query features, key features, and value features extracted when the expansion rate is s, respectively. Computation of augmented post-value features at scale s , is represented as: ; ; In the formula, W represents the Sigmoid activation function. a Represents the adaptive weight matrix; Indicates pooling operation; This represents the attention weight coefficient with a scale of s; The cross-scale attention features are calculated and represented as follows: ; In the formula, S represents the total number of scales participating in cross-scale attention fusion, i.e., the maximum value of s; the superscript T indicates transpose; d k Indicates k s Feature dimensions; Represents cross-scale attention features; Combining linear transformations, we obtain C1, which is expressed as: ; Similarly, C2 and C3 are generated based on I2 and I3.
[0025] In S7, the specific process for defect detection of C1, C2, and C3 is as follows: High-resolution, medium-resolution, and low-resolution detection heads are set up to perform parallel defect detection on C1, C2, and C3, respectively. This enables efficient detection of power grid defects at different scales, as shown below: ; In the formula, K represents the index of the detection head, which can be 1, 2 or 3; Indicates the Kth detector head; C K Indicates C1, C2, or C3; This represents the classification probability of the Kth detector head; This represents the bounding box regression of the Kth detector head; This indicates the confidence level of the target being detected by the Kth detector. Represented as: ; In the formula, This indicates that the input is C. K time ; This represents the convolution weight matrix of the classification branch of the Kth detector head; Represented as: ; In the formula, This indicates that the input is C. K time ; Represented as: ; In the formula, This indicates that the input is C. K time ; This represents the convolution weight matrix of the target confidence branch of the Kth detector head.
[0026] The high-resolution detection head is adapted to the detection requirements of large-size feature maps, with input C1, which is the feature map with the largest spatial size. The medium-resolution detection head is adapted to medium-sized feature maps, with input C2, whose spatial size is half that of C1. The low-resolution detection head is adapted to small-size feature maps, with input C3, whose spatial size is one-quarter that of C1. Each detection head focuses on defects adapted to its resolution, thereby efficiently covering distribution network defects of different scales.
[0027] For feature map C with spatial dimension K The detection head makes predictions individually for each spatial location of the feature map using a 1×1 convolutional layer: for The number of channels is mapped to the number of defect categories using a 1×1 convolution, and the probability of each position belonging to a different defect is output. for The number of channels is mapped to 4 using a 1×1 convolution (corresponding to the x / y / width / height of the bounding box), and the defect box coordinates at each position are output; x and y are the reference coordinates of the bounding box (border), and width (w) and height (h) are the size parameters of the bounding box; for The number of channels is mapped to 1 using a 1×1 convolution, and the confidence level of a defect is output for each position.
[0028] Example 2: Based on Example 1, the input features of the dynamic Inception mixer are further refined. Perform defect saliency detection and generate a defect saliency mask M: ; Connect M with... , Perform element-wise multiplication to obtain the weighted intermediate features. , : ; ; use , ,generate : ; For minor defects such as slight wire damage and slight aging of insulators in power distribution network inspection images, this improvement can enhance the ability of dynamic convolutional hybrid blocks to capture defect features, reduce the interference of background features such as trees and buildings on the detection results, and make the defect recognition of the final generated adaptive features A1, A2, and A3 more accurate, thereby improving the overall detection accuracy and reducing the false alarm rate.
[0029] Example 3: As Figure 2 As shown, the power distribution network inspection image defect detection system based on collaborative feature learning is used to implement the method in Embodiment 1 or Embodiment 2, including: The super-resolution reconstruction module is used to extract shallow features F0 from the input power distribution network inspection image through convolution, and further process F0 using residual feature blocks to obtain the feature F0 after the residual feature blocks are processed. RB Fusion with F0, and fusion feature F fusion Perform channel expansion and pixel rearrangement operations to generate a high-resolution image I. HR ; The downsampling compression module (dual channel) is used to convert I HR The process is split into two parallel branches, X1 and X2. X1 is divided into several non-overlapping sub-tensors and concatenated along the channel dimension to obtain the total tensor. The total tensor is convolved to obtain the output tensor Y1 of X1. At the same time, the output tensor Y2 of X2 is obtained through max pooling and convolution operations. Y1 and Y2 are connected along the channel dimension to obtain the first-level basic feature F1. The downsampling compression module processes F1 again to obtain the second-level basic feature F2, and the downsampling compression module processes F2 again to obtain the third-level basic feature F3. The dynamic kernel adaptive convolution module performs multi-receptive field fusion based on channel normalization preprocessing, dynamic convolutional mixing block and adaptive convolution for F1, F2 and F3 respectively, generating adaptive features A1, A2 and A3 corresponding to F1, F2 and F3 respectively. The dynamic convolutional mixing block includes an Inception mixer and a convolutional gated linear unit. The hierarchical granularity interaction module is used to perform internal coarse-fine granular information exchange between A1, A2, and A3 respectively, and generate the interaction features I1, I2, and I3 corresponding to A1, A2, and A3. The cross-resolution attention module, based on the cross-scale attention mechanism, generates multi-scale fusion features C1, C2, and C3 corresponding to I1, I2, and I3; The multi-scale parallel detection module is equipped with three detection heads of different resolutions to perform defect detection on C1, C2, and C3 respectively, and output the defect category, location, and confidence information.
[0030] The system's final output can be an anomaly list, compliance assessment, and professional handling suggestions. This series of outputs is the result of full-process feature enhancement and precise detection of distribution network inspection images: The input inspection images are first restored to high-resolution images through a perception-guided super-resolution reconstruction module, and then multi-scale fusion feature pyramids (F1, F2, F3) are generated through a downsampling compression module. Subsequently, through layer-by-layer processing by a dynamic kernel adaptive convolution module, a hierarchical granularity interaction module, and an adjustable cross-resolution attention module, adaptive feature enhancement, multi-granularity information interaction, and cross-scale fusion are completed. Finally, a multi-scale parallel detection module completes defect detection for enhanced features of different resolutions, and finally, an anomaly list containing defect location and type is generated. Combined with distribution network operation and maintenance specifications, a compliance assessment is output, and professional handling suggestions are given for various defects, providing direct and accurate support for distribution network fault investigation, risk assessment, and operation and maintenance decisions.
[0031] Example 3: A distribution network inspection image defect detection device based on collaborative feature learning, including a memory, a processor, and a computer program stored in the memory and run on the processor, which implements the method in Example 1 or Example 2 by executing the program through the processor.
Claims
1. A method for detecting defects in distribution network inspection images based on collaborative feature learning, characterized in that, Includes the following steps: S1. For the input power distribution network inspection image, extract shallow features F0 through convolution, and further process F0 using residual feature blocks. The processed residual feature blocks then generate the feature F0. RB Fusion with F0, and fusion feature F fusion Perform channel expansion and pixel rearrangement operations to generate a high-resolution image I. HR ; S2, I HR The process is split into two parallel branches, X1 and X2. X1 is divided into several non-overlapping sub-tensors and concatenated along the channel dimension to obtain the total tensor. The total tensor is convolved to obtain the output tensor Y1 of X1. At the same time, the output tensor Y2 of X2 is obtained through max pooling and convolution operations. Y1 and Y2 are connected along the channel dimension to obtain the first-level basic feature F1. S3. Based on S2, F1 is processed again to obtain the second-level basic feature F2. Based on S2, F2 is processed again to obtain the third-level basic feature F3. S4. For F1, F2, and F3, multi-receptive field fusion is performed based on channel normalization preprocessing, dynamic convolutional mixing block, and adaptive convolution, respectively, to generate adaptive features A1, A2, and A3 corresponding to F1, F2, and F3, respectively. The dynamic convolutional mixing block includes an Inception mixer and a convolutional gated linear unit. S5. Perform internal coarse-fine granular information exchange on A1, A2, and A3 respectively to generate interactive features I1, I2, and I3 corresponding to A1, A2, and A3; S6. Based on the cross-scale attention mechanism, generate multi-scale fusion features C1, C2, and C3 corresponding to I1, I2, and I3; S7. Set up three detection heads with different resolutions to perform defect detection on C1, C2 and C3 respectively, and output the defect category, location and confidence information.
2. The method for detecting defects in distribution network inspection images based on collaborative feature learning according to claim 1, characterized in that, In S1, for the input distribution network inspection image I LR Generate I HR The process is as follows: F0 is extracted through convolution, and is represented as: ; In the formula, This represents a 3×3 convolution; F0 is further processed by a single-layer residual feature block, and expressed as follows: ; In the formula, Represents a 1×1 convolution; Represents the ReLU activation function; F RB Feature fusion with F0 yields F fusion , is represented as: ; F is processed through channel expansion and pixel rearrangement operations. fusion , to obtain I HR , is represented as: ; In the formula, This indicates a pixel rearrangement operation.
3. The method for detecting defects in distribution network inspection images based on collaborative feature learning according to claim 1, characterized in that, In S2, the process of obtaining F1 is specifically as follows: I is obtained through average pooling and splitting operations. HR It can be split into two parallel branches, X1 and X2, as follows: ; In the formula, Represents a splitting operation; This represents the average pooling operation; For X1, the input tensor is divided into four non-overlapping sub-tensors by splitting the spatial dimension. Then, the four sub-tensors are concatenated along the channel dimension to obtain the total tensor. Finally, Y1 is obtained through convolution, as follows: ; In the formula, Represents a 1×1 convolution; Indicates a connection along the channel dimension; For X2, Y2 is obtained through max pooling and convolution operations, represented as: ; In the formula, This represents the max pooling operation; Connecting Y1 and Y2 along the channel dimension yields F1.
4. The method for detecting defects in distribution network inspection images based on collaborative feature learning according to claim 3, characterized in that, I HR The shape is Where b represents the batch size, c represents the number of input channels, and w and h represent the spatial dimensions; the shapes of X1 and X2 are... When splitting X1, the shape of each subtensor is as follows: The shape of the total tensor is .
5. The method for detecting defects in distribution network inspection images based on collaborative feature learning according to claim 1, characterized in that, In S4, the process of generating A1 is specifically as follows: After channel normalization preprocessing F1, it is expressed as: ; In the formula, Indicates the SiLU activation function; This indicates a batch normalization operation; F represents a 1×1 convolution; CBS This represents the features after feature channel normalization preprocessing; F CBS Segmentation is the main path F main and jump connection path F shortcut , is represented as: ; In the formula, Represents a splitting operation; By using three consecutive dynamic convolutional mixing blocks, F main The processing is represented as follows: ; In the formula, Represents a dynamic convolutional hybrid block; , , These represent the output results of the three dynamic convolutional hybrid blocks; right , , After performing adaptive convolution, we obtain A1, which is represented as: ; In the formula, Indicates a connection along the channel dimension; Similarly, A2 and A3 are generated based on F2 and F3.
6. The method for detecting defects in distribution network inspection images based on collaborative feature learning according to claim 5, characterized in that, Dynamic Inception Mixer in Dynamic Convolutional Mixing Blocks Represented as: ; ; In the formula, , These represent the input and output characteristics of the dynamic Inception mixer, respectively. , They represent splitting. The two intermediate features obtained; and These represent depthwise separable convolutions with kernels of 3 and 5, respectively. Convolution-gated linear units Represented as: ; In the formula, W1, B1, W2, and B2 represent learnable parameters; Represents the GRLU activation function; This indicates element-wise multiplication; Represents depthwise convolution; , These represent the input and output features of the convolutional gated linear unit, respectively. The output features of the dynamic convolutional hybrid block are obtained and represented as follows: ; In the formula, This indicates standardized operations; , , These represent the input, intermediate, and output features of the dynamic convolutional hybrid block, respectively.
7. The method for detecting defects in distribution network inspection images based on collaborative feature learning according to claim 1, characterized in that, In S5, the process of generating I1 is specifically as follows: Processing A1 yields coarse-grained memory m. c and fine-grained memory m f , is represented as: ; In the formula, This represents a 3×3 convolution; Indicates a linear layer; Generate m using the Softmax activation function c m f The attention weight is expressed as: ; ; In the formula, , They represent m respectively c m f The weight of attention; This represents the Softmax activation function; This indicates element-wise multiplication; Will , Adding them together, we get I1, which can be represented as: ; Similarly, I2 and I3 are generated based on A2 and A3.
8. The method for detecting defects in distribution network inspection images based on collaborative feature learning according to claim 1, characterized in that, In S6, the process of generating C1 is specifically as follows: Extract the query features, key features, and value features of I1, represented as follows: ; In the formula, q represents a dilated convolution with a dilation rate of s; s k s v s These represent the query features, key features, and value features extracted when the expansion rate is s, respectively. Computation of augmented post-value features at scale s , is represented as: ; ; In the formula, W represents the Sigmoid activation function. a Represents the adaptive weight matrix; This indicates element-wise multiplication; Indicates pooling operation; This represents the attention weight coefficient with a scale of s; The cross-scale attention features are calculated and represented as follows: ; In the formula, S represents the total number of scales involved in cross-scale attention fusion, which is the maximum value of s; This represents the Softmax activation function; the superscript T indicates transpose; d k Indicates k s Feature dimensions; Represents cross-scale attention features; Combining linear transformations, we obtain C1, which is expressed as: ; In the formula, Indicates a linear layer; Similarly, C2 and C3 are generated based on I2 and I3.
9. The method for detecting defects in distribution network inspection images based on collaborative feature learning according to claim 1, characterized in that, In S7, the specific process for defect detection of C1, C2, and C3 is as follows: High-resolution, medium-resolution, and low-resolution detection heads are set up to perform parallel defect detection on C1, C2, and C3, respectively, as shown below: ; In the formula, K represents the index of the detection head, which can be 1, 2 or 3; Indicates the Kth detector head; C K Indicates C1, C2, or C3; This represents the classification probability of the Kth detector head; This represents the bounding box regression of the Kth detector head; This indicates the confidence level of the target being detected by the Kth detector. Represented as: ; In the formula, This indicates that the input is C. K time ; This represents the Sigmoid activation function; This indicates element-wise multiplication; This indicates a batch normalization operation; This represents a 3×3 convolution; This represents the convolution weight matrix of the classification branch of the Kth detector head; Represented as: ; In the formula, This indicates that the input is C. K time ; Represents a 1×1 convolution; Represented as: ; In the formula, This indicates that the input is C. K time ; This represents the convolution weight matrix of the target confidence branch of the Kth detector head.
10. A distribution network inspection image defect detection system based on collaborative feature learning, used to implement the method described in any one of claims 1-9, characterized in that, include: The super-resolution reconstruction module is used to extract shallow features F0 from the input power distribution network inspection image through convolution, and further process F0 using residual feature blocks to obtain the feature F0 after the residual feature blocks are processed. RB Fusion with F0, and fusion feature F fusion Perform channel expansion and pixel rearrangement operations to generate a high-resolution image I. HR ; The downsampling compression module is used to convert I HR The process is split into two parallel branches, X1 and X2. X1 is divided into several non-overlapping sub-tensors and concatenated along the channel dimension to obtain the total tensor. The total tensor is convolved to obtain the output tensor Y1 of X1. At the same time, the output tensor Y2 of X2 is obtained through max pooling and convolution operations. Y1 and Y2 are connected along the channel dimension to obtain the first-level basic feature F1. The downsampling compression module processes F1 again to obtain the second-level basic feature F2, and the downsampling compression module processes F2 again to obtain the third-level basic feature F3. The dynamic kernel adaptive convolution module performs multi-receptive field fusion based on channel normalization preprocessing, dynamic convolutional mixing block and adaptive convolution for F1, F2 and F3 respectively, generating adaptive features A1, A2 and A3 corresponding to F1, F2 and F3 respectively. The dynamic convolutional mixing block includes an Inception mixer and a convolutional gated linear unit. The hierarchical granularity interaction module is used to perform internal coarse-fine granular information exchange between A1, A2, and A3 respectively, and generate the interaction features I1, I2, and I3 corresponding to A1, A2, and A3. The cross-resolution attention module, based on the cross-scale attention mechanism, generates multi-scale fusion features C1, C2, and C3 corresponding to I1, I2, and I3; The multi-scale parallel detection module is equipped with three detection heads of different resolutions to perform defect detection on C1, C2, and C3 respectively, and output the defect category, location, and confidence information.