Power distribution insulator multi-type defect detection and identification method

Through the combination of lightweight and feature enhancement network and three-scale fusion mechanism, combined with the SIoU-Loss loss function, the convolutional neural network is improved, which solves the problem of insufficient flexibility and small defect identification in distribution insulator detection, and achieves efficient and accurate detection. Multiple types of defect detection.

CN118537294APending Publication Date: 2024-08-23CHINA THREE GORGES UNIV

Patent Information

Application Number
CN202410550094.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-06
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

Traditional distribution insulator defect detection methods have insufficient flexibility and low detection efficiency, especially the inability to effectively identify small defects. Conventional convolutional neural networks are not accurate enough in detecting small defects, resulting in a high missed detection rate.

Method used

Using a lightweight and feature enhancement network, through the combination of the backbone feature extraction network and the enhanced neck network, a three-scale fusion mechanism and SIoU-Loss loss function are introduced to improve the convolutional neural network and improve detection accuracy and efficiency.

Benefits of technology

It significantly improves the accuracy and efficiency of multi-type defect detection in distribution insulators and reduces the missed detection rate. It is suitable for engineering application needs and has the advantages of fast speed, high accuracy and small model parameters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118537294A
    Figure CN118537294A
Patent Text Reader

Abstract

The invention discloses a power distribution insulator multi-type defect detection and identification method, and the method comprises the steps: obtaining a power distribution insulator image, carrying out the data preprocessing of the power distribution insulator image and a label, and building a lightweight and feature enhancement network; constructing a trunk feature extraction network for extracting the defects of the power distribution insulator; constructing an enhanced neck network, and transmitting the distribution insulator defect features extracted by the trunk feature extraction network into the enhanced neck network; introducing a three-scale fusion mechanism, transmitting features after feature fusion into a lightweight and feature enhancement network for classification prediction, and replacing a regression loss function GIoU-Loss with a SIOU-Loss loss function; training the lightweight and feature enhancement network to obtain an optimal weight; and testing by utilizing the trained optimal weight, and evaluating a detection result to realize the multi-defect category identification of the power distribution insulator. According to the method, the precision of detecting the multi-type defects of the power distribution insulator is effectively improved, the time for detecting the multi-type defects of the power distribution insulator is shortened, and the detection efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of defect detection for distribution insulators, and in particular to a method for detecting and identifying multiple types of defects for distribution insulators. Background Art

[0002] Distribution lines are widely distributed and close to the user side, and their safe and stable operation directly affects the reliability of power supply. Due to the low insulation level of the distribution lines, they are prone to flashover or breakdown accidents when struck by lightning. Porcelain insulators usually have some process defects during the production and manufacturing process, and there are microcracks or small pores inside. During long-term energized operation, under the influence of electromechanical loads and harsh climatic conditions, their mechanical strength and insulation performance will gradually deteriorate, resulting in low-value or zero-value insulators, which seriously threaten the safe operation of distribution lines. Traditional manual inspections are affected by the natural environment and human factors, so there are problems such as insufficient flexibility and low detection efficiency. Although the traditional image processing algorithms that emerged later have improved these problems to a certain extent, for defects with discrete features, the threshold segmentation method cannot effectively perform linear processing, resulting in a low detection rate. Therefore, it is particularly important to use deep learning technology to identify distribution insulator defects.

[0003] In recent years, deep learning algorithms have made breakthrough progress in the fields of machine vision, image classification, target detection, and intelligent robots, and have also made up for the shortcomings of traditional algorithms in insulator defect detection. Deep learning mainly extracts high-level features of input images through neural networks, and performs classification, detection and other operations, avoiding the tedious manual feature extraction process. It has good robustness and generalization capabilities, and is very suitable for the field of distribution insulator defect identification and detection. However, the defects of distribution insulators are small, and conventional networks cannot accurately identify small defects. Therefore, it is urgent to improve the convolutional neural network, improve the detection accuracy, reduce the missed detection rate, and reduce the number of model parameters to make it better meet the needs of engineering applications. Summary of the invention

[0004] The present invention provides a method for detecting and identifying multiple types of defects of distribution insulators, which effectively improves the accuracy of multiple types of defects detection of distribution insulators, shortens the time of multiple types of defects detection of distribution insulators, improves the detection efficiency, and can meet the needs of engineering applications. It has the advantages of fast speed, high accuracy, and small model parameter amount.

[0005] The technical solution adopted by the present invention is:

[0006] The method for detecting and identifying multiple types of defects of distribution insulators comprises the following steps:

[0007] Step 1: Obtain distribution insulator images, perform data preprocessing on distribution insulator images and labels, and establish a lightweight and feature enhancement network;

[0008] Step 2: Construct a backbone feature extraction network to extract distribution insulator defects;

[0009] Step 3: construct an enhanced neck network and pass the distribution insulator defect features extracted by the trunk feature extraction network into it;

[0010] Step 4: Introduce the three-scale fusion mechanism, pass the fused features into the detection head of the lightweight and feature enhancement network for classification prediction, and replace the regression loss function GIoU-Loss with SIoU-Loss loss function;

[0011] Step 5: Train the lightweight and feature enhancement network to obtain the optimal weights;

