10kV pole-mounted equipment insulation damage detection method based on YOLOv8

By introducing multi-scale feature fusion and adaptive feature enhancement mechanism in YOLOv8, combining the channel-space attention mechanism and improved loss function, the lack of identification of YOLO algorithm in high resolution and complex scenarios is solved, and the 10kV column equipment is realized Accurate detection of insulation damage.

CN119295997APending Publication Date: 2025-01-10NANJING INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411369778.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

The existing YOLO algorithms are difficult to accurately identify insulation damage points in detecting high-resolution images of equipment on 10kV columns and in complex environments, and they lack stability and generalization capabilities in complex scenarios.

Method used

The deep learning network based on YOLOv8 is adopted, combined with multi-scale feature fusion technology and adaptive feature enhancement mechanism, and the channel-space attention mechanism and an improved loss function Inner-CIoU are introduced to improve the robustness and detection accuracy of the model in complex environments.

Benefits of technology

It significantly improves the identification accuracy and detection efficiency of small and medium-sized targets of the 10kV column equipment, enhances the robustness of the model in complex environments, and effectively realizes the accurate detection of insulation damage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119295997A_ABST
    Figure CN119295997A_ABST
Patent Text Reader

Abstract

The invention discloses a 10kV pole-mounted equipment insulation damage detection method based on YOLOv8, and the method comprises the steps: constructing a sample data set, and constructing an improved YOLOv8 neural network model; according to the improved model, a channel-space attention mechanism module is arranged at the output end of a backbone network in the YOLOv8 model, and meanwhile, a model loss function is replaced; training is carried out to obtain a 10kV pole-mounted equipment insulation damage detection model based on YOLOv8; collecting videos of the column-mounted equipment needing to be detected through the unmanned aerial vehicle; extracting a key frame picture from the video; dividing the video key frame picture into four equal parts and expanding the region area outwards to a preset proportion so as to obtain four to-be-detected images; and inputting the trained model based on the four to-be-detected images so as to output the corresponding part of the pole-mounted equipment with the insulation damage. According to the invention, defects of the power grid can be detected more quickly and more accurately, and the workload and risk of manual inspection are reduced at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image recognition, and in particular to a 10kV pole-mounted equipment insulation damage detection method based on YOLOv8. Background Art

[0002] 10kV (kilovolt) pole-mounted equipment refers to various electrical equipment used in power transmission and distribution systems at a 10kV voltage level. These devices are usually installed outdoors to ensure a stable supply and effective distribution of electricity. However, with the advent of severe weather and bird gnawing, the connections of these devices often have exposed metal points with damaged insulation, which seriously affects the quality of power supply and increases the risk of electrical failures and power outages. For this reason, regular detection and diagnosis of the status of 10kV pole-mounted equipment is essential for the operation and maintenance of power systems.

[0003] Traditionally, the status detection of 10kV pole-mounted equipment is usually done through manual inspection by power workers, but this method has problems such as low inspection efficiency, manual judgment errors, and omissions. With the development of artificial intelligence, deep learning has gradually emerged. Convolutional neural networks can learn autonomously while gradually extracting feature values. This method effectively improves the accuracy and efficiency of recognition. Drones can replace manual inspections to collect image data of connection points, and use artificial intelligence to process and identify the collected data to achieve the purpose of detection. This combination of drones and deep learning makes it possible to detect insulation damage of 10kV pole-mounted equipment.

[0004] In the prior art, the YOLO algorithm has been widely used in actual detection, and various improvements have been continuously introduced to adapt to different detection needs. For example, the patent with publication number CN117095155A proposes a multi-scale digital tube detection method based on an improved YOLO adaptive attention-feature enhancement network, which improves the detection ability of targets of different scales through an adaptive attention mechanism; the patent with publication number CN115731177A introduces the attention mechanism and ConvNext network into YOLO v5 for steel surface damage detection, effectively improving the recognition accuracy under complex backgrounds.

[0005] Although these methods have made adaptive improvements to YOLO and achieved certain results in specific scenarios, they still have the following limitations: First, these improvements are mainly aimed at the detection of flat or low-resolution targets, while the images of the connection points of 10kV pole-mounted equipment usually have high-resolution characteristics, and because the drone is limited by the safety distance, it can only be photographed at least 1 meter away from the 10kV pole, resulting in a small proportion of the pole-mounted equipment in the image. In this case, the exposed metal points where the insulation of the equipment is damaged are often difficult to capture clearly, and the existing YOLO algorithm is prone to missed detection or false detection when processing such subtle features. Secondly, the existing methods mostly focus on the detection of specific targets, such as digital tubes, steel surface damage, etc., and usually assume that the target morphology and environment are relatively stable. However, the detection of the connection points of 10kV pole-mounted equipment involves differences in many aspects such as equipment type and external environment of the equipment, and has complex and changeable characteristics. Therefore, when facing such complex targets, the model based on the existing YOLO improvement scheme is difficult to achieve ideal results in detection stability and generalization ability. Summary of the invention

