An insulator defect detection method based on complex environmental background conditions

By combining the YOLOv7 model with data augmentation and adaptive training methods from other feature extraction modules, the accuracy problem of insulator defect detection in complex environments was solved, achieving efficient and accurate insulator defect detection and improving the stability and security of the power system.

CN117252828BActive Publication Date: 2026-01-27GUANGXI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311202344.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-18
Publication Date
2026-01-27
Estimated Expiration
2043-09-18

AI Technical Summary

Technical Problem

Existing technologies lack the accuracy for detecting insulator defects in complex environments, making it difficult to accurately identify insulator defects and affecting the stability and safety of power systems.

Method used

We employ the YOLOv7 model combined with the ConvNeXtBlock pure convolutional feature extraction module, SimAM attention mechanism, hybrid pooling, and CARAFE general-level upsampling operator. Through data augmentation and adaptive training methods, we enhance feature extraction and focusing, thereby improving detection accuracy.

Benefits of technology

It can detect insulator defects more accurately in complex environments, improving the accuracy and real-time performance of detection, reducing operation and maintenance costs, and ensuring the stability and safety of the power system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117252828B_ABST
    Figure CN117252828B_ABST
Patent Text Reader

Abstract

The application provides an insulator defect detection method based on a complex environment background condition, and the method comprises the following steps: performing data enhancement on insulator defect image data collected by a UAV; after the data enhancement, performing preprocessing on the image data, normalizing the image data first, and then scaling the image data to a size of 640*640*3; after the preprocessing, inputting the image data into a preset network model to obtain a detection result. The insulator defect detection method can solve the problem of inaccurate insulator defect detection under a complex environment background condition, can accurately detect insulator defects under various complex conditions, can optimize the detection result of insulator defects in a power transmission line, and can improve the accuracy of insulator defect detection in a complex environment background. The application can accurately locate the position of the insulator defect, and can provide a reliable detection method and reference basis for power transmission line inspection personnel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of insulator defect detection in power transmission lines, specifically involving an intelligent detection method for insulator defects under complex environmental conditions, which is applicable to power line inspection in power systems. Background Technology

[0002] According to power system fault statistics released by the State Grid Corporation of China, insulator faults account for the largest proportion of power system faults. Insulators, as insulating components on transmission lines that prevent current from returning to ground and support conductors, are installed in complex outdoor environments and are inevitably prone to defects. As the degree of insulator defects increases, the insulation performance of the insulator is affected, seriously impacting the stability and safety of power transmission. Accurate and rapid detection of insulator defects on transmission lines is crucial for the stability and reliability of power transmission.

[0003] Furthermore, traditional insulator defect detection research employs methods including direct observation, contour feature-based detection, infrared imaging, and grayscale similarity matching. However, these methods suffer from limitations in real-time performance and intelligence, and are susceptible to interference from complex environmental backgrounds. Current research on insulator defect detection in complex environments primarily utilizes UAV-collected insulator defect data. This involves first labeling the defects using annotation tools, then training a deep learning model, and finally optimizing the model based on the training results. However, this approach is not precise enough for detecting insulator defects in complex environments.

[0004] Therefore, a highly accurate method for detecting insulator defects in complex environments is proposed. Summary of the Invention

[0005] This invention proposes an insulator defect detection method based on complex environmental background conditions. It combines the YOLOv7 model, the ConvNeXtBlock pure convolutional feature extraction module, the SimAM attention mechanism, hybrid pooling, and the CARAFE general-level upsampling operator for insulator defect detection. This method enhances feature extraction and focusing, improves the detail and accuracy of the reconstruction, and can more accurately detect insulator defects in complex environmental backgrounds and promptly identify potential hazards on transmission lines. The steps in its application are as follows:

[0006] Step (1): Extract the defective insulator images from the transmission line insulator dataset and use data augmentation to increase the diversity of the data samples. Data augmentation methods include: flipping, rotating, scaling and contrast adjustment.

[0007] Step (2): Perform batch normalization and size scaling on the data-enhanced images, uniformly scaling the images to 640×640×3, and dividing the insulator defect images into training set, validation set and test set according to the ratio of 8:1:1;

[0008] Step (3): Input the divided training set into the preset network model for training. Use the adaptive time estimation method to automatically adjust the learning rate of the network parameters in each iteration so that the network can quickly converge to the optimal solution during training. Then use the samples of the validation set to verify the detection performance of the model after each iteration of training. Optimize the parameters according to the verification effect. Then substitute the samples of the test set into the trained network to obtain the detection results.

