Substation power equipment defect detection method, medium and system

By improving the YOLOv8s network model, combining the frequency domain feature fusion module and the composite coordinate attention module, the problem of low identification accuracy in the detection of power equipment in substations is solved, and higher detection accuracy and robustness are achieved, and adapting to changeable conditions is achieved. Environmental testing requirements.

CN119295901APending Publication Date: 2025-01-10STATE GRID HUNAN ELECTRIC POWER COMPANY LIMITED +2
View PDF 0 Cites 3 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The prior art has problems in the detection of defects of substation power equipment, such as low recognition accuracy, susceptible to image noise interference, poor robustness, and difficulty in adapting to variable environments, resulting in insufficient detection efficiency and reliability.

Method used

Adopting the improved YOLOv8s network model, by designing the frequency domain feature fusion module in front of the backbone network, introducing a composite coordinate attention module, and introducing DFLoss in the bounding box regression loss strategy, avoiding overfitting and improving the feature extraction of power equipment defects by the model and detection capabilities.

Benefits of technology

The accuracy of defect detection of substation power equipment is significantly improved, missed detection and missed detection situations are reduced, and the robustness and efficiency of detection is improved. Compared with the baseline model, the average accuracy rate is increased by 3.2%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119295901A_ABST
    Figure CN119295901A_ABST
Patent Text Reader

Abstract

The invention discloses a substation power equipment defect detection method, medium and system, and the method comprises the steps: S1, obtaining an image of substation power equipment, and marking defects in the image to obtain a defect picture data set; s2, constructing an improved YOLOv8s network model: constructing an improved YOLOv8s backbone network, a YOLOv8s neck network and a YOLOv8s decoupling detection head, and constructing the improved YOLOv8s network model; s3, training and testing the improved YOLOv8s network model constructed in the step S2 through the electrical equipment defect picture data set in the step S1 to obtain an electrical equipment defect detection model; and S4, inputting the substation equipment picture into the electrical equipment defect detection model to obtain a substation electrical equipment defect detection result. The method has the advantages of high detection precision and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention mainly relates to the technical field of power equipment detection, and in particular to a method, medium and system for detecting defects in power equipment in a substation. Background Art

[0002] In modern society, power equipment is the cornerstone supporting the operation of all walks of life, providing the necessary energy for our lives, driving the development of industrial production, and ensuring the normal operation of various fields such as transportation, communications, medical care, and education. Power equipment is crucial to industrial production. Various production equipment, machinery, and tools require electricity to drive, and its reliability and stability are directly related to production efficiency and product quality. If the fault of the substation is not discovered and handled in time, it will lead to production interruption, equipment damage, product quality decline, and other problems, which will cause more serious economic losses. Therefore, it is very important to identify the defects of the substation.

[0003] At present, the defect inspection methods of power equipment are mainly divided into traditional manual inspection and intelligent equipment inspection. The traditional manual inspection method is mainly for engineering and technical personnel to regularly visually inspect, measure, test and record the power equipment to find potential faults and defects. For example, check whether the appearance of the power equipment is obviously damaged or corroded, measure the temperature, current and voltage of the equipment, and perform insulation test and grounding test. At the same time, preventive maintenance and overhaul will be carried out according to the use and historical data of the equipment. However, there are some limitations of traditional manual inspection, including the following aspects: first, manual inspection requires a lot of time and manpower costs, especially for large power equipment and equipment-intensive places; second, manual inspection may not be able to detect minor faults and potential problems in time, resulting in missed faults; in addition, manual inspection also has problems of subjective judgment and experience dependence, which may affect the accuracy and reliability of detection. These problems may lead to undesirable consequences such as missed detection of equipment failures, increased safety risks, economic losses and reduced efficiency.

