A distribution network equipment defect segmentation method based on a dynamically adjusted contrast network

CN122597787APending Publication Date: 2026-08-18HEBEI UNIV OF SCI & TECH +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610686981.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-19
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0005]本发明的目的是提供一种能够解决现有技术中存在的中间层误差累积和类别极度失衡问题,显著提升复杂动态环境下线路及设备缺陷分割的精度基于动态调整对比网络的配网设备缺陷分割方法

Benefits of technology

[0040](1)本发明通过DPEA模块直接校正中间特征层误差,mIoU提升1.30个百分点,显著优于传统中间监督方法CBL的0.02%提升,有效解决中间层误差累积问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122597787A_ABST
    Figure CN122597787A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of computer vision and deep learning, and particularly relates to a distribution network equipment defect segmentation method based on a dynamically adjusted contrast network, which comprises the following steps: (1) performing pretreatment on a distribution network equipment image photographed by a UAV inspection; (2) extracting multi-level semantic features from the pretreated image by using a backbone network; (3) introducing shallow spatial features extracted by the backbone network into a spatial focus contrast enhancement module SFCE; (4) performing multi-scale feature fusion on deep semantic features extracted by the backbone network through a multi-scale hollow convolution module; (5) splicing and fusing the deep multi-size feature map and the enhanced feature map in the channel dimension, feeding into a decoder for feature integration and prediction processing, and outputting a final prediction. The application can solve the problems of intermediate layer error accumulation and class extreme imbalance in the prior art, and significantly improve the precision of line and equipment defect segmentation in a complex dynamic environment of distribution network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer vision and deep learning technology, specifically relating to a method for defect segmentation of distribution network equipment based on dynamically adjusted comparison networks. Background Technology

[0002] In recent years, deep learning-based semantic segmentation algorithms have made significant progress in power distribution network equipment inspection and defect detection. Researchers have proposed various segmentation network architectures, including the DeepLab series, PSPNet, HRNet, and PIDNet, and have continuously improved semantic segmentation performance by introducing multi-scale receptive fields, expanding receptive fields, enhancing edge features, and capturing global context.

[0003] In the field of intelligent UAV inspection of power distribution lines, some researchers (such as Tao et al.) have applied deep learning object detection models to identify and locate insulator defects in aerial images; some scholars (such as Miao et al.) have explored the application of single-stage object detection algorithms in aerial images of different types of power distribution networks to cope with complex background interference in natural environments; in addition, to address the problem of extremely small defect proportions in aerial images, some studies (such as Liu et al.) have improved feature extraction networks and attention mechanisms to enhance the detection accuracy of small defects in complex backgrounds; at the same time, some studies (such as Xu et al.) have proposed networks that fuse multi-scale feature information, specifically designed to handle the scale abrupt changes caused by changes in flight altitude and viewing angle during UAV inspection.

[0004] Existing semantic segmentation methods for defect segmentation in complex and dynamic distribution networks suffer from problems such as intermediate layer error accumulation, extreme class imbalance, and limited effectiveness of intermediate supervision methods. Unlike indoor or fixed-viewpoint detection scenarios, distribution network UAV inspections face extremely complex background interference (such as forests, buildings, and dynamic cloud cover) as well as drastic changes in lighting and scale. This means that under strong background noise and complex structural textures, defects such as minor insulator damage, localized corrosion of hardware, or missing pins are highly susceptible to missed or false detections in the absence of effective foreground / background decoupling and feature focusing mechanisms. Summary of the Invention

[0005] The purpose of this invention is to provide a distribution network equipment defect segmentation method based on dynamic adjustment comparison network that can solve the problems of intermediate layer error accumulation and extreme category imbalance in the prior art and significantly improve the accuracy of line and equipment defect segmentation in complex dynamic environments.

[0006] The present invention adopts the following technical solution:

[0007] A method for defect segmentation of distribution network equipment based on dynamic adjustment comparison network, comprising the following steps:

[0008] (1) Preprocess the images of distribution network equipment captured by the shortwave infrared camera;

[0009] (2) Use the backbone network to extract multi-level semantic features from the image after preprocessing in step (1); the multi-level semantic features include shallow spatial features and deep semantic features;

[0010] (3) The shallow spatial features extracted by the backbone network are introduced into the Spatial Focusing Contrast Enhancement (SFCE) module to generate enhanced feature maps. ;

[0011] (4) The deep semantic features extracted from the backbone network are fused at multiple scales through a multi-scale dilated convolution module to generate deep multi-size feature maps. ;