[0012] Step 6: Use the trained optimal weights to conduct tests and evaluate the test results to achieve multi-defect category recognition of distribution insulators.

[0013] In the step 1, the distribution insulator images captured on site and downloaded from the public network are obtained, and then the distribution insulator images and labels are preprocessed to establish a lightweight and feature enhanced network model.

[0014] The data preprocessing is as follows:

[0015] The images of insulators in distribution stations are collected and sorted to obtain a dataset of defective images of distribution insulators. The defects include damage and flashover. The samples are shown in Figure 4(a) and Figure 4(b). Then, the insulator images are processed by traditional image processing, and the dataset is expanded by flipping, translating, and rotating. The expansion methods are as follows: Figure 5(a) to Figure 5(b) As shown, the generalization ability of lightweight and feature enhanced network models is improved.

[0016] Traditional image processing is as follows: first, the collected distribution insulator defect images are converted into RGB color space and HSI color space, and components are extracted as required for grayscale transformation; then, the image noise is analyzed and a local median filtering algorithm is proposed and applied to process the noise, thus obtaining a distribution insulator defect image with more prominent defects.

[0017] In step 1, the lightweight and feature enhancement network structure includes: a backbone network, a neck fusion network and a detection head. The backbone network is used to extract the features of the distribution insulator in the image; the neck fusion network uses a top-down and bottom-up connection method to fuse the multi-scale feature layers; and finally, it is sent to the detection head for loss calculation and defect prediction.

[0018] In step 2, the construction of the backbone feature extraction network includes the following steps:

[0019] S2.1: Design a dense residual feature enhancement module (Dense Residual Feature Enhancement Module, DRFEM) to replace the cross stage partial network (Cross Stage Partial Network, CSPNet) in the original convolutional neural network. Assume that the number of output channels of the first convolution normalization activation function module (ConvBNSiLU, CBS) is 2×c, followed by a channel segmentation layer, which divides it into two parts, each part contains feature maps of c channels, and the results of these two parts are stored in the list x; next, there are n bottleneck modules in series, and the input of each bottleneck module is the last element in the list x, that is, the feature map containing c channels. At the same time, the output of each bottleneck module will be added to the list x as the input of the next bottleneck module. After passing through n bottleneck modules, the elements in the list x are spliced ​​according to the channel dimension to obtain a feature map of (2+n)×c dimension. Finally, after the second convolution normalization activation function (ConvBNSiLU, CBS) module, the number of channels is compressed to c2 for output. The structure of DRFEM is as follows Figure 6 As shown, Figure 6 Part a is the C3 module and part b is the DRFEM module.

[0020] Through this process, the serial bottleneck modules provide the YOLOv5 model with feature information of different scales. This information is fused at different levels to comprehensively utilize their multi-scale information, thereby improving the representation ability of the feature map and the detection accuracy.

[0021] S2.2: In order to obtain deep high-level semantic information while taking into account the network operation speed, the bottleneck module in the dense residual feature enhancement module (DRFEM) is replaced by a ghost bottleneck module to obtain a ghost dense residual feature enhancement module (Ghost-dense residual feature enhancement module, Ghost-DRFEM). The structure of Ghost-DRFEM is as follows: Figure 7 shown.

[0022] In step 3, the enhanced neck network structure is as follows:

[0023] The channel concatenation (ConCat) layer of the original neck network only concatenates two levels of feature maps. This operation simply concatenates the feature maps processed by different layers according to the specified dimension, which has certain limitations in integrating feature information. Therefore, in order to obtain richer shallow detail information and deep semantic information in the insulator image, a three-scale fusion mechanism (Tri-Fusion) is introduced. The structure diagram of Tri-Fusion is shown in the figure. Figure 8 As shown, channel concatenation (ConCat) is used to concatenate the feature layers obtained by processing more layers layer by layer, so as to obtain richer feature information while the network parameters do not change much.

[0024] The new enhanced neck network (NE-Neck) structure introduces a three-scale fusion mechanism (Tri-Fusion) to replace the channel splicing (ConCat) layer, and performs channel splicing on the feature layer obtained by processing more layers by the channel splicing (ConCat) layer, so as to obtain richer feature information while keeping the network parameters unchanged.

[0025] The output feature map of the three-scale fusion mechanism (Tri-Fusion) network consists of three parts: shallow feature map, intermediate feature map and deep feature map; the specific structure diagram is as follows Fig. 9 As shown in the figure. The shallow feature map comes from the feature layer extracted from the Darknet53 backbone network, but its receptive field is small and the resolution is high. Therefore, a convolution with a kernel size of 3 and a step size of 2 is used to reduce the size of the feature map and further extract the features of the insulator defects. The intermediate feature map also comes from the feature layer extracted from the Darknet53 backbone network, but it has more redundant information. Therefore, a convolution with a kernel size of 1 and a step size of 1 is used to compress the number of channels and filter key information. The deep feature map has rich semantic information and low resolution, but lacks detail information. The shallow feature map has a strong ability to represent detail information, but its ability to represent semantic information is weak. Therefore, the channel concatenation (ConCat) layer structure of the feature fusion part is changed from the original two-layer feature map to three layers, which is more conducive to obtaining target information on multiple types of defects in insulators.

