Electrical equipment internal defect detection method, device, equipment and medium

By extracting and fusion the internal images of the power equipment, and identifying defect targets with attention weights, the identification problems caused by noise and complex backgrounds in the internal defect detection of power equipment are solved, and the detection effect of high accuracy and low error detection rate is achieved.

CN119540607AActive Publication Date: 2025-02-28GUANGDONG SHUANGDIAN TECH CO LTD
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202411425079.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-12
Publication Date
2025-02-28
Estimated Expiration
2044-10-12

AI Technical Summary

Technical Problem

There is noise and complex background in the detection of internal defects of power equipment, which makes it difficult to identify defect targets, especially the difficulty of detecting small defects.

Method used

By acquiring the internal image of the power equipment, multiple feature maps are generated, and feature extraction is performed on the feature map based on attention weights, feature fusion is performed, and defect targets are finally determined.

Benefits of technology

It improves the accuracy of defect detection, reduces the error detection rate, and can more accurately identify defect bodies inside the power equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119540607A_ABST
    Figure CN119540607A_ABST
Patent Text Reader

Abstract

The method is mainly applied to the technical field of power equipment detection. The invention discloses a power equipment internal defect detection method and device, equipment and a medium, and the method comprises the steps: obtaining an internal image of power equipment, and generating a plurality of feature maps based on the internal image of the power equipment; based on the channel number of each feature map, classifying each feature map to obtain a plurality of feature image groups; performing feature extraction processing on the feature image group based on the attention weight, and generating an output feature map corresponding to the feature image group according to image features obtained after the feature extraction processing; performing fusion processing on the output feature images corresponding to each feature image group to obtain a fused feature image; and determining a target object in the fused feature map, and taking the target object as a defect body inside the power equipment in the internal image of the power equipment. When the defects of the power equipment are detected, the accuracy can be improved, and the false detection rate can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] During the maintenance of the power system, the detection of power equipment is crucial. Among them, the detection of internal defects of power equipment usually adopts non-destructive testing such as X-ray image detection. However, in actual application, this detection method faces many challenges. On the one hand, various noises are often inevitable in X-ray images, which may come from various factors such as the detection equipment itself and the interference of the surrounding environment. On the other hand, the background of the image is often more complex and may contain many elements that are irrelevant to the defect target, making it difficult for the defect target to stand out clearly in such a background. In addition, the defect targets of some power equipment are very small, which may be only slight cracks, local material changes, etc., which further increases the difficulty of defect detection. When detecting these tiny defects, not only high-resolution detection equipment is required, but also advanced image processing algorithms are required to accurately identify and locate these tiny defect targets. Summary of the invention

[0003] The present invention provides a method, device, equipment and medium for detecting internal defects of electric equipment, which can improve the accuracy and reduce the false detection rate when detecting defects of electric equipment.

[0004] The present invention provides a method for detecting internal defects of electric power equipment, the method comprising: Acquire an internal image of the electric power equipment, and generate a plurality of feature maps based on the internal image of the electric power equipment; Based on the number of channels of each of the feature maps, each of the feature maps is classified to obtain a plurality of feature image groups; Performing feature extraction processing on the feature image group based on the attention weight, and generating an output feature map corresponding to the feature image group according to the image features obtained after the feature extraction processing; The output feature maps corresponding to each of the feature image groups are fused to obtain a fused feature map; A target object in the fused feature map is determined, and the target object is used as a defective body inside the power equipment in the internal image of the power equipment.

[0005] Optionally, the method comprises: Based on the resolution of each of the feature maps, classifying each of the feature maps into a first image group or a second image group, wherein the resolution of each feature map in the first image group is lower than the resolution of each feature map in the second image group; Convert each feature map in the first image group into a feature map with a preset number of channels; Each feature map of the preset number of channels is arranged in a preset order to generate an optimized feature map, wherein each feature map of the preset number of channels serves as a pixel of the optimized feature map.

[0006] Optionally, performing feature extraction processing on the feature image group based on the attention weight, and generating an output feature map corresponding to the feature image group according to the image features obtained after the feature extraction processing, includes: Performing feature extraction processing on the feature image group through a plurality of parallel paths with preset attention weights, wherein the feature image group is subjected to feature extraction processing through a first parallel path and a second parallel path, respectively, to obtain a first feature corresponding to the first parallel path and a second feature corresponding to the second parallel path; Aggregation processing is performed on the first feature and the second feature, and an output feature map corresponding to the feature image group is generated according to the image features after the aggregation processing.