[0012] (5) Deep multi-size feature map Enhanced feature map with SFCE output The feature maps are spliced ​​and fused along the channel dimension; the spliced ​​and fused feature maps are fed into the decoder for feature integration and prediction processing, and the final prediction is output; the intermediate feature layer of the decoder is corrected using the Dynamic Position Error Adjustment (DPEA) module during the training phase and the feature distribution is optimized using contrastive learning.

[0013] Furthermore, the preprocessing in step (1) includes, in sequence: random scaling, random cropping, flipping, and photometric distortion.

[0014] Furthermore, the backbone network in step (2) includes ResNet50 or a lightweight ShuffleNetV2 network.

[0015] Furthermore, the multi-level semantic features in step (2) include shallow spatial features and deep semantic features; the shallow spatial features are feature maps of 1 / 4 of the original input image; the deep semantic features are feature maps with resolutions of 1 / 8 and 1 / 16 respectively.

[0016] Furthermore, the Spatial Focusing Contrast Enhancement (SFCE) module in step (3) specifically comprises:

[0017] 1) Use a classifier to process the input feature map Generate category segmentation mask ; through Hadamard product operation , to obtain feature map ;

[0018] 2) To Perform max pooling and average pooling separately, and compare the results with the mask. The concatenation is performed along the channel dimension, followed by encoding the concatenated features using bidirectional striped convolution, and finally generating refined attention weights using a sigmoid activation function. ;

[0019] 3) Construct a contrastive learning framework, treating background features as negative samples and defect features as positive samples in the feature space. By calculating the distance between similar pixel features and the distance between dissimilar pixel features, the spatial focusing contrast enhancement loss is derived.

[0020]

[0021] Where A1′′ represents the defect feature, A0′′ represents the background feature, and 1 - A0′′ is considered a positive sample. τ is the temperature parameter.

[0022] 4) Utilize the generated attention weights Feature map of initial focus Perform adaptive updates The output of this module is then obtained by merging the results. .

[0023] Furthermore, the bidirectional stripe convolution sequentially comprises a 1×5 horizontal convolution and a 5×1 vertical convolution.

[0024] Furthermore, the multi-scale dilated convolution module in step (4) is as follows:

[0025] a) The deep semantic features extracted from the backbone network are fed into the parallel global average pooling branch and the dilated convolution branch, respectively;

[0026] The dilated convolution branch includes multiple parallel dilated convolution branches with different dilation rates;

[0027] b) The feature maps output by the average pooling branch and the dilated convolution branch are concatenated and fused to output the final deep multi-scale feature map. .

[0028] Furthermore, the dilated convolution branch includes three parallel dilated convolution branches with dilation rates of 6, 12, and 18, respectively.

[0029] Furthermore, the Dynamic Position Error Adjustment (DPEA) module in step (5) specifically comprises:

[0030] i) Sampling is performed based on the decoder's intermediate feature map, network prediction results, mask ground truth, and edge ground truth; according to pixels The samples are divided into positive and negative mask sample sets. ) and positive and negative edge sample sets ( );

[0031] ii) Use these sample features as The input is made to act directly on the intermediate feature layer of the decoder;

[0032] iii) Through calculation In the high-dimensional feature space, the distance constraint is directly applied between the intermediate layer target pixel features and the above-sampled positive and negative sample features;

[0033] With target pixel features and the positive and negative mask samples output by the aforementioned DAPS module ( ) and edge positive and negative samples ( Using this as input, the final error-adjusted loss value is generated. Used for backpropagation:

[0034]

[0035] in, Represents pixel features; and These represent sample features of the mask and edges, respectively; parameters Used to adjust the weight balance between the mask and edge features. This refers to the temperature parameter.

[0036] Furthermore, the training process is optimized by the overall loss function, defined as follows:

[0037]

[0038] in, Dice loss was used for all tests.

[0039] The beneficial effects of this invention are as follows:

[0040] (1) The present invention directly corrects the intermediate feature layer error through the DPEA module, and improves mIoU by 1.30 percentage points, which is significantly better than the 0.02% improvement of the traditional intermediate supervision method CBL, and effectively solves the problem of intermediate layer error accumulation.

[0041] (2) The present invention improves mIoU by 1.47 percentage points through the spatial focusing and contrastive learning strategy of the SFCE module, enhances the feature discrimination ability of defective regions, and effectively alleviates the problem of extreme class imbalance.

[0042] (3) After integrating two modules, the present invention improves the mIoU by 1.92 percentage points compared with the benchmark model, reaching 89.30%, which is significantly better than the existing advanced methods.

[0043] (4) The number of parameters and the amount of computation in this invention remain basically unchanged from the existing methods. The inference speed of 60 FPS meets the requirements of real-time detection and has high computational efficiency.

[0044] (5) The present invention maintains stable performance under both noise and light interference conditions, is robust, and has good deployment feasibility.

[0045] (6) The present invention has been specially optimized to address the characteristics of the background interference being strong and the small defects of insulators or fittings being easily submerged by the background texture in the complex dynamic environment of the UAV inspection of the power distribution network. Attached Figure Description

[0046] Figure 1 This is a schematic diagram of the method flow of the present invention. Detailed Implementation

[0047] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0048] Example