[0004] With the rapid development of artificial intelligence technology in recent years, the use of artificial intelligence algorithms for substation inspection has gradually become popular. This method effectively makes up for the shortcomings of traditional manual inspections and improves the efficiency, accuracy and reliability of detection. Although the current algorithm has achieved certain results, it is single-scene oriented, easily affected by image noise, has poor robustness, and is difficult to adapt to changing environments. Therefore, the existing technology requires a target detection algorithm with high recognition accuracy to handle power equipment defect detection. Summary of the invention

[0005] In view of the technical problems existing in the prior art, the present invention provides a method, medium and system for detecting defects of power equipment in a substation with high recognition accuracy.

[0006] In order to solve the above technical problems, the technical solution proposed by the present invention is:

[0007] A method for detecting defects in power equipment in a substation, comprising the steps of:

[0008] S1. Obtain images of power equipment in a substation, and then annotate the defects in the images of the power equipment to obtain a dataset of power equipment defect images with annotations and labels;

[0009] S2. Build an improved YOLOv8s network model: Build an improved YOLOv8s backbone network, a YOLOv8s neck network, and a YOLOv8s decoupling detection head, and then build an improved YOLOv8s network model based on the improved YOLOv8s backbone network, the YOLOv8s neck network, and the YOLOv8s decoupling detection head;

[0010] S3, training and testing the improved YOLOv8s network model constructed in step S2 using the power equipment defect image dataset in step S1 to obtain a power equipment defect detection model;

[0011] S4. Input the substation equipment image into the power equipment defect detection model to obtain the substation power equipment defect detection result.

[0012] Preferably, in step S1, the power equipment defects include one or more of substation defects, metal corrosion, loose strands, foreign matter, oil leakage, silicone discoloration, case damage and dial damage.

[0013] Preferably, in step S1, the defects in the power equipment image are annotated by LabelImg software to obtain labels, and the training set, validation set and test set are divided according to the ratio of 7:2:1, and finally a substation power equipment defect detection data set is constructed.

[0014] Preferably, in step S2, the specific process of constructing the improved YOLOv8s backbone network is:

[0015] Construct CSPDarknet, then modify CSPDarknet and design a frequency domain feature fusion module in front of CSPDarknet to extract and fuse the texture features of power equipment defects;

[0016] A composite coordinate attention module is added before each C2F module in CSPDarknet to enhance the model's feature extraction capability for substation equipment defects.

[0017] Preferably, in step S2, the specific process of constructing the YOLOv8s neck network is:

[0018] Based on the feature pyramid network structure, the PAFPN structure is used to further optimize the fusion and transfer process of features. In the fusion process between different layers, the nearest neighbor interpolation algorithm is used for upsampling, and the upsampled feature maps are spliced ​​with the feature maps from the lower layers. The C3 module is used to further process the features, including the residual structure to maintain the gradient flow and enhance the feature expression.

[0019] By constructing a neck network, the three different scale features obtained by improving the YOLOv8s backbone network are fused and the fused features are output.

[0020] Preferably, in step S2, the specific process of constructing the YOLOv8s decoupling detection head is:

[0021] The three scale feature maps generated are sent to three detection heads respectively. Each detection head consists of two branches, namely the regression branch and the classification branch. The two branches do not share parameters, and both extract information through two 3×3 convolutions and one 1×1 convolution.

[0022] Preferably, in step S2, it also includes constructing an improved bounding box regression loss strategy: introducing DFLoss to increase the robustness of the network training process, setting a termination training strategy, and terminating the training in advance when DFLoss converges to avoid overfitting.

[0023] Preferably, the specific process of step S3 is:

[0024] S3.1. Use the training set in step S1 to train the improved YOLOv8s network model: resize the images in the training set to 640×640 when input, input them into the improved YOLOv8s backbone network, and output feature maps of three different scales, namely 20×20, 40×40, and 80×80; send the feature maps of the three scales into the neck network to perform feature fusion between different layers; finally, send the fused new feature map into the detection head for category and border prediction;