[0007] Optionally, the step of performing feature extraction processing on the feature image group through a plurality of parallel paths with preset attention weights includes: According to a first direction and a second direction, a feature map of the feature image group is pooled to obtain a first image feature corresponding to the first direction and a second image feature corresponding to the second direction; performing weighted processing on the first image feature and the second image feature; Convolution processing is performed on the weighted first image feature and the weighted second image feature to obtain a weighted image feature as the first feature.

[0008] Optionally, the aggregating the first feature and the second feature, and generating an output feature map corresponding to the feature image group according to the image features after the aggregation process, includes: Generate a first feature map corresponding to the first feature and a second feature map corresponding to the second feature; Performing a global average pooling operation on the first feature map and the second feature map respectively to obtain a weight vector corresponding to the first feature map and a weight vector corresponding to the second feature map; Performing a matrix dot product operation on the weight vector corresponding to the first feature map and the weight vector corresponding to the second feature map to obtain a relationship strength value between the first feature map and the second feature map; Determine an attention weight ratio between the first feature map and the second feature map based on a preset binary classification function; According to the relationship strength value and the attention weight ratio, a weighted sum operation is performed on each feature pair corresponding to the first feature map and the second feature map to generate a weighted feature map as the output feature map.

[0009] Optionally, the determining a target object in the fused feature image and using the target object as a defective body inside the power equipment in the internal image of the power equipment includes: Generate a prediction box in the fused feature map using a preset prediction model; Acquire the target object through the prediction frame, wherein the target object is a marker within the prediction frame; The target object is taken as a defective body inside the electric power equipment in the internal image of the electric power equipment.

[0010] Optionally, the determining a target object in the fused feature image and using the target object as a defective body inside the power equipment in the internal image of the power equipment includes: Determine the overlap value between the predicted box and the true box; Based on the overlap value, generating a soft label; Constructing a loss function between soft labels and classification scores, wherein the classification scores are used to evaluate the ability of the preset prediction model to identify and classify the identifiers in the fused feature map; Based on the loss function between the soft label and the classification score, the prediction model is trained, and the prediction box is generated in the fused feature map using the trained prediction model.

[0011] Optionally, the determining a target object in the fused feature image and using the target object as a defective body inside the power equipment in the internal image of the power equipment includes: When generating the prediction box, determining the coordinates of the center point of the prediction box and the width and height of the prediction box; Constructing a loss function between the predicted box and the true box based on the center point coordinates, the height, the width, and the overlap value; Based on the loss function between the predicted box and the true box, the prediction model is trained, and the trained prediction model is used to generate the prediction box in the fused feature map.

[0012] The present invention also provides a device for detecting internal defects of electric power equipment, the device comprising: An input module, used to obtain an internal image of the power equipment and generate a plurality of feature maps based on the internal image of the power equipment; A grouping module, used for classifying each of the feature images based on the number of channels of each of the feature images to obtain a plurality of feature image groups; A feature enhancement module, used to perform feature extraction processing on the feature image group based on the attention weight, and generate an output feature map corresponding to the feature image group according to the image features obtained after the feature extraction processing; A feature fusion module, used for fusing the output feature maps corresponding to each of the feature image groups to obtain a fused feature map; The output module is used to determine the target object in the fused feature map and use the target object as a defective body inside the power equipment in the internal image of the power equipment.

[0013] The present invention also provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements any one of the above-mentioned methods for detecting internal defects of electric power equipment when executing the computer program.

[0014] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any one of the above-mentioned methods for detecting internal defects of electric power equipment is implemented.

[0015] The present invention has at least the following beneficial effects: This scheme classifies the feature map and extracts the features of the classified feature map according to the attention weight, thereby enhancing each feature through the attention mechanism and improving the feature extraction capability. Then, the enhanced features are fused to obtain a fused feature map, which makes it easier to determine the target object in the fused feature map, so as to more accurately determine the defective body inside the power equipment in the internal image of the power equipment, which is beneficial to improve the accuracy and reduce the false detection rate when detecting defects in the power equipment. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings are used to provide a further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the technical solution of the present invention and do not constitute a limitation to the technical solution of the present invention.

[0017] Figure 1 It is a flow chart of steps of a method for detecting internal defects of electric power equipment; Figure 2 It is a schematic diagram of the RTMdet target detection algorithm model architecture in the internal defect detection method of power equipment; Figure 3 It is a schematic diagram of a neck network architecture in a method for detecting internal defects of power equipment; Figure 4is a flowchart of step S103 in a method for detecting internal defects of electric power equipment; Figure 5 is a flowchart of step S202 in a method for detecting internal defects of electric power equipment; Figure 6 It is a schematic diagram of the attention mechanism network architecture used in the internal defect detection method of power equipment; Figure 7 is a flowchart of step S104 in a method for detecting internal defects of electric power equipment; Figure 8 It is a flow chart of the first step of training a prediction model in a method for detecting internal defects of power equipment; Fig. 9 It is a flow chart of the second step of training a prediction model in a method for detecting internal defects of power equipment; Fig.10 It is a schematic diagram of the structure of a device for detecting internal defects of electric power equipment; Fig.11 It is a structural diagram of an electrical equipment. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0019] It should be noted that with the increasing use of power equipment, the detection of its internal defects has become particularly important. Traditional defect detection methods often rely on manual inspection or simple image processing technology, which is inefficient and has limited accuracy.