[0026] In step 4, the SIoU-Loss loss function replaces the original loss function GIoU-Loss, because GIoU-Loss does not take into account the direction mismatch between the required real box and the predicted box. This deficiency will lead to slower convergence and reduced efficiency. The SIoU-Loss loss function considers the vector angle between the centers of the predicted box and the real box on the basis of the GIoU loss function. This allows the predicted box to move to the nearest coordinate axis and then return to a single coordinate (x or y), effectively reducing the free variables in the loss function and improving the classification accuracy of the model.

[0027] In step 5, the lightweight and feature enhanced network model is trained as follows:

[0028] The large-scale distribution insulator defect image dataset was divided into training set, validation set and test set according to the ratio of 8:1:1, and input into the lightweight and feature enhancement network model for pre-training. A total of 300 rounds of training were conducted, and the pre-training weights with the smallest training loss value were taken for transfer learning. The distribution insulator defect dataset and the pre-training weights were combined for training, and mosaic was used for data enhancement to improve the generalization ability of the network model and obtain the optimal weights.

[0029] Mosaic data enhancement includes the following steps:

[0030] A1: Randomly select the coordinates of the image stitching reference point (x c ,y c ), and four pictures were randomly selected;

[0031] A2: The four images are resized and scaled according to the reference points and placed at the upper left, upper right, lower left, and lower right positions of the large image of the specified size;

[0032] A3: According to the size transformation method of each image, the mapping relationship is mapped to the image label;

[0033] A4: According to the specified horizontal and vertical coordinates, the large image is stitched together and the coordinates of the detection frame that exceed the boundary are processed.

[0034] Mosaic data enhancement randomly selects four images for combination, and the number of images obtained by the combination is more than the number of original images. At the same time, it can also enhance the robustness of the model. Mixing four pictures with different semantic information allows the model to detect targets beyond the conventional context. Secondly, mosaic can enhance the effect of the batch normalization layer (Batch Normalization). When the model sets the BN operation, the total number of batch samples (BatchSize) will be increased as much as possible during training, because the principle of BN is to calculate the mean and variance of each feature layer. If the total number of batch samples is larger, the mean and variance calculated by BN will be closer to the mean and variance of the entire data set, and the effect will be better. Finally, the mosaic data enhancement algorithm is conducive to improving the performance of small target detection. The mosaic data enhanced image is spliced ​​from four original images, so that each image has a greater probability of containing small targets.

[0035] In step 6, the evaluation indicators include: mean average precision (mAP), recall (R) and frames per second (FPS). Through the above indicators, the detection results of the improved model can be intuitively shown, thereby giving readers a better reading experience.

[0036] The present invention provides a method for detecting and identifying multiple types of defects of distribution insulators, and the technical effects are as follows:

[0037] 1) Step 1 of the present invention first collects and organizes the distribution insulator image data set, and performs traditional image processing, such as cropping, translation, rotation, etc. to expand the data set, effectively increasing the diversity and quantity of data samples. This can improve the model's ability to identify insulator defects in different scenarios, and further improve the image quality by performing noise analysis and local median filtering on the image, which is conducive to the network model to better learn and understand the features, thereby improving the generalization ability of the model. Secondly, the designed lightweight and feature-enhanced network structure is divided into a backbone network, a neck fusion network, and a detection head, which fully considers the importance of the hierarchy of the network structure and feature fusion. The backbone network is responsible for extracting the distribution insulator features, and the neck fusion network fuses the multi-scale feature layers through top-down and bottom-up connections. This design enables the network to effectively capture information in the image at different scales, improving the flexibility and adaptability of the model. Finally, in the data preprocessing stage, the insulator defects are classified and labeled, including damage and flashover, which is conducive to the model to more accurately identify and locate different types of defects. At the same time, sample examples of defects are presented, which helps researchers and reviewers to understand the problems and solutions more intuitively, and improves the comprehensibility and evaluability of the patent.

[0038] 2) Step 2 of the present invention first introduces a multi-scale feature fusion mechanism in the backbone feature extraction network by designing a dense residual feature enhancement module (DRFEM) and a phantom dense residual feature enhancement module (Ghost-DRFEM). This mechanism enables the network to simultaneously obtain feature information of different scales, and comprehensively utilizes this information by means of feature fusion, thereby improving the characterization ability of the feature map. This multi-scale feature fusion method can help the model better understand the image content, improve detection accuracy and generalization ability. Secondly, in the process of replacing the bottleneck module with the phantom bottleneck module, the network structure not only considers the acquisition of deep-level high-level semantic information, but also takes into account the running speed of the network. This balance enables the network to have a faster reasoning speed while maintaining a high detection accuracy. This is very important for the real-time requirements in practical application scenarios, and can make the model more practical in actual deployment. Finally, the dense residual feature enhancement module and the phantom dense residual feature enhancement module are introduced, and the design innovation of these modules not only improves the effectiveness of the network, but also enhances the flexibility of the network. The design of this module can be easily embedded in other network structures, is suitable for different tasks and scenarios, and has certain versatility and scalability.