[0025] S3.2. Network parameter update and candidate box adjustment: During the training process, the corresponding candidate boxes are adjusted, the overall network loss is calculated based on the network output feature map, the adjusted candidate boxes, and the corresponding true boxes, and the YOLOv8s network parameters are updated based on the overall network loss; the validation set loss is calculated on the validation set through the improved YOLOv8s network after parameter update, and the fitting status of the YOLOv8s network is verified based on the validation loss;

[0026] S3.3. Repeat the above steps S3.1-S3.2 until the loss obtained in step S3.2 converges to obtain a trained power equipment defect detection model.

[0027] The present invention also discloses a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described above are executed.

[0028] The present invention further discloses a substation power equipment defect detection system, comprising a memory and a processor connected to each other, wherein a computer program is stored in the memory, and when the computer program is run by the processor, the steps of the method described above are executed.

[0029] Compared with the prior art, the advantages of the present invention are:

[0030] The present invention designs a frequency domain feature fusion module before the YOLOv8 backbone network to extract and fuse the texture features of power equipment defects; introduces a composite coordinate attention module into the YOLOv8 backbone network to enhance the model's feature extraction capability for substation equipment defects; improves DFLoss to terminate training in advance when the network converges, effectively avoiding the occurrence of overfitting, improving the accuracy of substation defect detection, and reducing the occurrence of missed detection and false detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 Schematic diagram of eight defects of the power equipment in the present invention; (a) foreign matter; (b) damaged case; (c) broken strands; (d) metal corrosion; (e) oil leakage; (f) damaged dial; (g) damaged case; (h) discoloration of silicone.

[0032] Figure 2 This is the improved YOLOv8s network model architecture diagram in the present invention.

[0033] Figure 3 These are the detection effect diagrams of each model in the present invention; (a) is the substation defect detection diagram; (b) is the metal corrosion detection diagram.

[0034] Figure 4 The present invention is a flowchart of a method for detecting defects in power equipment in a substation according to an embodiment of the present invention. DETAILED DESCRIPTION

[0035] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments.

[0036] like Figure 4 As shown, the embodiment of the present invention provides a substation power equipment defect detection method based on improved YOLOv8s to solve the problems of wide defect distribution, diverse defect appearance features and difficulty in feature extraction in substation defect detection tasks. The specific steps are as follows:

[0037] S1. Construct a dataset of power equipment defects with annotations and labels: collect defect images of substation equipment, annotate them with LabelImg software to obtain labels, and divide them into training set, validation set and test set in a ratio of 7:2:1 to construct a dataset of power equipment defects detection in substations; the eight types of defects are one or more of substation defects, metal corrosion, broken strands, foreign matter, oil leakage, silicone discoloration, case damage and dial damage, such as Figure 1 As shown;

[0038] S2. Build and improve the YOLOv8s network model:

[0039] S2.1. Build an improved YOLOv8s backbone network. Build CSPDarknet, then modify CSPDarknet, and design a frequency domain feature fusion module (FDFFM) before CSPDarknet. The structure of FDFFM is shown in the figure below. Figure 2 As shown in Figure 2, the texture features of power equipment defects are extracted and fused; a composite coordinate attention module (CCAM) is added before each C2F module in CSPDarknet. The structure of CCAM is as follows: Figure 2 As shown, the model’s feature extraction capability for substation equipment defects is enhanced, thus improving network performance.

[0040] S2.2. Construct the YOLOv8s neck network. Based on the feature pyramid network structure, the PAFPN structure is used to further optimize the feature fusion and transfer process. In the fusion process between different layers, the nearest neighbor interpolation algorithm is used for upsampling, and the upsampled feature map is spliced ​​with the feature map from the lower layer; and the C3 module is used to further process the features, including the residual structure to maintain the gradient flow and enhance the feature expression; by constructing the neck network, the three different scale features obtained in S2.1 are fused and the fused features are output.

[0041] S2.3, build a YOLOv8s decoupled detection head. The three scale feature maps generated after step S2.2 are sent to three detection heads respectively. Each detection head consists of two branches, namely the regression branch and the classification branch. The two branches do not share parameters, and both extract information through two 3×3 convolutions and one 1×1 convolution.