[0020] In order to solve these problems, the existing technical solution proposes a method for detecting internal defects of power equipment based on X-ray images. As a non-destructive testing technology, X-ray images can provide clear images of the internal structure of power equipment and help identify potential defects. However, there are often noise and complex backgrounds in X-ray images, and some defect targets are very small, which increases the difficulty of defect detection.

[0021] Please refer to Figure 1 , Figure 1 The invention is a flowchart of steps of a method for detecting internal defects of electric power equipment.

[0022] In a first aspect, this embodiment provides a method for detecting internal defects of an electric power device, the method comprising: S101. Acquire an internal image of an electric power device, and generate a plurality of feature maps based on the internal image of the electric power device.

[0023] S102: Classify each feature map based on the number of channels of each feature map to obtain multiple feature image groups.

[0024] S103, performing feature extraction processing on the feature image group based on the attention weight, and generating an output feature map corresponding to the feature image group according to the image features obtained after the feature extraction processing.

[0025] S104: Fusing the output feature maps corresponding to each feature image group to obtain a fused feature map.

[0026] S105: Determine the target object in the fused feature map, and use the target object as a defective body inside the power equipment in the internal image of the power equipment.

[0027] In a specific embodiment, the internal image of the electric power equipment is an X-ray image.

[0028] Please refer to Figure 2 In some embodiments, the internal defect detection method of the power equipment of some embodiments can be implemented by the RTMdet target detection algorithm model. The macroscopic architecture of the algorithm model can be decomposed into the backbone, neck and head. After the internal image of the power equipment passes through the backbone, neck and head in sequence, the defect body in the internal image of the power equipment is marked.

[0029] In step S101 of some embodiments, the input internal image of the power equipment is processed by multiple convolution layers in the backbone network to generate a series of feature maps with different scales and depths. Each convolution operation gradually abstracts and extracts features from the image, resulting in feature maps of multiple scales, which effectively encode different image information.

[0030] In step S101 of some embodiments, after the internal image of the power equipment is input into the backbone of the algorithm model, the resolution of the feature map is relatively high in the first few layers of the backbone. These shallow feature maps can capture detailed information in the image, such as edges, textures, and small shape features. Since these feature maps have a high spatial resolution, they retain more local information and fine structural details, which is important for identifying small objects and precise boundaries in images.

[0031] As the network depth increases, the number and complexity of convolutional layers gradually increase, and the resolution of these deep feature maps gradually decreases. Deep feature maps reduce the spatial dimension through pooling operations or strided convolutions during processing, but are able to capture higher-level semantic information. They integrate a large amount of local information in the global context of the image, forming a more abstract and semantic feature representation. This feature map is very helpful for recognizing large-scale structures, overall shapes, and complex scene understanding.

[0032] It is understandable that the multi-level abstraction of feature maps at different levels through deep convolution provides the model with information from details to semantics, enabling target detection and image analysis tasks to understand and process input images more accurately.

[0033] It can be understood that at the neck of the algorithm model, the Feature Pyramid Network (FPN) and the Path Aggregation Network (PAN) are combined to form PAFPN, which is the "neck network" of the algorithm, which is used to deeply fuse and process the feature maps extracted from the backbone.

[0034] Feature Pyramid Network is a network structure for multi-scale feature fusion. It generates feature pyramids in a bottom-up manner to preserve the semantic information of images at different scales. FPN enhances the network's ability to detect objects of different scales by fusing low-level and high-level features of the backbone network. In FPN, low-level feature maps (high resolution) are upsampled and fused with high-level feature maps (low resolution), which can restore image details while maintaining semantic information.

[0035] Please refer to Figure 3 , the path aggregation network further improves the flow and fusion of feature information. PAN connects feature maps of different levels through a path aggregation mechanism, thereby enhancing the information flow between feature maps. It uses the horizontal and vertical connections of feature maps to optimize the propagation and fusion of features, improving the expressiveness and detection performance of feature maps. The design of PAN enables the network to better integrate feature information from different levels, thereby improving the accuracy and robustness of target detection. The two path aggregation modules work together to form the core structure of the Neck network.

