Power transmission network insulator defect detection method, device and system, and storage medium
The transmission network insulator defect detection model constructed through deep learning technology uses multi-scale feature extraction and attention mechanism to solve the problems of low detection efficiency and limited accuracy in the existing technology, achieving higher detection accuracy and robustness.
Patent Information
- Application Number
- CN202411770734.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-04
AI Technical Summary
When detecting insulator defects in the transmission grid, the prior art has low efficiency and limited accuracy, making it difficult to identify early and hidden defects, and is greatly affected by the external environment.
Deep learning technology is used to build a transmission network insulator defect detection model including 5-DCFM module and DCAM module, and improve the accuracy and robustness of detection through multi-scale feature extraction, hollow convolution and attention mechanisms.
It significantly improves the accuracy and calculation efficiency of insulator defect detection, enhances the adaptability to complex backgrounds and noise environments, and improves the practicality and reliability of detection.
Smart Images

Figure CN119723036A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of image processing technology, and in particular relates to a method and device, a system, and a storage medium for detecting defects in insulators of a power transmission network. Background Art
[0002] Insulators are vital equipment in power systems. They are used to support and fix transmission lines and provide electrical insulation between live conductors and grounded parts. If insulators have defects, such as cracks, aging, pollution, etc., it will cause power equipment failures and even cause safety accidents such as large-scale power outages. Therefore, timely and accurate detection of insulator defects is crucial for the safe operation of the transmission network.
[0003] Traditional insulator defect detection methods mainly rely on manual inspections or the use of thermal imaging, lidar and other equipment. Although these methods can effectively detect some defects, they have the following three limitations:
[0004] (1) Low efficiency of manual inspection: Manual inspection of transmission lines is costly and time-consuming;
[0005] (2) Limited detection accuracy of equipment: Although equipment such as thermal imaging and lidar can detect some defects, the detection results are easily affected by external factors such as weather and light, resulting in inaccurate detection.
[0006] (3) Difficulty in identifying early and hidden defects: Some insulator defects such as tiny cracks or early aging phenomena are not easily detected by traditional methods, which can easily lead to missed detection. Summary of the invention
[0007] The technical problem to be solved by the present invention is to provide a method and device, system and storage medium for detecting defects of insulators in a power transmission network, which can greatly improve the detection efficiency and accuracy in an environment with complex background and noise interference.
[0008] To achieve the above object, the present invention adopts the following technical solution:
[0009] A method for detecting defects in insulators of a transmission network, comprising:
[0010] Step S1, obtaining a data set of insulator defects in a transmission network;
[0011] Step S2, preprocessing the transmission network insulator defect data set, and dividing the preprocessed transmission network insulator defect data set to obtain a training set and a test set;
[0012] Step S3, constructing a transmission network insulator defect detection model according to the preprocessed transmission network insulator defect data set; wherein the transmission network insulator defect detection model includes: a 5-DCFM module and a DCAM module;
[0013] Step S4, training a transmission network insulator defect detection model according to the training set;
[0014] Step S5, input the test set into the trained power transmission network insulator defect detection model to identify the insulators in the current power transmission network area and obtain the defect type and location.
[0015] Preferably, the 5-DCFM module adopts multi-scale feature extraction, dilated convolution and feature fusion mechanism.
[0016] Preferably, the DCAM module adopts a dilated convolution mechanism and an attention mechanism in the channel dimension and the spatial dimension.
[0017] Preferably, the transmission network insulator defect detection model adopts the HCIoU loss function to simultaneously optimize the position, size, confidence and accuracy of category prediction of the bounding box.
[0018] The present invention also provides a transmission network insulator defect detection device, comprising:
[0019] An acquisition module, used for acquiring a data set of defects of insulators in a transmission network;
[0020] A partitioning module is used to preprocess the transmission network insulator defect data set and partition the preprocessed transmission network insulator defect data set to obtain a training set and a test set;
[0021] A construction module is used to construct a transmission network insulator defect detection model according to the preprocessed transmission network insulator defect data set; wherein the transmission network insulator defect detection model includes: a 5-DCFM module and a DCAM module;
[0022] A training module, used for training a transmission network insulator defect detection model based on a training set;
[0023] The detection module is used to input the test set into the trained transmission network insulator defect detection model to identify the insulators in the current transmission network area and obtain the defect type and location.
[0024] An embodiment of the present invention further provides a transmission network insulator defect detection system, comprising: a memory and a processor, wherein the memory stores a computer program executed by the processor, and the computer program executes a transmission network insulator defect detection method when executed by the processor.
[0025] An embodiment of the present invention further provides a storage medium, on which a computer program is stored, and the computer program executes the method for detecting defects of insulators in a power transmission network when the computer program is run.
[0026] The present invention effectively improves the accuracy and computational efficiency of insulator defect detection in complex environments; it also enhances the adaptability and robustness when processing irregular and multi-scale features, and significantly improves the practicability and reliability of insulator defect detection in transmission networks. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0028] Figure 1 This is a flow chart of a method for detecting defects in insulators in a power transmission network according to an embodiment of the present invention;
[0029] Figure 2 It is a schematic diagram of the structure of the insulator defect detection model for the transmission network;
[0030] Figure 3 Schematic diagram of the 5-DCFM module structure
[0031] Figure 4 This is a schematic diagram of the DCAM module structure. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0033] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0034] Embodiment 1:
[0035] like Figure 1 As shown, an embodiment of the present invention provides a method for detecting defects of insulators in a power transmission network, comprising:
[0036] Step S1, obtaining a data set of insulator defects in a transmission network;
[0037] Step S2, preprocessing the transmission network insulator defect data set, and dividing the preprocessed transmission network insulator defect data set to obtain a training set and a test set;
[0038] Step S3, constructing a transmission network insulator defect detection model according to the preprocessed transmission network insulator defect data set;
[0039] Step S4, training a transmission network insulator defect detection model according to the training set;
[0040] Step S5, input the test set into the trained power transmission network insulator defect detection model to identify the insulators in the current power transmission network area and obtain the defect type and location.
[0041] As an implementation method of an embodiment of the present invention, in step S1, a photographing device is used to photograph an area containing insulator defects, and a transmission network insulator defect image is collected to form a data transmission network insulator defect data set D1. The transmission network insulator defect image (hereinafter referred to as the insulator defect image) in D1 is manually annotated so that the subsequent model can identify defects more accurately. In the annotation process, an annotation tool is used to select the area of the insulator defect. The specific annotation work includes determining the horizontal and vertical coordinates of the upper left corner and the lower right corner of the box, and adding corresponding labels to each annotated defect area to mark the defect type of the insulator in the area.
[0042] As an implementation method of an embodiment of the present invention, in step S2, all insulator defect images in D1 are first cropped to the same size. Under normal circumstances, the number of actual transmission network insulator defect data samples is relatively small. In order to enhance the performance of the model, D1 is expanded to obtain D2, where D2 contains multiple insulator defect images. Finally, the data set is divided into a training set, a validation set, and a test set in a ratio of 8:1:1 to ensure that the distribution and diversity of each part of the data can effectively support the training and evaluation of the model.
[0043] The transmission network insulator defect dataset D1 is expanded, and the commonly used data enhancement techniques include the following:
[0044] ① Random pixel perturbation: Increase the diversity of samples by randomly changing the pixel values in the image. The specific implementation can be achieved using the cv2.randu() function.
[0045] ② Adding Gaussian noise: By adding Gaussian noise to simulate the performance of the image in a noisy environment, the robustness of the model can be improved. This can be achieved using the GaussianBlur() method in the ImageFilter module in the PIL library.
[0046] ③ Salt and pepper noise: Randomly change some pixels in the image to black or white to simulate the effect of similar defects. You can use the cv2.randSalt() function to add it.
[0047] ④ Enhance edges: Use edge detection algorithm to make the edges of the image more obvious and enhance the model's sensitivity to defective edges. The cv2.Canny() function is often used to implement edge detection.
[0048] ⑤ Image flipping: Flip the image horizontally or vertically to enrich the different perspectives of the sample. You can use the cv2.flip() function to flip the image.
[0049] Data augmentation aims to increase the amount of data in order to provide sufficient samples for training, validation, and testing, and to make the model more robust and reduce the model's sensitivity to single image features.
[0050] As an implementation of an embodiment of the present invention, in step S3, a transmission network insulator defect detection model based on deep learning is constructed, and the insulator defect image in the transmission network insulator defect data set is input into the transmission network insulator defect detection model. The transmission network insulator defect detection model is used to identify insulator defects on the transmission network. The model can identify different types of defects such as insulator cracks, defects, aging, etc., and automatically generate a positioning frame to determine the specific location and range of the defect.
[0051] The defect detection model of insulators in transmission network is as follows: Figure 2 As shown, the preprocessed first insulator defect image X1 is input into the transmission network insulator defect detection model for processing:
[0052] First, X1 is input into the first Conv module to generate the second insulator defect feature map X2. The first Conv module is composed of a Conv2d layer with a convolution kernel size of 3×3 and a step size of 2, a BN layer, and a SiLU activation function layer connected in series. The first Conv module can effectively extract the edge and local features of the image, providing better input data for subsequent layers;
[0053] Next, X2 is input into the second Conv module to generate the third insulator defect feature map X3; on this basis, X3 is passed to the first 5-DCFM module to generate a higher-level feature map, namely the fourth insulator defect feature map X4; after that, X4 is sequentially passed through the third Conv module, the second 5-DCFM module, the fourth Conv module, the third 5-DCFM module, the fifth Conv module, and the fourth 5-DCFM module to generate a series of feature maps, namely the fifth insulator defect feature map X5, the sixth insulator defect feature map X6, the seventh insulator defect feature map X7, the eighth insulator defect feature map X8, the ninth insulator defect feature map X9, and the tenth insulator defect feature map X10. 10; These feature maps contain rich defect information at different levels and scales. The power transmission network insulator defect detection model continuously analyzes and fuses image features by extracting features layer by layer to identify various defect features in the power transmission network insulator. The first Conv module, the second Conv module, the third Conv module, the fourth Conv module, and the fifth Conv module have the same structure. The first 5-DCFM module, the second 5-DCFM module, the third 5-DCFM module, the fourth 5-DCFM module, and the fifth 5-DCFM module have the same structure.
[0054] X 10 It is then passed to the DCAM module for further processing to generate the insulator defect enhancement feature map X 10 ';
[0055] Then X 10 'Input into the SPPF module to generate the eleventh insulator defect characteristic diagram X 11 ; for X 11 Perform upsample operation (Upsample) to generate the twelfth insulator defect feature map X 12 ; X8 and X 12 Perform Concat operation to generate the thirteenth insulator defect characteristic diagram X 13 ;
[0056] In order to further extract effective features, X 13 Input into the fifth 5-DCFM module to generate the fourteenth insulator defect characteristic map X 14 ; for X 14 Perform Upsample operation to generate the fifteenth insulator defect characteristic map X 15 ; X6 and X 15 Perform Concat operation to generate the sixteenth insulator defect characteristic graph X 16 ; X 16 Input into the sixth 5-DCFM module to generate the seventeenth insulator defect characteristic diagram X 17 ; X 17 Input into the sixth Conv module to generate the eighteenth insulator defect feature map X 18 ;
[0057] To further enhance the features, X 14 and X 18 Perform Concat operation to generate the nineteenth insulator defect characteristic diagram X 19 ; X 19 Input into the seventh 5-DCFM module to generate the twentieth insulator defect characteristic map X 20 ; X 20Input into the seventh Conv module to generate the twenty-first insulator defect feature map X 21 ; X 11 and X 21 Perform Concat operation to generate the twenty-second insulator defect characteristic diagram X 22 ; X 22 Input into the eighth 5-DCFM module to generate the twenty-third insulator defect characteristic diagram X 23 ;
[0058] Finally, X 17 , X 20 , X 23 They are respectively input into the target prediction head Head, and a tensor containing prediction information is output. Each row of the tensor corresponds to a detection result, which is a defect detection result for the insulator defect image, including information such as the predicted bounding box coordinates, defect category label, and confidence score.
[0059] Further, step S3 specifically includes:
[0060] Step 3.1: Input the preprocessed first insulator defect image X1 into the transmission network insulator defect detection model for processing. First, X1 is input into the first Conv module to generate the second insulator defect feature map X2. This first Conv module is composed of a Conv2d layer with a convolution kernel size of 3×3 and a step size of 2, a BN layer, and a SiLU activation function layer connected in series. The first Conv module can effectively extract the edge and local features of the image, providing better input data for subsequent layers;
[0061] Next, X2 is input into the second Conv module to generate the third insulator defect feature map X3; on this basis, X3 is passed to the first 5-DCFM module to generate a higher-level feature map and obtain the fourth insulator defect feature map X4; then, X4 is passed through the third Conv module, the second 5-DCFM module, the fourth Conv module, the third 5-DCFM module, the fifth Conv module, and the fourth 5-DCFM module in sequence to generate a series of feature maps, namely the fifth insulator defect feature map X5, the sixth insulator defect feature map X6, the seventh insulator defect feature map X7, the eighth insulator defect feature map X8, the ninth insulator defect feature map X9, and the tenth insulator defect feature map X10. 10 These feature maps contain rich defect information at different levels and scales. The power transmission network insulator defect detection model continuously analyzes and fuses image features through layer-by-layer extraction to identify various defect features in power transmission network insulators.
[0062] like Figure 3As shown, the present invention designs a 5-DCFM module, which uses multi-scale feature extraction, void convolution and feature fusion to improve the robustness of the model in complex scenarios, thereby improving the detection accuracy of insulator defects and the generalization of the model.
[0063] The 5-DCFM module has five branches:
[0064] In branch A, the first intermediate defect feature map F1 is input into the Conv2d layer with a convolution kernel size of 1×1 to obtain the second intermediate defect feature map F2; F2 is then input into the Conv2d layer with a convolution kernel size of 3×3 to obtain the third intermediate defect feature map F3. Through layer-by-layer convolution with small convolution kernels (1×1 and 3×3), detailed insulator defect information, especially the characteristics of small-size defects of insulators, can be extracted.
[0065] In the B branch, F1 is input into the X_AvgPool layer for horizontal average pooling operation and into the Y_AvgPool layer for vertical average pooling operation to obtain the fourth intermediate defect feature map F4 and the fifth intermediate defect feature map F5 respectively; F4 and F5 are concat-operated to obtain the sixth intermediate defect feature map F6; F6 is then input into the Conv2d layer and the BN layer with a convolution kernel size of 3×3 to obtain the weight Ω of each channel; then, F1 directly input into the C branch and the weight Ω are multiplied element by element to obtain the seventh intermediate defect feature map F7; F7 is input into the Conv2d layer with a convolution kernel size of 3×3 and activated using the Sigmoid activation function to obtain the eighth intermediate defect feature map F8; finally, F7 and F8 are concat-operated to obtain the ninth intermediate defect feature map F9.
[0066] In the D branch, F1 is passed through the Conv2d layers with convolution kernel sizes of 1×1, 5×5, and 3×3 in sequence, where the dilation rate of the Conv2d layer with a convolution kernel size of 3×3 is 5, and the tenth intermediate defect feature map F is obtained. 10 ; Using dilated convolution, we can capture the features of different receptive fields while maintaining the resolution. 10 Perform the Concat operation to obtain the eleventh intermediate defect feature map F 11 ;
[0067] In the E branch, F1 is sequentially input into the Conv2d layers with convolution kernel sizes of 1×1, 9×9, and 3×3, where the void rate of the Conv2d layer with a convolution kernel size of 3×3 is 9, and the twelfth intermediate defect feature map F is obtained. 12 ; Through 9×9 convolution, the receptive field is expanded to obtain more global information. F9 and F 12Perform the Concat operation to obtain the thirteenth intermediate defect feature map F 13 ; Output F3 of branch A and output F of branch D 11 and F 13 Perform the Concat operation, and then use the Sigmoid activation function to activate, improve the recognition ability of insulator defect types (such as contamination, cracks, and foreign matter adhesion), enhance the generalization performance of the model, and obtain the fourteenth intermediate defect feature map F 14 , F 14 is the final output feature map of the 5-DCFM module.
[0068] Step 3.2: X 10 It is then passed to the DCAM module for further processing to generate the insulator defect enhancement feature map X 10 ';
[0069] like Figure 4 As shown, the present invention designs a DCAM module, which improves the focus on key information, effectively filters redundant background information, and strengthens the detection capability of different types of defects through the attention mechanism of channel dimension and spatial dimension. The hole convolution can capture features of different scales, including small-sized insulator defects, while not ignoring defects such as large-area insulator pollution. Through the attention mechanism, irrelevant background can be automatically ignored and the focus can be placed on the insulator and its defective area. The hole convolution cooperates with the attention mechanism to make it more robust to complex weather conditions and reduce false detection and missed detection.
[0070] The tenth insulator defect characteristic diagram X 10 Input to the DCAM module, first set X 10 After inputting the Conv2d layer with a convolution kernel size of 3×3 and a void rate of 1, the first enhanced defect feature map X is obtained. 10_1 , then X 10_1 Input to the BN layer and ReLU activation layer for processing to obtain the second enhanced defect feature map X 10_2 ; Then X 10_2 After inputting into the Conv2d layer with a convolution kernel size of 3×3 and a void rate of 1, the third enhanced defect feature map X is obtained. 10_3 , then X 10_3 Input to the BN layer and ReLU activation layer for processing to obtain the fourth enhanced defect feature map X 10_4 ; Then X 10_4 After inputting into the Conv2d layer with a convolution kernel size of 3×3 and a void rate of 1, the fifth enhanced defect feature map X is obtained. 10_5 , then X 10_5 Input to the BN layer and ReLU activation layer for processing to obtain the sixth enhanced defect feature map X 10_6 ; Then X10_6 They are input into the global average pooling layer and the global maximum pooling layer respectively to obtain two one-dimensional vectors. The two one-dimensional vectors are concat-operated, and then passed through a one-dimensional convolution (Conv1d), and the weight ω of each channel is obtained through the Sigmoid activation function. Finally, the weight ω is added to X 10_6 Multiply to get the insulator defect enhancement characteristic map X 10 ', X 10 ' is the final output feature map of the DCAM module.
[0071] Step 3.3: X 10 'Input into the SPPF module to generate the eleventh insulator defect characteristic diagram X 11 ; for X 11 Perform upsample operation (Upsample) to generate the twelfth insulator defect feature map X 12 ; X8 and X 12 Perform Concat operation to generate the thirteenth insulator defect characteristic diagram X 13 ;
[0072] In order to further extract effective features, X 13 Input into the fifth 5-DCFM module to generate the fourteenth insulator defect characteristic map X 14 ; for X 14 Perform Upsample operation to generate the fifteenth insulator defect characteristic map X 15 ; X6 and X 15 Perform Concat operation to generate the sixteenth insulator defect characteristic graph X 16 ; X 16 Input into the sixth 5-DCFM module to generate the seventeenth insulator defect characteristic diagram X 17 ; X 17 Input into the sixth Conv module to generate the eighteenth insulator defect feature map X 18 ;
[0073] To further enhance the features, X 14 and X 18 Perform Concat operation to generate the nineteenth insulator defect characteristic diagram X 19 ; X 19 Input into the seventh 5-DCFM module to generate the twentieth insulator defect characteristic map X 20 ; X 20 Input into the seventh Conv module to generate the twenty-first insulator defect feature map X 21 ; X 11 and X 21Perform Concat operation to generate the twenty-second insulator defect characteristic diagram X 22 ; X 22 Input into the eighth 5-DCFM module to generate the twenty-third insulator defect characteristic diagram X 23 ;
[0074] Step 3.4: X 17 , X 20 , X 23 They are input into the target prediction head respectively, and a tensor containing prediction information is output. Each row of the tensor corresponds to a detection result, including information such as the predicted bounding box coordinates, defect category label, and confidence score. This structure achieves accurate detection and classification of transmission network insulator defects through layer-by-layer extraction, splicing, and fusion.
[0075] Among them, in the deep learning object detection model, the Head is responsible for further parsing and processing the feature map to directly predict the category, location and confidence of the object. The output of the detection head is usually a three-dimensional tensor, each row of which contains the prediction information at a specific spatial position, including the category probability of each prediction box, the coordinates of the bounding box and the confidence of the object. This information provides the model with key parameters for positioning and classification.
[0076] (1) Bounding box prediction
[0077] In object detection, the image is divided into multiple grids, and each grid cell is responsible for predicting several bounding boxes. The task of bounding box prediction is to determine the location of the object, which includes the following parameters:
[0078] Center point coordinates (x, y): Relative to the center point position of the feature map cell, the relative position of the cell is offset to determine the position of the center of the bounding box in the entire image.
[0079] Width and Height (w,h): The width and height of the bounding box are relative to the overall width and height of the image, ensuring that the predicted bounding box has the correct scale and position.
[0080] In order to train the model more stably, the bounding box coordinates are normalized by a Sigmoid function after prediction, so that the coordinate output value is limited to between 0 and 1. This process ensures that the coordinate prediction of the bounding box is more accurate, and helps to avoid the prediction box being too large or too small, thereby reducing deviation.
[0081] (2) Category and confidence prediction
[0082] In the prediction of each bounding box, in addition to providing the coordinates, you also need to predict the category and confidence:
[0083] Category prediction: The model outputs a probability vector, which indicates the probability of each category that may exist in the bounding box. Through this probability, the model can identify the specific object type, such as insulators, poles, etc.
[0084] Confidence prediction: Confidence indicates the degree of trust the model has in the existence of an object in the current bounding box. The confidence value is between 0 and 1. The larger the value, the more confident the model is that the bounding box contains the target object. Usually in the post-processing stage of the detection model, bounding boxes with higher confidence are screened out according to the confidence threshold, thereby improving the accuracy of the detection results.
[0085] In actual operation, the output of Head is a three-dimensional tensor. Each element of this tensor contains the prediction information of each spatial position, that is, the category probability of each predicted box, the coordinates of the bounding box, and the confidence of the object's existence. Specifically, for each position on the feature map, the tensor provides detailed information of all the corresponding bounding boxes. This structural design can more effectively output classification and positioning information at the same time, ensuring the detection accuracy and efficiency of the model.
[0086] During the training process, the transmission network insulator defect detection model uses the HCIoU loss function to simultaneously optimize the position, size, confidence, and accuracy of the category prediction of the bounding box. This loss function helps the transmission channel tree obstacle monitoring model to make trade-offs in multiple aspects to achieve the best overall performance.
[0087] The present invention designs an HCIoU loss function for the training of the power transmission network insulator defect detection model to accurately calculate the difference between the predicted box and the true box, solving the performance problem in the detection of difficult-to-separate areas. In addition to considering the overlapping area between the detection box and the true box, the center distance, the border shape difference and the distance penalty term are also added to make the detection more stable and accurate. Through the fusion of multiple losses, the detection box and the target true box are more closely matched. Even if the target size, shape or position are very different, it can be effectively detected.
[0088] The HCIoU loss function is defined as follows:
[0089]
[0090] Among them, IoU represents the intersection-over-union ratio of the predicted box and the real box, that is, B and B gt Represent the predicted box and the true box respectively; b and b gt Represent the center points of the predicted box and the real box respectively; ρ(·) represents the Euclidean distance between the two points; w c and h c Respectively represent the width and height of the minimum bounding box composed of the predicted box and the true box; c represents the diagonal of the minimum bounding box; w gtand h gt Respectively represent the width and height of the real box; w p and h p They represent the width and height of the prediction box respectively; λ1, λ2, λ3, and λ4 are the weight coefficients of each part, and the sum of the four is 1; m is the threshold parameter. gt When the distance is too far, a penalty is imposed to prevent the detection box from shifting too far and avoid missed detections.
[0091] In the experiment of the present invention, the size of the feature map is set to H×W×C, where H is the height of the feature map, W is the width of the feature map, and C is the number of channels of the feature map.
[0092] The preprocessed first insulator defect image X1 (size 512×512×3) is input into the transmission network insulator defect detection model for processing: First, by inputting X1 into the first Conv module, the second insulator defect feature map X2 with a size of 256×256×64 is generated. This first Conv module is composed of a Conv2d layer with a convolution kernel size of 3×3 and a step size of 2, a BN layer, and a SiLU activation function layer connected in series. The first Conv module can effectively extract the edge and local features of the image, providing better input data for subsequent layers;
[0093] Next, X2 is input into the second Conv module to generate the third insulator defect feature map X3, which is 128×128×128 in size. On this basis, X3 is passed to the first 5-DCFM module to generate a higher-level feature map and obtain the fourth insulator defect feature map X4, which is 128×128×256 in size. After that, X4 is sequentially passed through the third Conv module, the second 5-DCFM module, the fourth Conv module, the third 5-DCFM module, the fifth Conv module, and the fourth 5-DCFM module to generate a series of feature maps, namely, the fifth insulator defect feature map X5, the sixth insulator defect feature map X6, the seventh insulator defect feature map X7, the eighth insulator defect feature map X8, the ninth insulator defect feature map X9, and the tenth insulator defect feature map X10. 10 ;
[0094] X 10 It is then passed to the DCAM module for further processing to generate an insulator defect enhancement feature map X with a size of 16×16×512. 10 ';
[0095] Then X 10 'Input into the SPPF module to generate the eleventh insulator defect feature map X with a size of 16×16×512 11 ; for X 11Perform Upsample operation to generate the twelfth insulator defect feature map X with a size of 32×32×512 12 ; X8 and X 12 Perform the Concat operation to generate the 13th insulator defect characteristic map X with a size of 32×32×1024 13 ;
[0096] In order to further extract effective features, X 13 Input into the fifth 5-DCFM module to generate the fourteenth insulator defect feature map X with a size of 32×32×512 14 ; for X 14 Perform Upsample operation to generate the fifteenth insulator defect feature map X with a size of 64×64×512 15 ; X6 and X 15 Perform a Concat operation to generate the insulator defect feature map X with a size of 64×64×1024. 16 ; X 16 Input into the sixth 5-DCFM module to generate the seventeenth insulator defect feature map X with a size of 64×64×256 17 ; X 17 Input to the sixth Conv module to generate the eighteenth insulator defect feature map X with a size of 32×32×256 18 ;
[0097] To further enhance the features, X 14 and X 18 Perform the Concat operation to generate the nineteenth insulator defect characteristic map X with a size of 32×32×768 19 ; X 19 Input into the seventh 5-DCFM module to generate the twentieth insulator defect characteristic map X with a size of 32×32×512 20 ; X 20 Input to the seventh Conv module to generate the twenty-first insulator defect feature map X with a size of 16×16×512 21 ; X 11 and X 21 Perform the Concat operation to generate the 22nd insulator defect characteristic map X with a size of 16×16×1024 22 ; X 22 Input into the eighth 5-DCFM module to generate the twenty-third insulator defect characteristic map X with a size of 16×16×512 23 ;
[0098] Finally, X 17 , X 20 , X 23They are input into the target prediction head respectively, and a tensor containing prediction information is output. Each row of the tensor corresponds to a detection result, including information such as the predicted bounding box coordinates, defect category label, and confidence score. This structure achieves accurate detection and classification of transmission network insulator defects through layer-by-layer extraction, splicing, and fusion.
[0099] As an implementation method of an embodiment of the present invention, in step S4, the neural network parameters of the power transmission network insulator defect detection model are first initialized. Subsequently, the hyperparameters related to the power transmission network insulator defect detection model are set, including but not limited to key settings such as training rounds (epochs), the size of each batch of data (batch size), the selection of optimizers (such as SGD, Adam, etc.), and the learning rate (learning rate). After completing the model initialization, the data of the training set and the validation set are divided into multiple small batches and input into the model in batches. First, a batch of training set data is input into the model each time, and the model performs forward propagation on the batch data, calculates the prediction results, and calculates the loss value loss according to the loss function.
[0100] During the training process, the gradient of the loss value relative to the model parameters is calculated through the back propagation algorithm, and the parameters of each layer of the model are updated using the optimizer to gradually reduce the loss value. Through each parameter update, the model gradually learns and optimizes its feature extraction capabilities for the input data.
[0101] After completing a round of training (i.e., an epoch) for all batches of data in the training set, the validation set data is input into the model in batches for validation, and the batch loss value batch_loss corresponding to the validation set is calculated. The loss value of the validation set is mainly used to monitor the performance of the model and detect whether overfitting or underfitting occurs. In order to avoid overfitting, an early stopping mechanism is introduced into the training process. When the validation loss value does not decrease significantly in multiple consecutive rounds of training, the training is terminated early. Among them, overfitting is manifested as the model performing well on the training set, but the effect on the validation set deteriorates.
[0102] After multiple rounds of training, as the training and validation losses gradually converge, the model gradually reaches the expected performance standard, indicating that the model has effectively learned the characteristics of insulator defects and can accurately detect them. Usually, when the validation loss batch_loss reaches a certain threshold or no longer decreases significantly after several consecutive rounds, the model is considered to have converged and the training process can be terminated. The trained model will have appropriate parameter settings and strong generalization capabilities, and can be applied to new transmission network insulator defect detection tasks.
[0103] The 5-DCFM module of the present invention uses multi-scale feature extraction, void convolution and channel attention mechanism to improve the robustness of the model in complex scenarios, thereby improving the detection accuracy of insulator defects and the generalization of the model. In the actual application of insulator defect detection in the power transmission network, the 5-DCFM module effectively solves the problems of complex insulator defect features, diverse target sizes, and background noise interference, thereby ensuring that the model can accurately detect tiny cracks, contamination and foreign matter attachment on the insulator.
[0104] The present invention uses the DCAM module to improve the model's attention to key information through the attention mechanism of channel dimension and spatial dimension, effectively filter redundant background information, and enhance the detection ability of different types of defects. The hole convolution module can capture features of different scales, including small-sized insulator defects, while not ignoring defects such as large-area insulator pollution. Through the attention mechanism, the model can automatically ignore irrelevant background and focus on the insulator and its defective area. The hole convolution combined with the attention mechanism makes the model more robust to complex weather conditions and reduces false detections and missed detections.
[0105] The present invention designs the HCIoU loss function for the training of the power transmission network insulator defect detection model to accurately calculate the difference between the predicted box and the true box, solving the performance problem in the detection of difficult-to-separate areas. In addition to considering the overlapping area between the detection box and the true box, the center distance, the border shape difference and the distance penalty term are also added to make the detection more stable and accurate. Through the fusion of multiple losses, the detection box and the target true box are more closely matched. Even if the target size, shape or position are very different, it can be effectively detected.
[0106] Embodiment 2:
[0107] The embodiment of the present invention further provides a transmission network insulator defect detection device, comprising:
[0108] An acquisition module, used for acquiring a data set of defects of insulators in a transmission network;
[0109] A partitioning module is used to preprocess the transmission network insulator defect data set and partition the preprocessed transmission network insulator defect data set to obtain a training set and a test set;
[0110] A construction module is used to construct a transmission network insulator defect detection model according to the preprocessed transmission network insulator defect data set; wherein the transmission network insulator defect detection model includes: a 5-DCFM module and a DCAM module;
[0111] A training module, used for training a transmission network insulator defect detection model based on a training set;
[0112] The detection module is used to input the test set into the trained transmission network insulator defect detection model to identify the insulators in the current transmission network area and obtain the defect type and location.
[0113] Embodiment 3:
[0114] An embodiment of the present invention further provides a transmission network insulator defect detection system, comprising: a memory and a processor, wherein the memory stores a computer program executed by the processor, and the computer program executes a transmission network insulator defect detection method when executed by the processor.
[0115] Embodiment 4:
[0116] An embodiment of the present invention further provides a storage medium, on which a computer program is stored, and the computer program executes the method for detecting defects of insulators in a power transmission network when the computer program is run.
[0117] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. A method for detecting defects in insulators of a transmission network, characterized in that: include: Step S1, obtaining a data set of insulator defects in a transmission network; Step S2, preprocessing the transmission network insulator defect data set, and dividing the preprocessed transmission network insulator defect data set to obtain a training set and a test set; Step S3, constructing a transmission network insulator defect detection model according to the preprocessed transmission network insulator defect data set; wherein the transmission network insulator defect detection model includes: a 5-DCFM module and a DCAM module; Step S4, training a transmission network insulator defect detection model according to the training set; Step S5, input the test set into the trained power transmission network insulator defect detection model to identify the insulators in the current power transmission network area and obtain the defect type and location.
2. The method for detecting defects in insulators of a power transmission network according to claim 1, characterized in that: The 5-DCFM module adopts multi-scale feature extraction, dilated convolution and feature fusion mechanism.
3. The method for detecting defects in insulators of a power transmission network according to claim 2, characterized in that: The DCAM module adopts the hole convolution mechanism and the attention mechanism of the channel dimension and the spatial dimension.
4. The method for detecting defects in insulators of a power transmission network according to claim 3, characterized in that: The transmission network insulator defect detection model adopts the HCIoU loss function to simultaneously optimize the position, size, confidence and category prediction accuracy of the bounding box.
5. A transmission network insulator defect detection device, characterized in that: include: An acquisition module, used for acquiring a data set of defects of insulators in a transmission network; A partitioning module is used to preprocess the transmission network insulator defect data set and partition the preprocessed transmission network insulator defect data set to obtain a training set and a test set; A construction module is used to construct a transmission network insulator defect detection model according to the preprocessed transmission network insulator defect data set; wherein the transmission network insulator defect detection model includes: a 5-DCFM module and a DCAM module; A training module, used for training a transmission network insulator defect detection model based on a training set; The detection module is used to input the test set into the trained transmission network insulator defect detection model to identify the insulators in the current transmission network area and obtain the defect type and location.
6. A power transmission network insulator defect detection system, characterized in that: include: A memory and a processor, wherein the memory stores a computer program executed by the processor, and when the computer program is executed by the processor, the method for detecting defects in insulators in a power transmission network as claimed in any one of claims 1 to 4 is executed.
7. A storage medium, characterized in that: The storage medium stores a computer program, which executes the method for detecting defects in insulators in a power transmission network according to any one of claims 1 to 4 when running.
Citation Information
Patent Citations
Power transmission line insulator defect detection method based on deep learning
CN113379699A
Method for constructing receptive field self-adaptive transformer substation insulator defect detection neural network
CN114419413A
Insulator defect detection model construction method and system
CN115063648A
Power transmission line insulator defect detection method based on computer vision
CN117113066A
Power transmission line insulator defect detection method based on complex environment
CN117351022A