Power transmission line insulator defect and tower nest detection method based on YOLOv8n

By designing the PCFocalNeXt-C2f module and asymptotic pyramid network on YOLOv8n, combining the ECIoU loss function and NMS, the problems of low target recognition accuracy and high error recognition rate in the detection of tower nests are solved, and the detection performance is significantly improved and robustness.

CN119027366AActive Publication Date: 2024-11-26CHINA THREE GORGES UNIV
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410915155.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-11-26
Estimated Expiration
2044-07-09

AI Technical Summary

Technical Problem

When the existing target detection algorithm detects the insulator defects of transmission line and the pole tower nest, due to the complex background, small defect targets, and large differences in different detection target sizes, the target recognition accuracy and high error recognition rate.

Method used

Using the detection method based on YOLOv8n, the Backbone of the PCFocalNeXt-C2f module optimization model was designed, the Asymptotic Pyramid Network (AFPN) was introduced to optimize Neck, and the loss functions ECIoU and ECIoU-NMS were introduced to improve the model's multi-scale feature extraction and small-objective detection. ability to reduce the rate of misidentification.

Benefits of technology

The detection accuracy and recall rate of the model for the insulator defects of transmission line and the pole tower nest is significantly improved, the misidentification rate is reduced, and the detection performance and robustness are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119027366A_ABST
    Figure CN119027366A_ABST
Patent Text Reader

Abstract

A power transmission line insulator defect and tower bird nest detection method based on YOLOv8n comprises the following steps: step 1, collecting power transmission line insulator defect and tower bird nest inspection images to make a data set, dividing the data set into a training set, a verification set and a test set, and expanding the data set through data enhancement; 2, improving an original YOLOv8n algorithm, and constructing a power transmission line insulator defect and tower nest detection model; and 3, training the model by using the training set, detecting a to-be-detected inspection image by using the trained model, and comparing experimental results of the YOLOv8n algorithm before and after improvement. Experimental results show that the detection precision of the improved YOLOv8n algorithm is obviously improved, the model parameter quantity is obviously reduced, and the detection performance is more excellent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of power transmission line defect detection, and in particular to a method for detecting insulator defects and tower bird nests of power transmission lines based on YOLOv8n. Background Art

[0002] With the advancement of intelligent power grid construction, drone aerial photography has become a common method in power inspection. Due to the large amount of image data obtained by aerial photography and the complex background, the manual screening method is time-consuming, labor-intensive and inefficient. At the same time, this method has the problem of high risk of missed detection and difficulty in ensuring the accuracy of judgment. Insulators are one of the most prone to failure in transmission lines. At the same time, bird nests on towers are one of the common foreign objects in transmission line corridors. Research on transmission line insulator defect and tower bird nest detection methods based on deep learning is of great significance to reducing the workload of inspection personnel and improving the intelligence level of power systems.

[0003] At present, mainstream deep learning target detection algorithms can be divided into two categories: single-stage target detection algorithms and two-stage target detection algorithms. Typical single-stage target detection algorithms include YOLO, SSD, etc., which can directly generate the category probability and position coordinate value of the object through one stage. Typical representatives of two-stage target detection algorithms include R-CNN, Fast R-CNN, Faster R-CNN, Mask R-CNN, etc., which usually first generate candidate areas containing the approximate location information of the target, and then classify and refine the position of the candidate areas. Compared with the two-stage target detection algorithm, the single-stage target detection algorithm does not need to generate candidate areas, has a faster detection speed, and is more suitable for real-time detection of transmission line inspection. YOLOv8 is the latest algorithm in the YOLO series of single-stage target detection algorithms. Compared with other mainstream target detection algorithms, YOLOv8 has higher detection accuracy. Due to the complex background, small defect targets, and large differences in the sizes of different detection targets of insulator defects and tower bird nests in drone aerial inspection images, the direct use of the above algorithms has the problems of low target recognition accuracy and high misrecognition rate, and the network needs to be further optimized.

