Power transmission line insulator defect detection method based on adaptive mixed attention
Through the AHAN detection method based on adaptive hybrid attention, a feature extraction and fusion network is built, which solves the problems of traditional low detection efficiency and missed detection, and realizes rapid and accurate detection and differentiated prevention and control of insulator defects in transmission lines.
Patent Information
- Application Number
- CN202411414509.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-02-14
AI Technical Summary
Traditional manual detection is not efficient, and it is prone to missed detection and missed detection, which fails to effectively suppress the rising trend of insulator failures. Moreover, there are many types of insulators, making it difficult to quickly and accurately locate faults.
Using the AHAN insulator defect detection method based on adaptive hybrid attention, the rapid and accurate detection of insulator defects in transmission lines is achieved by constructing an image database and establishing detection models of RAP-Net, AHA-PANet and DH defect detection networks.
It effectively improves the model's detection ability of small target defects, reduces the probability of false detection and missed detection of insulator defects, realizes rapid and accurate detection of insulator defects in transmission lines, and supports inspection personnel to carry out differentiated prevention and control.
Smart Images

Figure CN119444672A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of power transmission lines, and in particular relates to a method for detecting insulator defects of power transmission lines based on adaptive hybrid attention. Background Art
[0002] With the rapid development of the economy, people's demand for electricity is increasing, which brings great challenges to the maintenance and inspection of power grids. As one of the indispensable equipment in the power system, insulators play a key role in electrical insulation and mechanical support. However, due to the influence of various factors such as transient loads, atmospheric conditions, mechanical stress, etc., insulators often have various defects such as self-explosion, breakage, flashover, string drop, zero value and rust. If not handled in time, it will directly threaten the safe and stable operation of the power system. Different insulator failures will lead to different line hazards, so different prevention and control measures need to be taken.
[0003] Insulators are of various types and complex. Traditional manual inspection is inefficient and prone to missed inspections and false inspections. Practical prevention work is still insufficient and has failed to effectively curb the rising trend of insulator failures. With the rapid development of artificial intelligence technology, the application of computer vision and deep learning methods to detect insulator defects has become a research hotspot. How to quickly and accurately locate insulator faults in complex inspection images, and then assist line inspectors in accurately identifying insulator defects, is of great significance for regional line maintenance. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a transmission line insulator defect detection method based on adaptive hybrid attention, which is used to accurately detect the type of transmission line insulator defects in real time, provide a reference for inspection personnel, and further improve the differentiated prevention and control effect of transmission line insulator defects.
[0005] To achieve the above object, the present invention provides the following technical solution: a method for detecting defects in insulators of a power transmission line based on adaptive hybrid attention, comprising the following steps:
[0006] S1: Build an image database of transmission line insulator defects and divide it into training set, validation set and test set;
[0007] S2: Construct the AHAN insulator defect detection model, which includes the RAP-Net backbone feature extraction network, the AHA-PANet feature fusion network and the DH defect detection network;
[0008] The RAP-Net backbone feature extraction network has a total of 10 layers, which are a CBS module, a CBS module and a C2f1 module, a CBS module and a C2f2 module, a CBS module and a C2f3 module, a CBS module and a C2f4 module, and a RAP module. The output insulator defect features of the C2f2 module, the C2f3 module, and the RAP module are respectively used as the input of the AHA-PANet feature fusion network. The outputs of the C2f2 module, the C2f3 module, and the RAP module are feature P1, feature P2, and feature P3, respectively.
[0009] The processing process of the AHA-PANet feature fusion network is as follows: feature P3 is upsampled and then fused with feature P2 to obtain fused feature P4; fused feature P4 is subjected to feature extraction by the AHA1 module to obtain enhanced feature P5; enhanced feature P5 is subjected to upsampling and fused with feature P1 to obtain fused feature P6; fused feature P6 is subjected to feature extraction by the AHA2 module to obtain enhanced feature P7; enhanced feature P7 is subjected to enhanced feature extraction by the CBS module to obtain enhanced feature P5 and fused with enhanced feature P8; fused feature P8 is subjected to feature extraction by the AHA3 module to obtain enhanced feature P9; enhanced feature P9 is subjected to enhanced feature extraction by the CBS module to obtain fused feature P3. 10 , fusion feature P 10 After AHA4 module feature extraction, the enhanced feature P is obtained. 11 Finally, the enhanced features P7, P9 and P 11 As the output of the AHA-PANet feature fusion network;
[0010] The DH defect detection network is composed of three identical detection heads SST. Each SST consists of a comprehensive path and a final branch path. The structure of the comprehensive path is composed of multiple repeated SCA modules, SAA modules and TAA modules, as well as separate SCA modules, SAA modules, ROIP (ROIPooling) region of interest pooling modules and TAA modules. The final branch path is divided into two branches, one for predicting the box loss and the other for the classification loss. The enhanced features P7, P9 and P 11 Input three test heads SST respectively to detect insulator defects;
[0011] S3: Training the AHAN insulator defect detection model; using a large-scale public insulator image dataset to pre-train the AHAN insulator defect detection model, obtain pre-training weights, load the pre-training weights into the AHAN insulator defect detection model, and re-train the AHAN insulator defect detection model using the insulator defect images in the training set, and obtain the optimal training weights by cross-using the Mosaic and Mixup data enhancement methods;
[0012] S4: Detect transmission line insulator defects through the trained AHAN insulator defect detection model; load the optimal training weights into the AHAN insulator defect detection model, detect the insulator defect images of the test set, and use score screening and non-maximum suppression to eliminate redundant prediction boxes in the detection results.
[0013] Further preferably, the structures of the C2f1 module, the C2f2 module, the C2f3 module and the C2f4 module are all the same structure, and the processing process of the C2f1 module is: after the input features are extracted by the CBS1 module, they are processed in sequence by the segmentation module, the first C2 module, and the second C2 module, and the output features of the segmentation module, the first C2 module, and the second C2 module are fused, and finally the CBS2 module integrates the features as output.
[0014] Specifically, the structure of the first C2 module is the same as that of the second C2 module. The processing process of the first C2 module is: the input feature map is sequentially extracted by two CBS modules and then stacked with the input feature through residual edges, and the stacked feature is used as the output.
[0015] Specifically, the structures of the CBS1 module and the CBS2 module are the same as the CBS module, and the CBS module is composed of a Conv convolution layer, a BN layer and a SiLU activation function in sequence.
[0016] Further preferably, the RAP module includes 4 paths, the first path consists of the CBS1 module, the first residual pooling layer MP_5 and the DA attention module, the second path consists of the CBS1 module, the first residual pooling layer MP_5, the second residual pooling layer MP_9 and the DA attention module, the third path consists of the CBS1 module, the first residual pooling layer MP_5, the second residual pooling layer MP_9, the third residual pooling layer MP_13 and the DA attention module, and the fourth path consists of the CBS1 module. The outputs of the 4 paths are concat fused and finally the CBS2 module performs feature integration as the output.
[0017] Further preferably, the structures of the AHA1 module, AHA2 module, AHA3 module and AHA4 module are all the same structure, and the processing process of the AHA1 module is: after the input features are extracted by the CBS1 module, they are processed in sequence by the segmentation module, the first CAC module, and the second CAC module, and the output features of the segmentation module, the first CAC module, and the second CAC module are fused, and finally the CBS2 module integrates the features as output.
[0018] Specifically, the first CAC module and the second CAC module have the same structure, and the first CAC module is composed of a CBS1 module, an AHAM module and a CBS2 module in sequence.
[0019] Specifically, the processing process of the AHAM module is as follows: the input feature map in one branch is processed in parallel by the DA attention module and the BRA attention module, and then the feature map is integrated by the AWA adaptive weight allocation module, and stacked with the input feature map as the output of branch one; the input feature map in the other branch is processed serially by the DA attention module and the BRA attention module, and stacked with the input feature map as the output of branch two; finally, the feature maps of branch one and branch two are integrated by the AWA adaptive weight allocation module as the final output of the AHAM module.
[0020] Specifically, the processing process of the AWA adaptive weight allocation module is as follows: introduce a learnable parameter w1 and w2 whose sum is 1, and use w1 and w2 to adjust the input feature map P of the two branches respectively. branch1 With P branch2 Integrate and get P' branch1 With P' branch2 , and finally output the integrated feature map.
[0021] Specifically, the processing process of the SCA module is as follows: the input feature map is processed by the average pooling module AGP, the convolution module Conv, the activation function module ReLU and the HS (Hard Sigmoid) module in sequence, and then multiplied by the input feature map parameter; the processing process of the SAA module is as follows: the feature map output by the SCA is processed by the index operation Index, the Conv convolution module, σ offset The feature map after offset network processing is stacked with the feature map output by SCA and the feature map after index operation Index and two Conv convolution modules; the processing process of the TAA module is as follows: the output feature map of the SAA module is processed by the average pooling module AGP, the fully connected layer FC, the ReLU activation function, the fully connected layer FC and the normalization layer Norm in turn, and then stacked with the output feature map of the SAA module.
[0022] Specifically, the σ offsetThe offset network consists of a depthwise separable convolutional module DWConv, a GeLU activation function, and a Conv convolutional layer.
[0023] Further preferably, in S1, images of transmission line insulators taken by drones are collected as original image sample sets, the original image sample sets are expanded to form an image database of transmission line insulator defects, and the image database of transmission line insulator defects is labeled and divided into a training set, a validation set, and a test set in a ratio of 7:2:1.
[0024] Further preferably, in S1, the AHAGAN algorithm is used to expand the original image sample set, and the AHAGAN algorithm consists of two modules: a generator G and a discriminator D; the generator G is sequentially composed of a fully connected layer and a CBS module, a CBS module and an AHA module, a CBS module and a CBS module, a CBS module and an AHA module, and a CBS module and a CBS module; the discriminator D is sequentially composed of a CBS module and a CBS module, an AHA module and a CBS module, a CBS module and a CBS module, an AHA module and a CBS module, and a CBS module and a fully connected layer; the structure of the AHA module is the same as that of the AHA1 module, the AHA2 module, the AHA3 module and the AHA4 module.
[0025] Compared with the prior art, the present invention has the following beneficial effects:
[0026] Firstly, the insulator image is augmented by the AHAGAN algorithm to build an image database of various insulator defects of transmission lines, aiming to solve the problem of small image data samples and make the deep learning model have strong stability, robustness and generalization ability; then, the AHAN insulator defect detection model is built based on the independently designed RAP-Net backbone feature extraction network, AHA-PANet feature fusion network and DH defect detection network to strengthen local feature extraction, improve the interaction ability of global and local feature information and eliminate redundant global feature information, and finally effectively improve the model's detection ability for small target defects, thereby greatly reducing the probability of false detection and missed detection of insulator defects; finally, the trained optimal AHAN insulator defect detection model is used to detect various insulator defect targets. The technical solution proposed in the present invention can realize the rapid and accurate detection of various insulator defects of transmission lines, provide a reference for line maintenance of patrol personnel, and further improve the differentiated prevention and control effect of insulator defects of transmission lines. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 is a flow chart of the method of the present invention;
[0028] Figure 2 This is a schematic diagram of the AHAGAN algorithm model structure;
[0029] Figure 3 This is a schematic diagram of the AHAN insulator defect detection model;
[0030] Figure 4 It is a schematic diagram of the SST structure;
[0031] Figure 5 Schematic diagram of residual attention pyramid RAP;
[0032] Figure 6 This is the schematic diagram of the C2f1 module;
[0033] Figure 7 is a schematic diagram of the first C2 module;
[0034] Figure 8 Schematic diagram of the adaptive hybrid attention network AHA module;
[0035] Fig. 9 Schematic diagram of the adaptive hybrid attention module AHAM;
[0036] Fig.10 This is a schematic diagram of the AWA module of the adaptive weight allocation mechanism;
[0037] Fig.11 This is a schematic diagram of the CBS module. DETAILED DESCRIPTION
[0038] The present invention is further described below in conjunction with embodiments. It is necessary to point out that the following embodiments are only used to further illustrate the present invention and cannot be understood as limiting the scope of protection of the present invention. Some non-essential improvements and adjustments made by technical personnel in this field based on the above invention content still fall within the scope of protection of the present invention.
[0039] Reference Figure 1 , a transmission line insulator defect detection method based on adaptive hybrid attention, comprising the following steps:
[0040] S1: Construct an image database of transmission line insulator defects. Collect transmission line insulator images taken by drones as the original image sample set, augment the original image sample set using the AHAGAN algorithm, label the augmented sample set and divide it into training set, validation set and test set in a ratio of 7:2:1;
[0041] In this embodiment, five types of insulator defects, namely, self-explosion, breakage, flashover, string drop and corrosion, are selected as research objects, and the number of images of each defect is 150, totaling 750 insulator defect images as the original image sample set. The AHAGAN algorithm is used to augment the original image sample set, and each insulator defect image is expanded by 150, totaling 1500 insulator defect image samples. Then, the expanded sample set is labeled using LabelImg label making software to indicate the target type and location, and is divided into training set, validation set and test set in a ratio of 7:2:1, that is, the training set is 1050 images, the validation set is 300 images, and the test set is 150 images.
[0042] Construct the AHAGAN image augmentation algorithm. The AHAGAN algorithm model consists of two modules: generator G and discriminator D. Figure 2 As shown in the figure, the generator G is composed of a fully connected layer and a CBS module, a CBS module and an AHA module, a CBS module and a CBS module, a CBS module and an AHA module, and a CBS module and a CBS module in sequence; the discriminator D is composed of a CBS module and a CBS module, an AHA module and a CBS module, a CBS module and a CBS module, an AHA module and a CBS module, and a CBS module and a fully connected layer in sequence. During training, 750 real insulator defect images were used as network input for training, the training batch was set to 100, and the learning rates of the generator G and the discriminator D were both set to 1×10 -3 , and the cosine annealing algorithm and stochastic gradient descent method are used to update and optimize the parameters of the discriminator D.
[0043] S2: Build the AHAN insulator defect detection model based on the RAP-Net backbone feature extraction network, the AHA-PANet feature fusion network and the DH defect detection network. Figure 3 As shown;
[0044] The RAP-Net backbone feature extraction network has 10 layers, which are a CBS module, a CBS module and a C2f1 module, a CBS module and a C2f2 module, a CBS module and a C2f3 module, a CBS module and a C2f4 module, and a RAP module. The output insulator defect features of the C2f2 module, the C2f3 module, and the RAP module are used as the input of the AHA-PANet feature fusion network. The outputs of the C2f2 module, the C2f3 module, and the RAP module are feature P1, feature P2, and feature P3, respectively. The RAP module sequentially adds the DA attention mechanism to the residual edge of the SPPF, and effectively removes redundant global feature information after pooling the input feature map at different scales, which greatly alleviates the excess computing power brought to the AHAN algorithm by redundant features, thereby adapting to targets of different sizes and enabling the model to detect defective targets more accurately.
[0045] The AHA-PANet feature fusion network is as follows: feature P3 is upsampled and fused with feature P2 to obtain fused feature P4; fused feature P4 is subjected to feature extraction by the AHA1 module to obtain enhanced feature P5; enhanced feature P5 is subjected to upsampling and fused with feature P1 to obtain fused feature P6; fused feature P6 is subjected to feature extraction by the AHA2 module to obtain enhanced feature P7; enhanced feature P7 is subjected to enhanced feature extraction by the CBS module to obtain enhanced feature P5 and fused with enhanced feature P8; fused feature P8 is subjected to feature extraction by the AHA3 module to obtain enhanced feature P9; enhanced feature P9 is subjected to enhanced feature extraction by the CBS module to obtain fused feature P3. 10 , fusion feature P 10 After AHA4 module feature extraction, the enhanced feature P is obtained. 11 Finally, the enhanced features P7, P9 and P 11 As the output of the AHA-PANet feature fusion network. The AHA module can adaptively integrate feature maps obtained from different branches by introducing the adaptive hybrid attention module AHAM; the dual introduction of DA deformable attention and BRA double-layer routing attention enables the model to more effectively focus on the feature layer of the insulator defect image globally and locally, and effectively reduce the number of parameters caused by the attention mechanism by adaptively selecting the model's area of interest, thereby improving the network's detection speed and generalization ability; the AHA module further extracts the input features and performs multi-module feature fusion, and its structure obtains richer context feature information while ensuring lightweight;
[0046] The DH defect detection network is specifically: strengthening features P7, P9 and P 11 Three identical detection heads SST are input respectively for insulator defect detection. Each SST consists of a comprehensive path and a final branch path, such as Figure 4 As shown in the figure, the structure of a comprehensive path is composed of multiple repeated SCA modules, SAA modules and TAA modules, as well as separate SCA modules, SAA modules, ROIP (ROIPooling) region of interest pooling modules and TAA modules. The final branch path is divided into two branches, one branch is responsible for the prediction box loss, and the other is responsible for the classification loss.
[0047] The processing process of the SCA module of this embodiment is as follows: the input feature map is processed by the average pooling module AGP, the convolution module Conv, the activation function module ReLU and the HS (Hard Sigmoid) module in sequence, and then multiplied by the input feature map parameter; the processing process of the SAA module is as follows: the feature map output by SCA is processed by the index operation Index, the Conv convolution module, σ offsetThe feature map processed by the offset network is stacked with the feature map output by the SCA and the feature map processed by the index operation Index and two Conv convolution modules; the processing process of the TAA module is as follows: the output feature map of the SAA module is processed by the average pooling module AGP, the fully connected layer FC, the ReLU activation function, the fully connected layer FC and the normalization layer Norm in turn, and then stacked with the output feature map of the SAA module, where σ offset The offset network is composed of a depth-separable convolution module DWConv, a GeLU activation function, and a Conv convolution layer. The structure is as follows: Figure 4 shown.
[0048] The RAP module includes 4 paths. The first path consists of the CBS1 module, the first residual pooling layer MP_5 and the DA attention module. The second path consists of the CBS1 module, the first residual pooling layer MP_5, the second residual pooling layer MP_9 and the DA attention module. The third path consists of the CBS1 module, the first residual pooling layer MP_5, the second residual pooling layer MP_9, the third residual pooling layer MP_13 and the DA attention module. The fourth path consists of the CBS1 module. The outputs of the four paths are concat fused, and finally the CBS2 module integrates the features as the output. The structure is as follows: Figure 5 shown.
[0049] The structures of C2f1 module, C2f2 module, C2f3 module and C2f4 module are the same, such as Figure 6 , the processing process of the C2f1 module is as follows: after the input features are extracted by the CBS1 module, they are processed by the segmentation module, the first C2 module, and the second C2 module in turn, and the output features of the segmentation module, the first C2 module, and the second C2 module are fused, and finally the CBS2 module integrates the features as output; the segmentation module segments the feature data in the channel dimension, which can enhance the model's attention to features of different dimensions. Secondly, the first C2 module and the second C2 module perform enhanced feature extraction in different dimensions, and after cross-layer information fusion, they can fully extract feature information of different dimensions. The structure of the first C2 module is the same as that of the second C2 module, such as Figure 7 As shown in FIG. 1 , the processing process of the first C2 module is as follows: the input feature map is sequentially extracted by two CBS modules, and then stacked with the input feature through the residual edge, and the stacked feature is used as the output.
[0050] The structure of AHA module is the same as that of AHA1 module, AHA2 module, AHA3 module and AHA4 module. Figure 8As shown in the figure, the processing process of the AHA module is as follows: after the input features are extracted by the CBS1 module, they are processed by the segmentation module, the first CAC module, and the second CAC module in sequence, and the output features of the segmentation module, the first CAC module, and the second CAC module are fused, and finally the CBS2 module performs feature integration as the output, wherein the first CAC module has the same structure as the second CAC module, and the first CAC module is composed of the CBS1 module, the AHAM module, and the CBS2 module in sequence.
[0051] The AHAM module is mainly composed of two branches, the structure is as follows Fig. 9 As shown in the figure: the input feature map in one branch is processed by the DA attention module and the BRA attention module in parallel, and then the feature map is integrated by the AWA adaptive weight allocation module, and stacked with the input feature map as the output of branch one; the input feature map in the other branch is processed by the DA attention module and the BRA attention module in series, and stacked with the input feature map as the output of branch two; finally, the feature maps of branch one and branch two are integrated by the AWA adaptive weight allocation module as the final output of the AHAM module.
[0052] like Fig.10 As shown in Figure 2, the processing process of the AWA adaptive weight allocation module is as follows: introduce a learnable parameter w1 and w2 whose sum is 1, and use w1 and w2 to adjust the input feature map P of the two branches respectively. branch1 With P branch2 Integrate and get P' branch1 With P' branch2 , and finally output the integrated feature map.
[0053] The structure of CBS1 module and CBS2 module is the same as that of CBS module. Fig.11 As shown in FIG. 1 , the CBS module is composed of a Conv convolutional layer, a BN layer and a SiLU activation function in sequence.
[0054] Compared with the single attention mechanism, the adaptive hybrid attention module AHAM can adaptively allocate the proportion of each branch feature map through the learnable parameters w1 and w2, thereby effectively adjusting the network's attention to each feature layer of the insulator, further improving the generalization ability of the deep learning model; the residual attention pyramid structure RAP uses the residual network with DA attention to optimize the maximum pooling layer Maxpooling. Compared with the fast pyramid pooling structure SPPF, it can fully integrate the feature information of insulator defects of different scales and effectively eliminate redundant global feature information; the detection head SST performs enhanced feature extraction on insulators from the scale, space and task perception levels, so the constructed AHAN insulator defect detection model has good detection performance and generalization ability.
[0055] S3: Training the AHAN insulator defect detection model. Use a large-scale public insulator image dataset to pre-train the AHAN insulator defect detection model, obtain pre-training weights, load the pre-training weights into the AHAN insulator defect detection model, and use the insulator defect images in the training set to re-train the AHAN insulator defect detection model. In the training process, combine cosine annealing, weight decay and other training techniques, and cross-use Mosaic and Mixup data enhancement methods to obtain the optimal training weights;
[0056] In this embodiment, a large-scale dataset of publicly available insulator images is used to pre-train the AHAN insulator defect detection model to obtain pre-training weights. Based on the idea of transfer learning, the pre-training weights are used as the basis to load the pre-training weights into the model, and the insulator defect images of the training set are used to re-train the AHAN insulator defect detection model. Mosaic data enhancement is set to be used with a probability of 50% in each round of training, and Mixup data enhancement is used with a probability of 50% after Mosaic data enhancement. During the training process, the number of frozen training rounds is set to 50, the number of unfrozen training rounds is set to 50, the batch size is set to 16, and the initial learning rate is set to 1×10 -3 .
[0057] S4: Detect transmission line insulator defects using the trained AHAN insulator defect detection model. Load the optimal training weights into the AHAN insulator defect detection model, detect the insulator defect images in the test set, and use score screening and non-maximum suppression to remove redundant prediction boxes in the detection results;
[0058] This embodiment uses Python as the programming language, the experimental operating system is Visual Code 2017, the software environment of pytorch2.2.1, and the GPU is NVIDIA GeForce RTX 3080Ti GPU (12GB video memory). This embodiment uses mean average precision (mAP) and frames per second (FPS) to evaluate the AHAN insulator defect detection model. The experimental results show that the mAP value of 150 test images reaches 95.6%, and the FPS reaches 72.46, which verifies the effectiveness of the method proposed in this embodiment, which can assist line inspection personnel in the rapid and accurate detection of insulator faults, thereby promoting the differentiated prevention and control of insulator faults in transmission lines.
[0059] The above only expresses the preferred implementation of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosure to modify or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the content of the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.
Claims
1. A method for detecting defects in insulators of power transmission lines based on adaptive hybrid attention, characterized in that: The following steps are involved: S1: Build an image database of transmission line insulator defects and divide it into training set, validation set and test set; S2: Construct the AHAN insulator defect detection model, which includes the RAP-Net backbone feature extraction network, the AHA-PANet feature fusion network and the DH defect detection network; The RAP-Net backbone feature extraction network has a total of 10 layers, which are a CBS module, a CBS module and a C2f1 module, a CBS module and a C2f2 module, a CBS module and a C2f3 module, a CBS module and a C2f4 module, and a RAP module. The output insulator defect features of the C2f2 module, the C2f3 module, and the RAP module are respectively used as the input of the AHA-PANet feature fusion network. The outputs of the C2f2 module, the C2f3 module, and the RAP module are feature P1, feature P2, and feature P3, respectively. The processing process of the AHA-PANet feature fusion network is as follows: feature P3 is upsampled and then fused with feature P2 to obtain fused feature P4; fused feature P4 is subjected to feature extraction by the AHA1 module to obtain enhanced feature P5; enhanced feature P5 is subjected to upsampling and fused with feature P1 to obtain fused feature P6; fused feature P6 is subjected to feature extraction by the AHA2 module to obtain enhanced feature P7; enhanced feature P7 is subjected to enhanced feature extraction by the CBS module to obtain enhanced feature P5 and fused with enhanced feature P8; fused feature P8 is subjected to feature extraction by the AHA3 module to obtain enhanced feature P9; enhanced feature P9 is subjected to enhanced feature extraction by the CBS module to obtain fused feature P3. 10 , fusion feature P 10 After AHA4 module feature extraction, the enhanced feature P is obtained. 11 Finally, the enhanced features P7, P9 and P 11 As the output of the AHA-PANet feature fusion network; The DH defect detection network is composed of three identical detection heads SST. Each SST consists of a comprehensive path and a final branch path. The structure of the comprehensive path is composed of multiple repeated SCA modules, SAA modules and TAA modules, as well as separate SCA modules, SAA modules, ROIP region of interest pooling modules and TAA modules. The final branch path is divided into two branches, one for predicting the box loss and the other for the classification loss. The enhanced features P7, P9 and P 11 Input three test heads SST respectively to detect insulator defects; S3: Training the AHAN insulator defect detection model; using a large-scale public insulator image dataset to pre-train the AHAN insulator defect detection model, obtain pre-training weights, load the pre-training weights into the AHAN insulator defect detection model, and re-train the AHAN insulator defect detection model using the insulator defect images in the training set, and obtain the optimal training weights by cross-using the Mosaic and Mixup data enhancement methods; S4: Detect transmission line insulator defects using the trained AHAN insulator defect detection model; load the optimal training weights into the AHAN insulator defect detection model, detect the insulator defect images of the test set, and use score screening and non-maximum suppression to eliminate redundant prediction boxes in the detection results; The structures of the C2f1 module, C2f2 module, C2f3 module and C2f4 module are all the same. The processing process of the C2f1 module is as follows: after the input features are extracted by the CBS1 module, they are processed by the segmentation module, the first C2 module and the second C2 module in sequence, and the output features of the segmentation module, the first C2 module and the second C2 module are fused, and finally the CBS2 module performs feature integration as output; The RAP module includes 4 paths, the first path consists of the CBS1 module, the first residual pooling layer MP_5 and the DA attention module, the second path consists of the CBS1 module, the first residual pooling layer MP_5, the second residual pooling layer MP_9 and the DA attention module, the third path consists of the CBS1 module, the first residual pooling layer MP_5, the second residual pooling layer MP_9, the third residual pooling layer MP_13 and the DA attention module, and the fourth path consists of the CBS1 module. The outputs of the four paths are concat fused, and finally the CBS2 module performs feature integration as the output; The structures of the AHA1 module, AHA2 module, AHA3 module and AHA4 module are all the same. The processing process of the AHA1 module is as follows: after the input features are extracted by the CBS1 module, they are processed by the segmentation module, the first CAC module and the second CAC module in sequence, and the output features of the CBS1 module, the segmentation module, the first CAC module and the second CAC module are fused, and finally the CBS2 module performs feature integration as output; The first CAC module and the second CAC module have the same structure, and the first CAC module is composed of a CBS1 module, an AHAM module and a CBS2 module in sequence.
2. The method for detecting defects in transmission line insulators based on adaptive hybrid attention according to claim 1, characterized in that: The structure of the first C2 module is the same as that of the second C2 module. The processing process of the first C2 module is as follows: the input feature map is sequentially extracted by two CBS modules, and then stacked with the input feature through the residual edge, and the stacked feature is used as the output.
3. The method for detecting defects in insulators of power transmission lines based on adaptive hybrid attention according to claim 1, characterized in that: The processing process of the AHAM module is as follows: the input feature map in one branch is processed in parallel by the DA attention module and the BRA attention module, and then the feature map is integrated by the AWA adaptive weight allocation module, and stacked with the input feature map as the output of branch one; the input feature map in the other branch is processed serially by the DA attention module and the BRA attention module, and stacked with the input feature map as the output of branch two; finally, the feature maps of branch one and branch two are integrated by the AWA adaptive weight allocation module as the final output of the AHAM module.
4. The method for detecting defects in transmission line insulators based on adaptive hybrid attention according to claim 3, characterized in that: The processing process of the AWA adaptive weight allocation module is as follows: introduce a learnable parameter w1 and w2 whose sum is 1, and use w1 and w2 to adjust the input feature map P of the two branches respectively. branch1 With P branch2 Integrate and get P' branch1 With P' branch2 , and finally output the integrated feature map.
5. The method for detecting defects in transmission line insulators based on adaptive hybrid attention according to claim 1, characterized in that: The processing process of the SCA module is as follows: the input feature map is processed by the average pooling module AGP, the convolution module Conv, the activation function module ReLU and the HS module in sequence, and then multiplied by the input feature map parameter; the processing process of the SAA module is as follows: the feature map output by SCA is processed by the index operation Index, the Conv convolution module, σ offset The feature map after offset network processing is stacked with the feature map output by SCA and the feature map after index operation Index and two Conv convolution modules; the processing process of the TAA module is as follows: the output feature map of the SAA module is processed by the average pooling module AGP, the fully connected layer FC, the ReLU activation function, the fully connected layer FC and the normalization layer Norm in turn, and then stacked with the output feature map of the SAA module.
6. The method for detecting defects in transmission line insulators based on adaptive hybrid attention according to claim 5, characterized in that: The σ offset The offset network consists of a depthwise separable convolutional module DWConv, a GeLU activation function, and a Conv convolutional layer.
7. The method for detecting defects in transmission line insulators based on adaptive hybrid attention according to claim 1 or 2, characterized in that: The structures of the CBS1 module and the CBS2 module are the same as those of the CBS module, and the CBS module is composed of a Conv convolutional layer, a BN layer, and a SiLU activation function in sequence.
8. The method for detecting defects in transmission line insulators based on adaptive hybrid attention according to claim 7, characterized in that: In S1, images of transmission line insulators taken by drones are collected as original image sample sets, the original image sample sets are expanded to form an image database of transmission line insulator defects, and the image database of transmission line insulator defects is labeled and divided into a training set, a validation set, and a test set in a ratio of 7:2:
1.
9. The method for detecting defects in insulators of power transmission lines based on adaptive hybrid attention according to claim 8, characterized in that: In S1, the AHAGAN algorithm is used to expand the original image sample set. The AHAGAN algorithm consists of two modules: a generator G and a discriminator D. The generator G is composed of a fully connected layer and a CBS module, a CBS module and an AHA module, a CBS module and a CBS module, a CBS module and an AHA module, and a CBS module and a CBS module in sequence; the discriminator D is composed of a CBS module and a CBS module, an AHA module and a CBS module, a CBS module and a CBS module, an AHA module and a CBS module, and a CBS module and a fully connected layer in sequence; the AHA module has the same structure as the AHA1 module, the AHA2 module, the AHA3 module, and the AHA4 module.
Citation Information
Cited By
Real-time inspection method applied to damaged insulator of power transmission line
CN119649310A