[0006] 1. Technical problems to be solved:

[0007] In view of the above technical problems, the present invention has made further improvements on the basis of the existing technology to provide a 10kV pole-mounted equipment insulation damage detection method based on YOLOv8. By introducing a deep learning network based on high-resolution image feature extraction and combining multi-scale feature fusion technology, the recognition accuracy of small and medium targets (such as insulation damage points) on pole-mounted equipment is improved. At the same time, in view of the large differences in equipment connection points, an adaptive feature enhancement mechanism is adopted to effectively improve the robustness of the model in complex environments, thereby realizing accurate detection of insulation damage on 10kV pole-mounted equipment. This improvement makes up for the shortcomings of the existing YOLO method in high-resolution targets and complex scenarios, so that both detection efficiency and accuracy have been significantly improved.

[0008] 2. Technical solution:

[0009] The 10kV pole-mounted equipment insulation damage detection method based on YOLOv8 is characterized by comprising the following steps:

[0010] Step 1: Construct a sample data set; obtain pictures of 10kV pole-mounted equipment, including information on insulation damage locations; preprocess the obtained pictures to obtain pictures containing insulation damage locations, and then construct an insulation damage data set at the connection of pole-mounted equipment;

[0011] Step 2: construct an improved YOLOv8 neural network model; the improved YOLOv8 neural network model sets a channel-space attention mechanism module at the output end of the backbone network in the original YOLOv8 model, and replaces the loss function of the model;

[0012] Step 3: Train and verify the constructed improved YOLOv8 neural network model; divide the insulation damage data set of the pole-mounted equipment connection into a training set and a verification set according to a preset ratio, and use the sample data to train and verify the model to obtain a 10kV pole-mounted equipment insulation damage detection model based on YOLOv8;

[0013] Step 4: Use a drone to capture video of the 10kV pole-mounted equipment that needs to be inspected; extract key frame images from the video; divide the video key frame images into 4 equal parts, and then expand the area of ​​the segmented images outward to a preset ratio to obtain 4 images to be inspected; input the 4 images to be inspected into the 10kV pole-mounted equipment insulation damage detection model based on YOLOv8 to output the corresponding parts of the 10kV pole-mounted equipment where insulation damage occurs.

[0014] Furthermore, the preprocessing in step 1 is to use an optimized Mosaic method to scale, crop, rotate, and stitch the images collected at different angles into one image; the optimized Mosaic method is to stitch the acquired 6 images;

[0015] The spliced ​​pictures are added as new samples to the existing sample library to obtain an expanded pole-mounted equipment insulation damage sample database; Labelimg is used to mark each sample in the pole-mounted equipment insulation damage sample database, and the specific parts of the pictures where insulation damage occurs are marked respectively; the specific parts of the insulation damage include lightning arrester BQL, conductor DX, transformer DX, transformer HGQ, fuse RDQ, and wire clamp XJ.

[0016] Further, in step 2, the improved YOLOv8 neural network model also includes a neck network and a head network; wherein the backbone network, the neck network and the head network are connected in sequence; the backbone network uses the corresponding structure in the lightweight YOLOv8 architecture to extract input image features and transfer the extracted features to the neck network; the neck network is used to fuse the feature maps of different stages of the backbone network, and the enhanced features are transferred to the head network; the head network performs target detection and classification tasks on the received images;

[0017] The channel-spatial attention mechanism module at the output end of the backbone network includes a channel attention submodule and a spatial attention submodule connected in sequence;

[0018] The channel attention submodule processes the input image as follows: the input feature map is subjected to the maximum pooling operation and the average pooling operation to obtain the attention-weighted channel feature map:

[0019]

[0020] In the above formula, M c (F) represents the channel attention of the feature map F, where the subscript c represents that the feature map is processed in the channel; F represents the feature map; MLP represents the multi-layer perceptron operation; σ represents the Sigmoid activation function; Maxpool represents the maximum pooling; Avgpool represents the average pooling; W1 and W0 represent the weight coefficients of the multi-layer perceptron operation MLP;

[0021] The spatial attention submodule processes the features after channel attention processing as follows:

[0022]

[0023] Where: M s (F) represents spatial attention; s represents feature map processing in space; f 7×7 Represents a 7×7 convolution; represents the average pooling feature; represents the maximum pooling feature;

[0024] The channel-spatial attention feature map after attention weighting is passed to the neck network and the head network.

[0025] Furthermore, the loss function replaced in step 2 is to use the improved Inner-CioU as the loss function;

[0026] The replacement loss function is shown as follows:

[0027] L inner-CIoU =L CIoU +IoU-IoU inner

[0028] In the above formula, L inner-CIoU Represents the final Inner-CIoU loss, which specifically includes L CIoU , IoU and IoU inner Three parts; L CIoU Represents the IoU loss function; IoU represents the interaction ratio between the prediction box and the target box; IoU inner Indicates the IoU value of the auxiliary box;

[0029] The IoUinner part is as follows:

[0030]

[0031]

[0032] union=(w gt ·h gt )·(ratio) 2 +(wh)·(ratio) 2 -inter

[0033]

[0034]

[0035]

[0036]

[0037] In the above formula, inter represents the area of ​​the intersection of the auxiliary box corresponding to the real box and the auxiliary box corresponding to the predicted box; union

[0038] represents the area of ​​the union of the auxiliary box corresponding to the real box and the auxiliary box corresponding to the predicted box; w gt 、h gt Indicates the width and length of the real box; (x c ,y c ) represents the center coordinate of the anchor box; (x c gt ,y c gt ) represents the center coordinate of the real frame; ratio represents the corresponding scaling factor, corresponding coordinate; b t 、b b Represents the coordinates corresponding to the upper and lower boundaries of the anchor box;

[0039] L CioU Some of them are:

[0040]

[0041]

[0042]

[0043] The IoU part is as follows:

[0044]

[0045] In the above formula, b and b gt They represent the center points of the predicted box and the real box respectively; IoU is the intersection over union ratio of the predicted box and the real box; ρ is b and b gtThe Euclidean distance between them, ν is the consistency of the aspect ratio of the predicted box and the real box; the predicted box is represented by B, and the real box is B GT express.

[0046] Furthermore, in step three, the sample data set is trained using a neural network model: the improved YOLOv8 neural network is used to train the insulation damage recognition of pole-mounted equipment on the data set that has been labeled with Labelimg.

[0047] Furthermore, step 4 specifically includes the following steps:

[0048] S41: Obtain video data of the drone; based on a preset pixel threshold for detecting lens switching, use a lens segmentation technique to first segment the video into multiple sub-videos; wherein the last frame of the previous sub-video is the starting frame of the next sub-video;

[0049] S42: The starting frame and the last frame of each sub-video are taken as key frames; each key frame is introduced into a preset ratio and divided into four equal parts, and four images to be detected with a preset ratio are obtained; wherein the preset ratio formula is as follows:

[0050]

[0051] In the above formula, a1 and b1 represent the length and width of a single rectangular image after segmentation; a and b represent the length and width of the entire rectangular image before segmentation;

[0052] S43: The four images to be detected are input into the 10kV pole-mounted equipment insulation damage detection model based on YOLOv8 obtained in step 3 to output the insulation damage points of the 10kV pole-mounted equipment.

[0053] 3. Beneficial effects:

[0054] (1) This method provides a 10kV pole-mounted equipment insulation damage detection method based on YOLOv8. In order to improve the pertinence of the sample data set, the samples are expanded in the original professional data set. The expanded pictures are taken by daily power grid workers during inspections. The collected pictures are pre-processed by scaling, cropping, rotating, etc. using the Mosic processing method to obtain spliced ​​pictures as new samples and added to the professional sample library, thereby increasing the number of samples and improving the robustness of training.

[0055] (2) This method provides a 10kV pole-mounted equipment insulation damage detection method based on YOLOv8, which improves the neural network model of YOLOv8 and adds a CBAM attention mechanism to reduce information reduction and amplify global interaction representation to improve the performance of the neural network, enhance the model's ability to extract the abnormal insulation characteristics of the 10kV pole-mounted equipment connection in terms of channels, and enhance the ability to focus on the input feature map of spatial attention.

[0056] (3) At the same time, the improvement of the neural network model of YOLOv8 also includes replacing the loss function; the traditional YOLOv8 model uses the CIoU loss function. In order to solve the problem of slow convergence of the CIoU loss function during detection, this method uses the Inner-CIoU improved by Inner-IoU to replace the original loss function.

[0057] (4) In order to adapt to the problem that the drone cannot get closer to the 10kV pole due to the safety distance limit of 1 meter, the pole-mounted equipment in the original picture accounts for a relatively small proportion. In order to enlarge the proportion of the target in the original picture and improve the detection accuracy, this method proposes a process of equally dividing the extracted key frame picture, and inputting the segmented image into the trained model, such as comparing the proportion and Fig.10 and Fig.11 It can be verified that this processing can effectively avoid the situation where the equipment on the column in the center is chopped up, and the recognition accuracy is greatly improved compared to direct input of the original image, effectively enlarging the proportion of the target in the original image and improving the detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 This is the overall flow chart of this method;

[0059] Figure 2 A schematic diagram of a Mosic processing method used in a specific embodiment;