[0042] S2.4, build an improved YOLOv8s network model architecture. Based on the YOLOv8s network model, the improved YOLOv5s backbone network obtained in step S2.1, the neck network obtained in step S2.2, and the detection head obtained in step S2.3 are used to build a complete network model.

[0043] S2.5. Construct an improved bounding box regression loss strategy. Introduce DFLoss to increase the robustness of the network training process. Set a termination training strategy to terminate the training in advance when DFLoss converges to avoid overfitting and improve the accuracy of substation defect detection.

[0044] S3. Training and improving YOLOv8s network model:

[0045] S3.1. Use the training set to train the improved YOLOv8s model. Resize the images in the training set to 640×640 when input, input them into the backbone network of the improved YOLOv8s, and output feature maps of three different scales: 20×20, 40×40, and 80×80. Send the feature maps of the three scales into the neck network to perform feature fusion between different layers. Finally, send the fused new feature maps into the detection head for category and bounding box prediction.

[0046] S3.2. Network parameter update and candidate box adjustment. During the training process, the model adjusts the corresponding candidate boxes, calculates the overall network loss based on the network output feature map, the adjusted candidate boxes, and the corresponding true boxes, and updates the YOLOv8s network parameters based on the overall network loss. The validation set loss is calculated on the validation set through the improved YOLOv8s network after parameter update, and the fitting status of the YOLOv8s network is verified based on the validation loss.

[0047] S3.3 Repeat the above steps S3.1-S3.2 until the loss obtained in step S3.2 converges to obtain the trained improved YOLOv8s network model.

[0048] S4. Test the effect of the improved YOLOv8s network model on the power equipment defect test set: load the optimal YOLOv8 weight model after training, perform batch prediction on the data set, and obtain the Box and category confidence of the image on the test set. Compare the improved YOLOv8s network model with other target detection algorithms on the constructed data set to test the overall performance of the present invention.

[0049] The present invention designs a frequency domain feature fusion module before the YOLOv8 backbone network to extract and fuse the texture features of power equipment defects; introduces a composite coordinate attention module into the YOLOv8 backbone network to enhance the model's feature extraction capability for substation equipment defects; improves DFLoss to terminate training in advance when the network converges, effectively avoiding the occurrence of overfitting, improving the accuracy of substation defect detection, and reducing the occurrence of missed detection and false detection.

[0050] The present invention selects 8 typical substation defect types as experimental objects. Compared with the baseline model, the mean average precision (mAP) is improved by 3.2%, which can effectively improve the detection effect of substation defects and provide favorable conditions for the intelligent monitoring of unmanned substations.

[0051] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0052] The method for detecting defects in power equipment in a substation according to an embodiment of the present invention specifically comprises the following steps:

[0053] S1. Prepare dataset.

[0054] Prepare image data and label data: First, collect eight types of defects in the substation, including substation defects, metal corrosion, loose strands, foreign matter, oil leakage, silicone discoloration, case damage, dial damage, etc. Figure 1 As shown in the figure, the eight types of defects in the collected images were annotated using LabelImg labeling software. After the labeling was completed, the training set, validation set, and test set were divided according to the ratio of 7:2:1 to construct a power equipment defect dataset.

[0055] S2. Build and improve the YOLOv8s network model:

[0056] S2.1. Build an improved YOLOv8s backbone network. Build a cross-stage partial network darknet (CSPDarknet), and then modify CSPDarknet. Most of the defects of substation power equipment have texture features, among which the texture features of metal corrosion are particularly obvious, and the existing algorithms are not very ideal for the detection of metal corrosion, which makes the detection of metal corrosion a huge challenge. Metal rust has a discrete distribution form and a large intra-class gap, resulting in poor network recognition effect.