[0049] The defect segmentation method for distribution network equipment described in this invention includes the following steps (e.g. Figure 1 (As shown).

[0050] I. Image Preprocessing

[0051] To enhance the model's generalization ability and adapt to the complex and ever-changing outdoor power distribution network drone inspection environment, the following data preprocessing operations are performed sequentially on the input power distribution network equipment images during the model training phase.

[0052] (1) Image input: Acquire images of distribution network lines and equipment taken by visible light or infrared dual-light cameras carried by inspection equipment such as drones. The initial resolution of the images is 640×590 pixels.

[0053] (2) Random scaling: First, the original image is randomly scaled, with the scaling factor set to a range of (0.5, 2). This operation can simulate the imaging changes of the UAV at different flight altitudes, shooting distances, and viewing angles, enabling the model to recognize multi-scale defects.

[0054] (3) Random cropping: After the scaling operation is completed, a random cropping strategy is used to locally crop the image. The cropping process aims to extract image patches containing key local features (such as small defects or complex background interference areas) from the original high-resolution image. The cropped image patches must meet the input dimension requirements preset by the neural network model.

[0055] (4) Flipping and photometric distortion: The cropped image blocks are further subjected to random horizontal flipping; photometric distortion processing is introduced at the same time. The specific process of photometric distortion is as follows: by randomly adjusting the brightness, contrast, saturation or hue parameters of the image in the color space, extreme light interference caused by sudden weather changes, backlighting, cloud cover, sensor thermal noise or overexposure / underexposure in actual outdoor inspections is simulated.

[0056] (5) Requirements for preprocessed images: After the above processing steps, the final output is an enhanced image set with standardized size and richer and more diverse data distribution (covering multiple scales, multiple views, and multiple lighting conditions). This enhanced image set serves as the direct input data for the subsequent encoder network to extract multi-level semantic features, thereby effectively improving the robustness of the model in complex dynamic distribution network environments.

[0057] II. Feature Extraction

[0058] The preprocessed image of the distribution network equipment is input into an encoder based on the DeepLabV3+ architecture. The encoder specifically includes a backbone network for feature extraction (specifically, a ResNet50 network in this embodiment) and a multi-scale dilated convolution module. Existing ResNet50 only serves as a single feature extraction channel. To address the problem of small defect features being easily lost during downsampling, this invention introduces an SFCE module in the second stage of the backbone network. This invention creatively achieves a feature map resolution of 1 / 4 of the input image (i.e.,... The network is cut at the feature layer. At this specific cut, the encoder is designed as a two-way path. One path continues with conventional downsampling, extracting 1 / 8 and 1 / 16 of the deep semantic features, and finally feeding them into a multi-scale dilated convolution. The other path introduces the shallow spatial features into the SFCE module for spatial focusing and contrastive learning to enhance the output enhanced feature map. .

[0059] The image undergoes layer-by-layer convolution and downsampling operations through the backbone network to extract multi-level semantic features. These multi-level semantic features are specifically manifested in the intermediate feature maps with different spatial resolutions output by the backbone network at different network depth stages.

[0060] Specifically, it includes:

[0061] (1) Shallow spatial features: The feature map output by the backbone network in the early stage has a resolution of 1 / 4 of the original input image. (), used to preserve the target's details and spatial location information.

[0062] (2) Deep semantic features: The feature maps output by the deep stages of the backbone network have resolutions of 1 / 8 and 1 / 16, respectively, which are used to capture global contextual semantic information under a larger receptive field.

[0063] III. Spatial Focus Enhancement (SFCE Module Processing)

[0064] In the second stage of the encoder backbone network (such as ResNet50 or ShuffleNetV2), a Spatial Focused Contrast Enhancement (SFCE) module is introduced. Specifically, the second stage of the backbone network refers to the output of an intermediate feature map with a resolution of 1 / 4 the size of the original input image during the downsampling feature extraction process. (Network layer)

[0065] The specific processing method of the SFCE module and its connection with the network are as follows:

[0066] The SFCE module receives intermediate feature maps output from the second stage of the backbone network. (i.e., feature map with a resolution of 1 / 4) ).

[0067] Specific handling method:

[0068] (1) Feature mask generation: First, the input feature map is processed by a classifier. Generate category segmentation mask (Includes defect categories and background categories). Performed via Hadamard product operation ( Suppressing irrelevant regions allows the model to initially focus on features of specific categories, resulting in feature maps. .

[0069] (2) Directional Focusing and Attention Weight Calculation: For Perform max pooling and average pooling separately, and compare the results with the mask. The concatenation is performed along the channel dimension. Then, bidirectional striped convolutions (containing sequential 1×5 horizontal convolutions and 5×1 vertical convolutions) are used to encode the concatenated features, and a refined attention weight is generated using a sigmoid activation function. .

[0070] (3) Pixel-level contrastive learning optimization: A contrastive learning framework is constructed, in which background features are used as negative samples and defect features are used as positive samples in the feature space. By calculating the distance between similar pixel features and the distance between dissimilar pixel features, the spatial focusing contrast enhancement loss is obtained. .

[0071]

[0072] Here, A1′′ represents the defect feature, A0′′ represents the background feature (as a negative sample), and 1 - A0′′ represents the positive sample. By introducing a lower temperature parameter τ, this loss function increases the penalty for the similarity of out-of-class features, forcing the model to learn a more discriminative feature distribution.

[0073] (4) Feature adaptive update: using the generated attention weights Feature map of initial focus Perform adaptive updates ( ), and finally merge them to obtain the output of the module.

[0074] SFCE module output: A feature map that enhances the spatial representation of the defect region. The calculated contrastive learning loss value is output to the network. .

[0075] Comparative learning loss value This not only reflects the distance constraint between the internal background and defect features of the SFCE module, but also serves as an independent loss term output to the outside of the module. On one hand, it participates in global backpropagation: After being calculated internally by the SFCE module, the result is output and added to the total loss function of the entire DACN network. The network performs global backpropagation and parameter updates by minimizing this total loss. On the other hand, As a separate contrastive learning loss term, it is assigned specific weight parameters ( = 0.01), together with other losses, drive the parameter optimization (gradient descent) of the entire network.

[0076] Connection method with the backbone network: The SFCE module connects to the backbone network as a bypass branch. The features extracted by the backbone network are split into two paths in the second stage: one path enters the SFCE module to generate enhanced feature maps. The other path continues downsampling in the backbone network (extracting features at resolutions of 1 / 8 and 1 / 16) to obtain deep multi-scale features. Finally, in the decoder stage, the SFCE module outputs... It will be spliced ​​and fused with the upsampled deep multi-scale features to generate a prediction mask.

[0077] IV. Multi-scale feature fusion (multi-scale dilated convolution module)

[0078] The deep features extracted by the backbone network are further captured by a multi-scale dilated convolution module to capture multi-scale contextual information.

[0079] The specific implementation method and processing procedure are as follows:

[0080] Input: Deep feature maps output by the backbone network after multiple downsampling processes (combined with...) Figure 1 As shown, specifically, it is a feature map with a resolution of 1 / 16 of the original input image.

[0081] Specific implementation method (multi-scale dilated convolution processing): A multi-scale dilated convolution module (inherited from the DeepLabV3+ architecture) is used to process the input deep feature map in parallel. Specifically, the deep feature map is fed into parallel global average pooling branches and dilated convolution branches respectively.

[0082] (1) Global average pooling branch: Obtain global image-level contextual prior information through average pooling (Avg pool) operation.

[0083] (2) Dilated Convolution Branches: Multiple dilated convolutional layers with different dilation rates are used for processing. Referring to the network architecture diagram, three parallel dilated convolutional branches are specifically used, with dilation rates set to 6, 12, and 18, respectively. This design allows for the acquisition of receptive fields of different sizes without reducing the spatial resolution of the feature maps.

[0084] Multi-scale feature fusion and output: The feature maps output by the average pooling branch and the dilated convolution branches with dilation rates of 6, 12, and 18 are concatenated and fused. Through this multi-scale fusion operation, the network can simultaneously capture local details and global multi-scale contextual semantic information, ultimately outputting a processed deep multi-scale feature map. ).

[0085] V. Output Generation: Final Prediction

[0086] Using a decoder based on the DeepLabV3+ architecture, the final defect segmentation result of the distribution network equipment is generated through upsampling, splicing and fusion, feature integration and prediction processing.

[0087] The specific generation process is as follows:

[0088] The inputs are: the deep multi-scale feature map output from the multi-scale feature fusion stage (corresponding to a resolution of 1 / 16 of the original image in the illustration), and the spatial focusing enhancement feature map output from the SFCE module in step three. (The corresponding image resolution is 1 / 4 of the original image).

[0089] The specific handling method is as follows:

[0090] (1) In the decoder, the deep multi-scale feature map is upsampled to increase its spatial resolution to match the enhanced features output by the SFCE module. Figure 1 Upsample to 1 / 4 of the size (i.e., upsample to 1 / 4 of the size).

[0091] (2) Compare the upsampled deep feature map with the enhanced feature map output by the SFCE module. The components are spliced ​​and merged along the channel dimension.

[0092] (3) The spliced ​​and fused feature map is fed into the feature integration convolutional layer inside the decoder for feature integration and prediction processing.

[0093] Decoder output: Generates mask prediction results corresponding to the size and position of the original input image, thereby achieving the final pixel-level segmentation of defects in power distribution equipment.

[0094] VI. Intermediate Layer Error Adjustment (Enabled only during the training phase)

[0095] By introducing a Dynamic Position Error Adjustment (DPEA) module into the intermediate feature layer of the aforementioned DeepLabV3+ architecture-based decoder, the error of the intermediate feature layer is directly corrected, and the feature distribution is optimized by contrastive learning.

[0096] Error correction is specifically achieved through dynamic position sampling (DAPS) and a dynamic position error adjustment loss function. This is accomplished collaboratively. The connection between the two lies in the fact that DAPS is responsible for accurately selecting a set of samples that meet the criteria from a complex feature space, and these selected sample sets are then passed as direct input to... This module is used for subsequent comparison learning loss calculation. It is only enabled during the training phase and does not increase the computational overhead during the inference phase.

[0097] (1) Sampling is performed based on the decoder's intermediate feature map, network prediction results, mask ground truth, and edge ground truth. Based on pixels... The samples are divided into positive and negative mask sample sets. ) and positive and negative edge sample sets ( All selected samples Strict screening is required.

[0098] (a) Accuracy: Selected samples must be correctly classified by the current network (i.e., j = ).

[0099] (b) Semantic consistency: Positive samples must be consistent with the target location. They have the same semantic category.

[0100] (c) Semantic differences: Negative samples must be related to the target location. They belong to different semantic categories.

[0101] The samples selected through rigorous screening are correctly predicted samples of the same class (positive sample set) and correctly predicted samples of different classes (negative sample set).

[0102] (2) Based on the semantic similarities and differences with the target location pixels, these correctly classified samples are precisely divided into positive and negative mask sample sets and positive and negative edge sample sets. The features of these finely selected samples are directly used as... The input is directly applied to the intermediate feature layers of the decoder. This approach shifts the optimization focus from the final output layer to the intermediate layers, shortening the gradient propagation path during training. This allows for explicit control and direct correction of feature representation errors in the intermediate layers, effectively mitigating the gradient decay problem in deep network training.

[0103] (3) Regarding the optimization of feature distribution, a contrastive learning computational framework that fuses mask features and edge features was constructed. Specifically, through computation... In the high-dimensional feature space, the distance constraint is directly applied between the intermediate layer target pixel features and the above-sampled positive and negative sample features.

[0104] With target pixel features and the positive and negative mask samples output by the aforementioned DAPS module ( ) and edge positive and negative samples ( Using this as input, the feature distance between the target pixel and the correctly predicted samples (positive samples) of the same class is reduced through calculation using a formula, while the feature distance between it and the samples of different classes (negative samples) is increased.

[0105] Generate the final error-adjusted loss value. Used for backpropagation. Its mathematical expression is as follows:

[0106]

[0107] in, Represents pixel features; and These represent sample features of the mask and edges, respectively. Parameters Used to adjust the weight balance between the mask and edge features. This is a temperature parameter. It is set in this invention. and .

[0108] By employing this directional "narrowing and widening" mechanism in the feature space, the penalty for dissimilar feature similarity is increased, forcing the model to form a more dispersed and discriminative feature distribution, which significantly enhances the model's ability to perceive and understand the boundaries and shape information of complex objects.

[0109] The entire network training process of this invention (including the backbone network (feature extraction), the SFCE module (spatial focusing contrast enhancement), the multi-scale dilated convolution module, and the decoder with the DPEA module (dynamic position error adjustment)) is optimized by an overall loss function, defined as follows:

[0110]

[0111] in, Dice loss is used in all cases. The parameters are set as follows: =1.0, =0.4, =1.0, =0.01, =0.01.

[0112] Experimental Example

[0113] (1) Experimental environment

[0114] The neural network was built using the PyTorch framework, and experiments were conducted on a high-performance platform equipped with an NVIDIA GeForce RTX 3090 Ti GPU and an Intel Core i9-12900KS CPU. The backbone network was initialized with ImageNet pre-trained weights to accelerate convergence and incorporate prior knowledge.

[0115] (2) Training parameters

[0116] During training, the batch size was 4, the optimizer used stochastic gradient descent (SGD), the initial learning rate was 0.01, the momentum was 0.9, and the learning rate was dynamically adjusted using polynomial decay. The total number of iterations was 60,000. During the model training phase, the images were first scaled, then randomly cropped, horizontally flipped, and subjected to photometric distortion to enhance the model's generalization ability.

[0117] (3) Dataset

[0118] A Defect Segmentation Dataset (PDDS) was collected and constructed in a real-world, complex, and dynamic power distribution line UAV inspection scenario. The PDDS consists of 1,500 high-resolution images taken by a high-definition visible light or infrared gimbal camera mounted on a UAV, covering various common power distribution equipment defects such as insulator damage and pin detachment. The images were randomly divided into training and test sets at a 2:1 ratio.

[0119] Comparative Example 1

[0120] To verify the effectiveness of this invention, a comparative experiment was conducted on the PDDS dataset. The PDDS dataset contains 1500 high-resolution images taken by a high-definition visible light or infrared gimbal camera mounted on a drone, covering various common defects in power distribution network equipment, such as insulator damage and pin detachment. The images were randomly divided into training and test sets at a 2:1 ratio.

[0121] Table 1 compares the performance of existing semantic segmentation methods on the PDDS dataset.

[0122] .

[0123] In Table 1, the method DeepLabV3+ refers to Chen LC, Zhu Y, Papandreou G, et al. Encoder-decoder with atrous separable convolution for semantic imagesegmentation[C] / / Proceedings of the European conference on computer vision (ECCV). 2018: 801-818.

[0124] The backbone network Res50 is referenced from He K, Zhang X, Ren S, et al. Deep residual learning for image recognition[C] / / Proceedings of the IEEE conference on computer vision and pattern recognition. 2016: 770-778.

[0125] The methods HRNet and the backbone network Hr48 are referenced from Sun K, Xiao B, Liu D, et al. Deep high-resolution representation learning for human pose estimation[C] / / Proceedingsof the IEEE / CVF conference on computer vision and pattern recognition. 2019:5693-5703.

[0126] Method OCRNet refers to Yuan Y, Chen X, Wang J. Object-contextual representations for semantic segmentation[C] / / European conference on computervision. Cham: Springer International Publishing, 2020: 173-190.

[0127] The method Mask2Former refers to Cheng B, Misra I, Schwing AG, et al. Masked-attention mask transformer for universal image segmentation[C] / / Proceedings of the IEEE / CVF conference on computer vision and pattern recognition. 2022:1290-1299.

[0128] Method RERN refers to Wang C, Chen H, Zhao S. RERN: Rich edge featuresrefinement detection network for polycrystalline solar cell defectsegmentation[J]. IEEE Transactions on Industrial Informatics, 2023, 20(2):1408-1419.

[0129] The results in Table 1 show that:

[0130] (1) The DACN (ResNet50 backbone) of this invention achieves 89.30% mIoU on the PDDS dataset, which is significantly better than existing advanced methods such as DeepLabV3+ (87.36%), Mask2Former (86.89%), and RERN (87.90%).

[0131] (2) In terms of precision (P), DACN achieved 90.20%, which is better than DeepLabV3+ (86.72%) and RERN (88.30%).

[0132] (3) In terms of recall (R) rate, DACN reached 88.14%, which is better than DeepLabV3+ (86.28%).

[0133] (4) In terms of F1 score, the DACN of the present invention achieves 89.16%, which is superior to all comparison methods.

[0134] Comparative Example 2 Ablation Experiment

[0135] To verify the effectiveness of each core component of DACN, we conducted stepwise ablation experiments on the PDDS dataset, using DeepLabV3+ (ResNet50) as a benchmark. The results show that both DPEA and SFCE modules significantly improve segmentation performance without introducing a noticeable computational burden.

[0136] (1) Effectiveness of DPEA module: After introducing the DPEA module into the baseline model, mIoU increased from 87.38% to 88.68%. This improvement is mainly due to the direct error constraint mechanism of DPEA on the intermediate layer features of the decoder, which effectively alleviates the gradient decay problem in deep network training and enhances the model's ability to represent complex defect details.

[0137] (2) Effectiveness of the SFCE module: After introducing the SFCE module alone, the mIoU increased to 88.85%. Stepwise experimental results show that the classifier branch can improve the initial class discrimination ability, while the bidirectional striped convolution further enhances the spatial feature modeling effect; combined with the contrastive learning strategy, the extreme class imbalance problem is effectively alleviated by widening the distance between the background and defect features.

[0138] (3) Overall performance and computational efficiency: After integrating DPEA and SFCE modules, DACN achieved a maximum mIoU of 89.30%, which is 1.92 percentage points higher than the baseline model.

[0139] Comparative Example 3 Robustness

[0140] To verify the robustness of this invention, noise and illumination interference tests were conducted. To verify the stability of the model in the complex dynamic environment of real-world outdoor power distribution network drone inspections, this embodiment artificially introduced specific noise and illumination interference into the test set, with the specific parameter settings as follows:

[0141] Gaussian noise test: Introducing a mean of 0 and a standard deviation of 0. Gaussian noise was used to simulate sensor thermal noise and motion blur caused by high-frequency vibration of the UAV rotor and gust interference.

[0142] Salt-and-pepper noise test: Randomly flip 1% to 5% of the pixels in the image to black or white to simulate digital signal bit errors in the long-distance image transmission link of the drone, or dust and water vapor contamination on the camera optical components in complex outdoor environments.

[0143] Poisson noise test: Introducing parameterless Poisson noise, which is generated directly based on the photon statistical law of the image, to simulate the imaging interference of power distribution network drone inspection under low light or low illumination natural conditions such as dusk and cloudy days.

[0144] Over-exposure test: This is achieved by increasing the image brightness by about 70 gray levels and slightly enhancing the contrast, simulating strong direct sunlight outdoors, or local glare caused by the high reflectivity of the surface of power distribution hardware, ceramic, and glass insulators.

[0145] Under-exposure test: This is achieved by reducing the image brightness by about 100 gray levels and moderately increasing the contrast, simulating low signal imaging conditions under complex working conditions such as heavy cloud cover, strong backlight shooting, or dense bushes around power distribution towers.

[0146] The specific experimental results (mIoU, %) are shown in Table 2.

[0147] Table 2. Comparison of robustness experiments of different models under various noise and illumination interference conditions.

[0148] .

[0149] To assess robustness against noise interference, Gaussian noise, salt-and-pepper noise, and Poisson noise were introduced into the test set to address high-frequency rotor vibration, sensor thermal noise, dust and water vapor pollution in natural environments, and imaging interference under low light or low illumination conditions during outdoor inspections of power distribution drones. Experimental results show that DACN achieves the highest segmentation accuracy under all noise conditions, especially under Gaussian and Poisson noise, significantly outperforming lightweight models such as STDC and DDRNet, thus verifying the effective noise suppression capability of the DPEA module.

[0150] Robustness to illumination disturbances was tested under extreme illumination conditions, including overexposure caused by strong direct sunlight, high reflectivity of distribution network hardware and ceramic / glass insulator surfaces, and underexposure caused by heavy cloud cover, dense tree shadows, or strong backlighting. Results showed that some existing models experienced significant performance degradation under drastic illumination changes, while DACN maintained stable performance under both overexposure and underexposure conditions, indicating that the method possesses good adaptability to illumination variations.

[0151] Comparative Example 4: Compared with traditional intermediate monitoring methods

[0152] To verify the effectiveness of this invention in handling intermediate layer errors, it is compared with the traditional intermediate supervision method CBL. CBL is a conventional intermediate supervision segmentation method called Conditional Boundary Loss.

[0153] Table 3 Comparison Results of Intermediate Supervision Methods

[0154] .

[0155] Under the same computational conditions, introducing CBL only improves the mIoU of the baseline model by 0.02% (from 87.38% to 87.40%), a limited gain; in contrast, DACN achieves a significant improvement of 1.92%. This is because the extreme sparsity of minor defects in the distribution network (such as hardware corrosion and insulator damage) from the drone aerial perspective, and the severe visual confusion between defect edges and natural backgrounds (such as tree canopy textures and building structures), make it difficult for the local sampling mechanism relied upon by CBL to obtain sufficient similar effective samples, and it is even prone to introducing complex background interference noise. DACN, on the other hand, directly optimizes the intermediate features of the decoder through the DPEA and SFCE modules, avoiding reliance on fixed window sampling, thus more effectively mitigating the error accumulation problem in the complex dynamic environment of the distribution network.

Claims

1. A method for defect segmentation of distribution network equipment based on a dynamically adjusted comparison network, characterized in that, It includes the following steps: (1) Preprocess the images of power distribution equipment collected by inspection equipment such as drones; (2) Use the backbone network to extract multi-level semantic features from the image after preprocessing in step (1); the multi-level semantic features include shallow spatial features and deep semantic features; (3) The shallow spatial features extracted by the backbone network are introduced into the Spatial Focusing Contrast Enhancement (SFCE) module to generate enhanced feature maps. ; (4) The deep semantic features extracted from the backbone network are fused at multiple scales through a multi-scale dilated convolution module to generate deep multi-size feature maps. ; (5) Deep multi-size feature map Enhanced feature map with SFCE output The feature maps are spliced ​​and fused along the channel dimension; the spliced ​​and fused feature maps are fed into the decoder for feature integration and prediction processing, and the final prediction is output; the intermediate feature layer of the decoder is corrected using the Dynamic Position Error Adjustment (DPEA) module during the training phase and the feature distribution is optimized using contrastive learning.

2. The method for defect segmentation of distribution network equipment based on a dynamically adjusted comparison network according to claim 1, characterized in that, The preprocessing in step (1) includes random scaling, random cropping, flipping, and photometric distortion.

3. The method for defect segmentation of distribution network equipment based on a dynamically adjusted comparison network according to claim 1, characterized in that, The backbone network in step (2) includes ResNet50 or a lightweight ShuffleNetV2 network.

4. The method for defect segmentation of distribution network equipment based on a dynamically adjusted comparison network according to claim 1, characterized in that, The multi-level semantic features in step (2) include shallow spatial features and deep semantic features; the shallow spatial features are feature maps of 1 / 4 of the original input image; the deep semantic features are feature maps with resolutions of 1 / 8 and 1 / 16 respectively.

5. The method for defect segmentation of distribution network equipment based on a dynamically adjusted comparison network according to claim 1, characterized in that, The Spatial Focusing Contrast Enhancement (SFCE) module in step (3) specifically refers to: 1) Use a classifier to process the input feature map Generate category segmentation mask ; through Hadamard product operation , to obtain feature map ; 2) To Perform max pooling and average pooling separately, and compare the results with the mask. The concatenation is performed along the channel dimension, followed by encoding the concatenated features using bidirectional striped convolution, and finally generating refined attention weights using a sigmoid activation function. ; 3) Construct a contrastive learning framework, treating background features as negative samples and defect features as positive samples in the feature space. By calculating the distance between similar pixel features and the distance between dissimilar pixel features, the spatial focusing contrast enhancement loss is derived. Where A1′′ represents the defect feature, A0′′ represents the background feature, and 1 - A0′′ is considered a positive sample. τ is the temperature parameter. 4) Utilize the generated attention weights Feature map of initial focus Perform adaptive updates The output of this module is then obtained by merging the results. .

