Power transformation equipment typical defect generation method
The BN-CBAM improved backbone network and feature fusion module enhance the detection accuracy of substation equipment defects, addressing the inefficiencies of traditional inspection methods and improving the reliability of substation maintenance.
Patent Information
- Application Number
- CN202411333678.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2024-12-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing substation equipment inspection methods are inadequate for efficient and reliable detection of defects, which can lead to equipment failures and power accidents.
A method involving a defect detection network model with a BN-CBAM improved backbone network and feature fusion module, utilizing batch normalization, channel and spatial attention layers, and multi-scale feature fusion to accurately predict defect areas and types in substation equipment images.
Enhances the detection accuracy of small objects and improves the convergence speed of the neural network, effectively identifying defects such as insulator rupture, suspended objects, and metal corrosion with high confidence.
Smart Images

Figure CN119180991A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power system equipment defect generation, and in particular to a method for generating typical defects of substation equipment. Background Art
[0002] Substations are an important link between the main power grid and the distribution network, and are the central hub of the smart grid. As the power grid continues to expand, the number of equipment in substations continues to increase, the importance of equipment maintenance and inspection tasks is increasing, and the challenges are becoming increasingly severe, requiring great attention and vigilance. Common equipment defects in substations include metal corrosion, meter damage, transformer oil leakage, ground oil pollution, respirator damage, insulator rupture, floating debris, bird nests, etc. During routine inspections of electrical equipment in substations, any abnormal operating conditions or equipment defects, if not discovered in time, may lead to equipment failures and even power accidents of varying degrees.
[0003] At present, the inspection of substation equipment mainly relies on routine inspections by inspectors. However, in the rapidly developing power industry, traditional detection methods can no longer meet the requirements of substation operation, maintenance and safety control. The shift to intelligent operation and maintenance inspection is increasingly seen as an important trend in the advancement of substations and broader fields.
[0004] With the continuous development of artificial intelligence technologies such as computer vision and deep learning, intelligent detection of substation faults has become a research hotspot. The current research focus is to use these advanced technologies to achieve automated and efficient fault detection and diagnosis of substation equipment, thereby improving the safety and reliability of equipment. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a method for generating typical defects of substation equipment.
[0006] To solve the above problems, the technical solution adopted by the present invention is:
[0007] A method for generating typical defects of power transformation equipment, the method comprising:
[0008] Acquire images of substation equipment;
[0009] A defect detection network model is constructed and trained to obtain a trained substation typical target defect detection model; the substation typical target defect detection model includes: a BN-CBAM improved backbone network and a feature fusion module, the BN-CBAM improved backbone network includes five BN-CBAM modules connected in sequence, each BN-CBAM module includes: a first batch normalization layer, a channel attention layer, a second batch normalization layer and a spatial attention layer; the feature map output by each BN-CBAM module is input into the feature fusion module to generate a new feature map;
[0010] The image of the substation equipment is input into the trained substation defect target detection model to predict the defect area and defect type in the substation equipment image.
[0011] As an implementation mode of the invention, after the feature map is input into the BN-CBAM module, the batch normalization layer acts on the input feature map to obtain a first feature; the first feature is input into the channel attention layer to obtain a second feature; the second feature is input into the second batch layer to obtain a third feature; the third feature is input into the spatial attention layer to obtain a fourth feature.
[0012] As an embodiment of the invention, the method of inputting the first feature into the channel attention layer to obtain the second feature includes:
[0013] The first feature is input into the channel attention layer. The channel attention first compresses the feature map in the spatial dimension and then performs a series of operations, which mainly include an average pooling layer and a maximum pooling layer, respectively obtaining the features of the average pooling module and the features of the maximum pooling module; then, these features are fused through a multi-layer perceptron and element-by-element summation, and then the channel attention features are obtained through a sigmoid activation function;
[0014] The attention feature is element-wise multiplied by the first feature to obtain the second feature.
[0015] As an implementation mode of the invention, the method of inputting the third feature into the spatial attention layer to obtain the fourth feature includes:
[0016] The third feature is passed through an average pooling layer and a maximum pooling layer to obtain the features of the output average pooling module and the features of the maximum pooling module respectively;
[0017] The two features are fused by cascade operation, and then the spatial features are obtained by passing through a convolution layer with a convolution kernel of 7×7 and a sigmoid activation function;
[0018] The fourth feature is obtained by performing element-by-element multiplication of the spatial feature and the third feature.
[0019] As an implementation mode of the invention, during the training process, a classification submodule is used to predict the probability of defect existence, and a bounding box regression submodule calculates the offset of each box to its nearby true value.
[0020] As an embodiment of the invention, the classification submodule includes 5 convolutional layers and a sigmoid activation function located after the 5 convolutional layers. The convolution kernel sizes of the first 4 convolutional layers are 3×3, the number of channels is 256, and a RelU activation function is added after each convolutional layer. The convolution kernel size of the last convolutional layer is 1×1, and the number of channels is k.
[0021] As an implementation mode of the invention, the first four convolution layers of the bounding box regression submodule have a convolution kernel size of 3×3 and a channel number of 256, and the last convolution layer contains two branches; a RelU activation function is added after each of the first four convolution layers;
[0022] The two branches of the last convolutional layer are the regression branch and the Center-ness branch. The regression branch uses four convolutional layers with a convolution kernel size of 1×1 to calculate the four deviations between the predicted bounding box and the true value; the Center-ness branch uses a convolutional layer with a convolution kernel of 1×1 and the number of output channels is 1.
[0023] As an implementation method of the invention, during the training process, the classification submodule introduces Focal loss, the regression branch adopts Smooth L1 loss, and the Center-ness branch adopts Binary Cross-entropy (BCE) loss. The three loss functions are defined as follows:
[0024] Focal Loss(y i )=α t (1-y i ) γ log(y i );
[0025]
[0026]
[0027] Among them, y i is the predicted value, γ is a value greater than 0, α t is a decimal between [0,1], γ and α t They are all fixed values and do not participate in training. is the true value, Among them, γ = 2, α t =0.25.
[0028] As an implementation mode of the invention, the generation method of the trained typical target defect detection model of the substation includes:
[0029] Construct a data set, obtain multiple images of substation equipment with defects, and mark the defect location and defect type on each image to construct a training set;
[0030] The defect detection network model is trained using the data set to obtain the typical target defect detection model of the substation.
[0031] The beneficial effects of adopting the above technical solution are:
[0032] (1) We designed a convolutional block attention module (BN-CBAM) with improved batch normalization layer. This module is improved on the basis of the convolutional block attention module. By adding a batch normalization layer after the input feature map and the channel attention output feature map, the influence of different channels on the feature map is strengthened. In addition, the distribution of network input is ensured to be the same, which accelerates the convergence speed of the neural network. The backbone network incorporating BN-CBAM assigns different weights to features from the channel dimension, highlighting the contribution of different channel features, thereby improving the network's feature extraction capability.
[0033] (2) A multi-scale feature fusion module is designed. This module cascades feature maps of multiple scales at one time, so that the new feature map can simultaneously obtain the spatial information and semantic information of small objects, thereby improving the detection accuracy of small objects.
[0034] (3) The multi-branch detection module is used to suppress low-quality bounding boxes and improve the detection performance of the network. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a structural diagram of a typical target defect detection model.
[0036] Figure 2 It is a structural diagram of a BN-CBAM module.
[0037] Figure 3 It is a structural diagram of different feature pyramid modules and feature fusion modules.
[0038] Figure 4 It is a structural diagram of the classification submodule and regression branch.
[0039] Figure 5 This is a schematic diagram of sample expansion.
[0040] Figure 6 Loss curves for different detection networks.
[0041] Figure 7Detection results of different methods on a simple insulator dataset.
[0042] Figure 8 These are the detection results of different methods on the insulator dataset with complex background.
[0043] Fig. 9 These are the detection results of different methods on the suspended tower hanging dataset with simple background.
[0044] Fig.10 These are the detection results of different methods on the suspended object tower hanging dataset with complex background.
[0045] Fig.11 These are the detection results of different methods on the bird’s nest dataset.
[0046] Fig.12 These are the detection results of different methods on the metal corrosion dataset.
[0047] Fig.13 It is the PR curve of DDNet and FCOS on four datasets.
[0048] Fig.14 is the sample expansion result.
[0049] Fig.15 It is a comparison chart of loss curves of different CBAMs.
[0050] Fig.16 These are the detection results of DDNet for smaller targets on different datasets. DETAILED DESCRIPTION
[0051] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention is clearly and completely described below in conjunction with specific embodiments.
[0052] An embodiment of the present invention provides a method for generating typical defects of a power transformation device, the method comprising:
[0053] Step 1: Obtain images of substation equipment;
[0054] Step 2: Build and train a defect detection network model to obtain a trained substation typical target defect detection model; Figure 1 As shown, the substation typical target defect detection model includes: a BN-CBAM improved backbone network and a feature fusion module. The BN-CBAM improved backbone network includes five BN-CBAM modules connected in sequence, such as Figure 2As shown, each BN-CBAM module includes: a first batch normalization layer, a channel attention layer, a second batch normalization layer and a spatial attention layer; the feature map output by each of the BN-CBAM modules is input into the feature fusion module to generate a new feature map.
[0055] (I) BN-CBAM module
[0056] Specifically, for any BN-CBAM module, after the feature map is input into the BN-CBAM module, the batch normalization layer acts on the input feature map to obtain the first feature; the first feature is input into the channel attention layer to obtain the second feature; the second feature is input into the second batch layer to obtain the third feature; the third feature is input into the spatial attention layer to obtain the fourth feature.
[0057] That is, the input feature Figure X , sequentially passes through the batch normalization layer of BN-CBAM, the channel attention layer batch normalization layer and the spatial attention layer, and the final output is X". The overall process can be summarized as follows:
[0058] X"=F BNCB (X);
[0059] In the formula,
[0060] The above process is as follows:
[0061] The batch normalization layer acts on the input feature map, and the first feature can be expressed as: X BN =F BN (X).
[0062] The method of inputting the first feature into the channel attention layer to obtain the second feature includes:
[0063] Step S201: The first feature X BN Input to the channel attention layer, the channel attention first compresses the feature map in the spatial dimension and then performs a series of operations, which mainly include the average pooling layer and the maximum pooling layer, respectively obtaining the features of the average pooling module And the maximum pooling module After that, these features are fused through a multi-layer perceptron and element-wise summation, and then the channel attention features are obtained through a sigmoid activation function.
[0064] Step S202: The attention feature X CA With the first feature XBN The second feature X′ is obtained by element-by-element multiplication. This process is expressed as:
[0065]
[0066] In the formula, In addition, σ represents the sigmoid activation function.
[0067] The second feature X′ is input into the batch normalization layer to obtain the third feature X′ BN , followed by a spatial attention operation.
[0068] The method of inputting the third feature into the spatial attention layer to obtain the fourth feature includes:
[0069] Step S203: the third feature X′ BN After the average pooling layer and the maximum pooling layer, the features X of the output average pooling module are obtained respectively. avg_spatial ∈ H×W×1 And the feature X of the maximum pooling module max_spatial ∈ H×W×1 ;
[0070] Step S204: The two features are fused by cascading operation, and then the convolution layer with a convolution kernel of 7×7 and a sigmoid activation function are used to obtain the spatial feature X SA ∈ H×W×1 ;
[0071] Step S205: convert the spatial feature X SA With the third feature X′ BN The fourth feature X″ is obtained by element-by-element multiplication. This process is expressed as:
[0072]
[0073] After obtaining the feature maps output by each of the BN-CBAM modules, all feature maps are input into the feature fusion module to generate new feature maps.
[0074] (II) Feature Fusion Module
[0075] Figure 3Shown are different feature pyramid modules and feature fusion modules, which detect targets of different scales through feature layers of different levels. (a) Mainly inspired by the Faster R-CNN model, a single level of feature layer is used to complete the prediction. (b) Inspired by SSD, different levels of feature layers are used to directly complete the detection of targets of different sizes. The most common model is shown in Figure (c), where the new feature is fused by the higher-level feature and the corresponding left feature. However, for detecting small target objects, if the information of the small target is lost in the deeper network layer, then its semantic information will also be lost at the same time. The goal of the present invention is to enhance the acquisition of shallower information to assist in the detection of small targets.
[0076] Therefore, the feature fusion module in this step of the present invention is designed for small target detection, such as Figure 1 and Figure 3 As shown in (d), C1, C2, C3, C4 and C5 are feature maps obtained by the backbone network improved by BN-CBAM, and C1 and C2 are omitted in the figure. Next, new five-level feature maps are generated by the three layers of features C3, C4 and C5, namely P3, P4, P5, P6 and P7. Among them, the P3-level feature is fused by C3, C4 and C5. This level of feature can extract rich semantic information and spatial information to detect smaller objects. C3, C4 and C5 are cascaded, and a batch normalization layer is added at the end to ensure that the feature maps have the same distribution.
[0077] P4 is obtained by applying depthwise separable convolution to P3 and 1×1 convolution to C4. The kernel of depthwise separable convolution is 3×3 and the stride is 2. Similarly, P4 and C5 work together to obtain P5. In addition, P6 and P7 are obtained by applying depthwise separable convolution with kernel 3×3 and stride 2 to P5 and P6 respectively. Compared with ordinary convolutional networks, depthwise separable convolution has fewer parameters and improves the training speed of the network.
[0078] Furthermore, during the training process, the present invention uses a classification submodule to predict the probability of defect existence, and a bounding box regression submodule to calculate the offset of each box to its nearby true value.
[0079] like Figure 4 As shown in the figure, the classification submodule includes 5 convolutional layers and a sigmoid activation function after the 5 convolutional layers. The convolution kernel size of the first 4 convolutional layers is 3×3, the number of channels is 256, and a ReLU activation function is added after each convolutional layer. The convolution kernel of the last convolutional layer is 1×1, and the number of channels is k. The classification submodule is set after feature layers of different levels at the same time to predict the probability of defects of different scales.
[0080] The bounding box regression submodule includes the first four convolutional layers with a convolution kernel size of 3×3 and a channel number of 256, and the last convolutional layer including two branches; a RelU activation function is added after each of the first four convolutional layers.
[0081] The two branches of the last convolutional layer are regression branch and Center-ness branch. The regression branch uses 4 convolutional layers with a convolution kernel size of 1×1 to calculate the 4 deviations between the predicted bounding box and the true value. The Center-ness branch aims to suppress low-quality bounding boxes, which are generally predicted by locations far away from the center of the object. The Center-ness branch uses a convolutional layer with a convolution kernel of 1×1 and an output channel of 1.
[0082] In addition, the classification submodule introduces Focal loss, the regression branch uses Smooth L1 loss, and the Center-ness branch uses Binary Cross-entropy (BCE) loss. The three loss functions are defined as follows:
[0083] Focal Loss(y i )=α t (1-y i ) γ log(y i );
[0084]
[0085] Among them, y i is the predicted value, γ is a value greater than 0, αt is a decimal between [0,1]. Both γ and αt are fixed values and do not participate in training. is the true value, Among them, γ = 2, α t =0.25.
[0086] Furthermore, in the present invention, considering that the problem faced by power component defect detection is that samples are scarce and it is difficult to train neural networks, the present invention simulates different environments to achieve sample expansion and enrich the diversity of training samples. The generation method of the trained substation typical target defect detection model includes:
[0087] Step S206: construct a data set, obtain multiple images of substation equipment with defects (i.e., defect images), and mark the defect location and defect type on each image to construct a training set;
[0088] There are four types of defects, namely insulators, suspended objects, bird nests and metal corrosion. Figure 5As shown in the figure, for any defect type, the corresponding data set is obtained in the following way:
[0089] (1) Obtain an image containing the defect type and segment it to obtain a defect image.
[0090] For example: Figure 5 Taking an insulator as an example, the upper left side is an image containing an insulator, and the right side of the image is the target segment image obtained by segmentation. Segmentation means removing the background of the image containing the defect type, and the target segment image obtained only contains the defect type. In addition, the acquisition method in this step can be aerial photography, and the segmentation can be performed manually.
[0091] (2) An original background image is obtained by photographing with a drone, and the original background image is cropped and scaled to obtain a target background image. The original background image is an image containing multiple power components, and the target background image is an image containing only one power component.
[0092] Power components can be poles, conductors, hardware, or other components, such as Figure 5 As shown, the image on the left side of the lower middle is the original background image, and the right side of the image is the target background image.
[0093] (3) The resolutions of the background image and the target fragment image are unified and then fused to obtain a new synthesized image.
[0094] (4) Filtering: In order to better simulate the natural environment, the newly synthesized image is filtered using a 3×3 mean filter. The mean filter uses the average value of the pixels around a certain pixel to smooth the noise. The mean filter can be expressed as:
[0095]
[0096] Where g(x,y) and f(s,t) represent the pixel values before and after filtering respectively.
[0097] (5) Smoothing: Gaussian noise with a mean of 0 and a variance of 0.01 is added to the filtered image to form a smooth transition from the edge of the target segment to the background.
[0098] In addition, the method also includes: HSV transformation: In addition to the above methods, in order to better simulate different weather environments, HSV transformation is used for sample expansion. HSV transformation can be expressed as:
[0099] F HSV =F H +αF S +βF V ;
[0100] Among them, F H 、FS and F V Represents hue, saturation and brightness respectively. α and β are the weights of saturation and brightness respectively. In actual operation, the image is first converted from RGB color space to HSV color space and then α and β are modified to simulate different lighting conditions and image saturation. Finally, the adjusted image is converted from HSV color space to RGB color space. In the experiment, the adjustment range of α and β is set to [0.2,1.2].
[0101] The strategy for sample expansion of power component defects is different from that of wires. Power component defects are very sensitive to image clarity. Gaussian blur is used to simulate images taken with an inaccurately focused camera. The specific operation is to apply a z×z Gaussian kernel with a variance of d to the original image, set z to 3 or 5, and set d to the range of [0.01, 0.03].
[0102] In addition, angle transformation is used to simulate different shooting angles. Data expansion in this way helps to enhance the robustness of the training model. Angle transformation includes mirror transformation, rotation of 90°, rotation of 180°, and rotation of 270°.
[0103] After using the above method to expand the samples, the insulator dataset has a total of 550 images and contains three categories, namely insulator_ceram, insulator_glass and defect, of which there are 480 images containing defect, 300 images containing insulator_ceram, and 260 images containing insulator_glass; the suspended object dataset has a total of 373 images, marked as yw_gkxfw; the Bird's Nest dataset has a total of 743 images, marked as yw_nc; the metal corrosion dataset has a total of 1499 images, marked as isxs.
[0104] Step S207: Use the data set to train the defect detection network model to obtain the substation typical target defect detection model.
[0105] After the model is built, the training set is input into the defect detection network model for training, and the model is adjusted and optimized to obtain a trained substation typical target defect detection model. In order to avoid the impact of inter-class sample imbalance on defect detection performance, four data sets are trained separately in the experiment.
[0106] All training and testing work in the present invention is carried out on NVIDIA Tesla V100. The network initialization parameters during the training process are shown in Table 1.
[0107] Table 1 Network initialization parameters
[0108]
[0109] The evaluation indicators of target detection include accuracy, average accuracy (AP), mean average precision (mAP), recall, F1, IoU, etc.
[0110] By setting different thresholds, we get a series of accuracy and recall rates. We connect multiple sets of data together to form a PR curve. The integral area under the PR curve represents the average accuracy. Each category generates an average accuracy, and the average of all categories is the average accuracy. IoU is used to describe the overlap between the predicted result and the true value. When the difference between the predicted result and the manually labeled true value is very small, it means that the bounding box predicted by the algorithm is accurate.
[0111] Furthermore, in order to verify the effectiveness of the present invention, the present invention (DD Net) is compared with FoveaBox, FSAF and FCOS. FoveaBox is inspired by the fovea structure of the human eye. It predicts the bounding box of the valid position while predicting the possible center position of the target. The FoveaBox network is implemented by a backbone network and two sub-networks. The backbone network completes feature extraction. The first sub-network classifies each pixel on the output of the backbone network; the second sub-network performs bounding box prediction at the corresponding position. The FSAF network designs an online feature selection mechanism, and on the basis of Anchor-based, introduces Anchor-free branches and performs joint training. FCOS adopts a first-order full convolution detection method to regress the bounding box of each position in the feature map corresponding to the original image. In addition, Centerness is used to reduce the weight of the bounding box far away from the center of the object, thereby improving the detection accuracy.
[0112] In the experiment, all four methods use ResNet-101 as the backbone network. The training results of the four methods are as follows: Figure 6 As shown in the figure, it can be seen that DDNet converges the fastest compared to other methods. In addition, due to the promotion of the Center-ness sub-branch, FCOS also converges very quickly, but after 10,000 steps, FCOS converges slower than DDNet. FSAF converges in the middle, FoveaBox converges the slowest, and there is a disturbance at 80,000 steps.
[0113] Further, Figure 7Represents the detection results of different detection methods on the insulator dataset with a simple background. The characteristics of the insulator image in the figure are that the insulator is quite different from the surrounding background. In addition, there are fewer insulators, and the color and shape are clearer in the image. It can be seen that for the first row of insulator images in the figure, the four methods can effectively detect insulators and defects, and accurately mark the position of the bounding box. In the second row of images, because the color of the glass insulator is very similar to the color of the background sky, Foveabox has repeated detections and does not locate the location of the defects. In the third row of images, the size of the insulator accounts for a large proportion of the image, and only FSAF has repeated detections. Other methods accurately detect insulators and defects. DDNet always detects insulators and small-sized defects with high confidence in simple background insulator images.
[0114] Figure 8 The figure shows the detection results of different detection methods on the insulator dataset with complex background. Although there is only one insulator in the first row of images, its color is very close to the surrounding towers, which increases the difficulty of detection. It can be seen from the figure that there is a relatively large deviation in the positioning of the Foveabox bounding box, and the bounding box position detected by DDNet is the most accurate and has a high confidence level. There are more insulators in the second and third rows of images and their distribution is more concentrated, which makes Foveabox, FSAF and FCOS all have inaccurate detection. Among them, Foveabox did not locate the defect in the second row of images. The DDNet method improves the detection accuracy of smaller-scale targets through multi-scale feature fusion, so that the position of the defect can still be accurately located when the background is complex and the defect is small.
[0115] Fig. 9 The figure shows the detection results of different detection methods on the suspended object hanging dataset with a simple background. The background of the detected image in the figure is relatively simple. The suspended objects in the first row of images are yellow and more obvious against the blue sky background. The suspended objects in the second row of images are on the wires, and their shapes are different from the straight wires, which are also more obvious. The third row of images are white suspended objects, which are similar in color to the surrounding poles and towers. The target is less obvious than the first two rows of images. It can be seen from the figure that the four methods can accurately locate the basic position of the target, but the bounding box output by Foveabox in the first row of images is small and does not completely contain the target. The bounding box obtained by FSAF is larger and includes part of the background area. The other two methods accurately mark the bounding box with a high confidence. DDNet outputs a high confidence while accurately marking the bounding box, because DDNet uses BN-CBAM for feature extraction, which effectively extracts rich spatial information and semantic information, thereby enhancing the performance of target detection.
[0116] Fig.10The figure shows the detection results of different methods on the suspended objects dataset with complex background. Fig. 9 Compared with the increased detection difficulty, the suspended objects in the first row of images are smaller in size and not obvious in the background. Although the suspended objects in the second row of images are larger in size, their colors are similar to the background, and it is not easy to distinguish the boundaries. The suspended objects in the third row of images are not obvious in the image and almost blend into the background. From the detection results, it can be seen that FSAF has missed detections and multiple misjudgments, Foveabox has repeated detection problems, and DDNet always accurately locates suspended objects with a high degree of confidence.
[0117] Fig.11 Represents the detection results of different detection methods on the bird nest dataset. Bird nest images are relatively simple compared to other datasets, because most images of bird nests are relatively clear and are quite different from the surrounding environment, making them relatively easy to distinguish. The four methods can effectively locate bird nests when the distribution area of the bird nests is large and the difference from the surrounding environment is obvious, such as the second and fourth rows of images. The scale of the bird nests in the first row of images is very small, resulting in repeated detection by Foveabox. When the distribution of bird nests in the third row of images is not uniform, FoveaBox and FSAF fail to accurately locate the bird nests. DDNet can effectively locate bird nests of different scales and shapes with high confidence in all cases.
[0118] Fig.12 Represents the detection results of different detection methods on the metal rust dataset. The morphology of metal rust in the image has no fixed pattern, and occasionally small scales appear. As can be seen from the figure, FoveaBox has repeated detections in the second row of images. FSAF missed the smaller area of rust in the upper left corner of the third row of images. The FCOS method has good overall detection performance, but repeated detections occurred in the second row of images and missed detections occurred in the third row of images. Compared with the first three methods, DDNet has more accurate detection results and higher confidence when the detection position is accurate. Therefore, it can be seen that the BN-CBAM module used by DDNet can effectively extract features, thereby improving the detection accuracy.
[0119] Table 2 shows the quantitative comparison results of different methods on four datasets. The detection difficulty of suspended objects and bird nests is relatively small, and the detection performance of the four methods on these two datasets is relatively small. For the two datasets of insulators and metal corrosion, the average accuracy of FoveaBox and FSAF is relatively low. FCOS uses the Center-ness branch to reduce redundant bounding boxes and obtain a higher average accuracy. DDNet further adopts the BN-CBAM module and the multi-scale feature fusion module based on the Center-ness branch, which promotes the extraction and fusion of semantic information and spatial information of small targets, thereby improving the accuracy of defect detection.
[0120] Table 2 Object detection accuracy of different methods on four datasets
[0121]
[0122] In order to further compare the performance of FCOS and DDNet, this experiment compares the PR curves of DDNet and FCOS. Fig.13 The PR curves of FCOS and DDNet on the insulator, suspended object hanging, bird's nest and metal corrosion datasets are shown, where the insulator is the average of three categories: insulator_ceram, insulator_glass and defect. From the PR curve, it can be seen that the detection performance of the two methods for insulators and metal corrosion is weaker than that of suspended object hanging and bird's nest. Because there are many types of insulators and their shapes are different, it is difficult to distinguish them from the surrounding background environment, which makes detection more difficult. The difficulty of metal corrosion lies in the irregular shape, which makes it difficult to accurately locate. The background in the suspended object hanging and bird's nest datasets is mostly near the wire. The background is simpler than that of insulators and metal rust, and the detection accuracy is improved. In addition, the detection performance of DDNet in the four datasets is better than that of FCOS, indicating that DDNet uses the BN-CBAM module and the multi-scale feature fusion module to effectively extract and fuse the low-resolution deep features and high-resolution shallow features required for small target detection, thereby improving the detection performance.
[0123] Of course, in the present invention, a performance analysis of a typical target defect detection network based on multi-scale feature fusion is also performed.
[0124] (1) Impact of dataset enhancement on experiments
[0125] Taking the insulator image as an example, the data enhancement results are as follows Fig.14 As shown in the figure, (a), (b), (c) and (d) are obtained by mirroring and angle transformation; (e) and (f) are obtained by Gaussian blur; (g) and (h) are obtained by HSV transformation; (i), (j), (k) and (l) are obtained by weighted fusion of target fragment and background.
[0126] Table 3 shows the impact of different sample expansion methods on the insulator defect detection performance. It can be seen from the table that all expansion methods have promoted the detection performance to a certain extent. In addition, the target fragment and background fusion method is more helpful in improving the detection accuracy than other methods, because this method can effectively simulate various complex natural environments. In addition, the combination of the four methods makes the average accuracy rate reach the highest. Therefore, it can be seen that the use of the above expansion methods to enhance the sample is conducive to preventing network overfitting and improving the accuracy of detection.
[0127] Table 3 Effect of different sample expansion methods on insulator defect detection performance
[0128]
[0129] (2) Impact of BN-CBAM and feature fusion module on detection performance
[0130] Table 4 shows the detection performance of the network on the insulator dataset when using different modules. The insulator dataset is more complex and more difficult to detect than other categories of datasets, which can better reflect the role of each module.
[0131] Table 4 Effect of BN-CBAM and feature fusion module on detection performance of insulator dataset
[0132]
[0133] This experiment uses ResNet-50 and ResNet-101 as the backbone network. When ResNet101 is used as the backbone network, it can be seen from the table that compared with FPN, the feature fusion module designed by the present invention improves the average accuracy by 2.9%. When ResNet-50 is used as the backbone network, the feature fusion module improves the average accuracy by 1.5%. In addition, when ResNet-50 and ResNet-101 are used as the backbone networks, adding the BN-CBAM module will improve the detection performance.
[0134] In order to further verify the impact of the BN-CBAM module on network convergence, Fig.15 The loss curves of DDNet using the BN-CBAM module and the CMAB module are shown. It can be seen that compared with CBAM, the use of BN-CBAM makes the loss curve converge faster. In the end, the network loss value of the BN-CBAM module is about 0.11, which is slightly lower than the network loss value of the CBAM module.
[0135] (3) Detection performance of small targets in complex environments
[0136] Fig.16The results of DDNet's detection of small-sized targets in different data sets are shown. The first to fourth rows are insulators, suspended objects, bird nests, and metal rust, respectively. It can be seen from the figure that DDNet can still detect targets with high quality when the background is very complex and the target size is small. This shows that the BN-CBAM module and feature fusion module proposed in this chapter effectively realize feature extraction and complete multi-scale feature fusion, thereby promoting the overall improvement of detection performance.
[0137] Step three: input the image of the substation equipment into the trained substation defect target detection model to predict the defect area and defect type in the substation equipment image.
[0138] Specifically, the image of the substation equipment to be identified is input into the trained substation defect target detection model, and the defect area and defect type of the substation equipment image can be predicted.
[0139] The present invention provides a method for generating typical defects of power transformation equipment, which has the following beneficial effects:
[0140] (1) We designed a convolutional block attention module (BN-CBAM) with improved batch normalization layer. This module is improved on the basis of the convolutional block attention module. By adding a batch normalization layer after the input feature map and the channel attention output feature map, the influence of different channels on the feature map is strengthened. In addition, the distribution of network input is ensured to be the same, which accelerates the convergence speed of the neural network. The backbone network incorporating BN-CBAM assigns different weights to features from the channel dimension, highlighting the contribution of different channel features, thereby improving the network's feature extraction capability.
[0141] (2) A multi-scale feature fusion module is designed. This module cascades feature maps of multiple scales at one time, so that the new feature map can simultaneously obtain the spatial information and semantic information of small objects, thereby improving the detection accuracy of small objects.
[0142] (3) The multi-branch detection module is used to suppress low-quality bounding boxes and improve the detection performance of the network.
[0143] (4) Experiments show that this method has achieved a high detection accuracy in the data generated by four typical defects: insulator breakage, suspended object hanging, bird's nest, and metal corrosion.
Claims
1. A method for generating typical defects of substation equipment, characterized in that: The method comprises: Acquire images of substation equipment; A defect detection network model is constructed and trained to obtain a trained substation typical target defect detection model; the defect detection network model includes: a BN-CBAM improved backbone network and a feature fusion module, the BN-CBAM improved backbone network includes five BN-CBAM modules connected in sequence, each BN-CBAM module includes: a first batch normalization layer, a channel attention layer, a second batch normalization layer and a spatial attention layer; the feature map output by each BN-CBAM module is input into the feature fusion module to generate a new feature map; The image of the substation equipment is input into the trained substation defect target detection model to predict the defect area and defect type in the substation equipment image.
2. A method for generating typical defects of substation equipment according to claim 1, characterized in that: After the feature map is input into the BN-CBAM module, the batch normalization layer acts on the input feature map to obtain the first feature; the first feature is input into the channel attention layer to obtain the second feature; the second feature is input into the second batch layer to obtain the third feature; the third feature is input into the spatial attention layer to obtain the fourth feature.
3. A method for generating typical defects of substation equipment according to claim 2, characterized in that: The method of inputting the first feature into the channel attention layer to obtain the second feature includes: The first feature is input into the channel attention layer, which first compresses the feature map in the spatial dimension using the average pooling layer and the maximum pooling layer to obtain the features of the average pooling module and the features of the maximum pooling module respectively; then, these features are fused through a multi-layer perceptron and element-by-element summation, and then the channel attention features are obtained through a sigmoid activation function; The attention feature is element-wise multiplied by the first feature to obtain the second feature.
4. A method for generating typical defects of substation equipment according to claim 2, characterized in that: The method of inputting the third feature into the spatial attention layer to obtain the fourth feature includes: The third feature is passed through an average pooling layer and a maximum pooling layer to obtain the features of the output average pooling module and the features of the maximum pooling module respectively; The two features are fused by cascade operation, and then the spatial features are obtained by passing through a convolution layer with a convolution kernel of 7×7 and a sigmoid activation function; The fourth feature is obtained by performing element-by-element multiplication of the spatial feature and the third feature.
5. A method for generating typical defects of power transformation equipment according to claim 1, characterized in that: During the training process, the classification submodule is used to predict the probability of defect existence, and the bounding box regression submodule calculates the offset of each box to its nearby true value.
6. A method for generating typical defects of substation equipment according to claim 5, characterized in that: The classification submodule includes 5 convolutional layers and a sigmoid activation function after the 5 convolutional layers. The convolution kernel sizes of the first 4 convolutional layers are all 3×3, the number of channels is 256, and a RelU activation function is added after each convolutional layer. The convolution kernel of the last convolutional layer is 1×1, and the number of channels is k.
7. A method for generating typical defects of substation equipment according to claim 5, characterized in that: The first four convolution layers of the bounding box regression submodule have a convolution kernel size of 3×3 and a channel number of 256, and the last convolution layer contains two branches; each of the first four convolution layers is followed by a RelU activation function; The two branches of the last convolutional layer are the regression branch and the Center-ness branch. The regression branch uses four convolutional layers with a convolution kernel size of 1×1 to calculate the four deviations between the predicted bounding box and the true value; the Center-ness branch uses a convolutional layer with a convolution kernel of 1×1 and the number of output channels is 1.
8. A method for generating typical defects of power transformation equipment according to claim 5, characterized in that: During the training process, the classification submodule introduces Focal loss, the regression branch uses Smooth L1 loss, and the Center-ness branch uses Binary Cross-entropy loss. The three loss functions are defined as follows: Focal Loss(and i )=a t (1-and i ) γ log(y i ); Among them, y i is the predicted value, γ is a value greater than 0, α t is a decimal between [0, 1], γ and α t They are all fixed values and do not participate in training. is the true value, Among them, γ = 2, α t =0.
25.
9. A method for generating typical defects of power transformation equipment according to claim 1, characterized in that: The trained substation typical target defect detection model is generated by: Construct a data set, obtain multiple images of substation equipment with defects, and mark the defect location and defect type on each image to construct a training set; The defect detection network model is trained using the data set to obtain the typical target defect detection model of the substation.