[0057] To this end, a frequency domain feature fusion module (FDFFM) is first designed in front of CSPDarknet to fuse the frequency domain texture features and convolution features of defects. The module is divided into two branches. One branch extracts local spatial information and consists of two convolution modules. The convolution module contains a 2D convolution, layer normalization and activation function. The other branch uses Fourier transform to extract frequency domain features. First, the input image is Fourier transformed, and then the real and imaginary parts of the Fourier transformed image are fused in the channel dimension to generate a new feature map. The feature map is then passed to two convolution blocks for frequency domain feature extraction. After the feature extraction, it is divided into two parts in the channel dimension as the real part and the imaginary part, and the inverse Fourier transform is performed to obtain the frequency domain features.

[0058] Finally, the convolution local features obtained by the first branch and the frequency domain global features obtained by the second branch are fused again in the channel dimension. The network structure is shown in the figure Figure 2 As shown in the FDFFM module, this module can improve the network's ability to extract texture features.

[0059] Then, the composite coordinate attention module (CCAM) is introduced before the convolutional fusion module (C2F module) of the backbone network to obtain complete global context feature information and defect basic features. Figure 2 As shown in the CCAM module, by effectively modeling the global context, long-distance dependencies are formed, and feature information is transmitted between long-distance locations, the detection accuracy of the model is improved.

[0060] Average pooling in the x- and y-directions is used to obtain attention weights, and global context features are obtained by fusing the attention weights in the x- and y-directions. A three-level bottleneck layer structure is adopted, and convolution layers and normalization layers are added within the bottleneck transformation for feature conversion to form the fusion feature part, thereby reducing the complexity of convolution and improving the efficiency of convolution operations.

[0061] Finally, the feature decoupling operation is performed, and the spilt operation is used to divide the attention into two branches. Finally, the feature information is extracted through the convolution layer and activated by the Sigmoid function.

[0062] S2.2, build the YOLOv8s neck network. Based on the feature pyramid network structure, the path aggregation feature pyramid network (PAFPN) is used to further optimize the feature fusion and transfer process. In the fusion process between different layers, the nearest neighbor interpolation algorithm is used for upsampling, and the upsampled feature map is spliced ​​with the feature map from the lower layer. And the cross-stage partial bottleneck module (C3 module) is used to further process the features, which uses the residual structure to maintain the gradient flow and enhance the feature expression. By constructing the neck network, the three different scale features obtained in step S2.1 are fused and the fused features are output.

[0063] S2.3. Construct a YOLOv8s decoupled detection head. The three scale feature maps fused in step S2.2 are sent to three detection heads respectively. Each detection head consists of two branches, namely the regression branch and the classification branch. The two branches do not share parameters, and both extract information through two 3×3 convolution modules and one 1×1 convolution module. Among them, the 3×3 convolution module includes 3×3 convolution, batch normalization and SiLU activation function, and the 1×1 convolution module includes 1×1 convolution, batch normalization and SiLU activation function.

[0064] S2.4, build an improved YOLOv8s network model architecture. Based on the YOLOv8s network model, the improved YOLOv5s backbone network obtained in step S2.1, the neck network obtained in step S2.2, and the detection head obtained in step S2.3 are used to build a complete network model.

[0065] S2.5. Construct an improved bounding box regression loss strategy. Introduce the distance focus loss function (DFLoss) to increase the robustness of the network training process. Set a termination training strategy to terminate the training in advance when DFLoss converges to avoid overfitting and improve the accuracy of substation defect detection.

[0066] S3. Training and improving YOLOv8s network model:

[0067] S3.1. Use the training set to train the improved YOLOv8s model. Resize the images in the training set to 640×640 when inputting, input them into the backbone network of the improved YOLOv8s, and output feature maps of 20×20, 40×40, and 80×80. Send the feature maps of the three scales into the neck network to perform feature fusion between different layers. Finally, send the fused new feature map to the detection head for category and border prediction.