[0039] 3) Step 3 of the present invention first introduces a three-scale fusion mechanism (Tri-Fusion), which enables the network to fuse richer feature information by splicing channels of feature maps at more levels. This multi-scale feature fusion mechanism can comprehensively utilize feature maps at different levels, including both shallow detail information and deep semantic information, thereby improving the model's characterization ability and detection performance for insulator defects. Secondly, in the new enhanced neck network (NE-Neck), the output feature map composed of three parts is analyzed and processed in detail. Shallow feature maps, intermediate feature maps, and deep feature maps each have their own characteristics. By performing different processing on these feature maps, such as size reduction, channel compression, etc., the network can more effectively process the information of feature maps at different levels, thereby improving the robustness and generalization ability of the model. Then, while introducing the three-scale fusion mechanism, the network parameter amount does not change much. This means that the model can obtain richer feature information without increasing too much computational cost. This efficient network design not only ensures the lightweight and high efficiency of the model, but also improves the feature characterization ability of the model, making the model more competitive in practical applications. Finally, by changing the channel splicing layer structure of the feature fusion part from the original two-layer feature map to three-layer, the network is more conducive to obtaining target information on multiple types of insulator defects. This targeted design can help the model better capture the characteristics of different types of defects and improve the model's ability to identify and detect insulator defects in complex scenarios.

[0040] 4) Step 4 of the present invention first introduces the SIoU-Loss loss function to consider the direction mismatch problem between the predicted box and the real box, which is one of the shortcomings of the GIoU-Loss loss function. By considering the vector angle of the centers of the two boxes, SIoU-Loss makes it easier for the predicted box to quickly move to the direction that matches the real box, thereby more accurately capturing the location information of the target. This improvement helps to improve the convergence speed and efficiency of the model, while reducing the training difficulties caused by direction mismatch. Secondly, SIoU-Loss effectively reduces the free variables in the loss function by quickly moving the predicted box to the nearest coordinate axis and then returning to a single coordinate. This simplification helps to improve the training stability of the model, reduces the complexity of the loss function, makes it easier for the model to learn the location and shape information of the target, and thus improves the classification accuracy. Finally, the SIoU-Loss loss function comprehensively considers the location and shape information of the target on the basis of GIoU-Loss, making the loss function more comprehensive and accurate. This comprehensive consideration helps the model to better understand the characteristics of the target, improves the model's detection and positioning capabilities for the target, and thus improves the classification accuracy and detection performance of the model.

[0041] 5) Step 5 of the present invention first divides the large-scale distribution insulator defect image data set into a training set, a validation set and a test set in a ratio of 8:1:1, and then inputs it into a lightweight and feature-enhanced network model for pre-training. This method can effectively utilize the rich image information in the large-scale data set, help the network model better learn the characteristics and patterns of insulator defects, and improve the generalization ability and classification accuracy of the model. Secondly, the method of using mosaic for data enhancement can effectively improve the robustness and generalization ability of the network model. Mosaic data enhancement randomly selects four images for combination, increases the diversity of training samples, and enables the model to better adapt to different scenes and conditions. In addition, mosaic data enhancement also helps to enhance the effect of the batch normalization layer and improve the small target detection performance. These advantages all help to improve the stability and performance of the model. Finally, the mosaic data enhancement algorithm increases the probability that each image contains a small target by splicing four original images. This method helps the model to better detect and locate small targets, improves the model's detection performance for small targets, and enhances the model's adaptability in complex scenarios.

[0042] 6) Step 6 of the present invention: Mean average precision (mAP), recall rate (Recall) and frame rate (FPS) are commonly used target detection model evaluation indicators, which can intuitively reflect the detection accuracy, recall rate and reasoning speed of the model. Through these indicators, the performance of the improved model in the detection task can be clearly understood. Secondly, mAP and Recall mainly reflect the performance of the model in detection accuracy and recall rate, while FPS reflects the reasoning speed of the model. The comprehensive consideration of these three indicators can comprehensively evaluate the performance of the model, making the evaluation results more accurate and comprehensive. Finally, by comparing the performance of the model before and after the improvement on these evaluation indicators, the impact of the improvement on the model performance can be objectively evaluated. If the improved model is improved in mAP and Recall, and there is no obvious decrease in FPS, then it can be confirmed that the improvement is effective, and this objective evaluation can provide strong support for the creativity of the patent. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:

[0044] Figure 1 The figure is a flow chart of the defect detection and identification method of the present invention.

[0045] Figure 2 This is a model diagram for detecting multiple types of defects in distribution insulators.

[0046] FIG3(a) is a comparison of the neural network recognition effects obtained in the embodiment Figure 1 (Left: YOLOv5; Right: Improved YOLOv5);

[0047] FIG3(b) is a comparison of the neural network recognition effects obtained in the embodiment Figure 2 (Left: YOLOv5; Right: Improved YOLOv5);

[0048] FIG3( c ) is a comparison diagram of the neural network recognition effects obtained in the embodiment (left side: YOLOv5; right side: improved YOLOv5).

[0049] Figure 4(a) shows a typical insulator defect sample (breakage);

[0050] Figure 4(b) shows a typical insulator defect sample (pollution flashover).

[0051] Figure 5(a) shows the insulator image expansion method Figure 1 (Original image);

[0052] Figure 5(b) shows the insulator image expansion method Figure 1 (rotation);

[0053] Figure 5(c) shows the insulator image expansion method Figure 1 (translation);

[0054] Figure 5(d) shows the insulator image expansion method Figure 1 (Flip).