[0036] It is understandable that the main function of the head of the algorithm model is to perform the final classification and bounding box regression on the image features passed from Backbone and Neck.

[0037] In step S102 of some embodiments, the feature maps are grouped by channels, and adaptive average pooling in the horizontal and vertical directions is used to capture feature information in different directions. C×H×W is the intermediate feature map, where C represents the number of input channels, H and W represent the height and width of the input feature respectively. Therefore, the one-dimensional global average pooling that encodes global information along the horizontal dimension of C at height H can be expressed as:

[0038] Among them, xc represents the input feature of the cth channel. Similarly, the pooling output with width W in C can be expressed as:

[0039] It is understandable that in deep learning and computer vision, the number of channels of a feature map refers to the depth of the feature map in a given spatial dimension (i.e., height and width). More specifically, when we process an image through a convolutional neural network (CNN), each layer of convolution outputs one or more feature maps, each of which is a representation of the input image in a specific feature space.

[0040] In image processing, each pixel in the original image has only one color value (for grayscale images) or three color values ​​(for RGB color images). In the feature map, each pixel can correspond to multiple eigenvalues, and the set of these eigenvalues ​​constitutes the representation of the pixel in the feature space. The number of these eigenvalues ​​is the number of channels of the feature map. The more channels there are, the richer the feature information contained in the feature map. For example, in image classification tasks, different channels may capture different visual features, such as edges, textures, colors, etc.

[0041] This embodiment classifies the feature map and performs feature extraction processing on the classified feature map according to the attention weight, thereby enhancing each feature through the attention mechanism and improving the feature extraction capability. Then, the enhanced features are fused to obtain a fused feature map, which makes it easier to determine the target object in the fused feature map, so as to more accurately determine the defective body inside the power equipment in the internal image of the power equipment, which is beneficial to improve the accuracy and reduce the false detection rate when detecting defects in the power equipment.

[0042] Please refer to Figure 4 , Figure 4 The present invention is a flowchart of step S103 in a method for detecting internal defects of electric power equipment.

[0043] In some embodiments, step S103 includes: S201. Perform feature extraction processing on a feature image group through a plurality of parallel paths with preset attention weights, wherein feature extraction processing is performed on the feature image group through a first parallel path and a second parallel path, respectively, to obtain a first feature corresponding to the first parallel path and a second feature corresponding to the second parallel path.

[0044] S202: Aggregate the first feature and the second feature, and generate an output feature map corresponding to the feature image group according to the aggregated image features.

[0045] In step S201 of some embodiments, after being divided into multiple feature image groups, for each feature image group, multiple parallel paths are used to perform feature extraction processing on the feature image group to extract the attention weight descriptor of the feature image group, wherein the first parallel path includes a 1x1 convolution branch and the second parallel path includes a 3x3 convolution branch, which are respectively responsible for extracting features of different scales.

[0046] In some embodiments, a specific implementation of the step of performing feature extraction processing on a feature image group through multiple parallel paths with preset attention weights includes: According to the first direction and the second direction, the feature map of the feature image group is pooled to obtain a first image feature corresponding to the first direction and a second image feature corresponding to the second direction; the first image feature and the second image feature are weighted; and the weighted first image feature and the weighted second image feature are convolved to obtain a weighted image feature as the first feature.

[0047] In this embodiment, after the feature map of the feature image group is pooled, the pooled feature map is spliced ​​in the channel dimension, and subjected to 1×1 convolution processing to obtain weighted horizontal features and weighted vertical features. The weighted horizontal features are used as the first image features, and the weighted vertical features are used as the second image features.

[0048] In step S202 of some embodiments, feature aggregation is enriched by providing a cross-spatial information aggregation method in different spatial dimensional directions. The output of the 1x1 branch encodes global spatial information through two-dimensional global average pooling, while the output of the 3x3 branch is directly converted to the corresponding dimensional shape, and then these outputs are aggregated through a matrix dot product operation to generate a first spatial attention map. The output feature map within each group is aggregated through the Sigmoid function of the two generated spatial attention weight values ​​to capture pixel-level pairing relationships and highlight the global context of all pixels. The final output is a feature map of the same size as the input, thereby effectively enhancing the feature representation by normalizing the feature map and applying the calculated attention weights to the feature map using the sigmoid activation function.

[0049] Please refer to Figure 5 , Figure 5 The present invention is a flowchart of step S202 in a method for detecting internal defects of electric power equipment.

[0050] In some embodiments, step S202 includes: S301: Generate a first feature map corresponding to a first feature and a second feature map corresponding to a second feature.

[0051] S302, performing a global average pooling operation on the first feature map and the second feature map respectively to obtain a weight vector corresponding to the first feature map and a weight vector corresponding to the second feature map.