[0068] S3.2. Network parameter update and candidate box adjustment. During the training process, a candidate box is generated for each pixel on the feature map, and then the corresponding candidate box is adjusted according to the loss function, and the YOLOv8s network parameters are updated according to the network's regression loss, category loss, and confidence loss. The validation set loss is calculated on the validation set by the improved YOLOv8s network after parameter update, and the fitting status of the YOLOv8s network is verified based on the validation loss.

[0069] S3.3. Repeat the above steps S3.1-S3.2 until the loss obtained in step S3.2 converges, the model training is terminated, and the trained improved YOLOv8s network model is obtained.

[0070] S4. Test the effect of the improved YOLOv8s network model on the substation power equipment defect test set: load the optimal YOLOv8 weight model after training, perform batch prediction on the data set, and obtain the border and category confidence of the image on the test set. Compare the improved YOLOv8s network model with other target detection algorithms on the constructed data set to test the overall performance of the present invention. The test results are as follows: Figure 3 shown.

[0071] Experimental Description

[0072] Evaluation indicators of model performance: In order to verify the performance of the model, the AP50 and mean average precision (mAP) indicators of each category are used for evaluation.

[0073] The calculation formula of mAP is:

[0074]

[0075]

[0076] Where P represents precision, R represents recall, AP represents the average precision under different recall rates in this category, TP represents true positives predicted by the model as positive examples and predicted correctly, FP represents false positives predicted by the model as positive examples but predicted incorrectly, TN represents true negatives predicted by the model as negative examples and predicted correctly, FN represents false negatives predicted by the model as negative examples but predicted incorrectly, and N represents the number of categories, N=8.

[0077] The performance comparison with advanced detection algorithms is shown in Table 1:

[0078] Table 1 Performance comparison with advanced detection algorithms

[0079]

[0080] It can be seen from Table 1 that:

[0081] (1) YOLOV8 is a single-stage target detection model with an average precision mAP of 66.3% and an FPS of 75 frames per second. It has the best balance between average precision and FPS among the comparison models and is the baseline model selected by the invention. FCOS is a single-stage anchor-free target detection model with an average precision mAP of 64.9% and an FPS of 94 frames per second. Compared with other models, its detection efficiency is low and its real-time performance cannot be guaranteed. The average precision mAP of YOLOV6 is 65.3% and its FPS is 84s frames per second, and its detection effect is not ideal. The average precision mAP of YOLOV5 is 64.8% and its FPS is 82 frames per second, making it the model with the worst detection efficiency in the comparison test. Compared with other detection models, the average precision mAP of the method of the present invention is 68.8% and its FPS is 67.9 frames per second, which is significantly better than YOLOV8 and other commonly used target detection algorithms.

[0082] (2) For the problem of substation defects. Due to the unclear defect characteristics and defect range, and the lack of important global context information, the average accuracy is low. The detection accuracy of the present invention on this research problem is 1.2% higher than that of the baseline model, achieving the highest accuracy of the comparison model. Figure 3As shown in (a), YOLOV5, FCOS and YOLOV6 all have missed detections; YOLOV8 has inaccurate positioning, while the algorithm of the present invention is Figure 3 The difficult image in (a) is accurately detected.

[0083] (3) Regarding the problem of damaged dial shell. Since damaged dials are generally in the form of cracks or fragments, lacking global information, resulting in a low average accuracy rate. YOLOV8, as a single-stage model without anchor frames, is an advanced algorithm used in the field of general target detection, and has achieved the highest accuracy rate among the comparison models. The algorithm of the present invention balances speed and accuracy in this research problem, and has achieved a higher accuracy rate at a faster detection speed, which is 3.7% higher than the baseline model. The damaged dial shell defect is relatively simple, and good detection results have been achieved in the comparison methods.

[0084] (4) Regarding the problem of broken dials. Since broken dials usually occur on the glass of the instrument panel, broken dials threaten the service life of the instrument to a great extent, making it difficult to detect. The detection accuracy of the algorithm of the present invention on this research problem is 1.1% lower than that of the baseline model. Although it is slightly lower in terms of indicators, it still achieves the highest recall rate of the comparison model. In the compared baseline models, YOLOV5, FCOS and YOLOV6 all have false detection phenomena. To address this problem, the method of the present invention proposes a frequency domain feature fusion module (FDFFM), which enables the network to better pay attention to the broken glass texture.