[0055] Figure 6 This is a structural comparison diagram between DRFEM and C3 modules.

[0056] Figure 7 This is the structure diagram of the Ghost-DRFEM module.

[0057] Figure 8 This is the Tri-Fusion structure diagram.

[0058] Fig. 9 This is the NE-Neck structure diagram.

[0059] Fig.10 This is the RGB color space model diagram.

[0060] Fig.11 This is a comparison chart of the loss function. DETAILED DESCRIPTION

[0061] like Figure 1 As shown in the figure, the detection and recognition method of multiple types of defects of distribution insulators performs image processing and image enhancement on the distribution insulator image; establishes a lightweight and feature enhancement network; constructs a backbone network for extracting small target defect features; constructs a new enhanced neck network (NE-Neck), and passes the features extracted by the backbone network into it; replaces the regression loss function GIoU-Loss with SIoU-Loss; trains the model to obtain the optimal model for target detection; uses the optimal model for target detection, outputs the target detection results, and evaluates the detection results. Specifically, it includes the following steps:

[0062] Step 1: Obtain photos of distribution insulators collected on site and downloaded from the public network, then perform data preprocessing on the distribution insulator images and labels, and establish a lightweight and feature enhancement network framework; first, the initial data was cleaned, and the insulator images with poor quality were removed, leaving only clear and recognizable valid images to obtain a distribution insulator defect dataset. The defects include three categories: self-explosion, breakage, and flashover. Then, traditional image processing was performed on the distribution insulator images, and the dataset was expanded using cropping, rotation, and translation to improve the generalization ability of the lightweight and feature enhancement network model.

[0063] Traditional image processing is performed on the distribution insulator image. First, the collected distribution insulator defect images are converted into RGB color space and HSI color space, and the components are extracted as required for grayscale transformation. Then, the image noise is analyzed and the local median filtering algorithm is proposed and applied to process the noise, and a distribution insulator defect map with more prominent defects is obtained.

[0064] (1) RGB color space:

[0065] RGB color space such as Fig.10 As shown in the figure, the principle is to use Cartesian coordinates to build a cube. The three primary colors R, G, and B correspond to three coordinate axes respectively, and gray levels are assigned along each coordinate axis. In this coordinate model, the origin represents black, and the vertices on the cube on the coordinate plane correspond to cyan, crimson, and yellow respectively. White is the point farthest from black, that is, the vertex farthest from the origin. All colors are normalized, that is, the values ​​of R, G, and B are taken on [0,1]. Various colors can be defined using vectors distributed at the origin. It can be seen that different colors are located inside or on the surface of the unit cube.

[0066] (2) HSI color space:

[0067] In order to segment the distribution insulator board image based on color and separate the feature area of ​​interest on a separate plane, a component of the HSI color space is used as a template image. Among them: the brightness represented by the I component is irrelevant to the color information of the distribution insulator board, and the hue represented by the H component and the saturation represented by the S component have a mathematical model with the way the human visual senses color. Therefore, the HIS color space can be used as the color feature of the human visual system to study image processing algorithms. The mathematical model for transferring the RGB color space to the HIS color space is as follows:

[0068]

[0069]

[0070] (3) Grayscale transformation:

[0071] Grayscale transformation method is an important method of spatial domain image enhancement. It can effectively improve the image quality of distribution insulators, enhance the image contrast, highlight more details of the target area and the inherent characteristics of distribution insulators, and remove unnecessary features from the image when used on distribution insulator images.

[0072] (4). Median filtering:

[0073] Median filtering can be expressed as follows:

[0074] g(x,y)=med{f(xw,yh),(w,h∈S)};

[0075] In the above formula: S is a two-dimensional template, i.e., the convolution kernel, with commonly used sizes of 3×3 and 5×5; f(xw,yh) represents the pixel grayscale value of the template window; f(x,y) and g(x,y) are the original image and the processed image respectively;

[0076] The original data is expanded by using mosaic data enhancement. Mosaic data enhancement uses four pictures to splice the four pictures. Each picture has its corresponding frame. After splicing the four pictures, we get a new picture and the frame corresponding to this picture. Then we pass such a new picture into the neural network for learning, which is equivalent to passing in four pictures for learning at once.

[0077] Step 2: Construct the backbone feature extraction network Ghost-CSPDarknet53 to extract distribution insulator defects: self-explosion, damage, and flashover. Use the designed dense residual feature enhancement module (DRFEM) to replace the cross-stage partial network (CSPNet) in the original convolutional neural network. Assume that the number of output channels of the first convolution normalized activation function (ConvBNSiLU, CBS) module is 2×c, followed by a channel split (Split) layer, which is divided into two parts, each containing feature maps of c channels, and the results of these two parts are stored in the list x. Next, there are n bottleneck modules in series, and the input of each bottleneck module is the last element in the list x, that is, the feature map containing c channels. At the same time, the output of each bottleneck module will be added to the list x as the input of the next bottleneck module. After n bottleneck modules, we will splice the elements in the list x according to the channel dimension to obtain a feature map of (2+n)×c dimensions. Finally, after the second convolution normalization activation function (ConvBNSiLU, CBS) module, the number of channels is compressed to c2 for output. Through this process, the serial bottleneck modules provide the model with feature information of different scales. This information is fused at different levels to comprehensively utilize their multi-scale information, thereby improving the representation ability of the feature map and the detection accuracy.