[0009] The preset network model includes a YOLOv7 model, a ConvNeXtBlock pure convolutional feature extraction module, a SimAM attention mechanism, hybrid pooling, and a CARAFE general-level upsampling operator. The ConvNeXtBlock pure convolutional feature extraction module is used to enhance the extraction of features from the 640×640×3 image. The SimAM attention mechanism is used to enhance the network's perceptual ability and adaptability. Hybrid pooling is used to retain detailed features lost during feature extraction. The CARAFE general-level upsampling operator is used to restore the feature map.

[0010] The specific content of the preset network model is as follows:

[0011] The input is a 640×640×3 image;

[0012] Connect to 4 CBS modules;

[0013] Connect another ConvSimCB module;

[0014] Connect another MP1 module;

[0015] Connect another ELAN module;

[0016] It is then divided into 2 branches:

[0017] Branch 1-1 connects to one CBS module;

[0018] Branch 1-2 is connected to one MP1 module;

[0019] Then connect an ELAN module after the MP1 module;

[0020] It is then divided into 2 branches:

[0021] Branch 2-1 connects to one CBS module;

[0022] Branch 2-2 connects to one MP1 module;

[0023] Then connect a ConvSimCB module after the MP1 module;

[0024] Connect another MIXPCSPC module;

[0025] Connect another CBS module;

[0026] Connect another CARAFE module;

[0027] Then, concatenate the outputs of the CBS module and the CARAFE module after branch 2-1;

[0028] Connect another ELAN-W module;

[0029] Connect another CBS module;

[0030] Connect another CARAFE module;

[0031] Then, concatenate the outputs of the CBS module and the CARAFE module after branch 1-1;

[0032] Connect another ELAN-W module;

[0033] It is then divided into 2 branches:

[0034] Branch 3-1 connects to one REP module;

[0035] Branch 3-2 connects to one MP2 module;

[0036] Then, concatenate the output of the MP2 module with the output of the first ELAN-W module;

[0037] Connect another ELAN-W module;

[0038] It is then divided into 2 branches:

[0039] Branch 4-1 connects to one REP module;

[0040] Branch 4-2 connects to one MP2 module;

[0041] Then, the outputs of the MP2 module and the MIXPCSPC module are concatenated;

[0042] Connect another ELAN-W module;

[0043] Connect another REP module;

[0044] Then connect one CBM module after all REP modules;

[0045] Then connect the CBM module to the detection head;

[0046] Output the detection results;

[0047] The specific contents of the CBS module structure are as follows:

[0048] The input is then fed into a single convolutional layer.

[0049] Add another batch normalization layer;

[0050] Add another Silu activation function;

[0051] Final output;

[0052] The specific contents of the ConvSimCB module structure are as follows:

[0053] After input, connect to one ConvNeXtBlock module;

[0054] Add another SimAM attention mechanism;

[0055] Add another CBS attention module;

[0056] Final output;

[0057] The specific content of the ConvNeXtBlock module structure is as follows:

[0058] The input is divided into two branches:

[0059] Branch 5-1 is output directly without any processing;

[0060] Branch 5-2 connects to a deep convolutional layer;

[0061] Then connect one more normalization layer;

[0062] Add another convolutional layer;

[0063] Add another Gelu activation function;

[0064] Add another convolutional layer;

[0065] Add another convolutional layer;

[0066] Add another scaling layer;

[0067] Add another regularization layer;

[0068] Then add the output of the regularization layer and the output of branch 5-1 together;

[0069] Final output;

[0070] The specific details of the MP1 module structure are as follows:

[0071] The input is divided into two branches:

[0072] Branch 9-1 connects to a max pooling layer, and then connects to a CBS module;

[0073] Branch 9-2 connects to one CBS module, and then connects to another CBS module;

[0074] Then concatenate the outputs of branch 9-1 and branch 9-2;

[0075] Final output;

[0076] The specific details of the ELAN module structure are as follows:

[0077] The input is divided into two branches:

[0078] Branch 11-1 connects to one CBS module;

[0079] Branch 11-2 is connected to 5 CBS modules in sequence;

[0080] Then, concatenate the outputs of branch 11-1, branch 11-2, and the outputs of the first to fourth CBS modules in branch 11-2;

[0081] Final output;