[0085] (5) Metal corrosion. Metal corrosion is difficult to detect because its target is small, its detection features are simple, and its environment is complex. The detection accuracy of the present invention on this problem is 2.8% higher than that of the baseline model. Figure 3 As shown in (b), multiple models have achieved high accuracy for severe corrosion problems, but there is still a problem that slight corrosion is difficult to detect. YOLOV5, FCOS, YOLOV6 and YOLOV8 all have missed detections, among which FCOS has missed detections. The present invention correctly detects two appearance defects in the same substation, indicating that the present invention is more accurate in capturing the characteristics of instrument defects, verifying the effectiveness of the method of the present invention, and its detection efficiency is relatively high.

[0086] In order to verify the contribution of each module in the present invention to the whole, the present invention makes adjustments on the baseline model respectively, conducts ablation experiments by comparing the frequency domain feature fusion module (FDFFM), composite coordinate attention module (CCAM) and loss function three improved parts, conducts experimental tests on the detection accuracy of different categories of targets, and evaluates the effectiveness of each improved part. The experimental results are shown in Table 2.

[0087] Table 2 Ablation experiment

[0088]

[0089] As can be seen from Table 2, due to the large number of fault types in the data set, and the existence of defects that are difficult to detect, such as substation defects and metal corrosion, the mAP50 of the baseline model YOLOv8 on eight types of faults is 66.3%, and the mAP50-95 is 40.8; after adding the designed frequency domain feature fusion module (FDFFM) to the baseline model, the mAP50 increases to 66.9%, and the mAP50-95 increases to 41.1%, indicating that the frequency domain feature fusion module designed in the present invention can extract the texture features of substation defects, but its effect is limited, so the overall accuracy is only increased by 0.3%; On this basis, after adding the designed composite coordinate attention module (CCAM), mAP50 increased to 67.4%, and mAP50-95 increased to 41.6%. This module helped the model increase its accuracy by 0.5%, indicating that the model is effective and can improve the model's ability to extract detailed features. On this basis, the improved loss function was finally introduced, and mAP50 increased again to 68.8%, and mAP50-95 increased to 42.5%. The model performance was significantly improved, indicating that this module can effectively improve overfitting, and the model effect is better than the frequency domain feature fusion module and the composite coordinate attention module.

[0090] The present invention also discloses a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are executed. The present invention further discloses a substation power equipment defect detection system, including a memory and a processor connected to each other, on which a computer program is stored, and when the computer program is executed by the processor, the steps of the above method are executed. The medium and system of the present invention correspond to the above detection method and also have the advantages of the above method.

[0091] The present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by hardware related to computer program instructions. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned method embodiment when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. Computer-readable storage media include: any entity or device that can carry computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. The memory is used to store computer programs and / or modules, and the processor implements various functions by running or executing computer programs and / or modules stored in the memory, and calling data stored in the memory. The memory may include high-speed random access memory and may also include non-volatile memory, such as a hard disk, an internal memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0092] The above are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should be regarded as the protection scope of the present invention.

Claims

1. A method for detecting defects in power equipment in a substation, characterized in that: Includes steps: S1. Obtain images of power equipment in a substation, and then annotate the defects in the images of the power equipment to obtain a dataset of power equipment defect images with annotations and labels; S2. Build an improved YOLOv8s network model: Build an improved YOLOv8s backbone network, a YOLOv8s neck network, and a YOLOv8s decoupling detection head, and then build an improved YOLOv8s network model based on the improved YOLOv8s backbone network, the YOLOv8s neck network, and the YOLOv8s decoupling detection head; S3, training and testing the improved YOLOv8s network model constructed in step S2 using the power equipment defect image dataset in step S1 to obtain a power equipment defect detection model; S4. Input the substation equipment image into the power equipment defect detection model to obtain the substation power equipment defect detection result.