[0078] In order to obtain deep high-level semantic information while taking into account the running speed of the network, the bottleneck module in the dense residual feature enhancement module (DRFEM) is replaced by the ghost bottleneck module to obtain the ghost-dense residual feature enhancement module (Ghost-DRFEM).

[0079] Step 3: Construct a new enhanced neck network (NE-Neck). The channel concatenation (ConCat) layer of the original neck network only concatenates two levels of feature maps. This operation simply concatenates the feature maps processed by different layers according to the specified dimension, which has certain limitations in integrating feature information. Therefore, in order to obtain richer shallow detail information and deep semantic information in the insulator image, a three-scale fusion mechanism (Tri-Fusion) is introduced, that is, the channel concatenation (ConCat) layer concatenates the feature layers processed by more layers, and obtains richer feature information while the network parameters do not change much.

[0080] Step 4: Replace the original GIoU-Loss with the SIoU-Loss loss function. The GIoU loss function used by the original convolutional neural network in the regression loss calculation does not take into account the direction mismatch between the required real box and the predicted box. This deficiency will lead to slower convergence and lower efficiency. To solve this problem, the SIoU loss function replaces the GIoU loss function. SIoU introduces the angle measurement between the real box and the predicted box, and redefines the penalty index, which mainly includes three parts: angle loss, distance loss, and shape loss. The formula is as follows:

[0081] The SIoU loss function adds the ground-truth box B gt The angle perception between the center of the predicted box B reduces the additional variables related to the distance. The calculation formula is as follows:

[0082]

[0083] Where: Λ is the final angle result; σ represents the distance between the center point of the predicted box and the real box; C H is the height difference between the center point of the predicted box and the real box; B cx , B cy Indicates the center coordinates of the prediction box; represents the center coordinate of the real frame; σ dRepresents the distance between the center point of the predicted box and the real box; α represents the angle.

[0084] Considering the angle loss defined above, the distance loss △ needs to be redefined as follows:

[0085]

[0086] Among them, C h and C w is the minimum external frame length and width; ρ x Represents the square value of the difference between the width of the real box and the predicted box compared to the width of the minimum enclosing rectangle of the real box and the predicted box; ρ y It indicates that the difference between the height of the real box and the predicted box is greater than the square value of the height of the minimum enclosing rectangle of the real box and the predicted box; γ indicates the distance value given time priority; represents the normalized value; t represents x or y; x represents the horizontal coordinate; y represents the vertical coordinate.

[0087] When α approaches 0, the contribution of △ decreases; on the contrary, the closer α is to π / 4, the greater the contribution of △. Therefore, as the angle increases, γ is given a time-priority distance value, so when α approaches 0, the distance loss becomes normal; the final shape loss Ω is calculated as follows:

[0088]

[0089]

[0090] Among them, (w,h) and (w gt ,h gt ) are the width and height of the predicted box and the real box respectively; W w Indicates the ratio of the absolute value of the difference between the widths of the two frames to the maximum value; W h Indicates the ratio of the absolute value of the height difference between the two frames to the maximum value; max(w,w gt ) represents the maximum width of the predicted box and the real box; max(h,h gt ) The maximum value of the height of the predicted box and the real box; Ω represents the angle loss value; Represents the width of the normalized prediction box; Represents the height of the normalized prediction box.

[0091] θ is the attention coefficient, and the shape loss of different data sets is different and its value is unique; through experiments, its value is set to 5. The SIoU loss calculation formula is as follows:

[0092]

[0093] IOU indicates the degree of overlap between the true box and the predicted box.

[0094] Step 5: Train the lightweight and feature-enhanced network model: Divide the large-scale image dataset into training set, validation set, and test set at a ratio of 8:1:1 and input them into the lightweight and feature-enhanced network model for pre-training. A total of 300 rounds of training are conducted, and the pre-trained weights with the smallest training loss value are taken for transfer learning. The distribution insulator defect dataset and pre-trained weights are combined for training, and mosaic is used for data enhancement to improve the generalization ability of the YOLOv5 network model and obtain the optimal weights.

[0095] Step 6: Use the trained optimal weights to test and evaluate the detection results, and finally realize the automatic and intelligent identification of multiple defect categories of distribution insulators; the evaluation index is the mean average precision (mAP), which is the mean of the average precision (AP) of all categories, and the AP of each category is i It is the area enclosed by the curve of the precision (Precision, P) and the corresponding recall rate (Recall, R) of the i-th category in the range of 0-1. The calculation of mAP, recall rate and frames per second (FPS) are as follows.

[0096]

[0097]

[0098] Among them: AP represents the detection accuracy of a certain category; FN represents the number of samples that are incorrectly classified as negative samples; TP is the number of samples that are correctly classified as positive samples; FN is the number of samples that are incorrectly classified as negative samples; F n Represents the number of detected images; T represents the total time used to detect images.