[0060] Figure 3 This is a picture of a sample obtained after being processed by Mosic in a specific embodiment;

[0061] Figure 4 This is a schematic diagram of the neural network structure module of the improved YOLOv8 constructed in this method;

[0062] Figure 5 It is a schematic diagram of the CBAM attention mechanism of the neural network structure module of the improved YOLOv8 in the present invention;

[0063] Figure 6 Schematic diagram of the channel attention principle in the CBAM attention mechanism of the present invention;

[0064] Figure 7Schematic diagram of the spatial attention principle in the CBAM attention mechanism of the present invention;

[0065] Figure 8 An improved diagram of the Inner-IoU loss function of the neural network structure of YOLOv8 improved by the present invention;

[0066] Fig. 9 A schematic diagram of a key frame image extracted from a video obtained in a specific embodiment of the present invention;

[0067] Fig.10 The detection result diagram of the extracted key frame image divided into 6 and 9 equal parts in a specific embodiment;

[0068] Fig.11 It is a diagram of the detection results of 4-equal-division and 4-equal-division overlapping segmentation in a specific embodiment;

[0069] Fig.12 It is a schematic diagram of the four-equal overlapping division in a specific embodiment. DETAILED DESCRIPTION

[0070] The present invention will be described in detail below in conjunction with the accompanying drawings.

[0071] As attached Figure 1 As shown, the 10kV pole equipment insulation damage detection method based on YOLOv8 is characterized by comprising the following steps:

[0072] Step 1: Construct a sample data set; obtain pictures of 10kV pole-mounted equipment, including information on insulation damage locations; preprocess the obtained pictures to obtain pictures containing insulation damage locations, and then construct an insulation damage data set at the connection of pole-mounted equipment;

[0073] Step 2: construct an improved YOLOv8 neural network model; the improved YOLOv8 neural network model sets a channel-space attention mechanism module at the output end of the backbone network in the original YOLOv8 model, and replaces the loss function of the model;

[0074] Step 3: Train and verify the constructed improved YOLOv8 neural network model; divide the insulation damage data set of the pole-mounted equipment connection into a training set and a verification set according to a preset ratio, and use the sample data to train and verify the model to obtain a 10kV pole-mounted equipment insulation damage detection model based on YOLOv8;

[0075] Step 4: Use a drone to capture video of the 10kV pole-mounted equipment that needs to be inspected; extract key frame images from the video; divide the video key frame images into 4 equal parts, and then expand the area of ​​the segmented images outward to a preset ratio to obtain 4 images to be inspected; input the 4 images to be inspected into the 10kV pole-mounted equipment insulation damage detection model based on YOLOv8 to output the corresponding parts of the 10kV pole-mounted equipment where insulation damage occurs.

[0076] Furthermore, the preprocessing in step 1 is to use an optimized Mosaic method to scale, crop, rotate, and stitch the images collected at different angles into one image; the optimized Mosaic method is to stitch the acquired 6 images;

[0077] The spliced ​​pictures are added as new samples to the existing sample library to obtain an expanded pole-mounted equipment insulation damage sample database; Labelimg is used to mark each sample in the pole-mounted equipment insulation damage sample database, and the specific parts of the pictures where insulation damage occurs are marked respectively; the specific parts of the insulation damage include lightning arrester BQL, conductor DX, transformer DX, transformer HGQ, fuse RDQ, and wire clamp XJ.

[0078] Further, in step 2, the improved YOLOv8 neural network model also includes a neck network and a head network; wherein the backbone network, the neck network and the head network are connected in sequence; the backbone network uses the corresponding structure in the lightweight YOLOv8 architecture to extract input image features and transfer the extracted features to the neck network; the neck network is used to fuse the feature maps of different stages of the backbone network, and the enhanced features are transferred to the head network; the head network performs target detection and classification tasks on the received images;

[0079] The channel-spatial attention mechanism module at the output end of the backbone network includes a channel attention submodule and a spatial attention submodule connected in sequence;

[0080] The channel attention submodule processes the input image as follows: the input feature map is subjected to the maximum pooling operation and the average pooling operation to obtain the attention-weighted channel feature map:

[0081]

[0082] In the above formula, M c(F) represents the channel attention of the feature map F, where the subscript c represents that the feature map is processed in the channel; F represents the feature map; MLP represents the multi-layer perceptron operation; σ represents the Sigmoid activation function; Maxpool represents the maximum pooling; Avgpool represents the average pooling; W1 and W0 represent the weight coefficients of the multi-layer perceptron operation MLP;

[0083] The spatial attention submodule processes the features after channel attention processing as follows:

[0084]

[0085] Where: M s (F) represents spatial attention; s represents feature map processing in space; f 7×7 Represents a 7×7 convolution; represents the average pooling feature; represents the maximum pooling feature;