6. The method for defect segmentation of distribution network equipment based on a dynamically adjusted comparison network according to claim 5, characterized in that, The bidirectional stripe convolution consists of a 1×5 horizontal convolution and a 5×1 vertical convolution.

7. The method for defect segmentation of distribution network equipment based on a dynamically adjusted comparison network according to claim 1, characterized in that, The multi-scale dilated convolution module in step (4) is: a) The deep semantic features extracted from the backbone network are fed into the parallel global average pooling branch and the dilated convolution branch, respectively; The dilated convolution branch includes multiple parallel dilated convolution branches with different dilation rates; b) The feature maps output by the average pooling branch and the dilated convolution branch are concatenated and fused to output the final deep multi-scale feature map. .

8. The method for defect segmentation of distribution network equipment based on a dynamically adjusted comparison network according to claim 7, characterized in that, The dilated convolutional branches include three parallel dilated convolutional branches with dilation rates of 6, 12, and 18, respectively.

9. The method for defect segmentation of distribution network equipment based on a dynamically adjusted comparison network according to claim 1, characterized in that, The Dynamic Position Error Adjustment (DPEA) module in step (5) specifically refers to: i) Sampling is performed based on the decoder's intermediate feature map, network prediction results, mask ground truth, and edge ground truth; according to pixels The samples are divided into positive and negative mask sample sets. ) and positive and negative edge sample sets ( ); ii) Use these sample features as The input is made to act directly on the intermediate feature layer of the decoder; iii) Through calculation In the high-dimensional feature space, the distance constraint is directly applied between the intermediate layer target pixel features and the above-sampled positive and negative sample features; With target pixel features and the positive and negative mask samples output by the aforementioned DAPS module ( ) and edge positive and negative samples ( Using this as input, the final error-adjusted loss value is generated. Used for backpropagation: in, Represents pixel features; and These represent sample features of the mask and edges, respectively; parameters Used to adjust the weight balance between the mask and edge features. This refers to the temperature parameter.

10. A method for defect segmentation of distribution network equipment based on a dynamically adjusted comparison network according to claim 1, characterized in that, The training process is optimized by the overall loss function, which is defined as follows: in, Dice loss was used for all tests.