[0099] Figure 2 This is a diagram of the multi-type defect detection model for distribution insulators. Figure 2 From the results, the present invention makes the following improvements based on the YOLOv5 algorithm model: 1) the DRFEM module is replaced by the C3 module; 2) the Ghost-DRFEM module is introduced into the backbone; 3) the three-scale fusion mechanism (Tri-Fusion) is introduced into the neck network; 4) the SIoU-Loss loss function replaces the original GIoU-Loss; the LFE-YOLOv5 model established according to the above improved method can effectively improve the detection accuracy and speed of the model.

[0100] Figure 3(a) to Figure 3(b) This is a neural network recognition effect diagram obtained in the embodiment. Figure 3(a) to Figure 3(b)The results show that YOLOv5 is greatly affected by environmental factors, resulting in false detections. When there are many small target defects in the insulator image, LFE-YOLOv5 does not miss detections when detecting flashover defects, and its detection accuracy is better than the original YOLOv5. Moreover, when facing the detection of multiple defect categories, YOLOv5 has the problem of inaccurate target positioning frame. The overall situation shows that the proposed LFE-YOLOv5 has achieved a good balance between detection accuracy and speed of multi-defect insulators. In practical applications, its missed detection and false detection rates are low, which can more effectively meet the requirements of actual detection.

[0101] Verification example:

[0102] In order to verify the effectiveness of the improved method proposed in the present invention, 8 groups of ablation experiments were carried out. The experimental results are shown in Table 1, where: √ indicates that the module is added.

[0103] Table 1 Ablation experiment of LFE-YOLOv5 network

[0104]

[0105] As shown in Table 1, in Experiment 2, the mAP increased by 2.5% by introducing the Tri-Fusion mechanism only in the path aggregation network, and the precision and recall rates also increased by 1.9% and 1.2% respectively, indicating that the multi-scale fusion of the feature layer of shallow detail information and the deep feature layer of high semantic information can greatly improve the detection accuracy of the network; in Experiment 3, the mAP increased by 2.5% by replacing only the C3 module of the original network with the DRFEM module, indicating that DRFEM can improve the recognition ability of small target defect features such as damage and flashover, and improve the detection effect; in Experiment 4, the Ghost module was introduced on the basis of DRFEM, and the model parameters were reduced by 30.3%, indicating that GhostNet has a lightweight effect and can effectively improve the detection speed of the model; in Experiment 5, the GIoU loss function was replaced by SIoU, and the mAP increased by 2.8%, indicating that SIoU can effectively solve the problem of unbalanced training samples in model bounding box regression. By adopting these methods simultaneously, the detection performance of LFE-YOLOv5 has been further improved. Compared with the original YOLOv5 network, its average precision (mAP) has been improved by 3.3% and the recall rate has been improved by 3.4%. At the same time, the number of model parameters has been reduced by 12.9%, and the detection speed has also been greatly improved. The above data show that the model in this paper has stronger feature extraction capabilities and multi-scale fusion performance, and has better detection performance in the detection of multiple types of defects in insulators.

[0106] The SIoU loss function adopted by the present invention is compared with the original GIoU loss function to verify the effectiveness of the SIoU loss function in improving the model detection performance. The experimental results are shown in Table 2.

[0107] Table 2 Results of different loss functions

[0108]

[0109] As shown in Table 2, the accuracy (P) and mAP of the GIoU loss function are 91.9% and 89.1% respectively, while the accuracy (P) and mAP of the SIoU loss function proposed in this paper reach 92.8% and 90.3%, an increase of 0.9% and 1.2%. The mAP curves under different loss function training are shown in Figure 2. Fig.11 As shown in the figure, the training accuracy of SIoU loss function is higher than GIoU. The reason is that the preset mechanism of anchor box leads to low matching degree and poor quality of target frame, and high-quality anchor box is relatively scarce. Therefore, the above problem is alleviated by adding angle loss for weighting. When the IoU value is large, the matching degree between anchor box and target is high, and the weighted value of angle loss is also large, and vice versa. Therefore, SIoU loss function can highlight the contribution of high-quality anchor box, suppress the influence of low-quality anchor box, and effectively solve the problem of imbalanced model training samples.

Claims

1. A method for detecting and identifying multiple types of defects in distribution insulators, characterized in that The following steps are involved: Step 1: Obtain distribution insulator images, perform data preprocessing on distribution insulator images and labels, and establish a lightweight and feature enhancement network; Step 2: Construct a backbone feature extraction network to extract distribution insulator defects; Step 3: construct an enhanced neck network and pass the distribution insulator defect features extracted by the trunk feature extraction network into it; Step 4: Introduce the three-scale fusion mechanism, pass the fused features into the lightweight and feature enhancement network for classification prediction, and replace the regression loss function GIoU-Loss with SIoU-Loss loss function; Step 5: Train the lightweight and feature enhancement network to obtain the optimal weights; Step 6: Use the trained optimal weights to conduct tests and evaluate the test results to achieve multi-defect category recognition of distribution insulators.

2. The method for detecting and identifying multiple types of defects in distribution insulators according to claim 1 is characterized in that: In step 1, data preprocessing is specifically as follows: The insulator images of distribution stations are collected and sorted to obtain a distribution insulator defect image dataset. The defects include breakage and flashover. Then the insulator images are processed and the dataset is expanded using flipping, translation and rotation methods.