[0082] The specific details of the MIXPCSPC module structure are as follows:

[0083] The input is divided into two branches:

[0084] Branch 6-1 connects to one CBS module;

[0085] Branch 6-2 is connected to three CBS modules in sequence;

[0086] The three CBS modules are then divided into four branches:

[0087] Branch 7-1 connects to a 5×5 hybrid pooling layer;

[0088] Branch 7-2 connects to a 9×9 hybrid pooling layer;

[0089] Branch 7-3 connects to a 13×13 hybrid pooling layer;

[0090] Branches 7-4 are output directly without any processing.

[0091] Then concatenate the outputs of branches 7-1, 7-2, 7-3, and 7-4;

[0092] Then connect two more CBS modules in sequence;

[0093] Then concatenate the outputs of branch 6-1 and branch 6-2;

[0094] Connect another CBS module;

[0095] Final output;

[0096] The specific contents of the CARAFE module structure are as follows:

[0097] The input is divided into two branches:

[0098] Branch 8-1 connects to a channel compression layer, and then connects to a convolutional layer prediction upsampling kernel;

[0099] Branch 8-2 ​​is output directly without any processing;

[0100] Output features of branch 8-2 Figure 1 The values ​​at each position are multiplied by the values ​​at the corresponding positions of the upsampling kernel of the 8-1 output;

[0101] Then, multiply and accumulate to obtain the value at that position in the output feature map;

[0102] Final output;

[0103] The specific details of the ELAN-W module structure are as follows:

[0104] The input is divided into two branches:

[0105] Branch 12-1 connects to one CBS module;

[0106] Branch 12-2 is connected to 5 CBS modules in sequence;

[0107] Then, concatenate the outputs of branch 12-1, branch 12-2, and the outputs of the first and third CBS modules in branch 12-2;

[0108] Final output;

[0109] The specific contents of the REP module structure are as follows:

[0110] After input, it splits into 3 branches:

[0111] Branch 13-1 connects to one convolutional layer and one batch normalization layer in sequence;

[0112] Branch 13-2 connects to one convolutional layer and one batch normalization layer in sequence;

[0113] Branch 13-3 is connected to one batch normalization layer;

[0114] Then add the outputs of branch 13-1, branch 13-2, and branch 13-3 together;

[0115] Final output;

[0116] The specific details of the MP2 module structure are as follows:

[0117] The input is divided into two branches:

[0118] Branch 10-1 connects to a max pooling layer, and then connects to a CBS module;

[0119] Branch 10-2 connects to one CBS module, and then connects to another CBS module;

[0120] Then concatenate the outputs of branch 10-1 and branch 10-2;

[0121] Final output;

[0122] The specific contents of the CBM module structure are as follows:

[0123] The input is then fed into a single convolutional layer.

[0124] Add another batch normalization layer;

[0125] Add another Sigmod activation function;

[0126] Final output;

[0127] The specific details of the SimAM attention mechanism are as follows:

[0128] The input feature map is divided into independent neurons. The importance of each neuron is evaluated by defining a minimum energy function for linear separability, thereby distinguishing the target neuron from other neurons. The minimum energy function is:

[0129]

[0130]

[0131]

[0132] in For hyperparameters; This is the minimum energy function value; For neuron indexing; Number of neurons per channel; The height of the feature map; The width of the feature map; For the target neuron; For the input feature map on a single channel One neuron; The mean of all neurons in a single channel; The variance of all neurons in a single channel; and Its purpose is to reduce the amount of computation;

[0133] use The size indicates the distinguishability between the target neuron and its neighboring neurons. The larger the value, the higher the weight assigned to the target neuron, and the more attention the network model pays to the region where the target neuron is located.

[0134] The present invention has the following advantages and effects compared with the prior art:

[0135] (1) The present invention processes a 640×640×3 insulator image using a preset network model. The YOLOv7 network model serves as the baseline network of the preset network model and consists of one or more CBS convolutional modules, MP1 modules, MP2 modules, ELAN modules, SPPCSPC modules, ELAN-W modules, UPSample modules, REP modules, and CBM modules. Simultaneously, the ConvSimCB module is introduced into the YOLOv7 model, replacing the first and fourth ELAN modules in the backbone feature extraction network. This significantly enhances the network's ability to extract features from small insulator defects, reduces interference from irrelevant features, and strengthens the network's focus on defect features. The ConvNeXtBlock module within the ConvSimCB module effectively extracts global and local features by segmenting the input features into multiple sub-paths. A parameter-sharing mechanism is implemented in the sub-paths to reduce the number of model parameters, accelerating module convergence and training efficiency. The SimAM attention mechanism combines channel dimension weights and spatial dimension weights to define three-dimensional parameterless attention weights, using a minimum energy function to evaluate the importance of neurons. This allows for a more comprehensive and efficient evaluation of feature weights without introducing additional parameters, thereby identifying the target regions of focus. The MIXPCSPC module is introduced into the YOLOv7 model to replace the SPPCSPC module, using hybrid pooling instead of max pooling to achieve translation and rotation invariance, preserving more edge details of the feature maps. In the YOLOv7 model, the CARAFE general-level upsampling operator is introduced to replace the UPSample module. Through convolution operations with adaptive receptive fields, the feature map resolution and image detail fidelity can be enhanced in the feature aggregation network.

[0136] (2) This invention enhances the dataset by flipping, rotating, scaling and contrast adjustment. First, flipping is used to simulate the different orientations and perspectives that insulators may have in real-world scenarios, effectively solving the problem of uncertain orientation of insulators in complex environments. Second, rotation at different angles is used to enhance the diversity and difficulty of the images, improving the robustness of the network model in complex environments. Third, scaling is used to simulate the observation of insulators at different distances, enabling the model to adapt to defect detection at different distances. Finally, contrast adjustment is used to highlight small defects in the image.

[0137] (3) By using enhanced data to train a preset model, the present invention can more accurately detect and locate insulator defects under various complex backgrounds, which is conducive to power inspection and maintenance personnel to accurately find hidden dangers in transmission lines, prevent transmission faults, and more effectively reduce maintenance costs. Attached Figure Description

[0138] Figure 1 This is a flowchart of an insulator defect detection method based on complex environmental background conditions according to the present invention.

[0139] Figure 2 This is a pre-defined overall structure diagram of the network model in the method of this invention.

[0140] Figure 3 This is a diagram of the YOLOv7 network model structure in the method of this invention.

[0141] Figure 4 This is a structural diagram of the ConvSimCB module in the method of this invention.

[0142] Figure 5 This is a structural diagram of the ConvNeXtBlock module in the method of this invention.

[0143] Figure 6 This is a diagram illustrating the implementation process of the SimAM attention mechanism in the method of this invention.

[0144] Figure 7 This is a structural diagram of the MIXPCSPC module in the method of this invention.

[0145] Figure 8 This is a structural diagram of the CARAFE module in the method of this invention.

[0146] Figure 9 This is a structural diagram of the CBS module in the method of this invention.

[0147] Figure 10 This is a structural diagram of the MP1 module in the method of the present invention.

[0148] Figure 11 This is a structural diagram of the MP2 module in the method of the present invention.

[0149] Figure 12 This is a structural diagram of the ELAN module in the method of this invention.

[0150] Figure 13 This is a structural diagram of the ELAN-W module in the method of this invention.

[0151] Figure 14 This is a structural diagram of the REP module in the method of this invention.

[0152] Figure 15 This is a structural diagram of the CBM module in the method of this invention. Detailed Implementation

[0153] The present invention proposes a method for detecting insulator defects under complex environmental conditions, which is described in detail below with reference to the accompanying drawings:

[0154] Figure 1 This is a flowchart of an insulator defect detection method under complex environmental conditions according to the present invention. First, the original insulator defect data is augmented by flipping, rotating, scaling, and adjusting contrast. Then, the augmented data undergoes preprocessing, including normalization and scaling the image size to 640×640×3. Next, the preprocessed data is divided into training, validation, and test sets in an 8:1:1 ratio. The training set is loaded into a pre-set network model with pre-defined training parameters for iterative training. After each iteration, the model's performance is verified using the validation set. Finally, after multiple iterations, the optimal parameter model is output, and the optimal model is tested using the test set. The test results are then visualized.

[0155] Figure 2 This is a diagram showing the overall structure of the preset network model in the method of this invention. The specific content of the preset network model is as follows:

[0156] The input is a 640×640×3 image;

[0157] Connect to 4 CBS modules;

[0158] Connect another ConvSimCB module;

[0159] Connect another MP1 module;

[0160] Connect another ELAN module;

[0161] It is then divided into 2 branches:

[0162] Branch 1-1 connects to one CBS module;