[0004] In recent years, power transmission line defect detection methods based on deep learning have been widely studied. For example, the patent document with authorization announcement number CN111539302B discloses a glass insulator self-explosion identification method based on a multi-scale deep perturbation neural network. The glass insulator self-explosion identification method based on a multi-scale deep perturbation neural network improves the ability to distinguish multiple categories of insulators in complex environments and the accuracy of state detection. The detection speed of insulators is improved by reducing the complexity of convolution operations. However, this method can only detect one defect, insulator self-explosion, and has poor generalization. In addition, this method cannot better identify smaller defects of the target, such as insulator breakage, insulator flashover, etc. Summary of the invention

[0005] The purpose of the present invention is to solve the problem that when the current target detection algorithm detects transmission line insulator defects and tower bird nests, the defect features are easily lost due to the complex background of the detection target, the small defect target, the large difference in the sizes of different detection targets, resulting in low target recognition accuracy and high misrecognition rate. A transmission line insulator defect and tower bird nest detection method based on YOLOv8n is provided to solve the problem that the detection target background is complex, the defect target is small, the size of different detection targets is large, and the defect features are easily lost, resulting in low target recognition accuracy and high misrecognition rate.

[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is: The YOLOv8n-based transmission line insulator defect and tower bird nest detection method includes the following steps: Step 1: Collect images of transmission line insulator defects and tower bird nest inspections to create a dataset, divide the dataset into training set, validation set, and test set, and expand the dataset through data enhancement; Step 2: Improve the YOLOv8n algorithm and build a transmission line insulator defect and tower bird nest detection model; Step 3: Use the training set to train the model, use the trained model to detect the inspection images to be detected, and compare the experimental results of the YOLOv8n algorithm before and after the improvement.

[0007] Compared with the prior art, the present invention has the following technical effects: Firstly, in order to solve the problem of small target insulator defect feature loss, the PCFocalNeXt-C2f module is designed and used to optimize the Backbone of YOLOv8n. This module can better integrate fine-grained local interaction and coarse-grained global interaction, effectively avoid the problem of small target information loss during feature extraction, and improve the model's ability to extract multi-scale features and detect small targets; secondly, in order to solve the problem of information loss or degradation of defect target features in multi-level transmission, the asymptotic pyramid network (AFPN) that supports direct interaction on non-adjacent levels is used to optimize the Neck of YOLOv8n; finally, the loss function ECIoU is introduced to optimize the loss function in YOLOv8n, and ECIoU-NMS is used to obtain the detection results to improve the robustness of the model. Experimental results show that the algorithm proposed in this paper has better detection performance than the improved YOLOv8n. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] The present invention will be further described below: Figure 1 It is a schematic diagram of the technical route flow of the present invention; Figure 2Schematic diagram of the CBS structure in the YOLOv8n algorithm of the present invention Figure 3 Schematic diagram of Bottleneck structure in the YOLOv8n algorithm of the present invention Figure 4 Schematic diagram of the C2f structure in the YOLOv8n algorithm of the present invention Figure 5 Schematic diagram of the Focal NeXt block structure in the improved YOLOv8n algorithm of the present invention Figure 6 Schematic diagram of the PCFocalNeXt-C2f module structure in the improved YOLOv8n algorithm of the present invention Figure 7 Schematic diagram of the AFPN structure in the improved YOLOv8n algorithm of the present invention Figure 8 Schematic diagram of the original YOLOv8n structure Fig. 9 Improved YOLOv8n structure diagram DETAILED DESCRIPTION The YOLOv8n-based transmission line insulator defect and tower bird nest detection method specifically includes the following steps: Step 1: Collect transmission line insulator defect and tower bird nest inspection images to create a dataset, divide the expanded dataset into training set, validation set and test set, and expand the dataset through data enhancement; Step 2: Improve the original YOLOv8n algorithm and build a transmission line insulator defect and tower bird nest detection model; Step 3: Use the training set to train the model, use the trained model to detect the inspection images to be detected, and compare the experimental results of the YOLOv8n algorithm before and after the improvement.

[0009] In step 1, the training of the deep learning model requires a large amount of data, which includes image data and label data of the corresponding images. However, the amount of image data with defective targets in the transmission line inspection images is very small. Collecting enough inspection images with defective targets and annotating the data requires a lot of manual costs. Therefore, expanding the data set by data enhancement can greatly reduce the cost and improve the generalization of the model. It includes the following sub-steps: Step 1-1: Collect images of transmission line insulator defects and tower bird nest inspections Most inspection images do not contain defect samples. We select images containing transmission line insulator defects and tower bird nests to create a data set. The data set should include various scenes of the target object as much as possible so that the trained target recognition model can have good generalization performance in various test scenes and prevent overfitting.

[0010] Step 1-2: Create and expand the data set, wherein the method of creating and expanding the data set includes the following steps: Step 1-2-1: Use Labelme to label the 795 collected inspection images, which include five detection targets, namely insulator explosion, insulator breakage, insulator flashover, tower nest, and insulator string.

[0011] Step 1-2-2: Divide the dataset into training set, validation set, and test set in a ratio of 8:1:1.

[0012] The training set is a collection of data samples for model fitting, such as building a classifier by training and fitting some parameters.

[0013] The validation set is a set of samples set aside during the model training process. It can be used to adjust the model's hyperparameters and to make a preliminary assessment of the model's capabilities. It is usually used during model iterative training to verify the current model's generalization ability (accuracy, recall, etc.), prevent overfitting, and decide how to adjust the hyperparameters.

[0014] The test set does not participate in training and is used to test the accuracy of the trained model.

[0015] Step 1-2-3: Use data enhancement methods to expand the divided data set. The data enhancement methods include adding noise, adjusting brightness, cropping, rotating, translating and mirroring, and expanding the original 795 image data to 4770. When the data set is expanded, the image data and the corresponding image label data will be expanded at the same time.

[0016] In step 2, due to the complex background, small defect targets, and large size differences of different detection targets in the insulator defects in the drone aerial inspection images, the current target detection algorithm is prone to lose defect features when identifying such targets, resulting in low accuracy and high misrecognition rate. In order to improve the detection performance of the YOLOv8n algorithm for transmission line insulator defects and tower bird nests, the YOLOv8n algorithm is optimized, which includes the following sub-steps: Step 2-1: Design the PCFocalNeXt-C2f module and use it to optimize the YOLOv8n algorithm so that the model can better integrate fine-grained local interactions and coarse-grained global interactions, effectively preventing the loss of small target information during feature extraction, and improving the model's ability to extract multi-scale features and detect small targets. The optimization method of the YOLOv8n algorithm includes the following steps; Step 2-1-1: PConv module is a module that reduces redundant calculations and memory accesses and can effectively extract spatial features. Focal NeXt block is a focusing block designed in CFNet network. This module expands the receptive field by utilizing global attention or large convolution kernels to achieve better performance when processing large-size input images. Its purpose is to simultaneously fuse fine-grained local interactions and coarse-grained global interactions, which enables Focal NeXt block to more deeply and effectively fuse multi-scale features. The structure of Focal NeXt block is as follows: Figure 5 As shown in the figure, the d7×7 layer represents a depth convolution with a convolution kernel of 7×7, n is the number of channels of the output feature, r is the expansion rate of the additional convolution, the 1×1 layer represents a Linear layer with a convolution kernel of 1×1, which is used to change the number of channels, the LayerNorm layer performs normalization, and the GELU layer is the activation function Gaussian error linear unit. The Bottleneck module and C2f module structures are shown in Figure 1. Figure 2 and Figure 3 As shown, the PCFocalNeXt-C2f module designed by the present invention is as follows Figure 6 As shown in the figure, the structure adds a PConv before the first CBS module and after the last CBS module of the C2f module to improve its feature extraction capability, and uses the Focal NeXt block to replace the Bottleneck in the C2f module. This module enables the model to better integrate fine-grained local interactions and coarse-grained global interactions, effectively preventing the loss of small target information during feature extraction, improving the model's ability to extract multi-scale features and detect small targets, and at the same time having a lower number of parameters. This improvement greatly improves the model's detection accuracy for insulator defects.

[0017] Step 2-1-2: Replace all C2f modules in the original YOLOv8n backbone with the PCFocalNeXt-C2f modules of the present invention.

[0018] Step 2-2: Use an asymptotic pyramid network (AFPN) that supports direct interaction at non-adjacent levels to replace the Neck of YOLOv8n to solve the problem of information loss or degradation of the features of the defective target in multi-level transmission. The replacement method includes the following steps: Step 2-2-1: The structure of the asymptotic pyramid network (AFPN) is as follows Figure 7 As shown in the figure, the solid arrows represent convolutions, and the dotted arrows represent adaptive spatial feature fusion. AFPN avoids large semantic gaps between non-adjacent levels by fusing two adjacent low-level features and asymptotically incorporating high-level features into the fusion process. The structure supports direct interactions at non-adjacent levels. Since the features at each spatial position may have multi-object information conflicts during the fusion process, adaptive spatial feature fusion operations are used in AFPN to alleviate these inconsistencies. The Asymptotic Feature Pyramid Network (AFPN) is divided into two stages in the bottom-up feature extraction process of the backbone. In the first stage, two low-level features of different resolutions are fused. As the later stages are entered, high-level features are gradually incorporated into the fusion process and finally fused with the top features of the backbone. This fusion method can avoid large semantic gaps between non-adjacent levels. In this process, the semantics from low-level features and high-level features are directly interacted, avoiding information loss or degradation in multi-level transmission. In the entire feature fusion process, the adaptive spatial feature fusion operation is used to filter the features in the multi-level fusion process, thereby suppressing the information contradictions between features at different levels.

[0019] Step 2-2-2: Replace the neck part of YOLOv8n with the Asymptotic Feature Pyramid Network (AFPN).

[0020] Step 2-3: Introduce the loss function ECIoU and optimize the loss function in YOLOv8n to obtain better positioning results and model performance, and use ECIoU-NMS to obtain detection results to improve the robustness of the model. The replacement method includes the following steps: Step 2-3-1: ECIoU loss function definition: Where: IoU represents the intersection-over-union ratio of the real box and the predicted box, b and b gt They represent the center points of the predicted box and the real box respectively, ρ represents the calculation of the Euclidean distance between the two center points, β represents the weight function, and θ is used to measure the similarity of the aspect ratio; w gt and h gt They represent the width and height of the real box, w and h represent the width and height of the predicted box, respectively.

[0021] The θ term of ECIoU uses the Sigmoid function to form a penalty term for the aspect ratio of the rectangular box, which makes the ECIoU term more stable and smooth than CIoU. Its function output value is (0, 0.25), which can directly meet the normalization requirements and simplify the complexity of the original loss function. The regression loss function ECIoU can obtain faster convergence speed, better positioning results and model performance, and ECIoU-NMS is used to remove invalid target boxes in the detection image, reduce the model's misrecognition rate of all detection targets, and improve the robustness of the model.

[0022] Step 2-3-2: Replace the loss function of YOLOv8n with ECIoU, and replace the NMS of YOLOv8n with ECIoU-NMS.

[0023] In step 3, the model is trained using the training set and tested to prove the superiority of the detection performance of the present invention; Step 3-1: When training the model, the model parameters are set and the model evaluation index is determined. The setting method includes the following steps; Step 3-1-1: Set the model parameters: the input image size (imgsz) is 640×640, the batch size is 64, the training cycle (epochs) is 300, the number of processes (workers) is 32, the optimizer used is SGD, and the initial learning rate (lr0) and the final learning rate (lrf) are both 0.01.

[0024] Step 3-1-2: The present invention uses accuracy, recall, F1 value, low-quality model accuracy index mAP@0.5 and high-quality model accuracy index mAP@0.5-0.95 to evaluate the detection performance of the model, and uses parameter quantity Parameters to evaluate the size of the model. Precision is the ratio of the true value to the correct value in the data predicted to be correct; Recal is the recall rate, that is, the probability of the predicted correct category box; F1 value is the harmonic mean, which is an indicator used to balance precision and recall; mAP@0.5 is the average detection accuracy of all detection categories when the IoU threshold is 0.5; mAP@0.5-0.95 is the average value of 10 mAP values ​​when the IoU threshold increases from 0.5 to 0.95 in steps of 0.05. This indicator can better reflect the accuracy of the model than mAP@0.5 when only the IoU threshold is 0.5; Parameters is the number of parameters contained in the model; the calculation formulas of precision Precision, recall Recal, F1 value, average precision index mAP@0.5 and mAP@0.5-0.95 are as follows: Step 3-2: Use the training set to train the models separately. In order to prove the effectiveness of the improved strategy, an ablation experiment was set up to compare the experimental results of the YOLOv8n algorithm before and after the improvement.

[0025] In order to verify the effectiveness of the improved algorithm in this paper, the ablation experiment shown in Table 1 was established. Group 1 is the initial YOLOv8n algorithm; Group 2, Group 3, and Group 4 are the algorithms after the PCFocalNeXt-C2f module, AFPN, and ECIoU are introduced into YOLOv8n respectively; Group 5 is the algorithm after the PCFocalNeXt-C2f module and AFPN are introduced into YOLOv8n; Group 6 is the algorithm after the PCFocalNeXt-C2f module and ECIoU are introduced into YOLOv8n; Group 7 is the algorithm after the AFPN and ECIoU are introduced into YOLOv8n; Group 8 is the algorithm proposed in this paper, which means the algorithm after the PCFocalNeXt-C2f module, AFPN, and ECIoU are introduced into YOLOv8n.

[0026] Table 1 Ablation experiment results

[0027] The experimental results show that the detection accuracy of each improved algorithm is higher than that of the original YOLOv8n model, which proves the effectiveness of the PCFocalNeXt-C2f module designed in this paper, and also proves the effectiveness of the introduced AFPN and ECIoU. By comparing the algorithm in this paper (Group 8) and the initial YOLOv8n algorithm (Group 1), it can be seen that the algorithm proposed in this paper has a 5.1% increase in recall rate, a 3.2% increase in F1 value, a 3.9% and a 5.9% increase in map@50 and map@50-95 respectively, and a 23.8% decrease in the number of parameters, which proves that the improved strategy in this paper effectively improves the model's detection performance for power insulator defects and tower bird nests.

[0028] The contents described in the embodiments of this specification are merely an enumeration of the implementation forms of the inventive concept. The protection scope of the present invention should not be regarded as limited to the specific forms described in the embodiments. The protection scope of the present invention also extends to equivalent technical means that can be conceived by those skilled in the art based on the inventive concept.

Claims

1. A method for detecting insulator defects and tower bird nests in transmission lines based on YOLOv8n, characterized in that: The following steps are involved: Step 1: Collect images of transmission line insulator defects and tower bird nest inspections to create a dataset, divide the dataset into training set, validation set, and test set, and expand the dataset through data enhancement; Step 2: Improve the YOLOv8n algorithm and build a transmission line insulator defect and tower bird nest detection model; Step 3: Use the training set to train the model, use the trained model to detect the inspection images to be detected, and compare the experimental results of the YOLOv8n algorithm before and after the improvement.

2. The method for detecting insulator defects and tower bird nests of transmission lines based on YOLOv8n according to claim 1, characterized in that: In step 1, the following sub-steps are included: Step 1-1: Collect inspection images of transmission line insulator defects and tower bird nests; Step 1-2: Create and expand the data set. The method of creating and expanding the data set includes the following steps: Step 1-2-1: Use Labelme to label the collected inspection images, which include five detection targets, namely insulator explosion, insulator breakage, insulator flashover, tower nest and insulator string; Step 1-2-2: Divide the data set into training set, validation set and test set in a ratio of 8:1:1; Step 1-2-3: Use data enhancement methods to expand the data set divided in step 1-2-2 and expand the original multiple image data.

3. The method for detecting insulator defects and tower bird nests of transmission lines based on YOLOv8n according to claim 1, characterized in that: In step 2, the following sub-steps are specifically included: Step 2-1: Design the PCFocalNeXt-C2f module and use it to optimize the YOLOv8n algorithm. The optimization method includes the following steps: Step 2-1-1: Add a PConv before the first CBS module and after the last CBS module of the C2f module to improve its feature extraction capability, and use the Focal NeXt block to replace the Bottleneck in the C2f module to design the PCFocalNeXt-C2f module; Step 2-1-2: Replace all C2f modules in the backbone of YOLOv8n before the improvement with the PCFocalNeXt-C2f modules designed in step 2-1-1; Step 2-2: Replace the Neck part of YOLOv8n with an asymptotic pyramid network (AFPN) that supports direct interactions on non-adjacent levels; Step 2-3: Introduce the loss function ECIoU, optimize the loss function in YOLOv8n, and use ECIoU-NMS to obtain the detection results.

4. The method for detecting insulator defects and tower bird nests of transmission lines based on YOLOv8n according to claim 3 is characterized in that: In step 2-3, the ECIoU loss function is defined as: Where: IoU represents the intersection-over-union ratio of the real box and the predicted box, b and b gt They represent the center points of the predicted box and the real box respectively, ρ represents the calculation of the Euclidean distance between the two center points, β represents the weight function, and θ is used to measure the similarity of the aspect ratio; w gt and h gt Represent the width and height of the real box respectively, w and h represent the width and height of the predicted box respectively, and the θ term of ECIoU uses the Sigmoid function to form a penalty term for the aspect ratio of the rectangular box.

5. The method for detecting insulator defects and tower bird nests of transmission lines based on YOLOv8n according to claim 3, characterized in that: In step 2-1-1, the PCFocalNeXt-C2f module adds a PConv before the first CBS module and after the last CBS module of the C2f module, and uses the Focal NeXt block to replace the Bottleneck in the C2f module.

6. The method for detecting insulator defects and tower bird nests in power transmission lines based on YOLOv8n according to claim 1, characterized in that: In step 3, the following sub-steps are specifically included: Step 3-1: When training the model, set the input image size (imgsz) to 640×640, the batch size (batch) to 64, the training cycle (epochs) to 300, the number of processes (workers) to 32, the optimizer (optimizer) used to be SGD, and the initial learning rate (lr0) and the final learning rate (lrf) to 0.01; Step 3-2: Use the training set to train the original YOLOv8n model and the improved YOLOv8n model respectively, set up an ablation experiment, and compare the experimental results of the YOLOv8n algorithm before and after the improvement.

7. The method for detecting insulator defects and tower bird nests in power transmission lines based on YOLOv8n according to claim 6, characterized in that: In step 3-1, the accuracy Precision, recall Recal, F1 value, low-quality model accuracy index mAP@0.5 and high-quality model accuracy index mAP@0.5-0.95 are used to evaluate the detection performance of the model, and the parameter quantity Parameters is used to evaluate the size of the model; the accuracy Precision is the proportion of the true value in the data predicted to be correct; the recall Recal represents the recall rate, that is, the probability of the predicted correct category box; the F1 value represents the harmonic mean, which is an indicator used to balance the accuracy and recall rate; mAP@0.5 represents represents the average detection accuracy of all detection categories when the IoU threshold is 0.5; mAP@0.5-0.95 represents the average value of 10 mAP values ​​when the IoU threshold increases from 0.5 to 0.95 with a step size of 0.

05. This indicator can better reflect the accuracy of the model compared with mAP@0.5 when only the IoU threshold is 0.5; Parameters represents the number of parameters contained in the model; the calculation formulas of Precision, Recal, F1 value, average precision index mAP@0.5 and mAP@0.5-0.95 are as shown in formulas (4) to (8):

Citation Information

Patent Citations

  • YOLOv8 dense pedestrian detection method based on FocalNeXtFold focusing stacking block

    CN117115736A

  • Insulator defect identification method based on improved YOLOv8 model and cosine annealing learning rate attenuation method

    CN117197530A

  • Insulator defect detection method and system based on YOLO detector

    CN117455923A

  • Light-weight insulator defect detection method and device based on deep learning

    CN117496223A

  • Weld defect visual inspection method based on improved YOLOv5s network

    CN117576015A