3. The method for detecting and identifying multiple types of defects in distribution insulators according to claim 2 is characterized in that: In step 1, the lightweight and feature enhancement network structure includes: a backbone network, a neck fusion network and a detection head. The backbone network is used to extract the features of the distribution insulator in the image; the neck fusion network uses a top-down and bottom-up connection method to fuse the multi-scale feature layers; and finally, it is sent to the detection head for loss calculation and defect prediction.

4. The method for detecting and identifying multiple types of defects in distribution insulators according to claim 1, characterized in that: In step 2, the construction of the backbone feature extraction network includes the following steps: S2.1: Design a dense residual feature enhancement module DRFEM to replace the cross-stage partial network CSPNet in the original convolutional neural network. Assume that the number of output channels of the first convolution normalization activation function module CBS is 2×c, followed by a channel segmentation layer to divide it into two parts, each containing feature maps of c channels, and store the results of these two parts in the list x; next, there are n bottleneck modules in series, and the input of each bottleneck module is the last element in the list x, that is, the feature map containing c channels; at the same time, the output of each bottleneck module will be added to the list x as the input of the next bottleneck module; after passing through n bottleneck modules, the elements in the list x are spliced ​​according to the channel dimension to obtain a feature map of (2+n)×c dimension; finally, after the second convolution normalization activation function (ConvBNSiLU, CBS) module, the number of channels is compressed to c2 for output; S2.2: Replace the bottleneck module in the dense residual feature enhancement module DRFEM with the phantom bottleneck module to obtain the phantom dense residual feature enhancement module Ghost-DRFEM.

5. The method for detecting and identifying multiple types of defects in distribution insulators according to claim 1 is characterized in that: In step 3, the enhanced neck network structure is as follows: The three-scale fusion mechanism Tri-Fusion is introduced, that is, the channel splicing ConCat layer is used to perform channel splicing on the feature layer processed by more layers; the enhanced neck network NE-Neck structure introduces the three-scale fusion mechanism Tri-Fusion to replace the channel splicing ConCat layer, and the channel splicing ConCat layer is used to perform channel splicing on the feature layer processed by more layers, so as to obtain richer feature information while the network parameters do not change much; The output feature map of the three-scale fusion mechanism Tri-Fusion network consists of three parts: shallow feature map, intermediate feature map and deep feature map; the shallow feature map comes from the feature layer extracted from the Darknet53 backbone network, but its receptive field is small and the resolution is high, so the convolution with a convolution kernel size of 3 and a step size of 2 is used to reduce the size of the feature map and further extract the characteristics of insulator defects; the intermediate feature map also comes from the feature layer extracted from the Darknet53 backbone network, but it has more redundant information, so the convolution with a convolution kernel size of 1 and a step size of 1 is used to compress the number of channels and filter key information; the deep feature map is rich in semantic information and low in resolution, but lacks detail information, while the shallow feature map has a strong ability to represent detail information, but its ability to represent semantic information is weak, so the channel splicing ConCat layer structure of the feature fusion part is changed from the original two-layer feature map to three layers.

6. The method for detecting and identifying multiple types of defects in distribution insulators according to claim 1, characterized in that: In step 4, the SIoU-Loss loss function considers the vector angle between the centers of the predicted box and the real box on the basis of the GIoU loss function, which makes the predicted box move to the nearest coordinate axis quickly and then return to a single coordinate; The SIoU-Loss loss function calculation formula is as follows: IOU represents the degree of overlap between the real box and the predicted box; Ω represents the angle loss value; △ represents the distance loss.

7. The method for detecting and identifying multiple types of defects in distribution insulators according to claim 1, characterized in that: In step 5, the lightweight and feature enhanced network model is trained as follows: The distribution insulator defect image dataset is divided into training set, validation set and test set according to the ratio of 8:1:1, and input into the lightweight and feature enhancement network model for pre-training. A total of 300 rounds of training are carried out, and the pre-training weights with the smallest training loss value are taken for transfer learning; the distribution insulator defect dataset and the pre-training weights are combined for training, and mosaic is used for data enhancement to improve the generalization ability of the network model and obtain the optimal weights.

8. The method for detecting and identifying multiple types of defects in distribution insulators according to claim 7, characterized in that: Mosaic data enhancement includes the following steps: A1: Randomly select the coordinates of the image stitching reference point (x c ,y c ), and four pictures were randomly selected; A2: The four images are resized and scaled according to the reference points and placed at the upper left, upper right, lower left, and lower right positions of the large image of the specified size; A3: According to the size transformation method of each image, the mapping relationship is mapped to the image label; A4: According to the specified horizontal and vertical coordinates, the large image is stitched together and the coordinates of the detection frame that exceed the boundary are processed.

9. The method for detecting and identifying multiple types of defects in distribution insulators according to claim 1, characterized in that: In step 6, the evaluation indicators include: average precision mA, recall rate R and frame number FPS; the calculation is as follows; Among them: AP represents the detection accuracy of a certain category; FN represents the number of samples that are incorrectly classified as negative samples; TP is the number of samples that are correctly classified as positive samples; FN is the number of samples that are incorrectly classified as negative samples; F n Represents the number of detected images; T represents the total time used to detect images.

Citation Information

Patent Citations

  • PCB defect detection and identification method based on YOLO-SEE

    CN117372339A

Cited By

  • Insulator defect identification method

    CN119169489A