An improved CenterNet-based method for detecting defects in insulators of power transmission lines
Through the improved CenterNet target detection method, combined with high-resolution cameras and feature fusion modules, the problems of slow detection speed and low accuracy in traditional detection methods are solved, achieving fast and accurate detection of insulator defects in transmission lines, and reducing manual inspections. burden and reduce memory usage.
Patent Information
- Application Number
- CN202210087058.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-25
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-01-25
AI Technical Summary
Traditional manual inspection and YOLO-based image processing methods have problems such as slow detection speed, low accuracy and potential safety hazards when detecting insulator defects in transmission lines. Especially in complex backgrounds, it is difficult to achieve fast and accurate detection.
The improved CenterNet target detection method is used to return the width, height, category and position of the target by determining key points, reducing the number of network hyperparameters, and combining high-resolution cameras, drones to collect data, preprocessing and feature fusion modules to build Resnet50 The backbone network and Ghost Module and GCNet feature aggregation module use the loss function to optimize model training.
It improves the speed, accuracy and stability of insulator inspection, reduces the burden of manual inspection, can quickly and accurately detect defects in complex environments, and takes up less memory.
Smart Images

Figure CN114612803B
Abstract
Description
Technical Field
[0001] The invention belongs to the field of image recognition applications, and in particular relates to a method for detecting defects in insulators of a power transmission line using an improved CenterNet. Background Art
[0002] Object detection is an important technology that detects objects of interest from static images or dynamic videos and predicts their positions and sizes. Effective image recognition methods are the premise and basis for realizing intelligent recognition tasks such as target tracking, scene analysis, and environmental perception. In real life, image recognition technology has a wide range of applications, such as pedestrian / vehicle detection technology in the field of autonomous driving and face recognition technology in the field of security, which are all based on image recognition.
[0003] As an important protective device for the power transmission and distribution network, insulators are widely used in power transmission. Due to long-term exposure to electromechanical loads, air pollution, cold and hot changes, etc., insulators themselves will wear, age, and be damaged, which will reduce their insulation and mechanical properties. This will affect the reliability and stability of power transmission, cause safety hazards to the power grid, and even cause accidents such as discharge and power outages. In the early days, traditional insulator inspection mainly used manual inspection methods, that is, workers were used to conduct quality inspections on insulators to see if they had defects. However, the manual inspection method has disadvantages, such as the large number of insulators that require a lot of time and manpower, and the high-altitude operations and bad weather make the detection accuracy low and there are many safety hazards. Due to the many disadvantages of traditional manual inspections, researchers have proposed and tried image processing to detect insulators. Insulator detection based on deep learning models can achieve good detection results. Among them, the YOLO model has been widely used in the field of target detection. However, since YOLO requires multiple anchor boxes to be set in the candidate area and has a large number of network layers, the weight file after model training occupies a large amount of memory resources in actual application, the detection speed is limited, and it is difficult to accurately and quickly detect insulators in complex backgrounds. Summary of the invention
[0004] In view of the above problems, the purpose of the present invention is to provide an improved CenterNet target detection method for detecting defects in transmission line insulators. Compared with the traditional manual inspection method or the method based on traditional image processing technology, this method no longer uses anchor frames, but regresses the width and height categories and positions of the target by determining key points, reducing the number of network hyperparameters. Using the improved CenterNet target detection method to detect insulator images can improve the speed, accuracy and stability of detection on the one hand; on the other hand, it can further improve the collection, analysis and management functions of basic defect information.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is:
[0006] A method for detecting defects in insulators of a power transmission line based on an improved CenterNet, characterized in that the method comprises the following steps:
[0007] (1) Use a high-resolution camera mounted on a drone to take pictures of insulators and obtain pictures of different types and angles;
[0008] (2) Extract image samples from the captured insulator images and preprocess them:
[0009] (2a) Screening the acquired data to remove blurry samples or samples with poor image quality;
[0010] (2b) Expand the insulator defect image. By randomly flipping the image left and right, up and down, scaling it, and changing the light processing, the amount of data is increased and defect samples at different angles are expanded;
[0011] (2c) Use Gaussian filtering to remove noise and smooth the image;
[0012] (2d) Performing histogram equalization on the image to improve the contrast, so as to enhance the features of the image highlighting defects and improve the clarity of the image;
[0013] (3) Collect 800 images of insulators of different sizes, angles and types, and select 600 images as training samples for the network in this paper. The name of each image sample corresponds to the state of the insulator. In this experiment, there are only two states of insulators, normal (Normal) and defective (Defective), and save them in the train.txt file. The training samples and the train.txt file constitute the training data set. Similarly, select the remaining 200 images and the text.txt file to constitute the test data set;
[0014] (4) Construct the CenterNet network improved by this algorithm and train it with the training data set. The CenterNet network consists of three parts: encoding, decoding and prediction network. The encoding network uses Resnet50 as the backbone network. conv1 uses 3*3 dynamic convolution, 3*3 Max pool, and adds ESCA attention mechanism. Replace the 3*3 convolution in the remaining convblocks with the plug-and-play lightweight module Ghost Module. Each residual block consists of 1 3×3 convolution layer, 2 1×1 convolution layers, 3 BN layers and 3 ReLU units. The decoding network uses GCNet to perform global context feature aggregation on feature maps of different sizes, selects the output feature map in Resnet50, and passes it into GCNet to aggregate the context information to obtain the output feature map. Finally, the obtained feature map is passed into the branch prediction network to obtain three outputs. After the network is built, it is trained using the training data set. The training steps are as follows:
[0015] (4a) Randomly initialize all weight values (w) and offset values (b) of each layer in CenterNet;
[0016] (4b) Input image samples into the CenterNet input layer;
[0017] (4c) The three output judgment values are obtained by step-by-step calculation through the network
[0018] (4d) Calculate the loss function. The loss function of this algorithm includes the center point prediction loss (L k ), center point bias loss (L o ) and width and height loss (L s ). In order to make the model parameters converge faster during back propagation, weights are set for the branch loss function, which are λ s =0.1,λ o =1, the overall loss function is: L det =L k +λ s L s +λ o L o .
[0019] L k The center point loss function is:
[0020]
[0021] Where N is the number of targets in the current detection image, xyc means the current category at the xy position of the heat map is c, and setting α and β to 2 and 4 respectively can better improve the detection accuracy of the algorithm.
[0022] L s The bias loss function is: Among them, k represents the current detection target, is the predicted width and height information, S k is the real width and height information. In order to eliminate the error of the center point position when the heat map is mapped to the original image, L is introduced o Bias loss: Where P represents the coordinates of the target center point, is the predicted center point coordinate, and R is the downsampling factor.
[0023] (4e) Use the back propagation algorithm to calculate the weight value w and offset value b of each layer of the network as well as the change values Δw and Δb.
[0024] (4f) Use the values of lr, Δw and Δb to update w and b in the network, w [i ]=w [i] -lr*Δw [i] , b [i] =b [i] -lr*Δb [i] ;
[0025] (4g) Determine whether it is the last sample in the training data set. If it is not the last sample, select the next sample and jump to (4b); if it is the last sample, jump to (4h);
[0026] (4h) Determine whether the iteration is finished. If not, reselect the training sample, the number of iterations S = S + 1, and jump to (4b); if S = 100, the iteration is finished, then jump to (4i);
[0027] (4i) Fix and save all weight values w and offset values b in the network. When the training is finished, (5) Evaluate the trained network using the 100 test data sets obtained in step (3). Input all the image samples in the test data sets into the network in turn and record the output judgment value of each image sample. and compare them with the corresponding label value Y set in the test.txt file xyc , S k , P are compared, and after all the image samples in the test data set are judged, the judgment accuracy is calculated.
[0028] The present invention provides an improved CenterNet transmission line insulator defect detection method. Compared with the prior art, it has the following beneficial effects:
[0029] The transmission line insulator defect detection method based on improved CenterNet detects insulator anomalies by using improved CenterNet and multi-scale feature selective fusion and comprehensively analyzes and judges the image of the insulator, and finally obtains the defect determination result. The model used for insulator detection in this algorithm consists of an encoding network, a decoding network, and a prediction network, which can effectively realize the positioning of insulator targets in inspection images, and can quickly and accurately detect defective insulators in the image, reducing the burden of manual inspection; compared with the YOLO detection model, the detection model of the present invention uses Resnet50 for target feature extraction, and adds a lightweight module to reduce the redundancy of feature information. Through the feature fusion module based on context information, features of different scales are utilized, reducing the loss of feature information, and can effectively extract target features in complex environments and ensure detection accuracy while occupying less memory resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A flow chart of a method for detecting defects in insulators of a transmission line provided by an embodiment of the present invention;
[0031] Figure 2 A flowchart of image sample preprocessing provided by an embodiment of the present invention;
[0032] Figure 3 A diagram of the algorithm network structure provided by an embodiment of the present invention;
[0033] Figure 4 It is the structure diagram of Ghost Module in the algorithm of the present invention;
[0034] Figure 5 This is a diagram of the network training process of the method of the present invention. DETAILED DESCRIPTION
[0035] like Figure 1 As shown in the figure, the process of the transmission line insulator defect detection method based on the improved CenterNet is:
[0036] (1) Use a high-resolution camera mounted on a drone to obtain insulator image samples of different types and angles;
[0037] (2) Extract image samples from the captured insulator images and preprocess them:
[0038] (3) Divide the preprocessed image samples into a training data set and a test data set;
[0039] (4) Build the CenterNet network improved by this algorithm and train it with the training data set;
[0040] (5) Evaluate the trained network using the test dataset in step (3).
[0041] like Figure 2 As shown, the process of image sample preprocessing in the method of the present invention is:
[0042] (2a) Screening the acquired data to remove blurry images or images with poor quality;
[0043] (2b) Expand the insulator defect image. Expand the sample by geometrically transforming the image and changing the light processing;
[0044] (2c) Use Gaussian filtering to remove noise interference;
[0045] (2d) Performing image enhancement processing on the image to highlight the characteristics of the defect and improve the clarity of the image;
[0046] like Figure 3 As shown, the algorithm network structure of the method of the present invention is composed of:
[0047] The CenterNet network consists of three parts: encoding, decoding, and prediction networks. The encoding network uses Resnet50 as the backbone network. Conv1 uses 3*3 dynamic convolution, 3*3 Maxpool, and adds the ESCA attention mechanism. The 3*3 convolution in the original convblock is replaced by the plug-and-play lightweight module GhostModule. Each residual block consists of 1 3×3 convolution layer, 2 1×1 convolution layers, 3 BN layers, and 3 ReLU units. The decoding network uses GCNet to aggregate global context features of feature maps of different sizes, selects the output feature map in Resnet50, and passes it to GCNet to aggregate context information, which are recorded as {C2, C3, C4, C5} respectively. Secondly, deconvolution is used to convert C5 into a feature map P5 of the same size as C4. After deconvolution, a 1×1 convolution is performed to adjust the number of channels. Then P5 is added to C4 to obtain P4, and the same operation is performed in sequence to obtain the output feature map P2. Finally, the obtained feature map is passed into the branch prediction network to obtain three outputs.
[0048] like Figure 4 As shown, the Ghost Module structure diagram in the algorithm of the present invention;
[0049] The input is processed through the basic convolution (Primary Conv) operation to obtain half of the feature map, which is then processed through the linear operation (Cheap Operation) to obtain the other half of the feature map. The two halves of the feature map are concatenated to obtain the total feature map.
[0050] like Figure 5As shown, the network training process of the method of the present invention is:
[0051] (4a) Randomly initialize all weight values (w) and offset values (b) of each layer in CenterNet;
[0052] (4b) Input image samples into the CenterNet input layer;
[0053] (4c) The three output judgment values are obtained by step-by-step calculation through the network
[0054] (4d) Calculate the loss function. The loss function of this algorithm includes the center point prediction loss (L k ), center point bias loss (L o ) and width and height loss (L s ). The weights are set for the loss function, which are λ s =0.1,λ o =1, the overall loss function is: L det =L k +λ s L s +λ o L o .
[0055] L k The center point loss function is:
[0056]
[0057] Where N is the number of targets in the current detection image, xyc means the current category at the xy position of the heat map is c, and setting α and β to 2 and 4 respectively can better improve the detection accuracy of the algorithm.
[0058] L s The bias loss function is: Among them, k represents the current detection target, is the predicted width and height information, S k It is the real width and height information. After the feature extraction network, the image is downsampled. When the obtained heat map is mapped to the original image, there will be a slight error in the center point position. In order to eliminate the error, L is introduced. o Bias loss: Where P represents the coordinates of the target center point, is the predicted center point coordinate, and R is the downsampling factor.
[0059] (4e) Use the back propagation algorithm to calculate the weight value w and offset value b of each layer of the network as well as the change values Δw and Δb.
[0060] (4f) Use the values of lr, Δw and Δb to update w and b in the network, w [i] =w [i] -lr*Δw [i] , b [i] =b [i] -lr*Δb [i] ;
[0061] (4g) Determine whether it is the last sample in the training data set. If it is not the last sample, select the next sample and jump to (4b); if it is the last sample, jump to (4h);
[0062] (4h) Determine whether the iteration is finished. If not, reselect the training sample, the number of iterations S = S + 1, and jump to (4b); if S = 100, the iteration is finished, then jump to (4i);
[0063] (4i) Fix and save all weight values w and offset values b in the network, and the training is finished.
[0064] (5) Use the 200 test data sets obtained in step (3) to evaluate the trained network. Input all the image samples in the test data set into the network in turn and record the output judgment value of each image sample. And compare these three output judgment values with the corresponding label values Y set in the test.txt file xyc , S k , P are compared, and after all the image samples in the test data set are judged, the judgment accuracy is calculated.
Claims
1. A method for detecting defects in insulators of power transmission lines based on an improved CenterNet, characterized in that: The method comprises the following steps: (1) Use a high-resolution camera mounted on a drone to take pictures of insulators and obtain pictures of different types and angles; (2) Extract image samples from the captured insulator images and preprocess them: (2a) Screening the acquired data to remove blurry samples or samples with poor image quality; (2b) Expanding the insulator defect image by randomly flipping the image left and right, up and down, scaling it, and changing the light processing to increase the amount of data and expand the defect samples at different angles; (2c) Use Gaussian filtering to remove noise and smooth the image; (2d) Performing histogram equalization on the image to improve the contrast, so as to enhance the features of the image highlighting defects and improve the clarity of the image; (3) Collect 800 images of insulators of different sizes, angles, and types, and select 600 images as network training samples. The name of each image sample corresponds to the state of the insulator. There are only two states of insulators, normal and defective, and save them in the train.txt file. The training samples and the train.txt file constitute the training data set. Similarly, select the remaining 200 images and the text.txt file to constitute the test data set. (4) Build an improved CenterNet network and train it with the training data set. The CenterNet network consists of three parts: encoding, decoding, and prediction networks. The encoding network uses Resnet50 as the backbone network. Conv1 uses 3*3 dynamic convolution, 3*3 Max pool, and adds ESCA attention mechanism. The 3*3 convolution in the original convblock is replaced by the plug-and-play Ghost Module, each residual block consists of 1 3×3 convolution layer, 2 1×1 convolution layers, 3 BN layers and 3 ReLU units. The decoding network uses GCNet to perform global context feature aggregation on feature maps of different sizes, selects the output feature map in Resnet50, and passes it into GCNet to aggregate context information, which are recorded as {C2, C3, C4, C5} respectively. Then, deconvolution is used to convert C5 into a feature map P5 of the same size as C4. After deconvolution, a 1×1 convolution is performed to adjust the number of channels, and then P5 is added to C4 to obtain P4. The same operation is performed in sequence to obtain the output feature map P2. Finally, the obtained feature map is passed into the branch prediction network to obtain three outputs. After the network is built, the training data set is used for training. The training steps are as follows: (4a) Randomly initialize all weight values (w) and offset values (b) of each layer in CenterNet; (4b) Input image samples into the CenterNet input layer; (4c) The three output judgment values are obtained by step-by-step calculation through the network (4d) Calculate the loss function, which includes the center point prediction loss (L k ), center point bias loss (L o ) and width and height loss (L s ), in order to make the parameters of the constructed model converge faster during back propagation, the weights of the branch loss function are set according to the importance of each branch, which are λ s =0.1,λ o =1, the overall loss function is: L det =L k +λ s L s +λ o L o, L k The center point loss function is: Where N is the number of targets in the current detection image, xyc means the current category at the xy position of the heat map is c, and setting α and β to 2 and 4 respectively can greatly improve the detection accuracy of the algorithm. L s The bias loss function is: Among them, k represents the current detection target, is the predicted width and height information, S k It is the real width and height information. After the feature extraction network, the image is downsampled. When the obtained heat map is mapped to the original image, there will be a slight error in the center point position. In order to eliminate the error, L is introduced. o Bias loss: Where P represents the coordinates of the target center point, is the predicted center point coordinate, and R is the downsampling factor; (4e) Use the back propagation algorithm to calculate the weight value w and offset value b of each layer of the network as well as the change values Δw and Δb. (4f) Use the values of lr, Δw and Δb to update w and b in the network, w [i] =w [i] -lr*Δw [i] , b [i] =b [i] -lr*Δb [i] ; (4g) Determine whether it is the last sample in the training data set. If it is not the last sample, select the next sample and jump to (4b); if it is the last sample, jump to (4h); (4h) Determine whether the iteration is finished. If not, reselect the training sample, the number of iterations S = S + 1, and jump to (4b); if S = 100, the iteration is finished, then jump to (4i); (4i) All weight values w and offset values b in the network are fixed and saved, and the training is completed; (5) Use the 200 test data sets obtained in step (3) to evaluate the trained network. Input all the image samples in the test data set into the network in turn and record the output judgment value of each image sample. And compare these three output judgment values with the corresponding label values Y contained in the test.txt file xyc , S k , P are compared, and after all the image samples in the test data set are judged, the judgment accuracy is calculated.