[0163] Branch 1-2 is connected to one MP1 module;

[0164] Then connect an ELAN module after the MP1 module;

[0165] It is then divided into 2 branches:

[0166] Branch 2-1 connects to one CBS module;

[0167] Branch 2-2 connects to one MP1 module;

[0168] Then connect a ConvSimCB module after the MP1 module;

[0169] Connect another MIXPCSPC module;

[0170] Connect another CBS module;

[0171] Connect another CARAFE module;

[0172] Then, concatenate the outputs of the CBS module and the CARAFE module after branch 2-1;

[0173] Connect another ELAN-W module;

[0174] Connect another CBS module;

[0175] Connect another CARAFE module;

[0176] Then, concatenate the outputs of the CBS module and the CARAFE module after branch 1-1;

[0177] Connect another ELAN-W module;

[0178] It is then divided into 2 branches:

[0179] Branch 3-1 connects to one REP module;

[0180] Branch 3-2 connects to one MP2 module;

[0181] Then, concatenate the output of the MP2 module with the output of the first ELAN-W module;

[0182] Connect another ELAN-W module;

[0183] It is then divided into 2 branches:

[0184] Branch 1 connects to 4-1 REP modules;

[0185] Branch 2 connects to 4-1 MP2 modules;

[0186] Then, the outputs of the MP2 module and the MIXPCSPC module are concatenated;

[0187] Connect another ELAN-W module;

[0188] Connect another REP module;

[0189] Then connect one CBM module after all REP modules;

[0190] Then connect the CBM module to the detection head;

[0191] Output the detection results;

[0192] Figure 3This is a structural diagram of the YOLOv7 network model in the method of this invention. The specific content of the YOLOv7 network model is as follows:

[0193] The input is a 640×640×3 image;

[0194] Connect to 4 CBS modules;

[0195] Connect another ELAN module;

[0196] Connect another MP1 module;

[0197] Connect another ELAN module;

[0198] It is then divided into 2 branches:

[0199] Branch 14-1 connects to one CBS module;

[0200] Branch 14-2 connects to one MP1 module;

[0201] Then connect an ELAN module after the MP1 module;

[0202] It is then divided into 2 branches:

[0203] Branch 15-1 connects to one CBS module;

[0204] Branch 15-2 connects to one MP1 module;

[0205] Then connect an ELAN module after the MP1 module;

[0206] Connect another SPPCSPC module;

[0207] Connect another CBS module;

[0208] Connect another UPSample module;

[0209] Then, concatenate the output of the CBS module after branch 15-1 with the output of the UPSample module;

[0210] Connect another ELAN-W module;

[0211] Connect another CBS module;

[0212] Connect another UPSample module;

[0213] Then, concatenate the output of the CBS module after branch 14-1 with the output of the UPSample module;

[0214] Connect another ELAN-W module;

[0215] It is then divided into 2 branches:

[0216] Branch 16-1 connects to one REP module;

[0217] Branch 16-2 connects to one MP2 module;

[0218] Then, concatenate the output of the MP2 module with the output of the first ELAN-W module;

[0219] Connect another ELAN-W module;

[0220] It is then divided into 2 branches:

[0221] Branch 17-1 connects to one REP module;

[0222] Branch 17-2 connects to one MP2 module;

[0223] Then concatenate the outputs of the MP2 module and the SPC module;

[0224] Connect another ELAN-W module;

[0225] Connect another REP module;

[0226] Then connect one CBM module after all REP modules;

[0227] Then connect the CBM module to the detection head;

[0228] Output the detection results;

[0229] Figure 4 This is a structural diagram of the ConvSimCB module in the method of this invention. The specific content of the ConvSimCB module structure is as follows:

[0230] After input, connect to one ConvNeXtBlock module;

[0231] Add another SimAM attention mechanism;

[0232] Add another CBS attention module;

[0233] Final output;

[0234] Figure 5 This is a structural diagram of the ConvNeXtBlock module in the method of this invention. The specific content of the ConvNeXtBlock module structure is as follows:

[0235] The input is divided into two branches:

[0236] Branch 5-1 is output directly without any processing;

[0237] Branch 5-2 connects to a deep convolutional layer;

[0238] Then connect one more normalization layer;

[0239] Add another convolutional layer;

[0240] Add another Gelu activation function;

[0241] Add another convolutional layer;

[0242] Add another convolutional layer;