[0086] The channel-spatial attention feature map after attention weighting is passed to the neck network and the head network.

[0087] Furthermore, as attached Figure 8 As shown, the loss function replaced in step 2 is the improved Inner-CioU

[0088] As the loss function; the replacement loss function is as follows:

[0089] L inner-CIoU =L CIoU +IoU-IoU inner

[0090] In the above formula, L inner-CIoU Represents the final Inner-CIoU loss, which specifically includes L CIoU , IoU and IoU inner Three parts; L CIoU Represents the IoU loss function; IoU represents the interaction ratio between the prediction box and the target box; IoU inner Indicates the IoU value of the auxiliary box;

[0091] The IoUinner part is as follows:

[0092]

[0093]

[0094] union=(w gt ·h gt )·(ratio) 2+(wh)·(ratio) 2 -inter

[0095]

[0096]

[0097]

[0098]

[0099] In the above formula, inter represents the area of ​​the intersection of the auxiliary box corresponding to the real box and the auxiliary box corresponding to the predicted box; union

[0100] represents the area of ​​the union of the auxiliary box corresponding to the real box and the auxiliary box corresponding to the predicted box; w gt 、h gt Indicates the width and length of the real box; (x c ,y c ) represents the center coordinate of the anchor box; (x c gt ,y c gt ) represents the center coordinate of the real frame; ratio represents the corresponding scaling factor, corresponding coordinate; b t 、b b Represents the coordinates corresponding to the upper and lower boundaries of the anchor box;

[0101] L CioU Some of them are:

[0102]

[0103]

[0104]

[0105] The IoU part is as follows:

[0106]

[0107] In the above formula, b and b gt They represent the center points of the predicted box and the real box respectively; IoU is the intersection over union ratio of the predicted box and the real box; ρ is b and b gt The Euclidean distance between them, ν is the consistency of the aspect ratio of the predicted box and the real box; the predicted box is represented by B, and the real box is B GT express.

[0108] Furthermore, in step three, the sample data set is trained using a neural network model: the improved YOLOv8 neural network is used to train the insulation damage recognition of pole-mounted equipment on the data set that has been labeled with Labelimg.

[0109] Furthermore, step 4 specifically includes the following steps:

[0110] S41: Obtain video data of the drone; based on a preset pixel threshold for detecting lens switching, use a lens segmentation technique to first segment the video into multiple sub-videos; wherein the last frame of the previous sub-video is the starting frame of the next sub-video;

[0111] S42: The starting frame and the last frame of each sub-video are taken as key frames; each key frame is introduced into a preset ratio and divided into four equal parts, and four images to be detected with a preset ratio are obtained; wherein the preset ratio formula is as follows:

[0112]

[0113] In the above formula, a1 and b1 represent the length and width of a single rectangular image after segmentation; a and b represent the length and width of the entire rectangular image before segmentation;

[0114] S43: The four images to be detected are input into the 10kV pole-mounted equipment insulation damage detection model based on YOLOv8 obtained in step 3 to output the insulation damage points of the 10kV pole-mounted equipment. Specific embodiment:

[0116] Due to the high degree of confidentiality of the power system, the number of database samples collected online is too small, and the data sets collected online are not enough to train neural networks. In this specific embodiment, it is necessary to expand the data after combining with relevant pictures obtained on the Internet. The expanded data comes from the daily inspection photos taken by power grid workers. The original pictures taken by other image acquisition equipment from different angles and different backgrounds obtained by drones are true and reliable. There are 5268 pictures in total, 6 categories: BQL (lightning arrester), DX (wire), HGQ (transformer), RDQ (fuse), XJ (wire clamp), ZK (pole switch). Since some invalid pictures are included, we first performed manual screening to eliminate invalid pictures. In addition, this method also uses the optimized Mosaic method for data enhancement. Traditional Mosaic is to combine 4 original images (such as Figure 2 The 4 parallel pictures in the upper middle part are mixed into Figure 2 As shown in the middle part, the optimized Mosaic method in step 1 of this method is to stitch the 6 acquired pictures together to obtain Figure 2 The dotted line at the bottom of the image is obtained by rotating, scaling, and splicing the six original images (see attached Figure 3(as shown) is a new image expanded to obtain a sample dataset.

[0117] In this embodiment, 5619 high-quality images were finally selected by optimizing Mosaic, rotating, cropping, adding noise and other methods. Then Labelimg was used to mark the parts of the samples where insulation faults occurred, and a column equipment insulation fault dataset containing six categories was constructed. The images in the dataset were divided into a training set and a validation set at a ratio of 8:2.

[0118] The YOLOv8-based 10kV pole-mounted equipment insulation damage detection model constructed in this method is shown in the attached figure. Figure 4 As shown in the figure, the neural network in the model consists of three main parts: backbone network (Backbone), neck network (Neck) and head network (Head). Backbone: Feature Extractor extracts features of the network, used to extract information from the image for use by the subsequent network. Compared with YOLOv5, which has the best generalization ability in previous versions, YOLOv8 has changed in all parts. Backbone still uses the CSP idea, but the C3 module in YOLOv5 has been replaced by the C2f module, which has achieved further lightweighting. At the same time, YOLOv8 still uses the SPPF module used in YOLOv5 and other architectures, adding more skip-layer connections and additional Split operations. Neck: Multi-scale feature fusion technology is used between the backbone and the head to fuse feature maps from different stages of the backbone to enhance feature representation capabilities. Compared with YOLOv5, the YOLOv8 Neck part deletes two convolutional connection layers. Head: Responsible for the final target detection and classification tasks, including a detection head and a classification head. The changes in the Head part are similar to those in version v6. A decoupling head is introduced to decouple the heads of the classification and regression tasks, and perform independent training and optimization respectively.

[0119] Based on the existing YOLOv8 structure, this method adds the CBAM attention mechanism to reduce information reduction and amplify global interaction representation to improve the performance of the neural network. Figure 5 As shown, the mechanism uses a channel-spatial attention mechanism.

[0120] At the channel level, Figure 6As shown in the figure, after the CBAM input feature map is subjected to the maximum pooling operation (Maxpo0I) and the average pooling operation (Avgpool), two feature vectors containing the number of channels are generated, and then the attention weight of each channel is learned through the shared perceptron (SharedMLP) module, so that the network can adaptively select the channel that is more important for the detection task of the pole-mounted equipment connection. Subsequently, the global maximum feature vector and the average feature vector are intersected to obtain the channel attention weight, and the siqmoid activation function is used to ensure that the channel attention weight is between 0 and 1. Finally, the obtained attention weight is multiplied element by element with each channel of the original feature map to obtain the channel feature map after attention weighting, so as to use the channel attention mechanism to highlight the channels related to the insulation state characteristics of the 10kV pole-mounted equipment connection, and suppress irrelevant channels, thereby enhancing the model's ability to extract the abnormal insulation characteristics of the 10kV pole-mounted equipment connection in terms of channels.

[0121] At the spatial level Figure 7 As shown in the figure, the spatial attention module enables the neural network to focus on the important areas in the input feature map. This module performs average pooling and maximum pooling along the channel dimension on the features obtained after processing by the channel attention module, and obtains two channel descriptions with unchanged feature width and height and channel features compressed into a single feature. After splicing these two descriptions by channel, they are processed by a convolutional layer for dimensionality reduction, and the spatial attention features are generated by the Siqmoid activation function, so that the network's attention is focused on the key areas.

[0122] Compared with the traditional YOLOv8, the improved YOLOv8 adopted in this method adds the CBAM attention mechanism after SPPF, which can adaptively learn the feature map information of the channel and spatial dimensions, and refit and allocate the features, which helps to focus on small targets such as the connection between the equipment on the column and increase the weight ratio of small targets.

[0123] This method also replaces the loss function, that is, the improved YOLOv8 is used to replace the traditional CIoU loss function, which can solve the problem of slow convergence of the CIoU loss function during detection. Among them, the Inner-CIoU loss value Linner-CIoU consists of three parts: LCIoU (CIoU loss function), IoU (intersection over union), IoU inner This improvement adds auxiliary bounding boxes of different sizes, allowing the model to better measure the overlap between the detection box and the real target, capture the details of the target more clearly, speed up the convergence speed, and better detect insulation damage at the connection of 10kV pole-mounted equipment.

[0124] In the specific identification process, the drone is used to collect the video of the 10kV pole-mounted equipment to be inspected, and the key frame images are extracted from the video. The core of key frame extraction is to select the best representative of the lens content and minimize the redundancy of video data. Existing key frame extraction methods include methods based on lens boundaries, methods based on motion analysis, and methods based on clustering. This method adopts an identification method suitable for stationary equipment, that is, a method based on lens boundaries.

[0125] The key frame extraction algorithm based on shot boundaries was first proposed in the field of video retrieval and has become a relatively classic and mature technology. The principle of this algorithm is to first divide the video into several shots, and then select the first frame and the last frame in the shot as key frames, or select the first frame, the middle frame and the last frame as key frames, or extract the corresponding frames as key frames according to the set time interval. This system uses the first frame and the last frame as key frames.

[0126] The key frame extraction algorithm based on shot boundaries has the advantages of easy implementation, low complexity, and small amount of calculation. However, when faced with particularly complex scenes, the fixed number of key frames extracted may cause frame leakage and poor robustness.

[0127] Fig. 9 It is a key frame picture of a sub-video extracted in a specific embodiment.

[0128] Since the image of the connection of the 10kV pole-mounted equipment has the characteristics of high resolution, and the drone cannot get closer to the 10kV pole due to the safety distance limit of 1 meter, the pole-mounted equipment photographed accounts for a relatively small proportion in the original image. Therefore, in order to enlarge the proportion of the target in the original image and improve the detection accuracy, this method proposes the idea of ​​first dividing the image extracted from the key frame into equal parts. The traditional segmentation methods include 4, 6, and 9 equal divisions. In this embodiment, these three segmentation methods are experimented in turn under the same image and algorithm. The experimental results are as follows: Fig.10 , 11 As shown in the experiment, it is found that under the same conditions, 2×2 or 4-equal segmentation has the best effect. However, when performing 4-equal segmentation, since there is often a pole-mounted device to be detected in the center of the image when the drone shoots the pole-mounted device, if the original Figure 4 Equal division will cause the column equipment to be shredded. Fig.11 c, so it is impossible to accurately identify equipment defects. Therefore, we put forward the idea of ​​superimposed segmentation on this basis. Superimposed segmentation is to introduce the golden ratio on the basis of the original 4-equal segmentation, and expand the area of ​​each area outward, such as Fig.12 The schematic diagram of the four-equal overlapping division is shown. The formula for the side length of each area with the golden ratio is as follows:

[0129]

[0130] Where a1, b1, a, and b represent the side lengths of the relevant rectangles.

[0131] The 4-division overlapping segmentation effectively avoids the situation where the equipment on the column in the center is cut into pieces, and the recognition accuracy is greatly improved compared to the direct input of the original image. Finally, the image after 4-division overlapping segmentation is input into the improved YOLOv8 neural network to check the detection accuracy.

[0132] In order to verify the effectiveness of the YOLOv8-based 10kV pole-mounted equipment insulation damage detection model of this method, a comparative experiment was conducted on the algorithm. The following table shows the performance comparison of the improved YOLOv8 and the YOLOv8 algorithm before the improvement. The above two neural networks were used to verify the results under unified parameters and unified data sets. The experiment shows that the improved YOLOv8 has significantly improved the average precision mAP compared with the original YOLOv8. It can be seen that the improved YOLOv8 of the present invention is more suitable for 10kV pole-mounted equipment insulation damage detection.

[0133]

[0134]

[0135] Although the present invention has been disclosed as above in terms of preferred embodiments, they are not intended to limit the present invention. Anyone skilled in the art can make various changes or modifications without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection defined by the claims of this application.

Claims

1. A 10kV pole-mounted equipment insulation damage detection method based on YOLOv8, characterized by: The following steps are involved: Step 1: Construct a sample data set; obtain pictures of 10kV pole-mounted equipment, including information on insulation damage locations; preprocess the obtained pictures to obtain pictures containing insulation damage locations, and then construct an insulation damage data set at the connection of pole-mounted equipment; Step 2: construct an improved YOLOv8 neural network model; the improved YOLOv8 neural network model sets a channel-space attention mechanism module at the output end of the backbone network in the original YOLOv8 model, and replaces the loss function of the model; Step 3: Train and verify the constructed improved YOLOv8 neural network model; divide the insulation damage data set of the pole-mounted equipment connection into a training set and a verification set according to a preset ratio, and use the sample data to train and verify the model to obtain a 10kV pole-mounted equipment insulation damage detection model based on YOLOv8; Step 4: Use a drone to capture video of the 10kV pole-mounted equipment that needs to be inspected; extract key frame images from the video; divide the video key frame images into 4 equal parts, and then expand the area of ​​the segmented images outward to a preset ratio to obtain 4 images to be inspected; input the 4 images to be inspected into the 10kV pole-mounted equipment insulation damage detection model based on YOLOv8 to output the corresponding parts of the 10kV pole-mounted equipment where insulation damage occurs.

2. According to the YOLOv8-based 10kV pole equipment insulation damage detection method of claim 1, it is characterized in that: The preprocessing in step 1 is to use the optimized Mosaic method to scale, crop, rotate and stitch the images collected at different angles into one image; the optimized Mosaic method is to stitch the 6 images obtained; The spliced ​​pictures are added as new samples to the existing sample library to obtain an expanded pole-mounted equipment insulation damage sample database; Labelimg is used to mark each sample in the pole-mounted equipment insulation damage sample database, and the specific parts of the pictures where insulation damage occurs are marked respectively; the specific parts of the insulation damage include lightning arrester BQL, conductor DX, transformer DX, transformer HGQ, fuse RDQ, and wire clamp XJ.

3. The 10kV pole equipment insulation damage detection method based on YOLOv8 according to claim 2 is characterized in that: In step 2, the improved YOLOv8 neural network model also includes a neck network and a head network; wherein the backbone network, the neck network and the head network are connected in sequence; the backbone network uses a corresponding structure in a lightweight YOLOv8 architecture to extract input image features and transmits the extracted features to the neck network; The neck network is used to fuse the feature maps of different stages of the backbone network, and transmit the enhanced features to the head network; the head network performs target detection and classification tasks on the received images; The channel-spatial attention mechanism module at the output end of the backbone network includes a channel attention submodule and a spatial attention submodule connected in sequence; The channel attention submodule processes the input image as follows: the input feature map is subjected to the maximum pooling operation and the average pooling operation to obtain the attention-weighted channel feature map: In the above formula, M c (F) represents the channel attention of the feature map F, where the subscript c represents that the feature map is processed in the channel; F represents the feature map; MLP represents the multi-layer perceptron operation; σ represents the Sigmoid activation function; Maxpool represents the maximum pooling; Avgpool represents the average pooling; W1 and W0 represent the weight coefficients of the multi-layer perceptron operation MLP; The spatial attention submodule processes the features after channel attention processing as follows: Where: M s (F) represents spatial attention; s represents the feature map processed in space; f 7×7 Represents a 7×7 convolution; represents the average pooling feature; represents the maximum pooling feature; The channel-spatial attention feature map after attention weighting is passed to the neck network and the head network.

4. The 10kV pole equipment insulation damage detection method based on YOLOv8 according to claim 3 is characterized in that: The loss function replaced in step 2 is to use the improved Inner-CioU as the loss function; the replaced loss function is shown as follows: L inner-CIoU =L CIoU +IoU-IoU inner In the above formula, L inner-CIoU Represents the final Inner-CIoU loss, which specifically includes L CIoU , IoU and IoU inner Three parts; L CIoU Represents the IoU loss function; IoU represents the interaction ratio between the prediction box and the target box; IoU inner Indicates the IoU value of the auxiliary box; The IoUinner part is as follows: union=(w gt ·h gt )·(ratio) 2 +(wh)·(ratio) 2 -inter In the above formula, inter represents the area of ​​the intersection of the auxiliary box corresponding to the real box and the auxiliary box corresponding to the predicted box; union represents the area of ​​the union of the auxiliary box corresponding to the real box and the auxiliary box corresponding to the predicted box; w gt 、h gt Indicates the width and length of the real box; (x c ,y c ) represents the center coordinate of the anchor box; (x c gt ,y c gt ) represents the center coordinate of the real frame; ratio represents the corresponding scaling factor, which ranges from [0.5, 1.5]; b l gt , b r gt Respectively represent the coordinates of the left and right boundaries of the auxiliary box corresponding to the real box; b t , b b They represent the coordinates of the upper and lower boundaries of the auxiliary box corresponding to the prediction box; the width and height of the anchor box are represented by w and h; b l , b r Represents the coordinates corresponding to the left and right boundaries of the anchor box; b t , b b Represents the coordinates corresponding to the upper and lower boundaries of the anchor box; L CioU Some of them are: The IoU part is as follows: In the above formula, b and b gt Represent the center points of the predicted box and the real box respectively; IoU is the intersection over union ratio of the predicted box and the real box; ρ is b and b gt The Euclidean distance between them, ν is the consistency of the aspect ratio of the predicted box and the real box; the predicted box is represented by B, and the real box is B GT express.

5. The 10kV pole equipment insulation damage detection method based on YOLOv8 according to claim 4 is characterized in that: In step three, the sample data set is trained using a neural network model: the improved YOLOv8 neural network is used to train the insulation damage recognition of pole-mounted equipment on the data set that has been labeled with Labelimg.

6. The 10kV pole equipment insulation damage detection method based on YOLOv8 according to claim 5 is characterized in that: Step 4 specifically includes the following steps: S41: Obtain video data of the drone; based on a preset pixel threshold for detecting lens switching, use a lens segmentation technique to first segment the video into multiple sub-videos; wherein the last frame of the previous sub-video is the starting frame of the next sub-video; S42: The starting frame and the last frame of each sub-video are taken as key frames; each key frame is introduced into a preset ratio and divided into four equal parts, and four images to be detected with a preset ratio are obtained; wherein the preset ratio formula is as follows: In the above formula, a1 and b1 represent the length and width of a single rectangular image after segmentation; a and b represent the length and width of the entire rectangular image before segmentation; S43: The four images to be detected are input into the 10kV pole-mounted equipment insulation damage detection model based on YOLOv8 obtained in step 3 to output the insulation damage points of the 10kV pole-mounted equipment.

Citation Information

Patent Citations

  • YOLO v5 steel surface damage detection method introducing attention mechanism and ConvNext network

    CN115731177A

  • Multi-scale nixie tube detection method based on improved YOLO adaptive attention-feature enhancement network

    CN117095155A