[0052] S303: Perform a matrix dot product operation on the weight vector corresponding to the first feature map and the weight vector corresponding to the second feature map to obtain a relationship strength value between the first feature map and the second feature map.

[0053] S304: Determine an attention weight ratio between the first feature map and the second feature map based on a preset binary classification function.

[0054] S305. Perform a weighted sum operation on each feature pair corresponding to the first feature map and the second feature map according to the relationship strength value and the attention weight ratio to generate a weighted feature map as an output feature map.

[0055] It can be understood that in step S302, global average pooling is a pooling operation that averages all elements of the entire feature map (or a group of feature maps) to obtain a single value. For a given feature map, if its size is C×H×WC×H×W (where C is the number of channels, H is the height, and W is the width), global average pooling will output a tensor of size C×1×1C×1×1, and the output of each channel is the average value of all elements of the corresponding channel.

[0056] In step S303, in the attention mechanism, global average pooling is usually used to generate an attention descriptor or weight vector. These descriptors can interact with other features through matrix multiplication to calculate the final attention weight. For example, if global average pooling is applied to two feature maps respectively, then two descriptor vectors are obtained. By calculating the dot product of the two descriptor vectors by matrix multiplication, a scalar value can be obtained, which can be interpreted as the similarity between the two feature maps or the strength of the corresponding relationship, that is, the relationship strength value.

[0057] In step S304, after obtaining the relationship strength value, the attention weight value of each feature map is calculated by the softmax function or the sigmoid function, and the ratio between the attention weight value of the first feature map and the attention weight value of the second feature map is the attention weight ratio. The attention weight value indicates the importance that should be given to each feature map when the feature is fused or weighted summed. For example, in the self-attention mechanism, the attention weight of each feature map is calculated by the softmax function to ensure that the sum of the weights of all feature maps is 1.

[0058] In step S305, the attention weight is calculated by global average pooling and matrix multiplication, and the attention information in the horizontal and vertical directions is combined to generate the final weighted feature map.

[0059] Please refer to Figure 6 In this embodiment, an attention mechanism is used to implement a method for detecting internal defects of power equipment to generate an output feature map corresponding to a feature image group. Specifically, the feature image group passes through a first parallel path of two 1x1 convolution branches and a second parallel path of a 3x3 convolution branch, and is processed by pooling, convolution, etc., and then aggregated by cross-space learning to generate an output feature map corresponding to the feature image group.

[0060] It can be understood that this embodiment effectively integrates multi-scale and cross-spatial feature information, improves the expressiveness of the feature map, and reduces the computational complexity through efficient calculation methods.

[0061] Please refer to Figure 7 , Figure 7 The present invention is a flowchart of step S104 in a method for detecting internal defects of electric power equipment.

[0062] In some embodiments, step S104 includes: S401, using a preset prediction model to generate a prediction box in the fusion feature map.

[0063] S402: Acquire a target object through a prediction box, wherein the target object is a marker within the prediction box.

[0064] S403: taking the target object as a defective body inside the power equipment in the internal image of the power equipment.

[0065] Please refer to Figure 8 , Figure 8 The present invention is a flowchart of the first step of training a prediction model in a method for detecting internal defects of power equipment.

[0066] In some embodiments, based on the above embodiments, the method for detecting internal defects of electric power equipment further includes training a prediction model. The specific method for training the prediction model includes: S501: Determine the overlap value between the predicted frame and the real frame.

[0067] S502: Generate a soft label based on the overlap degree value.

[0068] S503: construct a loss function between soft labels and classification scores, wherein the classification scores are used to evaluate the ability of a preset prediction model to recognize and classify the identifiers in the fused feature map.

[0069] S504: Based on the loss function between the soft label and the classification score, the prediction model is trained, and the prediction box is generated in the fusion feature map using the trained prediction model.

[0070] In a specific embodiment, for each predicted box, the intersection over union (IoU) between the predicted box and the true box is calculated as the overlap value. IoU is a value between 0 and 1, indicating the degree of overlap between the predicted box and the true box. For example, if the IoU is 0.7, it means that 70% of the area of ​​the predicted box overlaps with the true box. In this embodiment, the loss function between the soft label and the classification score is the classification loss function Loss cls adopts Quality Focal Loss (QFL), which combines the classification score with the detection box IoU, proposes a soft label associated with IoU, and converts the actual label of the target into a continuous value. The loss calculation formula is as follows:

[0071] Among them, y is a quality label ranging from 0 to 1, and σ is the predicted value.

[0072] Please refer to Fig. 9 , Fig. 9 The present invention is a flowchart of the second step of training a prediction model in a method for detecting internal defects of power equipment.