2. The method for detecting defects in power equipment in a substation according to claim 1, characterized in that: In step S1, the power equipment defects include one or more of substation defects, metal corrosion, loose strands, foreign matter, oil leakage, silicone discoloration, case damage, and dial damage.

3. The method for detecting defects in power equipment in a substation according to claim 2, characterized in that: In step S1, the defects in the power equipment images are annotated with LabelImg software to obtain labels, and the training set, validation set, and test set are divided according to the ratio of 7:2:1 to finally construct a substation power equipment defect detection dataset.

4. The method for detecting defects in power equipment in a substation according to claim 1, 2 or 3, characterized in that: In step S2, the specific process of constructing the improved YOLOv8s backbone network is: Construct CSPDarknet, then modify CSPDarknet and design a frequency domain feature fusion module in front of CSPDarknet to extract and fuse the texture features of power equipment defects; A composite coordinate attention module is added before each C2F module in CSPDarknet to enhance the model's feature extraction capability for substation equipment defects.

5. The method for detecting defects in power equipment in a substation according to claim 4, characterized in that: In step S2, the specific process of building the YOLOv8s neck network is: Based on the feature pyramid network structure, the PAFPN structure is used to further optimize the fusion and transfer process of features. In the fusion process between different layers, the nearest neighbor interpolation algorithm is used for upsampling, and the upsampled feature maps are spliced ​​with the feature maps from the lower layers. The C3 module is used to further process the features, including the residual structure to maintain the gradient flow and enhance the feature expression. By constructing a neck network, the three different scale features obtained by improving the YOLOv8s backbone network are fused and the fused features are output.

6. The method for detecting defects in power equipment in a substation according to claim 5, characterized in that: In step S2, the specific process of constructing the YOLOv8s decoupling detection head is: The three scale feature maps generated are sent to three detection heads respectively. Each detection head consists of two branches, namely the regression branch and the classification branch. The two branches do not share parameters, and both extract information through two 3×3 convolutions and one 1×1 convolution.

7. The method for detecting defects in power equipment in a substation according to claim 6, characterized in that: In step S2, an improved bounding box regression loss strategy is also constructed: DFLoss is introduced to increase the robustness of the network training process, and a termination training strategy is set to terminate the training in advance when DFLoss converges to avoid overfitting.

8. The method for detecting defects in power equipment in a substation according to claim 1, 2 or 3, characterized in that: The specific process of step S3 is: S3.

1. Use the training set in step S1 to train the improved YOLOv8s network model: resize the images in the training set to 640×640 when input, input them into the improved YOLOv8s backbone network, and output feature maps of three different scales, namely 20×20, 40×40, and 80×80; send the feature maps of the three scales into the neck network to perform feature fusion between different layers; finally, send the fused new feature map into the detection head for category and border prediction; S3.

2. Network parameter update and candidate box adjustment: During the training process, the corresponding candidate boxes are adjusted, the overall network loss is calculated based on the network output feature map, the adjusted candidate boxes, and the corresponding true boxes, and the YOLOv8s network parameters are updated based on the overall network loss; the validation set loss is calculated on the validation set through the improved YOLOv8s network after parameter update, and the fitting status of the YOLOv8s network is verified based on the validation loss; S3.

3. Repeat the above steps S3.1-S3.2 until the loss obtained in step S3.2 converges to obtain a trained power equipment defect detection model.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the computer program performs the steps of the method according to any one of claims 1 to 8.

10. A substation power equipment defect detection system, comprising a memory and a processor connected to each other, wherein a computer program is stored in the memory, characterized in that: When the computer program is executed by a processor, the computer program performs the steps of the method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Two-stage substation equipment visual defect detection method based on open set classification

    CN119477902A

  • A two-stage visual defect detection method for substation equipment based on open set classification

    CN119477902B