[0243] Add another scaling layer;

[0244] Add another regularization layer;

[0245] Then add the output of the regularization layer and the output of branch 5-1 together;

[0246] Final output;

[0247] Figure 6 This is a diagram illustrating the implementation process of the SimAM attention mechanism in the method of this invention. The specific content of the SimAM attention mechanism is as follows:

[0248] The input feature map is divided into independent neurons. The importance of each neuron is evaluated by defining a minimum energy function for linear separability, thereby distinguishing the target neuron from other neurons. The minimum energy function is:

[0249]

[0250]

[0251]

[0252] in For hyperparameters; This is the minimum energy function value; For neuron indexing; Number of neurons per channel; The height of the feature map; The width of the feature map; For the target neuron; For the input feature map on a single channel One neuron; The mean of all neurons in a single channel; The variance of all neurons in a single channel; and Its purpose is to reduce the amount of computation.

[0253] use The size indicates the distinguishability between the target neuron and its neighboring neurons. The larger the value, the higher the weight assigned to the target neuron, and the more attention the network model pays to the region where the target neuron is located.

[0254] Figure 7 This is a structural diagram of the MIXPCSPC module in the method of this invention. The specific details of the MIXPCSPC module structure are as follows:

[0255] The input is divided into two branches:

[0256] Branch 6-1 connects to one CBS module;

[0257] Branch 6-2 is connected to three CBS modules in sequence;

[0258] The three CBS modules are then divided into four branches:

[0259] Branch 7-1 connects to a 5×5 hybrid pooling layer;

[0260] Branch 7-2 connects to a 9×9 hybrid pooling layer;

[0261] Branch 7-3 connects to a 13×13 hybrid pooling layer;

[0262] Branches 7-4 are output directly without any processing.

[0263] Then concatenate the outputs of branches 7-1, 7-2, 7-3, and 7-4;

[0264] Then connect two more CBS modules in sequence;

[0265] Then concatenate the outputs of branch 6-1 and branch 6-2;

[0266] Connect another CBS module;

[0267] Final output;

[0268] Figure 8 This is a structural diagram of the CARAFE module in the method of this invention. The specific contents of the CARAFE module structure are as follows:

[0269] The input is divided into two branches:

[0270] Branch 8-1 connects to a channel compression layer, and then connects to a convolutional layer prediction upsampling kernel;

[0271] Branch 8-2 ​​is output directly without any processing;

[0272] Output features of branch 8-2 Figure 1 The values ​​at each position are multiplied by the values ​​at the corresponding positions of the upsampling kernel of the 8-1 output;

[0273] Then, multiply and accumulate to obtain the value at that position in the output feature map;

[0274] Final output;

[0275] Figure 9 This is a structural diagram of the CBS module in the method of this invention. The specific content of the CBS module structure is as follows:

[0276] The input is then fed into a single convolutional layer.

[0277] Add another batch normalization layer;

[0278] Add another Silu activation function;

[0279] Final output;

[0280] Figure 10 This is a structural diagram of the MP1 module in the method of this invention. The specific content of the MP1 module structure is as follows:

[0281] The input is divided into two branches:

[0282] Branch 9-1 connects to a max pooling layer, and then connects to a CBS module;

[0283] Branch 9-2 connects to one CBS module, and then connects to another CBS module;

[0284] Then concatenate the outputs of branch 9-1 and branch 9-2;

[0285] Final output;

[0286] Figure 11 This is a structural diagram of the MP2 module in the method of this invention. The specific content of the MP2 module structure is as follows:

[0287] The input is divided into two branches:

[0288] Branch 10-1 connects to a max pooling layer, and then connects to a CBS module;

[0289] Branch 10-2 connects to one CBS module, and then connects to another CBS module;

[0290] Then concatenate the outputs of branch 10-1 and branch 10-2;

[0291] Final output;

[0292] Figure 12 This is a structural diagram of the ELAN module in the method of this invention. The specific content of the ELAN module structure is as follows:

[0293] The input is divided into two branches:

[0294] Branch 11-1 connects to one CBS module;

[0295] Branch 11-2 is connected to 5 CBS modules in sequence;

[0296] Then, concatenate the outputs of branch 11-1, branch 11-2, and the outputs of the first to fourth CBS modules in branch 11-2;

[0297] Final output;

[0298] Figure 13 This is a structural diagram of the ELAN-W module in the method of this invention. The specific details of the ELAN-W module structure are as follows:

[0299] The input is divided into two branches:

[0300] Branch 12-1 connects to one CBS module;

[0301] Branch 12-2 is connected to 5 CBS modules in sequence;

[0302] Then, concatenate the outputs of branch 12-1, branch 12-2, and the outputs of the first and third CBS modules in branch 12-2;

[0303] Final output;

[0304] Figure 14 This is a structural diagram of the REP module in the method of this invention. The specific content of the REP module structure is as follows:

[0305] After input, it splits into 3 branches:

[0306] Branch 13-1 connects to one convolutional layer and one batch normalization layer in sequence;

[0307] Branch 13-2 connects to one convolutional layer and one batch normalization layer in sequence;

[0308] Branch 13-3 is connected to one batch normalization layer;

[0309] Then add the outputs of branch 13-1, branch 13-2, and branch 13-3 together;

[0310] Final output;

[0311] Figure 15 This is a structural diagram of the CBM module in the method of this invention. The specific content of the CBM module structure is as follows:

[0312] The input is then fed into a single convolutional layer.

[0313] Add another batch normalization layer;

[0314] Add another Sigmod activation function;

[0315] Final output;

[0316] The above description is only a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A method for detecting insulator defects under complex environmental conditions, characterized in that, The steps during use are as follows: Step (1): Extract the defective insulator images from the transmission line insulator dataset and use data augmentation to increase the diversity of the data samples. Data augmentation methods include: flipping, rotating, scaling and contrast adjustment. Step (2): Perform batch normalization and size scaling on the data-enhanced images, uniformly scaling the images to 640×640×3, and dividing the insulator defect images into training set, validation set and test set according to the ratio of 8:1:1; Step (3): Input the divided training set into the preset network model for training. Use the adaptive time estimation method to automatically adjust the learning rate of the network parameters in each iteration so that the network can quickly converge to the optimal solution during training. Then use the samples of the validation set to verify the detection performance of the model after each iteration of training. Optimize the parameters according to the verification effect. Then substitute the samples of the test set into the trained network to obtain the detection results. The preset network model uses the YOLOv7 network model as the baseline network. The ConvSimCB module is introduced into the YOLOv7 model to replace the first and fourth ELAN modules in the backbone feature extraction network of the YOLOv7 model. The MIXPCSPC module is introduced into the YOLOv7 model to replace the SPCSPC module. The CARAFE general-level upsampling operator is introduced into the YOLOv7 model to replace the UPSample module. The specific contents of the ConvSimCB module structure are as follows: After input, connect to one ConvNeXtBlock module; Add another SimAM attention mechanism; Add another CBS attention module; Final output; The specific details of the MIXPCSPC module structure are as follows: The input is divided into two branches: Branch 6-1 connects to one CBS module; Branch 6-2 is connected to three CBS modules in sequence; The three CBS modules are then divided into four branches: Branch 7-1 connects to a 5×5 hybrid pooling layer; Branch 7-2 connects to a 9×9 hybrid pooling layer; Branch 7-3 connects to a 13×13 hybrid pooling layer; Branches 7-4 are output directly without any processing. Then concatenate the outputs of branches 7-1, 7-2, 7-3, and 7-4; Then connect two more CBS modules in sequence; Then concatenate the outputs of branch 6-1 and branch 6-2; Connect another CBS module; Final output; The specific contents of the CARAFE module structure are as follows: The input is divided into two branches: Branch 8-1 connects to a channel compression layer, and then connects to a convolutional layer prediction upsampling kernel; Branch 8-2 ​​is output directly without any processing; Multiply the value of a neighborhood at a location in the feature map output by branch 8-2 ​​with the value at the corresponding location in the upsampling kernel output by branch 8-1; Then, multiply and accumulate to obtain the value at that position in the output feature map; Final output.