[0073] In some embodiments, based on the above embodiments, the method for detecting internal defects of electric power equipment further includes training a prediction model. The specific method for training the prediction model includes: S601: When generating a prediction box, determine the center point coordinates of the prediction box and the width and height of the prediction box.

[0074] S602: Based on the center point coordinates, height, width, and overlap value, a loss function between the predicted box and the true box is constructed.

[0075] S603: Based on the loss function between the predicted box and the true box, the prediction model is trained, and the predicted box is generated in the fused feature map using the trained prediction model.

[0076] In a specific embodiment, the center point coordinates of the predicted box are (cx, cy), the width is w, and the height is h. In this embodiment, the loss function between the predicted box and the true box is CIoU Loss, and CIoU Loss is defined as:

[0077] Among them, b, b gt Represent the center points of the predicted box and the real box respectively, and ρ represents the Euclidean distance between the two center points. c represents the diagonal length of the smallest enclosing rectangle that can contain both the predicted box and the real box, α is the weight function, and υ is used to measure the consistency of the aspect ratio.

[0078] In some embodiments, based on the above embodiments, the method for detecting internal defects of electric power equipment further includes: Based on the resolution of each feature map, each feature map is classified into a first image group or a second image group, wherein the resolution of each feature map in the first image group is lower than the resolution of each feature map in the second image group; each feature map in the first image group is converted into a feature map with a preset number of channels; each feature map with a preset number of channels is arranged in a preset order to generate an optimized feature map, wherein each feature map with a preset number of channels is used as a pixel of the optimized feature map.

[0079] In a specific implementation of this embodiment, efficient image upsampling is achieved by combining convolution operation and pixel shuffling technology. First, the convolution layer converts the low-resolution image into a feature map with a high number of channels, and then rearranges these high-channel feature maps into a higher resolution space through the pixel shuffling operation. Pixel shuffling is a pixel rearrangement operation, the principle of which is to arrange the feature map of each preset number of channels in a preset order to generate an optimized feature map, thereby increasing the size and resolution of the feature map. While strengthening the feature extraction capability, this embodiment strengthens the upsampling process on the network to improve the high-quality feature map for subsequent network operations. Ultimately, efficient and high-quality feature extraction and fusion are achieved.

[0080] It is understandable that this embodiment implements an improved version of the RTMdet algorithm, which enhances the detection capability of internal defects of power equipment by optimizing the feature fusion processing steps, and replaces the original loss function with a more advanced loss function to improve the detection and classification capabilities. The improved RTMdet algorithm uses deep convolutional networks and multi-scale feature fusion technology, which can effectively improve detection accuracy and robustness. The results show that this method has a high detection accuracy and a low false detection rate when processing power equipment defects in X-ray images, providing strong support for the maintenance and safe operation of power equipment.

[0081] The present application also provides an embodiment of the application of the internal defect detection method of power equipment in a specific scenario. In this embodiment, Python is used as the programming language, and the experimental equipment adopts the server Ubantu 18.04 system, the server performance is i9-10900X CPU, GPU is 3090, and the running memory is 24GB.

[0082] The power equipment tested is the internal disk insulator of GIS (gas insulated switch). The pot insulator dataset used in the experiment is obtained by an X-ray machine. The detailed classification of pot insulator defect types is shown in Table 1. The dataset is divided into: training set 60%, validation set 25%, and test set 15%.

[0083] Table 1 - Detailed classification of detection defect types

[0084] In order to demonstrate the advanced performance of the improved algorithm of the present invention, a comparative experiment was conducted with the mainstream algorithm YOLOv8, and the following performance evaluation indicators were used to evaluate the model performance:

[0085]

[0086]

[0087] Among them, precision indicates the accuracy of the classifier in correctly identifying the defect location, and recall indicates the ability of the classifier to cover the location. TP indicates the positive sample classified as correct, FP indicates the positive sample classified as incorrect, and FN indicates the negative sample classified as incorrect. AP is the area enclosed by the horizontal axis and the vertical axis in the Precision-Recall curve. The performance index evaluation comparison is shown in Table 2 below.

[0088] Table 2- Comparison of experimental results evaluation indicators

[0089] From the above results, it can be seen that the improved RTMdet proposed in this scheme has a great improvement in detection accuracy compared with the mainstream YOLOv8 algorithm, which proves the advanced nature of the algorithm improvement. At the same time, it shows that the improved algorithm of the present invention is very suitable for internal defect detection of power equipment in X-ray images, and effectively solves the problem of increased difficulty in defect detection due to the presence of noise, complex background and tiny defect targets in X-ray images.

