Method and device for detecting damage of porcelain bushing type sleeve of transformer substation, computer equipment, storage medium and program product
By image annotation and model training on the sample image set of porcelain sleeves of substations, the target detection model is optimized, and the problem of low detection efficiency and accuracy in the existing technology is solved, efficient and accurate damage detection is achieved, and the safe operation of the substation is ensured.
Patent Information
- Application Number
- CN202510260535.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-06-27
AI Technical Summary
In the prior art, the damage detection efficiency and accuracy of porcelain sleeves in substations are low, and it is prone to missed inspection or missed inspection.
By obtaining the sample image set of the porcelain sleeve of the substation, image annotation of the sample image set, and generating the training set, verification set and test set. The initial object detection model is trained and updated using the training set and verification set, perform hollow convolution operations, and optimize the model until the accuracy indicators of the model on the test set meet the threshold conditions.
It realizes the efficiency and accuracy of the damage detection of porcelain sleeves in the substation, reduces the time and error of manual inspection, improves the detection efficiency and accuracy, and ensures the safe operation of the substation.
Smart Images

Figure CN120219296A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power systems, and particularly to a method, device, computer device, computer-readable storage medium, and computer program product for detecting damage to porcelain bushings of substations. Background Art
[0002] The rapid economic development and the increasing demand for electricity have prompted the continuous upgrading and expansion of substations. The safe operation of substations depends on the integrity and reliability of their key components. As an important part of substation electrical equipment, porcelain bushings undertake the important tasks of isolating electrical equipment from the external environment and ensuring the safe transmission of current. The good condition of porcelain bushings is the key to ensuring the stability and safety of substations.
[0003] In traditional technologies, on-site visual inspection of porcelain bushings of substations is mainly carried out by relevant technicians. However, due to the wide distribution of substations, they are often located in areas with complex terrains, such as mountainous areas and urban fringes, which makes the detection work time-consuming and laborious, and prone to missed detection or misdetection, resulting in problems of low detection efficiency and accuracy. Summary of the Invention
[0004] Based on this, in view of the above technical problems, it is necessary to provide a method, device, computer device, computer-readable storage medium, and computer program product for detecting damage to porcelain bushings of substations.
[0005] In a first aspect, the present application provides a method for detecting damage to porcelain bushings of substations, including:
[0006] Obtaining a sample image set of porcelain bushings of substations, performing image annotation on the sample image set according to the state of the porcelain bushings of substations, and obtaining a training set, a validation set, and a test set based on the annotated sample image set;
[0007] Training and updating an initial object detection model using the training set and the validation set to obtain a preliminarily trained object detection model;
[0008] Performing dilated convolution operations on the neural network architecture of the preliminarily trained object detection model to obtain an improved object detection model;
[0009] Testing and optimizing the improved object detection model using the test set until the accuracy index of the improved object detection model on the test set meets the threshold condition, obtaining a trained object detection model; the trained object detection model is used for detecting damage to porcelain bushings of substations.
[0010] In one embodiment, training and updating the initial object detection model by using the training set and the validation set includes:
[0011] Identifying the feature extraction module of the initial object detection model; obtaining feature extraction parameters and the sampling shape of the convolution kernel according to the training set and the validation set; and training and updating the feature extraction module by means of variable kernel convolution based on the feature extraction parameters and the sampling shape.
[0012] In one embodiment, image annotation of the sample image set according to the state of the substation porcelain bushing type bushing includes:
[0013] Dividing the state of the substation porcelain bushing type bushing into a normal state type and a defect state type, and dividing the sample image set into a negative sample image set and a positive sample image set according to the normal state type and the defect state type;
[0014] After image annotation of the sample image set according to the state of the substation porcelain bushing type bushing, it further includes:
[0015] Performing data cleaning on the negative sample image set until the cleaned negative sample image set and the positive sample image set meet the sample ratio condition.
[0016] In one embodiment, the method further includes:
[0017] Obtaining a channel attention and spatial attention fusion module based on a channel attention module and a spatial attention module; performing fusion processing on a bidirectional splicing module and the channel attention and spatial attention fusion module to obtain a target network model, and using the target network model to improve the preliminarily trained object detection model.
[0018] In one embodiment, the method further includes:
[0019] Identifying the original detection layer in the preliminarily trained object detection model, and adding a small object detection layer to the prediction part of the preliminarily trained object detection model; and integrating the small object detection layer and the original detection layer in the preliminarily trained object detection model.
[0020] In one embodiment, obtaining a training set, a validation set, and a test set according to the annotated sample image set includes:
[0021] Split the labeled sample image set into an initial training set, an initial validation set, and the test set according to a preset ratio; perform geometric transformation and color space adjustment on the initial training set and the initial validation set to obtain the enhanced training set and the validation set.
[0022] In a second aspect, the present application also provides a detection device for damage to porcelain bushings of a substation, including:
[0023] A sample processing module, configured to obtain a sample image set of porcelain bushings of a substation, perform image annotation on the sample image set according to the state of the porcelain bushings of the substation, and obtain a training set, a validation set, and a test set according to the labeled sample image set;
[0024] A model training module, configured to train and update an initial object detection model by using the training set and the validation set to obtain a preliminarily trained object detection model;
[0025] A model improvement module, configured to perform dilated convolution operations on the neural network architecture of the preliminarily trained object detection model to obtain an improved object detection model;
[0026] A model testing module, configured to test and optimize the improved object detection model by using the test set until the accuracy index of the improved object detection model on the test set meets the threshold condition to obtain a trained object detection model; the trained object detection model is used for detecting damage to porcelain bushings of a substation.
[0027] In a third aspect, the present application also provides a computer device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0028] Obtain a sample image set of porcelain bushings of a substation, perform image annotation on the sample image set according to the state of the porcelain bushings of the substation, and obtain a training set, a validation set, and a test set according to the labeled sample image set; train and update an initial object detection model by using the training set and the validation set to obtain a preliminarily trained object detection model; perform dilated convolution operations on the neural network architecture of the preliminarily trained object detection model to obtain an improved object detection model; test and optimize the improved object detection model by using the test set until the accuracy index of the improved object detection model on the test set meets the threshold condition to obtain a trained object detection model; the trained object detection model is used for detecting damage to porcelain bushings of a substation.
[0029] Fourthly, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0030] Obtain a sample image set of porcelain bushings of substation porcelain sleeves, perform image annotation on the sample image set according to the state of the porcelain bushings of the substation porcelain sleeves, and obtain a training set, a validation set, and a test set according to the annotated sample image set; use the training set and the validation set to train and update an initial object detection model to obtain a preliminarily trained object detection model; perform dilated convolution operations on the neural network architecture of the preliminarily trained object detection model to obtain an improved object detection model; use the test set to test and optimize the improved object detection model until the accuracy index of the improved object detection model on the test set meets the threshold condition to obtain a trained object detection model; the trained object detection model is used for detecting damage to porcelain bushings of substation porcelain sleeves.
[0031] Fifthly, the present application also provides a computer program product, including a computer program. When the computer program is executed by a processor, the following steps are implemented:
[0032] Obtain a sample image set of porcelain bushings of substation porcelain sleeves, perform image annotation on the sample image set according to the state of the porcelain bushings of the substation porcelain sleeves, and obtain a training set, a validation set, and a test set according to the annotated sample image set; use the training set and the validation set to train and update an initial object detection model to obtain a preliminarily trained object detection model; perform dilated convolution operations on the neural network architecture of the preliminarily trained object detection model to obtain an improved object detection model; use the test set to test and optimize the improved object detection model until the accuracy index of the improved object detection model on the test set meets the threshold condition to obtain a trained object detection model; the trained object detection model is used for detecting damage to porcelain bushings of substation porcelain sleeves.
[0033] The above detection method, device, computer equipment, computer-readable storage medium and computer program product for the breakage of porcelain bushings in substations obtain a sample image set of porcelain bushings in substations, perform image annotation on the sample image set while generating a training set, a validation set and a test set, then use the training set and the validation set to train and update an initial object detection model, and perform dilated convolution operations on the neural network architecture of the preliminarily trained object detection model. Then, use the test set to test and optimize the improved object detection model until the accuracy index of the improved object detection model on the test set meets the threshold condition, and a trained object detection model can be obtained. In summary, the entire detection process of the breakage of porcelain bushings in substations does not require a large amount of manual participation. Using the trained object detection model to assist relevant technicians in detecting the breakage of porcelain bushings in substations can avoid time-consuming and laborious cumbersome processes such as on-site visual inspection through manual operations, effectively improve the detection efficiency and accuracy, and ensure the safe operation of substations at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for the description of the embodiments of the present application or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other related drawings can be obtained based on these drawings.
[0035] Figure 1 It is an application environment diagram of the detection method for the breakage of porcelain bushings in substations in an embodiment;
[0036] Figure 2 It is a schematic flowchart of the detection method for the breakage of porcelain bushings in substations in an embodiment;
[0037] Figure 3 It is a schematic diagram of an improved object detection model in an embodiment;
[0038] Figure 4 It is a schematic diagram showing the detection results of the breakage of porcelain bushings in substations in an embodiment;
[0039] Figure 5 It is a schematic diagram of the feature extraction module after training and updating in an embodiment;
[0040] Figure 6 It is a schematic diagram of the channel attention and spatial attention fusion module in an embodiment;
[0041] Figure 7 It is a schematic diagram of the target network model in an embodiment;
[0042] Figure 8 It is a schematic flow chart of a method for detecting damage to porcelain bushings of a substation in a specific embodiment;
[0043] Figure 9 It is a structural block diagram of a detection device for damage to porcelain bushings of a substation in an embodiment;
[0044] Figure 10 It is an internal structure diagram of a computer device in an embodiment. Specific Embodiments
[0045] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0046] With the progress of power system technology, the application of unmanned aerial vehicles (UAVs) in the detection of damage to porcelain bushings has received increasing attention. This detection method not only has high detection efficiency, flexible operation, but also relatively low cost, effectively reducing the burden of on-site manual detection and improving the detection efficiency and safety. The high-definition cameras and various sensors carried by UAVs can accurately detect porcelain bushings during the operation of the equipment and collect detailed data and images of key components. However, when using UAVs to perform detection tasks, some technical challenges are also faced. For example, weather conditions and the equipment operating environment may affect the quality and resolution of the collected images, resulting in the inability to comprehensively and clearly identify tiny damages on porcelain bushings in real time, such as cracks or breakages. Usually, it is necessary to manually review the pictures collected by the detection equipment to find defects, but the long-term review work is prone to fatigue, resulting in missed detections or false detections, and the detection results are greatly affected by the experience and subjective judgment of quality inspection personnel.
[0047] With the continuous development of image processing technology, especially the application of deep learning in the field of object detection, a new solution has been provided for the identification of damage to porcelain bushings of a substation. Detection algorithms such as DETR, YOLO, SSD, RetinaNet, Transformer, and Mask R-CNN can automatically identify and locate tiny damages on porcelain bushings after image acquisition. Nevertheless, single-stage algorithms represented by YOLO still have limitations in identifying tiny damages, and further research and optimization of the algorithms are needed to improve the detection efficiency and accuracy.
[0048] To address the issues such as low efficiency and accuracy in identifying damage to porcelain bushings in substations, this application proposes a detection method for damage to porcelain bushings in substations based on improved YOLOv9. The RepNCSPELAN4 module of YOLOv9 is improved by using deformable kernel convolution. After fusing and improving the bidirectional splicing module and the channel attention and spatial attention fusion module, it is inserted into the transmission between the backbone and neck networks of YOLOv9. Then, the SPPCSPC is optimized using dilated convolution, and a small target detection layer is added to enhance the detection of small targets. Through the above improvements, the detection of porcelain bushings in substations can be carried out more accurately, quickly, and efficiently.
[0049] The detection method for damage to porcelain bushings in substations provided by the embodiments of this application can be applied to an application environment as Figure 1 shown. Among them, the terminal communicates with the server through the network. The data storage system can store the data that the server needs to process. The data storage system can be integrated on the server, or placed in the cloud or other network servers. In an application environment as Figure 1 shown, the terminal can be, but is not limited to, various personal computers, laptop computers, smart phones, and tablet computers. The server can be implemented with an independent server or a server cluster composed of multiple servers.
[0050] In one embodiment, as Figure 2 shown, a detection method for damage to porcelain bushings in substations is provided. Taking the method applied to the Figure 1 terminal as an example, the method includes the following steps:
[0051] Step S201: Obtain a sample image set of porcelain bushings in substations. According to the status of the porcelain bushings in substations, perform image annotation on the sample image set, and obtain a training set, a validation set, and a test set based on the annotated sample image set.
[0052] Specifically, to ensure the efficiency and accuracy of detecting damage to porcelain bushings in substations, advanced drone technology can be used for image acquisition. The drone is equipped with a high-definition camera, precisely flies to the designated position, captures detailed image data of the porcelain bushings in the substation, and transmits it to the terminal as a sample image set. After the acquisition is completed, the terminal performs strict quality screening and preprocessing on the obtained images. During this process, we carefully review each image and remove those with poor quality due to reasons such as blurring, overexposure, or jitter. Through this series of meticulous operations, we ensure that clear, reliable, and high-quality image materials are provided for subsequent damage identification and analysis, thereby effectively improving the detection efficiency and accuracy.
[0053] Step S202: Use the training set and the validation set to train and update the initial object detection model to obtain a preliminarily trained object detection model.
[0054] Specifically, the terminal first performs data augmentation on the training set and the validation set, then uses the augmented training set and validation set to train the initial object detection model, and adopts the gradient descent optimization algorithm to update the model parameters of the initial object detection model to improve the detection accuracy and obtain a preliminarily trained object detection model.
[0055] Step S203: Perform dilated convolution operations on the neural network architecture of the preliminarily trained object detection model to obtain an improved object detection model.
[0056] Among them, the neural network architecture can be the SPPCSPC module. A network model that optimizes SPPCSPC using dilated convolution is as Figure 3 shown.
[0057] Specifically, the terminal performs dilated convolution operations on the neural network architecture of the preliminarily trained object detection model to obtain an improved object detection model. Dilated convolution operation is a technique in the field of deep learning that effectively expands the receptive field of a convolutional neural network and demonstrates excellent performance especially in tasks such as image processing. This technique inserts "holes" or "gaps" between the elements of the convolutional kernel, achieving an increase in the scope of the convolutional operation's vision without increasing the number of parameters or computational cost.
[0058] The main advantages of dilated convolution operations include:
[0059] 1) Maintaining image resolution: Dilated convolution can increase the receptive field without reducing the resolution of the input image, enabling the network to capture more extensive context information.
[0060] 2) Parameter number optimization: Compared with standard convolution operations, dilated convolution expands the receptive field without adding extra parameters, thus significantly improving the parameter efficiency.
[0061] 3) Capturing multi-scale context: By applying dilated convolution with different dilation factors at different levels, the network can effectively extract multi-scale context information and enhance the diversity of feature expressions.
[0062] 4) Handling long-range dependencies: When dealing with sequence data, dilated convolution helps the model identify and utilize long-range dependencies, enhancing the ability to understand complex structures.
[0063] Step S204: Use the test set to test and optimize the improved object detection model until the accuracy index of the improved object detection model on the test set meets the threshold condition, and obtain the trained object detection model; the trained object detection model is used for the detection of damage to porcelain bushings in substations.
[0064] Specifically, after the object detection model is trained, in order to comprehensively evaluate the performance of the model, it is necessary to use the test set to test and optimize the improved object detection model until the accuracy index of the improved object detection model on the test set meets the threshold condition. The accuracy indexes include but are not limited to precision, recall, and mean average precision (mAP). These indexes together constitute a comprehensive system for evaluating the performance of the model in object detection tasks.
[0065] In addition, the intersection over union (IoU) is used as another core evaluation index to measure the overlap degree between the prediction box and the ground truth box. The calculation formula of IoU is defined as follows:
[0066] IOU = TP / (TP + FN + FP)
[0067] In the above formula, TP (True Positive) represents the number of correctly detected objects, FN (False Negative) represents the number of missed detected objects, and FP (False Positive) represents the number of misdetected objects.
[0068] In addition, the calculation formulas of precision and recall are defined as follows:
[0069] Precision:
[0070] Recall:
[0071] The calculation of the mean average precision (mAP) involves averaging the precision at multiple thresholds. Its formula is complex, but the core idea is to average the highest precision at different recall rates:
[0072]
[0073] Among them, is the predicted region of the algorithm detection box, is the actual region of the actual annotation box, r represents the recall rate, is the precision value for recall rate r, when the recall rate is greater than or equal to r, it is the corresponding precision value and is the maximum precision value among them.
[0074] By comprehensively evaluating indicators such as precision, recall rate, mAP, and IoU, we can fully understand the performance of the object detection model on the test set, and then guide the further optimization of the model to improve its accuracy and reliability in practical applications. Figure 4 It shows the detection results of the damaged bushing of the substation porcelain bushing after optimization.
[0075] In the above method for detecting the damage of the bushing of the substation porcelain bushing, by obtaining the sample image set of the bushing of the substation porcelain bushing, performing image annotation on the sample image set while generating the training set, validation set, and test set, then using the training set and validation set to train and update the initial object detection model, and performing dilated convolution operations on the neural network architecture of the preliminarily trained object detection model, and then using the test set to test and optimize the improved object detection model until the accuracy index of the improved object detection model on the test set meets the threshold condition, the trained object detection model can be obtained. In summary, the entire detection process of the damaged bushing of the substation porcelain bushing does not require a large amount of manual participation. Using the trained object detection model to assist relevant technicians in detecting the damage of the bushing of the substation porcelain bushing can avoid time-consuming and laborious cumbersome processes such as on-site visual inspection through manual operation, and effectively improve the detection efficiency and accuracy, while ensuring the safe operation of the substation.
[0076] In one embodiment, in the above step S202, using the training set and validation set to train and update the initial object detection model specifically includes the following steps:
[0077] Identify the feature extraction module of the initial object detection model; according to the training set and validation set, obtain the feature extraction parameters and the sampling shape of the convolutional kernel; based on the feature extraction parameters and the sampling shape, train and update the feature extraction module by means of variable kernel convolution.
[0078] Among them, the feature extraction module can be the RepNCSPELAN4 (Repetitive Non-Local Convolutional Spatial Pyramid Pooling Enhanced Learning Network, a kind of network representing repetitive non-local convolutional spatial pyramid pooling enhanced learning) module, and the improved RepNCSPELAN4 module is as Figure 5 shown.
[0079] Specifically, the terminal can improve the RepNCSPELAN4 module of YOLOv9 (a network module representing repeated non-local convolutional spatial pyramid pooling enhanced learning) using the adaptable kernel convolution (AKConv). The core idea is to provide the convolutional kernel with any number of parameters and any sampling shape, thereby improving the flexibility and accuracy of feature extraction. This enables the convolutional kernel to no longer be limited to a fixed square shape and be able to adjust the number of parameters and sampling shape according to actual needs. AKConv has the following characteristics:
[0080] 1) Arbitrary number of parameters: AKConv allows the use of any number of parameters (such as 1, 2, 3, 4, 5, 6, and 7, etc.) to extract features, which is not achieved in standard convolution and deformable convolution.
[0081] 2) Arbitrary sampling shape: The sampling shape of the convolutional kernel can be flexibly adjusted and is no longer limited to a fixed square, enabling better adaptation to different target shapes.
[0082] 3) Hardware adaptability: According to the hardware environment, the number of convolutional parameters can be linearly increased or decreased, which is very suitable for lightweight models.
[0083] In one embodiment, in the above step S201, according to the state of the substation porcelain bushing type sleeves, image annotation is performed on the sample image set, which specifically includes the following steps:
[0084] The state of the substation porcelain bushing type sleeves is divided into a normal state type and a defective state type. According to the normal state type and the defective state type, the sample image set is divided into a negative sample image set and a positive sample image set;
[0085] After performing image annotation on the sample image set according to the state of the substation porcelain bushing type sleeves, the following steps are further included:
[0086] Data cleaning is performed on the negative sample image set until the cleaned negative sample image set and the positive sample image set meet the sample ratio condition.
[0087] Specifically, the terminal can use a professional annotation platform to perform precise data annotation on the porcelain bushing type sleeve images collected by the drone, and clearly classify the sleeves in the images as the "normal state type" (negative samples) or the "defective state type" (positive samples). After annotation, the annotation file is integrated with the original image file to construct a complete data set. Given that the number of defective samples is limited in the real scenario, to ensure sample balance and meet the model training requirements, the data set is first preprocessed to eliminate redundant negative samples.
[0088] In one embodiment, the method of the present application further includes the following steps:
[0089] Based on the channel attention module and the spatial attention module, a channel attention and spatial attention fusion module is obtained; the bi-directional concatenation module and the channel attention and spatial attention fusion module are fused to obtain the target network model, and the target network model is used to improve the initially trained object detection model.
[0090] Specifically, the terminal obtains a channel attention and spatial attention fusion module based on the channel attention module and the spatial attention module; the bi-directional concatenation module and the channel attention and spatial attention fusion module are fused to obtain the target network model, and after fusing and improving the bi-directional concatenation and channel attention and spatial attention fusion network, it is inserted into the transmission between the yolov9 backbone and the neck network.
[0091] Among them, the bi-directional concatenation (BiC) module is a feature fusion module used in the object detection network, aiming to improve the detection accuracy, especially the localization accuracy of small objects. The following is a detailed introduction to BiC:
[0092] ① Network structure design:
[0093] The BiC module is usually used in the neck part of the detector. By fusing the adjacent layer features output by the backbone, it enhances the feature representation ability. This design can retain more accurate position signals, which is particularly important for the localization of small objects.
[0094] ② Bi-directional concatenation mechanism:
[0095] The main function of the BiC module is to enhance the information exchange between different-level features through the bi-directional feature fusion mechanism. Specifically, the BiC module integrates the feature maps of three adjacent layers, thereby improving the detection accuracy while maintaining the speed.
[0096] ③ Performance improvement:
[0097] After introducing the BiC module, the object detection network has achieved performance improvement in multiple aspects:
[0098] Higher detection accuracy: By fusing adjacent features at multiple levels, the BiC module can provide more accurate localization information, thereby improving the detection accuracy.
[0099] Enhanced small object detection ability: Due to retaining more accurate position signals, the BiC module performs well in small object detection.
[0100] Among them, on the images captured by the drone, the convolutional attention mechanism CBAM can extract the attention regions of the feature maps, enabling the network to focus on small targets to be detected. The convolutional attention mechanism CBAM consists of a cascaded channel attention model and a spatial attention model. The network structure of the channel attention and spatial attention fusion module (Convolutional Block Attention Module, CBAM) is as Figure 6 shown.
[0101] To further explain, the channel attention model and the spatial attention model are two different attention mechanisms. Their applications in convolutional neural networks (CNNs) can be used separately or combined to form the convolutional block attention mechanism (Convolutional Block Attention Module, CBAM). The following are the detailed steps and calculation formulas of these two models:
[0102] Channel Attention Model
[0103] ① Global pooling:
[0104] Average pooling: Perform global average pooling on each channel of the input feature map to obtain the global spatial features of each channel; Max pooling: Perform global max pooling on each channel of the input feature map to obtain the global spatial features of each channel.
[0105] ② Feature reshaping:
[0106] Reshape the pooled features into a one-dimensional vector to generate a single value for each channel.
[0107] ③ Multi-layer perceptron (MLP) processing:
[0108] Send the results of global average pooling and global max pooling into a shared multi-layer perceptron (MLP) for learning respectively. The number of neurons in the first layer of the MLP is C / r, the activation function is ReLU, and the number of neurons in the second layer is C. Learn the features in the channel dimension and the importance of each channel through the MLP.
[0109] ④ Channel weight generation:
[0110] Sum the results output by the MLP, and then perform mapping processing through the Sigmoid activation function to finally obtain the channel attention weight matrix M_c. The channel attention weight matrix M_c can be expressed as:
[0111]
[0112] In the above formula, is the feature map obtained by global average pooling, is the feature map obtained by global max pooling, σ is the Sigmoid activation function, and MLP is a multi-layer perceptron, usually including two fully connected layers. The first layer uses the ReLU activation function, and the second layer uses the Sigmoid activation function.
[0113] For the Spatial Attention Model:
[0114] ① Pooling operation: Perform average pooling and max pooling on the feature map along the channel axis (usually the depth dimension of the feature map). The purpose of doing this is to capture global context information in the spatial dimension while retaining important local features.
[0115] ② Feature fusion: Concatenate the results of average pooling and max pooling in the spatial dimension to obtain a fused feature map with a richer representation.
[0116] ③ Convolution operation: Process the fused feature map through a standard convolutional layer (usually using a 3x3 convolutional kernel) to learn spatial dependencies.
[0117] ④ Activation function: Use an activation function (such as sigmoid) to generate spatial attention weights, which represent the importance of different spatial positions.
[0118] The spatial attention weights can be expressed as:
[0119]
[0120] In the above formula, σ represents the sigmoid activation function, f7×7 represents the convolutional operation with a 7x7 convolutional kernel, and Favg and Fmax respectively represent the two-dimensional features of the average pooling operation and the max pooling operation.
[0121] For the Convolutional Block Attention Module (CBAM), the calculation formula of the entire CBAM is:
[0122]
[0123] In the above formula, is the output of the channel attention model, is the output of the spatial attention model, F is the backbone feature map, and ⊙ represents element-wise multiplication.
[0124] Through the above steps and calculation formulas, the channel attention model and the spatial attention model can effectively aggregate the spatial information and context representation in the feature map, thereby improving the performance of the model. Among them, the target network model formed by fusing the bidirectional splicing and the channel attention and spatial attention fusion network is as Figure 7 shown.
[0125] In one embodiment, the method of the present application further includes the following steps:
[0126] Identify the original detection layer in the initially trained object detection model, and add a small object detection layer to the prediction part of the initially trained object detection model; integrate the small object detection layer and the original detection layer in the initially trained object detection model.
[0127] Specifically, in the field of object detection, objects of different scales exhibit different characteristics in images, which poses challenges to detection algorithms. Objects closer to the camera occupy more pixels in the image, enabling the model to extract richer and more detailed feature information, and at the same time, the noise is relatively low, thus ensuring a relatively high accuracy of the detection results. On the contrary, objects farther from the camera have smaller pixel representations in the image, resulting in limited available feature information and a higher noise level, which will have a negative impact on the accuracy of the detection algorithm.
[0128] To effectively address this challenge, the YOLOv9 model adopts a multi-scale feature map strategy to detect objects of different sizes. In the original configuration, the model contains three detection layers, corresponding to objects of 32×32, 16×16, and 8×8 pixel sizes respectively. These detection layers are obtained by downsampling the original 640×640 pixel image by 8, 16, and 32 times, thereby generating feature maps of 80×80, 40×40, and 20×20 pixel sizes.
[0129] However, although this multi-scale method improves the model performance to a certain extent, for small objects at a long distance and objects with a high degree of overlap, the existing three detection layers may still be unable to effectively detect them. For this reason, this paper proposes an improved strategy: add a new detection layer with a scale of 160×160 pixels to the prediction part of the model. This newly added detection layer is specifically used to capture small objects at a long distance, has a larger receptive field, and can more accurately identify and locate these small-sized objects. By integrating the original three detection layers and the newly added small object detection layer, the model now has four detection layers with different receptive fields, achieving a more comprehensive coverage of objects of various scales. This multi-scale detection strategy not only significantly improves the detection accuracy of small objects but also enhances the model's inclusiveness and scalability to scales. In practical applications, this means that the model can more accurately detect small objects in the distance and at the same time more effectively handle the overlap between objects, thereby overall improving the performance of object detection.
[0130] In one embodiment, in the above step S201, according to the labeled sample image set, a training set, a validation set, and a test set are obtained, which specifically include the following steps:
[0131] The labeled sample image set is split into an initial training set, an initial validation set, and a test set according to a preset ratio; geometric transformations and color space adjustments are performed on the initial training set and the initial validation set to obtain an enhanced training set and a validation set.
[0132] Specifically, the terminal can scientifically divide the labeled sample image set into a training set, a validation set, and a test set according to a ratio of 8:1:1. To further expand the training data, data augmentation techniques such as geometric transformations (such as rotation, flipping, and cropping) and color space adjustments (including hue, saturation, and brightness changes) are applied to the training set and the validation set, thereby effectively improving the generalization ability and accuracy of model training.
[0133] In one embodiment, as Figure 8 shown, a detection method for the damage of porcelain bushings of a substation porcelain bushing in a specific embodiment is provided, which specifically includes the following steps:
[0134] Step S801, obtain a sample image set of porcelain bushings of a substation porcelain bushing, divide the state of the porcelain bushings of the substation porcelain bushing into a normal state type and a defect state type, divide the sample image set into a negative sample image set and a positive sample image set according to the normal state type and the defect state type, and perform data cleaning on the negative sample image set until the cleaned negative sample image set and the positive sample image set meet the sample ratio condition.
[0135] Step S802, split the labeled sample image set into an initial training set, an initial validation set, and a test set according to a preset ratio; perform geometric transformations and color space adjustments on the initial training set and the initial validation set to obtain an enhanced training set and a validation set.
[0136] Step S803, identify the feature extraction module of the initial object detection model; obtain the feature extraction parameters and the sampling shape of the convolution kernel according to the training set and the validation set; based on the feature extraction parameters and the sampling shape, train and update the feature extraction module by means of changeable kernel convolution to obtain a preliminarily trained object detection model.
[0137] Step S804, based on the channel attention module and the spatial attention module, obtain a channel attention and spatial attention fusion module; perform fusion processing on the bidirectional splicing module and the channel attention and spatial attention fusion module to obtain a target network model, and use the target network model to improve the preliminarily trained object detection model.
[0138] Step S805: Perform dilated convolution operations on the neural network architecture of the initially trained object detection model, identify the original detection layer in the initially trained object detection model, add a small object detection layer to the prediction part of the initially trained object detection model, and integrate the small object detection layer and the original detection layer in the initially trained object detection model to obtain an improved object detection model.
[0139] Step S806: Use the test set to test and optimize the improved object detection model until the accuracy index of the improved object detection model on the test set meets the threshold condition, obtaining a trained object detection model; the trained object detection model is used for the detection of damage to porcelain bushings of substations.
[0140] The beneficial effects brought by the above embodiments are as follows:
[0141] To solve the problems of low accuracy and slow recognition speed in identifying damage to porcelain bushings of substations, this application proposes a method for detecting damage to porcelain bushings of substations based on improved YOLOv9. The RepNCSPELAN4 module of YOLOv9 is improved by using dilatable convolution. After fusing the bidirectional splicing with the channel attention and spatial attention fusion network, it is inserted into the transmission between the backbone and neck networks of YOLOv9. The SPPCSPC is optimized by using dilated convolution, and a small object detection layer is added to enhance the detection of small objects. Through the above improvements, the porcelain bushings of substations can be detected more accurately, quickly, and efficiently.
[0142] It should be understood that although the steps in the flowcharts involved in the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.
[0143] Based on the same inventive concept, an embodiment of the present application further provides a detection device for a damaged porcelain bushing of a substation, which is used to implement the detection method for the damaged porcelain bushing of a substation involved above. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the detection device for a damaged porcelain bushing of a substation provided below can refer to the limitations on the detection method for a damaged porcelain bushing of a substation in the above text, and will not be repeated here.
[0144] In an exemplary embodiment, as Figure 9 shown, a detection device for a damaged porcelain bushing of a substation is provided, including:
[0145] A sample processing module 901, configured to obtain a sample image set of a porcelain bushing of a substation, perform image annotation on the sample image set according to the state of the porcelain bushing of a substation, and obtain a training set, a validation set, and a test set according to the annotated sample image set;
[0146] A model training module 902, configured to train and update an initial object detection model by using the training set and the validation set to obtain a preliminarily trained object detection model;
[0147] A model improvement module 903, configured to perform dilated convolution operation on the neural network architecture of the preliminarily trained object detection model to obtain an improved object detection model;
[0148] A model testing module 904, configured to test and optimize the improved object detection model by using the test set until the accuracy index of the improved object detection model on the test set meets the threshold condition to obtain a trained object detection model; the trained object detection model is used for the detection of damaged porcelain bushings of a substation.
[0149] In an embodiment, the model training module 902 is further configured to identify the feature extraction module of the initial object detection model; obtain feature extraction parameters and the sampling shape of the convolution kernel according to the training set and the validation set; and train and update the feature extraction module by changing the kernel convolution based on the feature extraction parameters and the sampling shape.
[0150] In an embodiment, the sample processing module 901 is further configured to divide the state of the porcelain bushing of a substation into a normal state type and a defect state type, and divide the sample image set into a negative sample image set and a positive sample image set according to the normal state type and the defect state type; the detection device for a damaged porcelain bushing of a substation further includes a data cleaning module, configured to perform data cleaning on the negative sample image set until the cleaned negative sample image set and the positive sample image set meet the sample ratio condition.
[0151] In one embodiment, the detection device for the breakage of the porcelain bushing of the substation bushing further includes a secondary improvement module, which is used to obtain a channel attention and spatial attention fusion module based on the channel attention module and the spatial attention module; fuse the bidirectional splicing module and the channel attention and spatial attention fusion module to obtain a target network model, and use the target network model to improve the preliminarily trained target detection model.
[0152] In one embodiment, the detection device for the breakage of the porcelain bushing of the substation bushing further includes a tertiary improvement module, which is used to identify the original detection layer in the preliminarily trained target detection model, and add a small target detection layer to the prediction part of the preliminarily trained target detection model; integrate the small target detection layer and the original detection layer in the preliminarily trained target detection model.
[0153] In one embodiment, the sample processing module 901 is further used to split the labeled sample image set into an initial training set, an initial validation set, and a test set according to a preset ratio; perform geometric transformation and color space adjustment on the initial training set and the initial validation set to obtain an enhanced training set and validation set after image enhancement.
[0154] Each module in the above-mentioned detection device for the breakage of the porcelain bushing of the substation bushing can be implemented in whole or in part by software, hardware, and their combination. The above-mentioned modules can be embedded in the processor in the computer device in the form of hardware or independent of it, or stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
[0155] In an exemplary embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 10As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a method for detecting damage to porcelain bushings of substation porcelain bushings. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0156] Those skilled in the art can understand that Figure 10 the structure shown in is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0157] In one embodiment, a computer device is further provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.
[0158] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by the processor, the steps in the above method embodiments are implemented.
[0159] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by the processor, the steps in the above method embodiments are implemented.
[0160] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.
[0161] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in this application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, artificial intelligence (AI) processors, etc., without limitation.
[0162] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this application.
[0163] The above-described embodiments merely represent several implementation manners of this application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the patent of this application. It should be noted that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can still be made, and these all belong to the protection scope of this application. Therefore, the protection scope of this application shall be subject to the appended claims.
Claims
1. A method for detecting damage to a porcelain bushing in a substation, characterized in that: The method comprises: Obtain a sample image set of a porcelain bushing of a substation, annotate the sample image set according to the state of the porcelain bushing of the substation, and obtain a training set, a validation set, and a test set according to the annotated sample image set; Using the training set and the validation set to train and update the initial target detection model to obtain a preliminarily trained target detection model; Performing a dilated convolution operation on the neural network architecture of the initially trained target detection model to obtain an improved target detection model; The improved target detection model is tested and optimized using the test set until the accuracy index of the improved target detection model on the test set meets the threshold condition, thereby obtaining a trained target detection model; the trained target detection model is used to detect damaged porcelain bushings in substations.
2. The method according to claim 1, characterized in that The using the training set and the validation set to train and update the initial target detection model includes: Identifying a feature extraction module of the initial object detection model; According to the training set and the validation set, feature extraction parameters and a sampling shape of a convolution kernel are obtained; Based on the feature extraction parameters and the sampling shape, the feature extraction module is trained and updated by means of a variable kernel convolution.
3. The method according to claim 1, characterized in that The step of labeling the sample image set according to the state of the porcelain bushing of the substation includes: The state of the substation porcelain bushing is divided into a normal state type and a defect state type, and the sample image set is divided into a negative sample image set and a positive sample image set according to the normal state type and the defect state type; After labeling the sample image set according to the state of the porcelain bushing of the substation, the method further includes: Data cleaning is performed on the negative sample image set until the cleaned negative sample image set and the positive sample image set meet a sample ratio condition.
4. The method according to claim 1, characterized in that: The method further comprises: Based on the channel attention module and the spatial attention module, a channel attention and spatial attention fusion module is obtained; The bidirectional splicing module and the channel attention and spatial attention fusion module are fused to obtain a target network model, and the target network model is used to improve the initially trained target detection model.
5. The method according to claim 1, characterized in that The method further comprises: Identifying an original detection layer in the initially trained object detection model and adding a small object detection layer to the prediction portion of the initially trained object detection model; The small object detection layer is integrated with the original detection layer in the preliminarily trained object detection model.
6. The method according to any one of claims 1 to 5, characterized in that: The method of obtaining a training set, a validation set and a test set based on the labeled sample image set includes: Splitting the labeled sample image set into an initial training set, an initial validation set and the test set according to a preset ratio; The initial training set and the initial verification set are subjected to geometric transformation and color space adjustment to obtain the training set and the verification set after image enhancement.
7. A detection device for damaged porcelain bushings in a substation, characterized in that: The device comprises: A sample processing module is used to obtain a sample image set of a substation porcelain bushing, annotate the sample image set according to the state of the substation porcelain bushing, and obtain a training set, a validation set and a test set according to the annotated sample image set; A model training module, used to train and update the initial target detection model using the training set and the validation set to obtain a preliminarily trained target detection model; A model improvement module, used for performing a dilated convolution operation on the neural network architecture of the initially trained target detection model to obtain an improved target detection model; A model testing module is used to test and optimize the improved target detection model using the test set until the accuracy index of the improved target detection model on the test set meets the threshold condition, thereby obtaining a trained target detection model; the trained target detection model is used to detect the damage of porcelain bushings in substations.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
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 steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Construction site intelligent inspection method based on unmanned aerial vehicle
CN121067745A