2. The method according to claim 1, characterized in that, The specific content of the preset network model is as follows: The input is a 640×640×3 image; Connect to 4 CBS modules; Connect another ConvSimCB module; Connect another MP1 module; Connect another ELAN module; It is then divided into 2 branches: Branch 1-1 connects to one CBS module; Branch 1-2 is connected to one MP1 module; Then connect an ELAN module after the MP1 module; It is then divided into 2 branches: Branch 2-1 connects to one CBS module; Branch 2-2 connects to one MP1 module; Then connect a ConvSimCB module after the MP1 module; Connect another MIXPCSPC module; Connect another CBS module; Connect another CARAFE module; Then, concatenate the outputs of the CBS module and the CARAFE module after branch 2-1; Connect another ELAN-W module; Connect another CBS module; Connect another CARAFE module; Then, concatenate the outputs of the CBS module and the CARAFE module after branch 1-1; Connect another ELAN-W module; It is then divided into 2 branches: Branch 3-1 connects to one REP module; Branch 3-2 connects to one MP2 module; Then, concatenate the output of the MP2 module with the output of the first ELAN-W module; Connect another ELAN-W module; It is then divided into 2 branches: Branch 4-1 connects to one REP module; Branch 4-2 connects to one MP2 module; Then, the outputs of the MP2 module and the MIXPCSPC module are concatenated; Connect another ELAN-W module; Connect another REP module; Then connect one CBM module after all REP modules; Then connect the CBM module to the detection head; Output the detection results; The specific contents of the CBS module structure are as follows: The input is then fed into a single convolutional layer. Add another batch normalization layer; Add another Silu activation function; Final output; The specific contents of the ConvNeXtBlock module structure are as follows: The input is divided into two branches: Branch 5-1 is output directly without any processing; Branch 5-2 connects to a deep convolutional layer; Then connect one more normalization layer; Add another convolutional layer; Add another Gelu activation function; Add another convolutional layer; Add another convolutional layer; Add another scaling layer; Add another regularization layer; Then add the output of the regularization layer and the output of branch 5-1 together; Final output.

3. The method according to claim 2, characterized in that, The specific content of the MP1 module structure in the preset network model is as follows: The input is divided into two branches: Branch 9-1 connects to a max pooling layer, and then connects to a CBS module; Branch 9-2 connects to one CBS module, and then connects to another CBS module; Then concatenate the outputs of branch 9-1 and branch 9-2; Final output.

4. The method according to claim 2, characterized in that, The specific contents of the ELAN module structure in the preset network model are as follows: The input is divided into two branches: Branch 11-1 connects to one CBS module; Branch 11-2 is connected to 5 CBS modules in sequence; Then, concatenate the outputs of branch 11-1, branch 11-2, and the outputs of the first to fourth CBS modules in branch 11-2; Final output.

5. The method according to claim 2, characterized in that, The specific contents of the ELAN-W module structure in the preset network model are as follows: The input is divided into two branches: Branch 12-1 connects to one CBS module; Branch 12-2 is connected to 5 CBS modules in sequence; Then, concatenate the outputs of branch 12-1, branch 12-2, and the outputs of the first and third CBS modules in branch 12-2; Final output.

6. The method according to claim 2, characterized in that, The specific content of the REP module structure in the preset network model is as follows: After input, it splits into 3 branches: Branch 13-1 connects to one convolutional layer and one batch normalization layer in sequence; Branch 13-2 connects to one convolutional layer and one batch normalization layer in sequence; Branch 13-3 is connected to one batch normalization layer; Then add the outputs of branch 13-1, branch 13-2, and branch 13-3 together; Final output.

7. The method according to claim 2, characterized in that, The specific content of the MP2 module structure in the preset network model is as follows: The input is divided into two branches: Branch 10-1 connects to a max pooling layer, and then connects to a CBS module; Branch 10-2 connects to one CBS module, and then connects to another CBS module; Then concatenate the outputs of branch 10-1 and branch 10-2; Final output.

8. The method according to claim 2, characterized in that, The specific content of the CBM module structure in the preset network model is as follows: The input is then fed into a single convolutional layer. Add another batch normalization layer; Add another Sigmod activation function; Final output.

9. The method according to claim 2, characterized in that, The SimAM attention mechanism in the preset network model is as follows: The input feature map is divided into independent neurons. The importance of each neuron is evaluated by defining a minimum energy function for linear separability, thereby distinguishing the target neuron from other neurons. The minimum energy function is: , , , in, For hyperparameters; This represents the minimum energy function value. For neuron indexing; Number of neurons per channel; The height of the feature map; The width of the feature map; For the target neuron; For the input feature map on a single channel One neuron; The mean value of all neurons in a single channel; The variance of all neurons in a single channel; and Its purpose is to reduce the amount of computation; use The size indicates the distinguishability between the target neuron and its neighboring neurons. The larger the value, the higher the weight assigned to the target neuron, and the more attention the network model pays to the region where the target neuron is located.