[0090] refer to Fig.10 , Fig.10 The figure is a schematic diagram of the structure of a device for detecting internal defects of electric power equipment.

[0091] In a second aspect, this embodiment provides an internal defect detection device for electric power equipment, comprising: The input module 701 is used to obtain an internal image of the electric power equipment and generate a plurality of feature maps based on the internal image of the electric power equipment.

[0092] The grouping module 702 is used to classify each feature map based on the number of channels of each feature map to obtain multiple feature image groups.

[0093] The feature enhancement module 703 is used to perform feature extraction processing on the feature image group based on the attention weight, and generate an output feature map corresponding to the feature image group according to the image features obtained after the feature extraction processing.

[0094] The feature fusion module 704 is used to fuse the output feature maps corresponding to each feature image group to obtain a fused feature map.

[0095] The output module 705 is used to determine the target object in the fused feature map and use the target object as a defective body inside the power equipment in the internal image of the power equipment.

[0096] It will be appreciated by those skilled in the art that all or some of the steps and devices in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or transient medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. It is well known to those skilled in the art that communication media generally contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery media. It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0097] In a third aspect, an embodiment of the present application provides an electronic device, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing any of the above methods for detecting internal defects of electric power equipment when executing the computer program.

[0098] refer to Fig.11 , Fig.11 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes: The processor 801 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application; The memory 802 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 802 can store operating devices and other applications. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 802, and the processor 801 calls and executes the internal defect detection method of the power equipment in the embodiment of this application; Input / output interface 803, used to implement information input and output; The communication interface 804 is used to realize the communication interaction between the device and other devices. The communication can be realized through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.); A bus 805 that transmits information between various components of the device (e.g., the processor 801, the memory 802, the input / output interface 803, and the communication interface 804); The processor 801 , the memory 802 , the input / output interface 803 and the communication interface 804 are connected to each other in communication within the device via a bus 805 .

[0099] It can be understood that the contents of the above method embodiments are all applicable to the electronic device embodiment, the functions specifically implemented by the electronic device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0100] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a program executable by a processor, and the program executable by the processor is used to implement the method for detecting internal defects of electric power equipment as described in any one of the above-mentioned specific embodiments when executed by the processor.

[0101] An embodiment of the present application also discloses a computer program product, including a computer program or computer instructions, wherein the computer program or computer instructions are stored in a computer-readable storage medium, a processor of a computer device reads the computer program or computer instructions from the computer-readable storage medium, and the processor executes the computer program or computer instructions, so that the computer device executes the method for detecting internal defects of power equipment as described in any of the previous embodiments.

[0102] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0103] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, device, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. It should be understood that in the present application, "at least one (item)" refers to one or more, and "a plurality" refers to two or more.

[0104] In the several embodiments provided in the present application, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0105] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0106] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0107] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.

[0108] Although the description of the present application has been quite detailed and specifically describes several described embodiments, it is not intended to be limited to any of these details or embodiments or any particular embodiment, but should be regarded as providing a broad possible interpretation of these claims by reference to the attached claims, taking into account the prior art, so as to effectively cover the intended scope of the present application. In addition, the above description of the present application is based on the embodiments foreseeable by the inventor, and its purpose is to provide a useful description, and those non-substantial changes to the present application that have not yet been foreseen may still represent equivalent changes to the present application.

Claims

1. A method for detecting internal defects of electric power equipment, characterized in that: The method comprises: Acquire an internal image of the electric power equipment, and generate a plurality of feature maps based on the internal image of the electric power equipment; Based on the number of channels of each of the feature maps, each of the feature maps is classified to obtain a plurality of feature image groups; Performing feature extraction processing on the feature image group based on the attention weight, and generating an output feature map corresponding to the feature image group according to the image features obtained after the feature extraction processing; The output feature maps corresponding to each of the feature image groups are fused to obtain a fused feature map; A target object in the fused feature map is determined, and the target object is used as a defective body inside the power equipment in the internal image of the power equipment.

2. A method for detecting internal defects of electric power equipment according to claim 1, characterized in that: The method comprises: Based on the resolution of each of the feature maps, classifying each of the feature maps into a first image group or a second image group, wherein the resolution of each feature map in the first image group is lower than the resolution of each feature map in the second image group; Convert each feature map in the first image group into a feature map with a preset number of channels; Each feature map of the preset number of channels is arranged in a preset order to generate an optimized feature map, wherein each feature map of the preset number of channels serves as a pixel of the optimized feature map.

