Insulator defect detection method based on improved YOLOv5s network

By improving the YOLOv5s network, using the data augmentation and convolution attention mechanism modules, the accuracy and speed problems of insulator defect detection in complex backgrounds in drone power inspection are solved, and fast and accurate identification and positioning of insulator defects are achieved.

CN119295908APending Publication Date: 2025-01-10CHINA JILIANG UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310956549.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-24
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

In the complex context, traditional drone power inspections are difficult to accurately and quickly identify and locate insulator defects, and the edge detection algorithms of existing image processing methods are inaccurate in segmentation and slow recognition speed.

Method used

The improved YOLOv5s network is adopted to enhance the data by acquiring and labeling image data, and a network structure composed of the backbone network, neck network and head network are constructed. The anchor box size is analyzed using K-means++ clustering, and the Hard-Swish activation function is used. and the Convolutional Attention Mechanism Module (CBAM), iterative training is performed to obtain optimal model parameters, identify and locate insulator defects.

Benefits of technology

Quickly and accurately identify and locate insulator defects in complex backgrounds, reduce mis-checking and missed inspections, and improve detection efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119295908A_ABST
    Figure CN119295908A_ABST
Patent Text Reader

Abstract

The invention discloses an insulator defect detection method based on an improved YOLOv5s network. The insulator defect detection method comprises the following steps: step 1, obtaining an image containing insulator defects; 2, marking an insulator image by using software, constructing a data set, and dividing the data set into a training set, a verification set and a test set according to a certain proportion; 3, expanding the data set by adopting a data enhancement method; step 4, constructing an improved YOLOv5s network; step 5, inputting the training set into an improved YOLOv5s network for training to obtain an optimal network model parameter, and obtaining an insulator defect detection network model; and 6, inputting an image needing to be detected into the insulator defect detection network model, and identifying and positioning the insulator defect. The method is high in anti-interference capability, and can quickly and accurately identify and position the insulator defects in various complex background images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical field:

[0001] The present invention relates to the field of computer vision, and in particular to an insulator defect detection method based on an improved YOLOv5s network. Background technology:

[0002] Insulators are important components for reliable insulation between transmission line components and ensuring safe power transmission. Due to long-term exposure to the natural environment, insulators are prone to self-explosion, breakage and flashover defects, which affect the stable operation of the power grid. Therefore, it is necessary to regularly inspect insulators to ensure the safety of the power supply system. Traditional inspections mostly use manual operations, which are inefficient, costly, have a harsh working environment and poor safety. The visual inspection method based on drones is low-cost, high-efficiency, flexible, and not affected by terrain. It has been widely used in insulator defect detection in recent years.

[0003] When the background is complex, how to accurately and quickly identify and locate insulator defects is a key issue that must be solved in UAV power inspection. At present, many scholars have conducted extensive research on insulator defect detection methods. Among them, the edge detection algorithm based on image processing segments the insulator, fits the edge contour of the insulator with an ellipse, and distinguishes between normal and defective insulators. When the background is complex, the segmentation is inaccurate and the recognition speed is slow. Summary of the invention:

[0004] In view of the above problems, the present invention provides an insulator defect detection method based on an improved YOLOv5s network, which can quickly and accurately identify and locate insulator defects in a complex background.

[0005] In order to achieve the purpose of the present invention, the following technical scheme is proposed: an insulator defect detection method based on an improved YOLOv5s network, comprising the following steps:

[0006] Step 1: Acquire an image containing insulator defects;

[0007] Step 2: Use software to annotate insulator images, construct a data set, and divide it into training set, validation set, and test set according to a certain ratio;

[0008] Step 3: Use data augmentation methods to expand the dataset;

[0009] Step 4: Build an improved YOLOv5s network;

[0010] Step 5: Input the training set into the improved YOLOv5s network for training to obtain the optimal network model parameters and obtain the insulator defect detection network model;

[0011] Step 6: Input the image to be detected into the insulator defect detection network model to identify and locate the insulator defects.

[0012] In step 1 described in this scheme, an image containing insulator defects is obtained by photographing or obtaining an open source dataset online.

[0013] Furthermore, in step 2, software is used to annotate normal insulators, self-exploding insulators, damaged insulators and flashover defective insulators in the image, a data set is constructed and randomly allocated in a certain proportion to generate a training set, a validation set and a test set.

[0014] Furthermore, in step 3, data enhancement is performed on the training set and the validation set respectively, and the data enhancement method uses random flipping, adding noise, averaging pixels and image scaling to expand the images of normal insulators, self-exploding insulators, damaged insulators and flashover defective insulators.

[0015] Furthermore, in step 4, the improved YOLOv5s network consists of a backbone network, a neck network and a head network. The K-means++ clustering analysis of the insulator data set is used to determine the preset anchor frame size of the network. The 3rd, 5th and 7th convolution modules of the backbone network use the Hard-Swish activation function and add a convolutional attention mechanism module (CBAM). The CBAM is embedded in the jump link between the backbone network and the neck network, and the cross convolution is used to replace the residual structure of the neck network feature fusion module.

[0016] Furthermore, in step 5, the training set is input into the improved YOLOv5s network for training, the loss value is calculated each iteration, the network weights are updated by back propagation, and the weight file with the lowest loss value is saved as the optimal network model parameters.

[0017] Furthermore, in step 6, the image to be detected is input into the insulator defect detection network model to identify and locate the insulator defects.

[0018] The present invention acquires images containing insulator defects from different perspectives, adopts data enhancement method to expand the images containing insulator defects, increases the diversity of data sets, constructs an improved YOLOv5s network, strengthens the network's attention to the characteristics of insulator defects, reduces false detections and missed detections, and can quickly and accurately identify and locate insulator defects in various complex background images. Description of the drawings:

[0019] Figure 1 It is the overall flow chart of the present invention.

[0020] Figure 2 This is the improved YOLOv5s network structure diagram.

[0021] Figure 3 This is the structure diagram of the Convolutional Attention Mechanism Module (CBAM).

[0022] Figure 4 This is the effect diagram of insulator defect identification and positioning. Specific implementation method:

[0023] The purpose of the present invention is further described in detail below through specific examples. The examples cannot be repeated here one by one, but the implementation mode of the present invention is not limited to the following examples.

[0024] The overall process of the present invention is as follows Figure 1 As shown, an insulator defect detection method based on an improved YOLOv5s network specifically includes the following steps:

[0025] Step 1: Obtain images containing insulator defects by shooting or obtaining open source datasets online.

[0026] Step 2: Use software to annotate normal insulators, self-exploding insulators, damaged insulators, and flashover defect insulators in the image, construct a data set, and randomly allocate it in a certain proportion to generate a training set, a validation set, and a test set.

[0027] Step 3: Perform data enhancement on the training set and validation set respectively. The data enhancement method uses random flipping, noise addition, average pixel and image scaling operations to expand the images of normal insulators, self-exploding insulators, damaged insulators and flashover defect insulators.

[0028] Step 4: Figure 2 As shown in the figure, the improved YOLOv5s network consists of a backbone network, a neck network and a head network. The K-means++ clustering analysis of the insulator dataset is used to determine the preset anchor frame size of the network. The 3rd, 5th and 7th convolution modules of the backbone network use the Hard-Swish activation function and add a convolutional attention mechanism module (CBAM). The CBAM is embedded in the jump link between the backbone network and the neck network, and the cross convolution is used to replace the residual structure of the neck network feature fusion module.

[0029] Step 5: Input the training set into the improved YOLOv5s network for training. After each iteration, calculate the loss value, back-propagate to update the network weights, and save the weight file with the lowest loss value as the optimal network model parameters obtained from the training.

[0030] Step 6: Input the image to be detected into the insulator defect detection network model to identify and locate the insulator defects, such as Figure 4 shown.

[0031] Through the above six steps of this embodiment, insulator defect detection under complex background can be finally achieved.

Claims

1. An insulator defect detection method based on an improved YOLOv5s network, characterized in that: The following steps are involved: Step 1: Acquire an image containing insulator defects; Step 2: Use software to annotate insulator images, construct a data set, and divide it into training set, validation set, and test set according to a certain ratio; Step 3: Use data augmentation methods to expand the dataset; Step 4: Build an improved YOLOv5s network; Step 5: Input the training set into the improved YOLOv5s network for training to obtain the optimal network model parameters and obtain the insulator defect detection network model; Step 6: Input the image to be detected into the insulator defect detection network model to identify and locate the insulator defects.

2. The insulator defect detection method based on the improved YOLOv5s network according to claim 1 is characterized in that: In the step 1, an image containing insulator defects is obtained by photographing or obtaining an open source data set on the Internet.

3. The insulator defect detection method based on the improved YOLOv5s network according to claim 1 is characterized in that: In the step 2, software is used to annotate normal insulators, self-exploding insulators, damaged insulators and flashover defect insulators in the image, a data set is constructed and randomly allocated in a certain proportion to generate a training set, a validation set and a test set.

4. The insulator defect detection method based on the improved YOLOv5s network according to claim 1 is characterized in that: In the step 3, data enhancement is performed on the training set and the validation set respectively. The data enhancement method uses random flipping, adding noise, averaging pixels and image scaling to expand the images of normal insulators, self-exploding insulators, damaged insulators and flashover defect insulators.

5. The insulator defect detection method based on the improved YOLOv5s network according to claim 1 is characterized in that: In the step 4, the improved YOLOv5s network consists of a backbone network, a neck network and a head network. The K-means++ clustering analysis of the insulator data set is used to determine the preset anchor frame size of the network. The 3rd, 5th and 7th convolution modules of the backbone network use the Hard-Swish activation function and add a convolutional attention mechanism module (CBAM). The CBAM is embedded in the jump link between the backbone network and the neck network, and the cross convolution is used to replace the residual structure of the neck network feature fusion module.

6. The K-means++ clustering according to claim 5, characterized in that: The annotation boxes of the insulator dataset are divided into 9 clusters according to their size and width-to-height ratio. The mean of each cluster is taken as the centroid, and 9 predicted anchor box sizes that are more suitable for the insulator dataset are obtained.

7. The convolutional attention mechanism module according to claim 5, characterized in that: The feature map size is compressed by maximum pooling and average pooling to obtain two one-dimensional vectors. After being processed by a shared fully connected layer, the two one-dimensional vectors are added and the channel attention weight is converted to between 0 and 1 using the Sigmoid function. Then, the number of feature map channels is compressed by maximum pooling and average pooling to obtain two two-dimensional matrices. The two two-dimensional matrices are fused through a convolutional layer and the spatial attention weight is converted to between 0 and 1 using the Sigmoid function. Finally, the input feature map is multiplied by the channel attention weight and the spatial attention weight in turn.

8. The insulator defect detection method based on the improved YOLOv5s network according to claim 1 is characterized in that: In step 5, the training set is input into the improved YOLOv5s network for training, the loss value is calculated each iteration, the network weights are updated by back propagation, and the weight file with the lowest loss value is saved as the optimal network model parameters.

Citation Information

Cited By

  • Power transmission line insulator string defect positioning system and method based on cascade detection strategy

    CN119600031A