Power equipment detection method and system
By extracting and fusion of power equipment images and using enhanced object detection models for detection, the problem of low detection reliability of traditional power equipment is solved, and higher detection accuracy and robustness are achieved.
Patent Information
- Application Number
- CN202411790367.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-03-18
AI Technical Summary
Traditional power equipment inspection mainly relies on manual inspection or sensor monitoring, resulting in low reliability of power equipment inspection.
A power equipment detection method is adopted. By obtaining the power equipment image and inputting the trained enhanced object detection model, multi-level feature extraction is used for the backbone network, feature pyramid fusion is performed for the neck network, and detection is performed for the head network and result determination is performed.
It improves the accuracy and robustness of power equipment detection, enhances feature extraction capabilities, realizes the interaction of multi-scale information, and improves the reliability of power equipment detection.
Smart Images

Figure CN119649004A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power equipment detection, and in particular to a power equipment detection method and system. Background Art
[0002] Power equipment detection is an important part of power system operation and maintenance, and its main purpose is to ensure the safe and reliable operation of the power system.
[0003] Traditional power equipment detection mainly relies on manual inspection or sensor monitoring. Manual inspection includes regular visual inspection of power equipment such as substations and transmission lines, and the use of infrared thermal imaging instruments to detect abnormal equipment temperature. However, it has disadvantages such as low efficiency, high cost, strong subjectivity, incomplete detection coverage, and difficulty in detection in complex terrain. Sensor monitoring collects equipment operation data in real time by installing temperature sensors, humidity sensors, and current sensors on power equipment. Although sensor monitoring improves the real-time collection of equipment status information, it still mainly relies on manual troubleshooting of equipment status information, and has the problem of limited data processing capabilities, resulting in low reliability of power equipment detection. Summary of the invention
[0004] The present invention provides a method and system for detecting electric equipment, which solves the technical problem that the traditional detection of electric equipment mainly relies on manual inspection or sensor monitoring, and the reliability of the detection of electric equipment is low.
[0005] A first aspect of the present invention provides a method for detecting electric power equipment, comprising:
[0006] Acquire an image of electric power equipment, and input the image of electric power equipment into a trained enhanced target detection model; the trained enhanced target detection model includes a backbone network, a neck network, and a head network;
[0007] Perform multi-level feature extraction and enhancement on the power equipment image through the backbone network to generate low-level features, middle-level features and high-level features;
[0008] Inputting the low-level features, the middle-level features and the high-level features into the neck network to perform feature pyramid fusion, and outputting a plurality of fused features;
[0009] The head network is used to detect each of the fusion features respectively and then add them element by element to determine the power equipment detection result.
[0010] Optionally, the backbone network includes an image enhancement module, a CBS module, a DCN module, a Shuffle attention module, an ELAN module, a GAMP module and a CAfuse module; performing multi-level feature extraction and enhancement on the power equipment image through the backbone network to generate low-level features, middle-level features and high-level features includes:
[0011] Input the power equipment image into the image enhancement module for image enhancement and output enhanced features, and perform convolution operation on the enhanced features through two stacked CBS modules to output a first intermediate feature;
[0012] Using two consecutive CBS modules to perform continuous feature extraction on the first intermediate feature to generate a second intermediate feature;
[0013] After the first intermediate feature is convolved by the DCN module and input into the Shuffle attention module for attention operation, it is concatenated with the second intermediate feature to determine a fusion feature;
[0014] After the fusion features are processed based on the ELAN module, down-sampling and feature extraction are performed using the cascaded GAMP module and the ELAN module to construct low-level features;
[0015] The low-level features are input into the GAMP module and the ELAN module connected in series for downsampling and feature extraction to generate mid-level features;
[0016] After downsampling and feature processing through the cascaded GAMP module and ELAN module, mid- and high-level features are obtained, and the mid- and high-level features are input into the CAfuse module for feature enhancement, and high-level features are output.
[0017] Optionally, the step of inputting the power equipment image into an image enhancement module for image enhancement and outputting enhanced features includes:
[0018] Performing global average pooling on the power equipment image to obtain pooling features;
[0019] Extracting diagonal elements from the pooled features to form global channel features, and extracting band elements from the pooled features to form local channel features;
[0020] After transposing the global channel feature, multiply the global channel feature element by element with the local channel feature to generate a first correlation feature;
[0021] After transposing the local channel feature, multiply it element by element with the global channel feature to construct a second related feature;
[0022] The first related features and the second related features are respectively summed and aggregated according to feature dimensions to obtain first aggregated features and second aggregated features respectively;
[0023] Nonlinear mapping is performed on the first aggregation and the second aggregation respectively through a Sigmoid activation function to generate a first activation feature and a second activation feature respectively;
[0024] The first activation feature and the second activation feature are respectively multiplied element by element with the associated learnable parameter matrix, and then added element by element, and residually connected with the power equipment image to output enhanced features.
[0025] Optionally, the GAMP module includes a maximum pooling layer, a graph convolution layer, a channel attention layer and a CBS layer; the processing process of the GAMP module includes:
[0026] After the perceptual input features input to the GAMP module are processed by the maximum pooling layer, the features are extracted by the CBS layer to generate the first perceptual intermediate features;
[0027] After performing a convolution operation on the perception input feature using a graph convolution layer, channel feature enhancement is performed based on a channel attention layer to construct a second perception intermediate feature;
[0028] The first perceptual intermediate feature and the second perceptual intermediate feature are added element by element to determine a perceptual output feature.
[0029] Optionally, the Cafuse module includes a CNN layer, a channel attention layer and an efficient multi-scale attention layer; the step of inputting the mid- and high-level features into the Cafuse module for feature enhancement and outputting high-level features includes:
[0030] After refining the channel features of the mid- and high-level features through the channel attention layer, an efficient multi-scale attention layer is used to enhance the features to construct enhanced intermediate features;
[0031] After the enhanced input features are convolved based on the CNN layer, they are added element by element with the enhanced intermediate features to output high-level features.
[0032] Optionally, the neck network includes an MFEblock module, a convolution module, an upsampling module, an ELAN-W module, a hybrid attention module and an MP module; the low-level features, the middle-level features and the high-level features are input into the neck network for feature pyramid fusion, and a plurality of fused features are output, including:
[0033] Perform multi-scale feature extraction on the high-level features through the MFEblock module to generate multi-scale fusion features;
[0034] A convolution module is used to perform a convolution operation on the multi-scale feature, and up-sampling is performed based on an up-sampling module to determine a first up-sampling feature;
[0035] The first up-sampled feature is concatenated with the middle-level feature, and input into the ELAN-W module for feature processing, and the second up-sampled feature is output;
[0036] After convolution processing and upsampling the second up-sampled feature through a cascaded convolution module and an up-sampling module, the second up-sampled feature is concatenated with the low-level feature to construct a third up-sampled feature;
[0037] After performing feature weighting on the third up-sampled feature based on the hybrid attention module, an ELAN-W module is used to extract the feature and output the first fusion feature;
[0038] After inputting the first fused feature into the MP module for downsampling, the first fused feature is concatenated with the second upsampled feature to determine a first downsampled feature;
[0039] Using a hybrid attention module and an ELAN-W module connected in series to perform feature processing on the first down-sampled features, and output a second fused feature;
[0040] After downsampling the second fused feature through the MP module, it is concatenated with the multi-scale feature to generate a second down-sampled feature;
[0041] The second down-sampled feature is input into the cascaded hybrid attention module and ELAN-W module for feature processing, and the third fused feature is output.
[0042] Optionally, the MFEblock module includes a hole convolution layer with different expansion rates, a GAP layer and a Sigmoid activation function; and the multi-scale feature extraction of the high-level features through the MFEblock module to generate multi-scale fusion features includes:
[0043] After extracting multi-scale features from the high-level features using multiple atrous convolutional layers, multiple scale features are generated;
[0044] Determine multiple channel weights by performing global average pooling on each of the scale features using a GAP layer;
[0045] After weight mapping of each channel weight based on the Sigmoid activation function, the weights are respectively multiplied element by element with the corresponding scale features, and element by element are added to output a multi-scale fusion feature;
[0046] Among them, the process of multi-scale feature extraction by the hole convolution layer is:
[0047] ;
[0048] In the formula, For the Atrous convolutional layers, For the The scale features of the hole convolutional layers, is the input feature of the MFEblock module, is a 3×3 hole convolution layer, is the expansion rate.
[0049] Optionally, the hybrid attention module includes a CNN layer, a channel attention layer, a spatial attention layer and a Sigmoid activation function; the processing process of the hybrid attention module includes:
[0050] Performing a convolution operation on the attention input feature input into the hybrid attention module using a CNN layer to generate a first attention intermediate feature;
[0051] A channel attention layer is used to perform channel enhancement on the first attention intermediate feature, and after inputting a Sigmoid activation function mapping, it is added element by element with the first attention intermediate feature to output a second attention intermediate feature;
[0052] The first attention intermediate feature is spatially weighted by the spatial attention layer, and after being mapped by the Sigmoid activation function, it is element-wise added to the first attention intermediate feature to determine a third attention intermediate feature;
[0053] Perform channel weighting on the first attention intermediate feature based on the channel attention layer to obtain a channel enhanced feature;
[0054] The channel enhancement feature is input into the spatial attention layer for spatial enhancement, and after being mapped by the Sigmoid activation function, it is added element by element with the channel enhancement feature to output the fourth attention intermediate feature;
[0055] The second attention intermediate feature, the third attention intermediate feature and the fourth attention intermediate feature are added element by element to determine the attention output feature.
[0056] Optionally, the power equipment detection result includes a prediction box and a prediction category; and further includes:
[0057] The prediction boxes determined by the trained enhanced target detection models of different grid specifications are normalized by the Sigmoid function and then multiplied element-by-element with the associated prediction boxes to determine multiple corresponding weighted prediction boxes;
[0058] Using each of the weighted prediction frames to perform element-by-element addition, and outputting a target prediction frame;
[0059] The prediction categories determined by the trained enhanced target detection models of different grid specifications are voted, and the prediction category with the most votes is used as the target prediction category.
[0060] A second aspect of the present invention provides an electric power equipment detection system, comprising:
[0061] A data acquisition module, used for acquiring an image of electric power equipment, and inputting the image of electric power equipment into a trained enhanced target detection model; the trained enhanced target detection model includes a backbone network, a neck network and a head network;
[0062] A data extraction module, used to perform multi-level feature extraction and enhancement on the power equipment image through the backbone network to generate low-level features, middle-level features and high-level features;
[0063] A data fusion module, used for inputting the low-level features, the middle-level features and the high-level features into the neck network to perform feature pyramid fusion and output a plurality of fused features;
[0064] The data detection module is used to use the head network to detect each of the fusion features respectively and then add them element by element to determine the detection result of the power equipment.
[0065] It can be seen from the above technical solutions that the present invention has the following advantages:
[0066] The above scheme of the present invention provides a method for detecting electric equipment, including: obtaining an image of electric equipment, inputting the image of electric equipment into a trained enhanced target detection model; the trained enhanced target detection model includes a backbone network, a neck network and a head network; performing multi-level feature extraction and enhancement on the image of electric equipment through the backbone network to generate low-level features, middle-level features and high-level features; inputting low-level features, middle-level features and high-level features into the neck network for feature pyramid fusion, and outputting multiple fused features; using the head network to detect each fused feature respectively and then add them element by element to determine the detection result of the electric equipment. The image of electric equipment is detected by the enhanced target detection model with improved structure, which enhances the feature extraction capability, realizes the interaction of multi-scale information, improves the accuracy and robustness of target detection, and thus improves the reliability of electric equipment detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0068] Figure 1 A flowchart of a method for detecting electric power equipment provided by an embodiment of the present invention;
[0069] Figure 2 A network architecture diagram of an enhanced target detection model provided by an embodiment of the present invention;
[0070] Figure 3 A schematic diagram of the structure of an image enhancement module provided by an embodiment of the present invention;
[0071] Figure 4 A schematic diagram of the structure of a GAMP module provided in an embodiment of the present invention;
[0072] Figure 5 A schematic diagram of the structure of a Cafe module provided in an embodiment of the present invention;
[0073] Figure 6 A schematic diagram of the structure of the MFEblock module provided in an embodiment of the present invention;
[0074] Figure 7 A schematic diagram of the structure of a mix-Attention module provided in an embodiment of the present invention;
[0075] Figure 8 An integrated network architecture of an enhanced target detection model of four different grids provided in an embodiment of the present invention;
[0076] Fig. 9 A structural block diagram of an electric power equipment detection system provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0077] The embodiment of the present invention provides a method and system for detecting electric equipment, which are used to solve the technical problem that traditional electric equipment detection mainly relies on manual inspection or sensor monitoring and has low reliability of electric equipment detection.
[0078] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0079] See also Figure 1 , Figure 1 A flowchart of the steps of a method for detecting electric equipment provided by an embodiment of the present invention.
[0080] The present invention provides a method for detecting electric power equipment, comprising:
[0081] Step 101: Acquire an image of power equipment, and input the image of power equipment into a trained enhanced target detection model; the trained enhanced target detection model includes a backbone network, a neck network, and a head network.
[0082] It should be noted that this embodiment improves the structure based on YOLOv7 to obtain an enhanced target detection model (Enhance-Y7). The overall structure of Enhance-Y7 includes a trunk network, a neck network and a head network. The trained enhanced target detection model is determined by training the constructed enhanced target detection model. When the image of the power equipment to be detected is obtained, the trained enhanced target detection model is used for detection;
[0083] The training process of the enhanced target detection model includes: obtaining training power equipment images and real power equipment detection results; inputting the training power equipment images into the untrained enhanced target detection model, and outputting the predicted power equipment detection results; using the real power equipment detection results and the predicted power equipment detection results to calculate the loss function value, iteratively optimizing the untrained enhanced target detection model according to the loss function value until the loss function value converges, and determining the trained enhanced target detection model; the loss function used to calculate the loss function value is Focal-EIOU, which combines the Focal Loss used for classification loss and the EIOU (Efficient Intersection over Union) loss used for frame regression loss, which can solve the problem of category imbalance between prediction boxes with inconsistent aspect ratios and positive and negative samples, improve the model's ability to accurately locate the position of objects, and help improve the accuracy of model detection. The calculation process of the loss function value includes:
[0084] ;
[0085] ;
[0086] In the formula, is the first weight coefficient, is the Focal loss value, is the second weight coefficient, is the EIOU loss value, is the intersection-over-union ratio of the predicted box and the true box, is the center distance between the predicted box and the true box, is the diagonal length of the minimum enclosing box containing the predicted box and the true box, is the third weight coefficient, is the difference in width, is the fourth weight coefficient, is a high difference; the first weight coefficient and the second weight coefficient are used to balance the relative importance of classification loss and regression loss.
[0087] Step 102: Perform multi-level feature extraction and enhancement on the power equipment image through the backbone network to generate low-level features, middle-level features and high-level features.
[0088] Step 102 includes the following sub-steps:
[0089] S11, inputting the power equipment image into the image enhancement module for image enhancement and outputting enhanced features, and performing convolution operation on the enhanced features through two stacked CBS modules to output a first intermediate feature;
[0090] S12, using two consecutive CBS modules to perform continuous feature extraction on the first intermediate feature to generate a second intermediate feature;
[0091] S13, after performing convolution processing on the first intermediate feature through the DCN module and inputting it into the Shuffle attention module for attention operation, it is concatenated with the second intermediate feature to determine the fusion feature;
[0092] S14, after the fusion features are processed based on the ELAN module, the cascaded GAMP module and the ELAN module are used for downsampling and feature extraction to construct low-level features;
[0093] S15, input the low-level features into the GAMP module and ELAN module connected in series for downsampling and feature extraction to generate mid-level features;
[0094] S16. After downsampling and feature processing through the cascaded GAMP module and ELAN module, mid- and high-level features are obtained, and the mid- and high-level features are input into the CAfuse module for feature enhancement, and high-level features are output.
[0095] It should be noted that the structure of the backbone network is as follows Figure 2 As shown, it includes image enhancement module, CBS module, DCN (deformable convolutional network) module, Shuffle attention module, ELAN module, GAMP (GCN-Attention-MP) module and CAfuse module (CNN-Attention hybrid module). The backbone network is used to perform image enhancement and multi-level feature extraction on the image of power equipment, thereby outputting low-level features, middle-level features and high-level features as the input of the neck network.
[0096] In a specific implementation, the power equipment image is input into an image enhancement module for image enhancement and outputting enhanced features, including:
[0097] Perform global average pooling on the power equipment image to obtain pooling features;
[0098] Extract diagonal elements from the pooled features to form global channel features, and extract strip elements from the pooled features to form local channel features;
[0099] After transposing the global channel feature, multiply it element-by-element with the local channel feature to generate the first correlation feature;
[0100] After transposing the local channel feature, it is multiplied element by element with the global channel feature to construct the second related feature;
[0101] The first related feature and the second related feature are respectively summed and aggregated according to the feature dimension to obtain a first aggregate feature and a second aggregate feature respectively;
[0102] The first aggregation and the second aggregation are nonlinearly mapped respectively through the Sigmoid activation function to generate the first activation feature and the second activation feature respectively;
[0103] The first activation feature and the second activation feature are respectively multiplied element-by-element with the associated learnable parameter matrix, and then added element-by-element, and residually connected with the power equipment image to output enhanced features.
[0104] It should be noted that the structure of the image enhancement module is as follows Figure 3 As shown, firstly, the power equipment image is feature extracted through the GAP (global average pooling) layer to obtain the pooled features. The calculation process of GAP includes:
[0105] ;
[0106] In the formula, is the input feature (size is ), is the height of the input feature, is the width of the input feature, is the depth of the input feature (i.e. the number of feature channels), The input feature Row, No. Column and Elements of the depth channel;
[0107] Secondly, diagonal elements (diag) are extracted from the pooling features to form global channel features to capture global information, and band elements (band), i.e. diagonal elements and elements adjacent to the diagonal elements, are extracted from the pooling features to form local channel features to capture global information; then, the global channel features and local channel features are multiplied by each other's transpose to obtain two related features, and the first related feature and the second related feature both contain the interaction of global information and local information; then, the two related features are respectively subjected to feature aggregation to obtain the corresponding first aggregated feature and the second aggregated feature, and feature aggregation is to take the sum of the elements of each dimension of each related feature as the value of each feature, and the two aggregated features are processed by the Sigmoid activation function to increase the nonlinear expression ability and avoid the noise and distortion caused by excessive enhancement, and then the initialized and trained learnable parameter matrix is introduced, multiplied, added, and residually connected with the power equipment image, and the final enhanced feature is output, and the module can adapt to different image characteristics through the learnable parameter matrix to improve the enhancement effect.
[0108] In a specific embodiment, the processing of the GAMP module includes:
[0109] After the perceptual input features of the GAMP module are processed by the maximum pooling layer, the features are extracted by the CBS layer to generate the first perceptual intermediate features;
[0110] After using the graph convolution layer to perform convolution operations on the perceptual input features, the channel features are enhanced based on the channel attention layer to construct the second perceptual intermediate features;
[0111] The first perceptual intermediate feature and the second perceptual intermediate feature are added element by element to determine the perceptual output feature.
[0112] It should be noted that the structure of the GAMP module is as follows Figure 4 As shown in the figure, it includes a maximum pooling layer (Maxpool), a graph convolution layer (GCN), a channel attention layer and a CBS layer, which nest graph convolution, channel attention and the original MP module of YOLOv7. Graph convolution can improve the perception of global information, and channel attention can improve the flexibility of feature selection.
[0113] In a specific implementation, the mid- and high-level features are input into the CAfuse module for feature enhancement, and the high-level features are output, including:
[0114] After refining the channel features of the mid- and high-level features through the channel attention layer, an efficient multi-scale attention layer is used to enhance the features and construct enhanced intermediate features;
[0115] After convolution processing of the enhanced input features based on the CNN layer, they are added element by element with the enhanced intermediate features to output high-level features.
[0116] It should be noted that the structure of the Cafuse module is as follows Figure 5 As shown in the figure, there are two branches consisting of a CNN layer, a channel attention layer and an efficient multi-scale attention layer (EMAttention). The first branch is composed of a CNN layer, and the second branch is nested by channel attention and EMAttention. The features extracted by the two branches are fused to obtain high-level features.
[0117] The processing process of the efficient multi-scale attention layer includes: dividing the input efficient input features into multiple sub-feature groups, each group contains a certain number of channels, and processing them in parallel through two branches. One branch performs global average pooling on the X dimension and Y dimension, and then performs channel information interaction through 1*1 convolution, and then generates feature weights of two dimensions through the Sigmoid function, re-weights the sub-feature groups, and normalizes them through GroupNorm to obtain a normalized feature matrix, which includes global information interaction between channels, and then generates the first branch feature matrix and the first branch feature weight of this branch through average pooling and Softmax; the second branch performs 3 *3 convolution extracts features to obtain the convolution feature matrix (including local cross-channel interaction and spatial information), and then generates the second branch feature matrix and the second branch feature weight of this branch through average pooling and Softmax; finally, the information interaction of the two branches and the residual connection with the efficient input features are performed, the first branch feature matrix of the first branch is multiplied by the second branch feature weight of the second branch, and the second branch feature matrix of the second branch is multiplied by the first branch feature weight of the first branch, and then the results of the two branches are added, weighted by the Sigmoid function, and then residually connected with the efficient input features to obtain an efficient output feature map; the average pooling formula is:
[0118] ;
[0119] In the formula, The output feature The value of the channel, is the height of the input feature, is the width of the input feature, is the first input feature Position in channel The value of .
[0120] Step 103: Input the low-level features, the middle-level features and the high-level features into the neck network for feature pyramid fusion, and output multiple fused features.
[0121] Step 103 includes the following sub-steps:
[0122] S21, extract multi-scale features from high-level features through the MFEblock module to generate multi-scale fusion features;
[0123] S22, using a convolution module to perform a convolution operation on the multi-scale feature, and performing upsampling based on an upsampling module to determine a first upsampling feature;
[0124] S23, concatenating the first up-sampled feature with the middle-level feature, and inputting the concatenated feature into the ELAN-W module for feature processing, and outputting the second up-sampled feature;
[0125] S24, after convolution processing and upsampling the second up-sampled feature through the cascaded convolution module and up-sampling module, concatenate it with the low-level feature to construct a third up-sampled feature;
[0126] S25, after performing feature weighting on the third up-sampled feature based on the hybrid attention module, the ELAN-W module is used to perform feature extraction, and the first fusion feature is output;
[0127] S26, inputting the first fusion feature into the MP module for downsampling, and then concatenating it with the second upsampling feature to determine the first downsampling feature;
[0128] S27, using a hybrid attention module and an ELAN-W module connected in series to perform feature processing on the first down-sampled feature, and output a second fused feature;
[0129] S28, after downsampling the second fusion feature through the MP module, concatenating it with the multi-scale feature to generate a second down-sampled feature;
[0130] S29. Input the second down-sampled feature into the cascaded hybrid attention module and the ELAN-W module for feature processing, and output the third fused feature.
[0131] It should be noted that the structure of the neck network is Figure 2 As shown, it includes MFEblock module, convolution module (Conv), upsampling module (UpSample), ELAN-W module, mixed attention module (mix-Attention) and MP module, where the MP module includes the maximum pooling layer and the CBS layer for downsampling the features, and the features extracted at different levels are interactively fused by upsampling and downsampling through the neck network to improve the ability to capture multi-scale information.
[0132] In a specific embodiment, sub-step S21 includes:
[0133] After using multiple hole convolution layers to extract multi-scale features from high-level features, multiple scale features are generated;
[0134] By using the GAP layer to perform global average pooling on the features of each scale, multiple channel weights are determined;
[0135] After weight mapping of each channel weight based on the Sigmoid activation function, they are multiplied element-by-element with the corresponding scale features and added element-by-element to output multi-scale fusion features.
[0136] It should be noted that the structure of the MFEblock module is as follows Figure 6 As shown in the figure, it includes a hole convolution layer with different expansion rates, a GAP layer and a Sigmoid activation function; the hole convolution layer can be specifically set to 4, and by setting 4 hole convolutions with different expansion rates, it has receptive fields of different scales, captures multi-scale information for interaction, extracts multi-scale scale features, and then performs global average pooling on each scale feature to obtain the channel weight, and then uses the Sigmoid activation function to map the channel weight to between 0 and 1, and finally, the scale feature is multiplied by the corresponding channel weight and then added to generate a multi-scale fusion feature; the process of multi-scale feature extraction by the hole convolution layer is:
[0137] ;
[0138] In the formula, For the Atrous convolutional layers, For the The scale features of the hole convolutional layers, is the input feature of the MFEblock module, is a 3×3 hole convolution layer, is the expansion rate; it can be seen that is extracted directly from X via a 3×3 dilated convolution with a dilation rate of 1. It is obtained by a 3×3 dilated convolution with a dilation rate of 2. Extracted from and Same reason.
[0139] In a specific implementation, the processing of the hybrid attention module includes:
[0140] The attention input features of the input mixed attention module are convolved using the CNN layer to generate the first attention intermediate features;
[0141] The channel attention layer is used to enhance the first attention intermediate feature, and after inputting the Sigmoid activation function mapping, it is added element by element with the first attention intermediate feature to output the second attention intermediate feature;
[0142] The first attention intermediate feature is spatially weighted through the spatial attention layer, and after being mapped by the Sigmoid activation function, it is added element by element with the first attention intermediate feature to determine the third attention intermediate feature;
[0143] Based on the channel attention layer, the first attention intermediate feature is channel-weighted to obtain the channel enhanced feature;
[0144] The channel enhancement feature is input into the spatial attention layer for spatial enhancement, and after being mapped by the Sigmoid activation function, it is added element by element with the channel enhancement feature to output the fourth attention intermediate feature;
[0145] The second attention intermediate feature, the third attention intermediate feature and the fourth attention intermediate feature are added element by element to determine the attention output feature.
[0146] It should be noted that the structure of the hybrid attention module is as follows Figure 7 As shown in the figure, it includes CNN layer, channel attention layer, spatial attention layer and Sigmoid activation function. The mix-Attention module generates different weights through a hybrid attention mechanism to highlight the important features of the corresponding dimensions.
[0147] Step 104: Use the head network to detect each fusion feature separately and then add them element by element to determine the power equipment detection result.
[0148] It should be noted that the structure of the head network is as follows Figure 2 As shown, it includes multiple RepConv modules, and each RepConv module performs feature processing on the first fusion feature, the second fusion feature and the third fusion feature output by the neck network to obtain outputs of different scales and add these three outputs as the output of a trained enhanced target detection model.
[0149] Furthermore, the power equipment detection result includes a prediction box and a prediction category; the method further includes:
[0150] The prediction boxes determined by the trained enhanced target detection models of different grid specifications are normalized by the Sigmoid function and then multiplied element-by-element with the associated prediction boxes to determine multiple corresponding weighted prediction boxes;
[0151] Each weighted prediction box is added element by element and the target prediction box is output;
[0152] The prediction categories determined by the trained enhanced target detection models of different grid specifications are voted, and the prediction category with the most votes is used as the target prediction category.
[0153] It should be noted that in this embodiment, the trained enhanced target detection model is used as the basic model to integrate multiple trained enhanced target detection models of different grid specifications as the overall detection model, such as Figure 8 As shown in the figure, taking the specifications of grid sizes of 32, 16, 8, and 4 as examples, large targets, medium targets, small targets, and tiny targets can be detected accordingly. The power equipment image is detected by each trained enhanced target detection model to output the corresponding power equipment detection result. The power equipment detection result includes a prediction box and a prediction category. After that, each prediction box is weighted by the Sigmoid function to obtain a weighted prediction box, and then added to output the final target detection box. At the same time, the prediction categories of different models are voted, and the prediction category with the most votes is selected as the final target prediction category. Thus, the target detection box and the target prediction category are output as the target power equipment detection result of the power equipment image. By integrating multiple models, targets of different sizes can be effectively detected, thereby improving the overall detection accuracy, which helps to improve the efficiency of detection to a certain extent.
[0154] In an embodiment of the present invention, the image of power equipment is detected through an enhanced target detection model with improved structure, which enhances the feature extraction capability, realizes the interaction of multi-scale information, and improves the accuracy and robustness of target detection. At the same time, it also has high computing efficiency and good hardware adaptability, and is easy to implement and deploy on various computing devices such as edge devices and cloud servers. It is well suitable for power equipment detection, thereby improving the reliability of power equipment detection.
[0155] See also Fig. 9 , Fig. 9 A structural block diagram of an electric power equipment detection system provided in an embodiment of the present invention.
[0156] The present invention provides an electric power equipment detection system, comprising:
[0157] The data acquisition module 901 is used to acquire the power equipment image and input the power equipment image into the trained enhanced target detection model; the trained enhanced target detection model includes a backbone network, a neck network and a head network;
[0158] The data extraction module 902 is used to perform multi-level feature extraction and enhancement on the power equipment image through the backbone network to generate low-level features, middle-level features and high-level features;
[0159] A data fusion module 903 is used to input low-level features, middle-level features and high-level features into the neck network to perform feature pyramid fusion and output multiple fused features;
[0160] The data detection module 904 is used to use the head network to detect each fusion feature respectively and then add them element by element to determine the power equipment detection result.
[0161] Optionally, the backbone network includes an image enhancement module, a CBS module, a DCN module, a Shuffle attention module, an ELAN module, a GAMP module and a CAfuse module; the data acquisition module 901 is specifically used for:
[0162] The power equipment image is input into the image enhancement module for image enhancement and output enhancement features, and the enhancement features are convolved through two stacked CBS modules to output the first intermediate features;
[0163] Using two consecutive CBS modules to perform continuous feature extraction on the first intermediate feature to generate a second intermediate feature;
[0164] After the first intermediate feature is convolved by the DCN module and input into the Shuffle attention module for attention operation, it is concatenated with the second intermediate feature to determine the fusion feature;
[0165] After the fusion features are processed based on the ELAN module, the cascaded GAMP module and ELAN module are used for downsampling and feature extraction to construct low-level features;
[0166] The low-level features are input into the GAMP module and ELAN module connected in series for downsampling and feature extraction to generate mid-level features;
[0167] After downsampling and feature processing through the cascaded GAMP module and ELAN module, mid- and high-level features are obtained, which are then input into the CAfuse module for feature enhancement and output as high-level features.
[0168] Optionally, the power equipment image is input into an image enhancement module for image enhancement and outputting enhanced features, including:
[0169] Perform global average pooling on the power equipment image to obtain pooling features;
[0170] Extract diagonal elements from the pooled features to form global channel features, and extract strip elements from the pooled features to form local channel features;
[0171] After transposing the global channel feature, multiply it element-wise with the local channel feature to generate the first correlation feature;
[0172] After transposing the local channel feature, it is multiplied element by element with the global channel feature to construct the second related feature;
[0173] The first related feature and the second related feature are respectively summed and aggregated according to the feature dimension to obtain a first aggregate feature and a second aggregate feature respectively;
[0174] The first aggregation and the second aggregation are nonlinearly mapped respectively through the Sigmoid activation function to generate the first activation feature and the second activation feature respectively;
[0175] The first activation feature and the second activation feature are respectively multiplied element-by-element with the associated learnable parameter matrix, and then added element-by-element, and residually connected with the power equipment image to output enhanced features.
[0176] Optionally, the GAMP module includes a maximum pooling layer, a graph convolution layer, a channel attention layer, and a CBS layer; the processing process of the GAMP module includes:
[0177] After the perceptual input features of the GAMP module are processed by the maximum pooling layer, the features are extracted by the CBS layer to generate the first perceptual intermediate features;
[0178] After using the graph convolution layer to perform convolution operations on the perceptual input features, the channel features are enhanced based on the channel attention layer to construct the second perceptual intermediate features;
[0179] The first perceptual intermediate feature and the second perceptual intermediate feature are added element by element to determine the perceptual output feature.
[0180] Optionally, the Cafuse module includes a CNN layer, a channel attention layer, and an efficient multi-scale attention layer; the mid- and high-level features are input into the Cafuse module for feature enhancement, and high-level features are output, including:
[0181] After refining the channel features of the mid- and high-level features through the channel attention layer, an efficient multi-scale attention layer is used to enhance the features and construct enhanced intermediate features;
[0182] After convolution processing of the enhanced input features based on the CNN layer, they are added element by element with the enhanced intermediate features to output high-level features.
[0183] Optionally, the neck network includes an MFEblock module, a convolution module, an upsampling module, an ELAN-W module, a hybrid attention module and an MP module; the data extraction module 902 is specifically used for:
[0184] The MFEblock module is used to extract multi-scale features from high-level features and generate multi-scale fusion features;
[0185] A convolution module is used to perform a convolution operation on the multi-scale features, and up-sampling is performed based on an up-sampling module to determine a first up-sampling feature;
[0186] The first upsampled feature is concatenated with the middle-level feature, and input into the ELAN-W module for feature processing, and the second upsampled feature is output;
[0187] After convolution processing and upsampling of the second upsampled feature through the cascaded convolution module and upsampling module, it is concatenated with the low-level feature to construct the third upsampled feature;
[0188] After weighting the third upsampled feature based on the hybrid attention module, the ELAN-W module is used to extract the feature and output the first fusion feature;
[0189] After the first fusion feature is input into the MP module for downsampling, it is concatenated with the second upsampling feature to determine the first downsampling feature;
[0190] A hybrid attention module and an ELAN-W module are connected in series to process the first downsampled features and output the second fused features;
[0191] After downsampling the second fusion feature through the MP module, it is concatenated with the multi-scale feature to generate the second down-sampled feature;
[0192] The second down-sampled features are input into the cascaded hybrid attention module and ELAN-W module for feature processing, and the third fused features are output.
[0193] Optionally, the MFEblock module includes a hole convolution layer with different expansion rates, a GAP layer, and a Sigmoid activation function; the MFEblock module performs multi-scale feature extraction on the high-level features to generate multi-scale fusion features, including:
[0194] After using multiple hole convolution layers to extract multi-scale features from high-level features, multiple scale features are generated;
[0195] By using the GAP layer to perform global average pooling on the features of each scale, multiple channel weights are determined;
[0196] After weight mapping of each channel weight based on the Sigmoid activation function, it is multiplied element by element with the corresponding scale feature, and then added element by element to output the multi-scale fusion feature;
[0197] Among them, the process of multi-scale feature extraction by the hole convolution layer is:
[0198] ;
[0199] In the formula, For the Atrous convolutional layers, For the The scale features of the hole convolutional layers, is the input feature of the MFEblock module, is a 3×3 hole convolution layer, is the expansion rate.
[0200] Optionally, the hybrid attention module includes a CNN layer, a channel attention layer, a spatial attention layer, and a Sigmoid activation function; the processing process of the hybrid attention module includes:
[0201] The attention input features of the input mixed attention module are convolved using the CNN layer to generate the first attention intermediate features;
[0202] The channel attention layer is used to enhance the first attention intermediate feature, and after inputting the Sigmoid activation function mapping, it is added element by element with the first attention intermediate feature to output the second attention intermediate feature;
[0203] The first attention intermediate feature is spatially weighted through the spatial attention layer, and after being mapped by the Sigmoid activation function, it is added element by element with the first attention intermediate feature to determine the third attention intermediate feature;
[0204] Based on the channel attention layer, the first attention intermediate feature is channel-weighted to obtain the channel enhanced feature;
[0205] The channel enhancement feature is input into the spatial attention layer for spatial enhancement, and after being mapped by the Sigmoid activation function, it is added element by element with the channel enhancement feature to output the fourth attention intermediate feature;
[0206] The second attention intermediate feature, the third attention intermediate feature and the fourth attention intermediate feature are added element by element to determine the attention output feature.
[0207] Optionally, the power equipment detection result includes a prediction box and a prediction category; and further includes a detection integration module for:
[0208] The prediction boxes determined by the trained enhanced target detection models of different grid specifications are normalized by the Sigmoid function and then multiplied element-by-element with the associated prediction boxes to determine multiple corresponding weighted prediction boxes;
[0209] Each weighted prediction box is added element by element and the target prediction box is output;
[0210] The prediction categories determined by the trained enhanced target detection models of different grid specifications are voted, and the prediction category with the most votes is used as the target prediction category.
[0211] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system and module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0212] In the several embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only 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 system, 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 through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.
[0213] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting electric power equipment, characterized in that: include: Acquire an image of electric power equipment, and input the image of electric power equipment into a trained enhanced target detection model; the trained enhanced target detection model includes a backbone network, a neck network, and a head network; Perform multi-level feature extraction and enhancement on the power equipment image through the backbone network to generate low-level features, middle-level features and high-level features; Inputting the low-level features, the middle-level features and the high-level features into the neck network to perform feature pyramid fusion, and outputting a plurality of fused features; The head network is used to detect each of the fusion features respectively and then add them element by element to determine the power equipment detection result.
2. The power equipment detection method according to claim 1, characterized in that: include: The backbone network includes an image enhancement module, a CBS module, a DCN module, a Shuffle attention module, an ELAN module, a GAMP module and a CAfuse module; The multi-level feature extraction and enhancement of the power equipment image by the backbone network to generate low-level features, middle-level features and high-level features includes: Input the power equipment image into the image enhancement module for image enhancement and output enhanced features, and perform convolution operation on the enhanced features through two stacked CBS modules to output a first intermediate feature; Using two consecutive CBS modules to perform continuous feature extraction on the first intermediate feature to generate a second intermediate feature; After the first intermediate feature is convolved by the DCN module and input into the Shuffle attention module for attention operation, it is concatenated with the second intermediate feature to determine a fusion feature; After the fusion features are processed based on the ELAN module, down-sampling and feature extraction are performed using the cascaded GAMP module and the ELAN module to construct low-level features; The low-level features are input into the GAMP module and the ELAN module connected in series for downsampling and feature extraction to generate mid-level features; After downsampling and feature processing through the cascaded GAMP module and ELAN module, mid- and high-level features are obtained, and the mid- and high-level features are input into the CAfuse module for feature enhancement, and high-level features are output.
3. The power equipment detection method according to claim 2, characterized in that: The step of inputting the power equipment image into an image enhancement module for image enhancement and outputting enhanced features comprises: Performing global average pooling on the power equipment image to obtain pooling features; Extracting diagonal elements from the pooled features to form global channel features, and extracting band elements from the pooled features to form local channel features; After transposing the global channel feature, multiply the global channel feature element by element with the local channel feature to generate a first correlation feature; After transposing the local channel feature, multiply it element by element with the global channel feature to construct a second related feature; The first related features and the second related features are respectively summed and aggregated according to feature dimensions to obtain first aggregated features and second aggregated features respectively; Nonlinear mapping is performed on the first aggregation and the second aggregation respectively through a Sigmoid activation function to generate a first activation feature and a second activation feature respectively; The first activation feature and the second activation feature are respectively multiplied element by element with the associated learnable parameter matrix, and then added element by element, and residually connected with the power equipment image to output enhanced features.
4. The power equipment detection method according to claim 2, characterized in that: The GAMP module includes a maximum pooling layer, a graph convolution layer, a channel attention layer and a CBS layer; the processing process of the GAMP module includes: After the perceptual input features input to the GAMP module are processed by the maximum pooling layer, the features are extracted by the CBS layer to generate the first perceptual intermediate features; After performing a convolution operation on the perception input feature using a graph convolution layer, channel feature enhancement is performed based on a channel attention layer to construct a second perception intermediate feature; The first perceptual intermediate feature and the second perceptual intermediate feature are added element by element to determine a perceptual output feature.
5. The power equipment detection method according to claim 2, characterized in that: The Cafe module includes a CNN layer, a channel attention layer, and an efficient multi-scale attention layer; The step of inputting the mid- and high-level features into the CAfuse module for feature enhancement and outputting high-level features includes: After refining the channel features of the mid- and high-level features through the channel attention layer, an efficient multi-scale attention layer is used to enhance the features to construct enhanced intermediate features; After the enhanced input features are convolved based on the CNN layer, they are added element by element with the enhanced intermediate features to output high-level features.
6. The power equipment detection method according to claim 1, characterized in that: The neck network includes an MFEblock module, a convolution module, an upsampling module, an ELAN-W module, a hybrid attention module and an MP module; the low-level features, the middle-level features and the high-level features are input into the neck network for feature pyramid fusion, and a plurality of fused features are output, including: Perform multi-scale feature extraction on the high-level features through the MFEblock module to generate multi-scale fusion features; A convolution module is used to perform a convolution operation on the multi-scale feature, and up-sampling is performed based on an up-sampling module to determine a first up-sampling feature; The first up-sampled feature is concatenated with the middle-level feature, and input into the ELAN-W module for feature processing, and the second up-sampled feature is output; After convolution processing and upsampling the second up-sampled feature through a cascaded convolution module and an up-sampling module, the second up-sampled feature is concatenated with the low-level feature to construct a third up-sampled feature; After performing feature weighting on the third up-sampled feature based on the hybrid attention module, an ELAN-W module is used to extract the feature and output the first fusion feature; After inputting the first fused feature into the MP module for downsampling, the first fused feature is concatenated with the second upsampled feature to determine a first downsampled feature; Using a hybrid attention module and an ELAN-W module connected in series to perform feature processing on the first down-sampled features, and output a second fused feature; After downsampling the second fused feature through the MP module, it is concatenated with the multi-scale feature to generate a second down-sampled feature; The second down-sampled feature is input into the cascaded hybrid attention module and ELAN-W module for feature processing, and the third fused feature is output.
7. The electric power equipment detection method according to claim 6, characterized in that: The MFEblock module includes a hole convolution layer with different expansion rates, a GAP layer and a Sigmoid activation function; the multi-scale feature extraction of the high-level features through the MFEblock module to generate multi-scale fusion features includes: After extracting multi-scale features from the high-level features using multiple atrous convolutional layers, multiple scale features are generated; Determine multiple channel weights by performing global average pooling on each of the scale features using a GAP layer; After weight mapping of each channel weight based on the Sigmoid activation function, the weights are respectively multiplied element by element with the corresponding scale features, and element by element are added to output a multi-scale fusion feature; Among them, the process of multi-scale feature extraction by the hole convolution layer is: ; In the formula, For the Atrous convolutional layers, For the The scale features of the hole convolutional layers, is the input feature of the MFEblock module, is a 3×3 hole convolution layer, is the expansion rate.
8. The electric power equipment detection method according to claim 6, characterized in that: The hybrid attention module includes a CNN layer, a channel attention layer, a spatial attention layer and a Sigmoid activation function; the processing process of the hybrid attention module includes: Performing a convolution operation on the attention input feature input into the hybrid attention module using a CNN layer to generate a first attention intermediate feature; A channel attention layer is used to perform channel enhancement on the first attention intermediate feature, and after inputting a Sigmoid activation function mapping, it is added element by element with the first attention intermediate feature to output a second attention intermediate feature; The first attention intermediate feature is spatially weighted by the spatial attention layer, and after being mapped by the Sigmoid activation function, it is element-wise added to the first attention intermediate feature to determine a third attention intermediate feature; Perform channel weighting on the first attention intermediate feature based on the channel attention layer to obtain a channel enhanced feature; Input the channel enhancement feature into the spatial attention layer for spatial enhancement, and after mapping through the Sigmoid activation function, add it element by element with the channel enhancement feature to output the fourth attention intermediate feature; The second attention intermediate feature, the third attention intermediate feature and the fourth attention intermediate feature are added element by element to determine the attention output feature.
9. The power equipment detection method according to claim 1, characterized in that: The power equipment detection result includes a prediction frame and a prediction category; and also includes: The prediction boxes determined by the trained enhanced target detection models of different grid specifications are normalized by the Sigmoid function and then multiplied element-by-element with the associated prediction boxes to determine multiple corresponding weighted prediction boxes; Using each of the weighted prediction frames to perform element-by-element addition, and outputting a target prediction frame; The prediction categories determined by the trained enhanced target detection models of different grid specifications are voted, and the prediction category with the most votes is used as the target prediction category.
10. An electric power equipment detection system, characterized in that: include: A data acquisition module, used for acquiring an image of electric power equipment, and inputting the image of electric power equipment into a trained enhanced target detection model; the trained enhanced target detection model includes a backbone network, a neck network and a head network; A data extraction module, used to perform multi-level feature extraction and enhancement on the power equipment image through the backbone network to generate low-level features, middle-level features and high-level features; A data fusion module, used for inputting the low-level features, the middle-level features and the high-level features into the neck network to perform feature pyramid fusion and output a plurality of fused features; The data detection module is used to use the head network to detect each of the fusion features respectively and then add them element by element to determine the detection result of the power equipment.
Citation Information
Cited By
Smart city target detection method and device based on improved YOLOv5, and storage medium
CN119672550A
Real-time traffic target detection method and system based on adaptive attention perception
CN119863613A
Oil and gas pipeline intrusion detection method and system based on bionic vision
CN120894571A
A method and system for oil and gas pipeline intrusion detection based on biomimetic vision
CN120894571B