3. A method for detecting internal defects of electric power equipment according to claim 1 or 2, characterized in that: The step of performing feature extraction processing on the feature image group based on the attention weight, and generating an output feature map corresponding to the feature image group according to the image features obtained after the feature extraction processing, includes: Performing feature extraction processing on the feature image group through a plurality of parallel paths with preset attention weights, wherein the feature image group is subjected to feature extraction processing through a first parallel path and a second parallel path, respectively, to obtain a first feature corresponding to the first parallel path and a second feature corresponding to the second parallel path; Aggregation processing is performed on the first feature and the second feature, and an output feature map corresponding to the feature image group is generated according to the image features after the aggregation processing.

4. A method for detecting internal defects of electric power equipment according to claim 3, characterized in that: The step of performing feature extraction processing on the feature image group through a plurality of parallel paths with preset attention weights comprises: According to a first direction and a second direction, a feature map of the feature image group is pooled to obtain a first image feature corresponding to the first direction and a second image feature corresponding to the second direction; performing weighted processing on the first image feature and the second image feature; Convolution processing is performed on the weighted first image feature and the weighted second image feature to obtain a weighted image feature as the first feature.

5. A method for detecting internal defects of electric power equipment according to claim 3, characterized in that: The aggregating the first feature and the second feature, and generating an output feature map corresponding to the feature image group according to the image features after the aggregation process, includes: Generate a first feature map corresponding to the first feature and a second feature map corresponding to the second feature; Performing a global average pooling operation on the first feature map and the second feature map respectively to obtain a weight vector corresponding to the first feature map and a weight vector corresponding to the second feature map; Performing a matrix dot product operation on a weight vector corresponding to the first feature map and a weight vector corresponding to the second feature map to obtain a relationship strength value between the first feature map and the second feature map; Determine an attention weight ratio between the first feature map and the second feature map based on a preset binary classification function; According to the relationship strength value and the attention weight ratio, a weighted sum operation is performed on each feature pair corresponding to the first feature map and the second feature map to generate a weighted feature map as the output feature map.

6. A method for detecting internal defects of electric power equipment according to claim 1 or 2, characterized in that: The determining of the target object in the fused feature image and using the target object as a defective body inside the power equipment in the internal image of the power equipment includes: Generate a prediction box in the fused feature map using a preset prediction model; Acquire the target object through the prediction frame, wherein the target object is a marker within the prediction frame; The target object is taken as a defective body inside the electric power equipment in the internal image of the electric power equipment.

7. A method for detecting internal defects of electric power equipment according to claim 6, characterized in that: The determining of the target object in the fused feature image and using the target object as a defective body inside the power equipment in the internal image of the power equipment includes: Determine the overlap value between the predicted box and the true box; Based on the overlap value, generating a soft label; Constructing a loss function between soft labels and classification scores, wherein the classification scores are used to evaluate the ability of the preset prediction model to identify and classify the identifiers in the fused feature map; Based on the loss function between the soft label and the classification score, the prediction model is trained, and the prediction box is generated in the fused feature map using the trained prediction model.

8. A method for detecting internal defects of electric power equipment according to claim 7, characterized in that: The determining of the target object in the fused feature image and using the target object as a defective body inside the power equipment in the internal image of the power equipment includes: When generating the prediction box, determining the coordinates of the center point of the prediction box and the width and height of the prediction box; Constructing a loss function between the predicted box and the true box based on the center point coordinates, the height, the width, and the overlap value; Based on the loss function between the predicted box and the true box, the prediction model is trained, and the trained prediction model is used to generate the prediction box in the fused feature map.

9. An internal defect detection device for electric power equipment, characterized in that: The device comprises: An input module, used to obtain an internal image of the power equipment and generate a plurality of feature maps based on the internal image of the power equipment; A grouping module, used for classifying each of the feature images based on the number of channels of each of the feature images to obtain a plurality of feature image groups; A feature enhancement module, used to perform feature extraction processing on the feature image group based on the attention weight, and generate an output feature map corresponding to the feature image group according to the image features obtained after the feature extraction processing; A feature fusion module, used for fusing the output feature maps corresponding to each of the feature image groups to obtain a fused feature map; The output module is used to determine the target object in the fused feature map and use the target object as a defective body inside the power equipment in the internal image of the power equipment.

10. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the method for detecting internal defects of electric power equipment according to any one of claims 1 to 8 when executing the computer program.

11. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for detecting internal defects of electric power equipment according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Video super-resolution method based on multi-frame attention mechanism progressive fusion

    CN112991183A

  • Image description generation method based on text hierarchical structure

    CN113569932A

  • Power distribution equipment defect detection method and device, computer equipment and storage medium

    CN114445336A

  • Artificial intelligence-based typing method and device for thymoma histopathology

    CN115471448A

  • Insulator defect detection model generation method and device, equipment and storage medium

    CN115829999A