A method and device for determining defects in substation equipment
By fusing the position-encoded inverse residual convolutional neural network and combining it with the spatial attention mechanism, the problems of insufficient feature extraction and overfitting of the residual network when identifying substation equipment defects in small sample images are solved, achieving higher recognition accuracy and efficiency.
Patent Information
- Application Number
- CN202111166629.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-30
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2041-09-30
AI Technical Summary
When existing residual networks identify defects in substation equipment using small sample images, their feature extraction capabilities are insufficient and they are prone to overfitting, resulting in low recognition accuracy.
An inverse residual convolutional neural network fused with position encoding is adopted to train and recognize small sample images of substation equipment through the inverse residual structure and position encoding module, and the spatial attention mechanism is combined to improve the feature extraction ability and recognition accuracy.
It effectively improves the accuracy and efficiency of substation equipment defect identification, reduces the overfitting of the model to small sample images, and improves recognition efficiency.
Smart Images

Figure CN113869437B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of substation equipment safety, and in particular to a method and device for determining substation equipment defects. Background Art
[0002] For substation equipment defect samples, such as cracked insulators, broken meters, loose wire strands, and transformer oil leaks, which are relatively rare, neural networks must be able to extract as many features of the equipment defects as possible from images using a small sample size while also preventing overfitting during training, which could result in the model only having good recognition results for the sample size. Traditional residual networks, while significantly improving feature extraction capabilities through greater depth or width, are less effective at extracting features from small sample sizes and are prone to overfitting. Consequently, traditional residual networks are not very accurate in identifying substation equipment defects. Summary of the Invention
[0003] The present invention provides a method and device for determining defects in substation equipment, which are used to identify small sample images of substation equipment through an inverse residual convolutional neural network fused with position coding, thereby obtaining defect recognition results and effectively improving recognition accuracy and efficiency.
[0004] In a first aspect, the present invention provides a method for determining substation equipment defects, comprising:
[0005] Obtaining small sample images of substation equipment and images of substation equipment to be identified; the small sample images of substation equipment are all marked with sample defect labels;
[0006] The constructed inverse residual convolutional neural network fused with position coding is trained using a small sample image of the substation equipment to obtain a target inverse residual convolutional neural network fused with position coding; the inverse residual convolutional neural network fused with position coding and the target inverse residual convolutional neural network fused with position coding are both configured with an inverse residual structure and a position coding module;
[0007] Inputting the substation equipment image to be identified into the inverse residual convolutional neural network of the target fusion position encoding to obtain the corresponding defect recognition result;
[0008] Determine whether to implement alarm processing based on the defect identification result.
[0009] Optionally, the constructed inverse residual convolutional neural network fused with position coding is trained using a small sample image of the substation equipment to obtain an inverse residual convolutional neural network fused with target position coding, including:
[0010] Inputting a small sample image of the substation equipment into the inverse residual convolutional neural network fused with position coding to obtain a corresponding predicted defect result;
[0011] According to the predicted defect result and the sample defect label, a target inverse residual convolutional neural network fused with position encoding is obtained.
[0012] Optionally, obtaining a target inverse residual convolutional neural network fused with position coding according to the predicted defect result and the sample defect label includes:
[0013] Determining a training error based on the predicted defect result and the sample defect label;
[0014] Based on the training error, adjusting the inverse residual convolutional neural network to obtain optimal network parameters;
[0015] The target inverse residual convolutional neural network is generated using the optimal network parameters.
[0016] Optionally, determining whether to implement alarm processing according to the defect identification result includes:
[0017] Determining whether the substation equipment image to be identified has defects based on the defect identification result;
[0018] If so, an alarm is issued;
[0019] If not, it is determined that the substation equipment corresponding to the substation equipment image to be identified is normal.
[0020] Optionally, before inputting the substation equipment image to be identified into the target fusion position encoded inverse residual convolutional neural network to obtain the corresponding defect identification result, the method further includes:
[0021] The substation equipment image to be identified is preprocessed; the preprocessing includes: image cropping and scaling, image correction, image channel conversion and image standardization.
[0022] In a second aspect, the present invention further provides a device for determining defects in substation equipment, comprising:
[0023] An acquisition module is used to acquire small sample images of substation equipment and images of substation equipment to be identified; the small sample images of substation equipment are all marked with sample defect labels;
[0024] A training module is used to train the constructed inverse residual convolutional neural network fused with position coding using a small sample image of the substation equipment to obtain a target inverse residual convolutional neural network fused with position coding; the inverse residual convolutional neural network fused with position coding and the target inverse residual convolutional neural network fused with position coding are both configured with an inverse residual structure and a position coding module;
[0025] An input module, configured to input the substation equipment image to be identified into the inverse residual convolutional neural network of the target fusion position encoding to obtain a corresponding defect recognition result;
[0026] The judgment module is used to determine whether to implement alarm processing based on the defect identification result.
[0027] Optionally, the training module includes:
[0028] An input submodule, configured to input a small sample image of the substation equipment into the inverse residual convolutional neural network fused with position coding to obtain a corresponding predicted defect result;
[0029] The target network determination submodule is used to obtain a target inverse residual convolutional neural network fused with position coding based on the predicted defect result and the sample defect label.
[0030] Optionally, the target network determination submodule includes:
[0031] A training error determination unit, configured to determine a training error based on the predicted defect result and the sample defect label;
[0032] An adjustment unit, configured to adjust the inverse residual convolutional neural network based on the training error to obtain optimal network parameters;
[0033] A generating unit is used to generate the target inverse residual convolutional neural network using the optimal network parameters.
[0034] Optionally, the judgment module is specifically configured to:
[0035] According to the defect identification result, it is determined whether the substation equipment image to be identified has defects; if so, an alarm is issued; if not, it is determined that the substation equipment corresponding to the substation equipment image to be identified is normal.
[0036] Optionally, it also includes:
[0037] The preprocessing module is used to preprocess the substation equipment image to be identified; the preprocessing includes: image cropping and scaling, image correction, image channel conversion and image standardization.
[0038] It can be seen from the above technical solutions that the present invention has the following advantages:
[0039] The present invention obtains a small sample image of a substation equipment and an image of the substation equipment to be identified; the small sample image of the substation equipment is marked with a sample defect label; the constructed inverse residual convolutional neural network fused with position coding is trained using the small sample image of the substation equipment to obtain a target inverse residual convolutional neural network fused with position coding; the inverse residual convolutional neural network fused with position coding and the target inverse residual convolutional neural network fused with position coding are both configured with an inverse residual structure and a position coding module; the substation equipment image to be identified is input into the target inverse residual convolutional neural network fused with position coding to obtain a corresponding defect identification result; and according to the defect identification result, it is determined whether to implement an alarm process. The small sample image of the substation equipment is identified by the inverse residual convolutional neural network fused with position coding, thereby obtaining a defect identification result, effectively improving the identification accuracy and efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention, and those skilled in the art can derive other drawings based on these drawings without inventive effort.
[0041] Figure 1 This is a flowchart of the steps of Embodiment 1 of a method for determining a defect of substation equipment according to the present invention;
[0042] Figure 2 This is a flowchart of the steps of Embodiment 2 of a method for determining defects in substation equipment according to the present invention;
[0043] Figure 3 Schematic diagram of the structure of an inverse residual convolutional neural network integrating position coding in a method for determining defects of substation equipment according to the present invention;
[0044] Figure 4 A schematic diagram of an inverse residual structure in an inverse residual convolutional neural network fused with position coding according to the present invention;
[0045] Figure 5 Schematic diagram of another inverse residual structure in the inverse residual convolutional neural network fused with position coding of the present invention;
[0046] Figure 6 This is a schematic diagram of the structure of the spatial attention module in the inverse residual convolutional neural network fused with position coding in the present invention;
[0047] Figure 7 Schematic diagram of the inverse residual structure of the spatial attention mechanism introduced in the present invention;
[0048] Figure 8 This is a schematic diagram of the structure of the position coding module in the inverse residual convolutional neural network fused with position coding in the present invention;
[0049] Figure 9 This is a structural block diagram of an embodiment of a device for determining defects in substation equipment according to the present invention. DETAILED DESCRIPTION
[0050] An embodiment of the present invention provides a method and device for determining defects in substation equipment, which is used to identify small sample images of substation equipment through an inverse residual convolutional neural network fused with position coding, thereby obtaining defect recognition results and effectively improving recognition accuracy and efficiency.
[0051] 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 making creative work are within the scope of protection of the present invention.
[0052] See also Figure 1 , Figure 1 This is a flowchart of a first embodiment of a method for defect detection of an insulator image according to the present invention, which may specifically include the following steps:
[0053] Step S101: obtaining a small sample image of a substation device and an image of the substation device to be identified; the small sample image of the substation device is marked with a sample defect label;
[0054] Step S102: training the constructed inverse residual convolutional neural network fused with position coding using a small sample image of the substation equipment to obtain a target inverse residual convolutional neural network fused with position coding; both the inverse residual convolutional neural network fused with position coding and the target inverse residual convolutional neural network fused with position coding are configured with an inverse residual structure and a position coding module;
[0055] Step S103: inputting the substation equipment image to be identified into the target fusion position encoded inverse residual convolutional neural network to obtain a corresponding defect recognition result;
[0056] Step S104: Determine whether to implement alarm processing based on the defect identification result.
[0057] The embodiment of the present invention obtains a small sample image of a substation equipment and an image of the substation equipment to be identified; the small sample image of the substation equipment is marked with a sample defect label; the constructed inverse residual convolutional neural network with fusion position coding is trained through the small sample image of the substation equipment to obtain a target inverse residual convolutional neural network with fusion position coding; the inverse residual convolutional neural network with fusion position coding and the target inverse residual convolutional neural network with fusion position coding are both configured with an inverse residual structure and a position coding module; the substation equipment image to be identified is input into the target inverse residual convolutional neural network with fusion position coding to obtain a corresponding defect recognition result; and according to the defect recognition result, it is determined whether to implement alarm processing. The small sample image of the substation equipment is identified by the inverse residual convolutional neural network with fusion position coding, thereby obtaining a defect recognition result, effectively improving recognition accuracy and recognition efficiency.
[0058] See also Figure 2 , is a flowchart of the steps of Embodiment 2 of a method for determining a substation equipment defect of the present invention, specifically comprising:
[0059] Step S201: obtaining a small sample image of a substation device and an image of the substation device to be identified; the small sample image of the substation device is marked with a sample defect label;
[0060] In an embodiment of the present invention, all small sample images of substation equipment are manually annotated with sample defect labels. The sample defect labels are the correct defect results of the small sample images. The defect results include defect results, such as insulator cracks, meter damage, loose wires, transformer oil leakage, etc., or no defect results.
[0061] Step S202: inputting a small sample image of the substation equipment into an inverse residual convolutional neural network fused with position coding to obtain a corresponding predicted defect result; the inverse residual convolutional neural network fused with position coding and the target inverse residual convolutional neural network fused with position coding are both configured with an inverse residual structure and a position coding module;
[0062] See also Figure 3 , Figure 3 This is a structural diagram of the inverse residual convolutional neural network that integrates position coding in a method for determining defects in substation equipment of the present invention. As shown in the figure, the neural network has nine layers, of which the first layer is the input layer, the second layer is the convolution layer, the third to fifth layers are the inverse residual convolution layers, the sixth to eighth layers are the sam inverse residual convolution layers, the ninth layer is the position coding module, and the output port is connected to the EMBEDING space.
[0063] Specifically, the size of the small sample image of the substation equipment input by the input layer (inputs) is 512×512×3; the convolution kernel size of the convolution layer (conv2d_1) is 3×3, the number of kernels is 16, the step size is 2, and the input image of size 512×512×3 is processed by convolution to an output image size of 256×256×16; each convolution layer of the inverse residual convolution layer is followed by a BN layer and a ReLU activation function, and the inverse residual convolution The convolution kernel of layer 1 (bneck_1) is 1×1, and the feature map of size 256×256×16 is output with a feature map size of 128×128×16 after inverse residual convolution; the convolution kernel of inverse residual convolution layer 2 (bneck_2) is 1×1, and the feature map of size 128×128×16 is output with a feature map size of 64×64×24 after inverse residual convolution; the convolution kernel of inverse residual convolution layer 3 (bneck_3) is 3× 3, the feature map with a size of 64×64×24 is output after the inverse residual convolution, and the feature map size is 64×64×24, which is output to the sixth layer; and for the sam inverse residual convolution 1 (samBneck_1), the feature map with a size of 64×64×24 is output after the sam inverse residual convolution to a feature map of 32×32×40; for the seventh layer sam inverse residual convolution 2 (samBneck_2), the feature map with a size of 64×64×40 is output after the sam inverse residual convolution to a feature map of 32×32×40; for the eighth layer sam inverse residual convolution 3 (samBneck_3), the feature map with a size of 32×32×40 is output after the sam inverse residual convolution to a feature map of 32×32×64; for the position encoding module 1 (posDecoder_1), the feature map with a size of 32×32×64 is output after the position encoding module to a feature map of 32×32×64.
[0064] Further, see Figure 4 and Figure 5 , Figure 4 This is a schematic diagram of an inverse residual structure in the inverse residual convolutional neural network fused with position coding in the present invention. Figure 5 This is a schematic diagram of another inverse residual structure in the inverse residual convolutional neural network fused with position coding in the present invention. There are two types of inverse residual structures: one with a superimposed input image step and the other without. However, regardless of which structure, a residual connection is performed only when the input and output have the same number of channels. By first using 1*1 convolution to expand the channel, then using 3*3 convolution, and finally using 1*1 convolution to restore the channel, this not only controls the number of model parameters, but also expands internally to a higher dimensional space to further improve the expressiveness of features.
[0065] Furthermore, the 6th to 8th layers of the inverse residual convolution layer are inverse residual convolution layers that introduce the spatial attention mechanism (Spatial Attention Module), namely the sam inverse residual convolution layer. The specific implementation is to add the spatial attention module to these 3 layers of inverse residual convolution layers. Please refer to Figure 6 , Figure 6 This is a schematic diagram of the structure of the spatial attention module in the inverse residual convolutional neural network fused with position coding in the present invention. The module takes the three-dimensional features f extracted by the feature extraction network as the input. θ (x) is used as input to generate a two-dimensional vector representing the importance of each region. Considering that the weight information of local features cannot only be based on the features of the current region, but also the influence of the information before and after the input should be considered, this network does not directly use 1×1 convolution, but first uses a two-dimensional convolution with a convolution kernel size of 3 on f θ (x) is reduced in dimension so that the output channel becomes 1 / r of the original, until the output channel is less than r. Then a 1×1 convolution kernel is used to generate a two-dimensional vector of H×W, and the sigmoid function is used to activate it to obtain the weight w∈R representing the importance of the local area. H×W . Broadcast w into a three-dimensional tensor and f through the broadcast mechanism θ Multiply (x) and add to f θ (x) to generate enhanced features f Φ (f θ (x)), f Φ (x) represents the spatial attention module. It can be expressed as:
[0066]
[0067] f Φ (f θ (x)) = barroadcast(w) × f θ (x)+f θ (x)
[0068] where f r k×k is a convolution operation with a kernel size of k and a ratio of output channels to input channels of r, and σ is a sigmoid activation function.
[0069] Further, see Figure 7 , Figure 7This is a schematic diagram of the inverse residual structure that introduces the spatial attention mechanism in the present invention. In response to the huge differences between the training set and test set samples and the inadequate feature extraction caused by the disjointness of the sample spaces of the training set and the test set in the small sample classification task, this network further introduces the spatial attention mechanism on the basis of the inverse residual network. First, through the inverse residual structure of first increasing the dimension, then convolution, and then reducing the dimension in the inverted residual module (Inverted Residuals), as well as the improvement of the activation function, the impact of the inadequate feature extraction on the small sample classification task is effectively reduced. That is, by first using 1*1 convolution to expand the channel, then using 3*3 convolution, and finally using 1*1 convolution to restore the channel and using relu6 features for activation.
[0070] At the same time, the network in this embodiment further combines the spatial attention mechanism to reduce the impact of noise on the gradient, thereby achieving the extraction of discriminative features and the suppression of irrelevant information. After the spatial attention mechanism uses 1*1 convolution to expand the channel in the inverse residual structure, it fully extracts the spatial information of the feature by using 3*3 convolution multiple times, and then uses a 1×1 convolution kernel to generate a two-dimensional vector of H×W. The H×W two-dimensional vector is activated using a sigmoid function to obtain a two-dimensional weight vector of H×W representing the importance of the local area. Finally, we splice the two features obtained by the inverted residual structure (Inverted Residuals) and the spatial attention mechanism (Spatial Attention Module) in the channel dimension, and further multiply the feature map that has undergone channel attention with the spatial attention, and then use 1*1 convolution to restore it to the feature map of the original channel, and finally obtain the feature map of feature and spatial enhancement.
[0071] In the entire 9-layer convolutional neural network, the 9th layer is the position encoding module. This module directly calculates the distance between sample features in the metric space for small sample classification, without considering the distance measurement error caused by the relative position difference of the specific target in the image between two samples of the same category. This leads to inaccurate results when comparing regions with completely different target position information in the two samples. The module innovatively designs a solution for automatically aligning semantic information to enable similarity comparison of target position information in completely different regions of two samples of the same category. Automatically aligning local features through learnable position parameters in the position encoding module further improves the accuracy of small sample data classification.
[0072] See also Figure 8 , Figure 8 This is a structural diagram of the position coding module in the inverse residual convolutional neural network fused with position coding of the present invention. In the specific implementation, the position coding module obtains the enhanced feature map f Φ(f θ (x)) is considered as a vector of H×W C dimensions, and the local features of each region can be expressed using the vector S i ∈R C , i=1,…H×W. Due to the lack of local feature annotation information, a set of learnable parameters {a i,1 ,…a i,j …,a i,H×W} will s i Mapped to position j, the local feature vector at position j is s j , i=1,…H×W, and parameter a ij It represents the probability of the feature vector at position i being mapped to position j, so s j It can be described as:
[0073]
[0074] H×W one-dimensional vector s j Recompose the new three-dimensional feature map X to obtain the aligned features. The above process can be described as:
[0075] X'=A*Reshape(f Φ (f θ (x))) T ,
[0076] in
[0077] To better compare the classification of two objects of the same category at different locations using the feature maps extracted by the previous network, a position encoding module learns a set of position parameters to automatically align the features of two objects of the same category at different locations. Multiple position mappings are performed using the hyperparameter n. Experiments have shown that the best results are achieved when n = 2.
[0078] X'=Reshape(A2*(A1*Reshape(f Φ (f θ (x))) T ))
[0079] The aligned features are adjusted through the convolution layer to finally obtain the feature map after position encoding:
[0080] f Φ (f φ (f θ (x)))=f 3×3 (X')+X'
[0081] where f Φ(x) represents the position encoding module.
[0082] Step S203: obtaining a target inverse residual convolutional neural network fused with position coding according to the predicted defect result and the sample defect label;
[0083] In an optional embodiment, a target inverse residual convolutional neural network fused with position coding is obtained according to the predicted defect result and the sample defect label, including:
[0084] Determining a training error based on the predicted defect result and the sample defect label;
[0085] Based on the training error, adjusting the inverse residual convolutional neural network to obtain optimal network parameters;
[0086] The target inverse residual convolutional neural network is generated using the optimal network parameters.
[0087] Step S204: pre-processing the substation equipment image to be identified; the pre-processing includes: image cropping and scaling, image correction, image channel conversion, and image standardization;
[0088] Step S205: inputting the substation equipment image to be identified into the target fusion position encoded inverse residual convolutional neural network to obtain a corresponding defect recognition result;
[0089] Step S206: judging whether the substation equipment image to be identified has defects based on the defect identification result; if so, issuing an alarm; if not, determining whether the substation equipment corresponding to the substation equipment image to be identified is normal.
[0090] In an embodiment of the present invention, a method for determining defects in substation equipment is provided, which obtains a small sample image of the substation equipment and an image of the substation equipment to be identified; the small sample image of the substation equipment is marked with a sample defect label; the constructed inverse residual convolutional neural network with fusion position coding is trained through the small sample image of the substation equipment to obtain a target inverse residual convolutional neural network with fusion position coding; the inverse residual convolutional neural network with fusion position coding and the target inverse residual convolutional neural network with fusion position coding are both configured with an inverse residual structure and a position coding module; the substation equipment image to be identified is input into the target inverse residual convolutional neural network with fusion position coding to obtain a corresponding defect identification result; and according to the defect identification result, it is determined whether to implement alarm processing. The small sample image of the substation equipment is identified by the inverse residual convolutional neural network with fusion position coding, thereby obtaining a defect identification result, effectively improving the identification accuracy and efficiency.
[0091] See also Figure 9 , shows a structural block diagram of an embodiment of a device for determining defects in substation equipment, including the following modules:
[0092] The acquisition module 401 is used to acquire small sample images of substation equipment and substation equipment images to be identified; the small sample images of substation equipment are all marked with sample defect labels;
[0093] A training module 402 is configured to train the constructed inverse residual convolutional neural network fused with position coding using a small sample image of the substation equipment to obtain a target inverse residual convolutional neural network fused with position coding; both the inverse residual convolutional neural network fused with position coding and the target inverse residual convolutional neural network fused with position coding are configured with an inverse residual structure and a position coding module;
[0094] An input module 403 is configured to input the substation equipment image to be identified into the target fused position encoded inverse residual convolutional neural network to obtain a corresponding defect recognition result;
[0095] The judgment module 404 is used to determine whether to implement alarm processing based on the defect identification result.
[0096] In an optional embodiment, the training module 402 includes:
[0097] An input submodule, configured to input a small sample image of the substation equipment into the inverse residual convolutional neural network fused with position coding to obtain a corresponding predicted defect result;
[0098] The target network determination module is used to obtain a target inverse residual convolutional neural network fused with position coding based on the predicted defect result and the sample defect label.
[0099] In an optional embodiment, the target network determination submodule includes:
[0100] A training error determination unit, configured to determine a training error based on the predicted defect result and the sample defect label;
[0101] An adjustment unit, configured to adjust the inverse residual convolutional neural network based on the training error to obtain optimal network parameters;
[0102] A generating unit is used to generate the target inverse residual convolutional neural network using the optimal network parameters.
[0103] In an optional embodiment, the judgment module is specifically configured to:
[0104] According to the defect identification result, it is determined whether the substation equipment image to be identified has defects; if so, an alarm is issued; if not, it is determined that the substation equipment corresponding to the substation equipment image to be identified is normal.
[0105] In an optional embodiment, the apparatus further comprises:
[0106] The preprocessing module is used to preprocess the substation equipment image to be identified; the preprocessing includes: image cropping and scaling, image correction, image channel conversion and image standardization.
[0107] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0108] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0109] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0110] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0111] 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 invention, 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. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0112] 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 above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can 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 determining defects in substation equipment, characterized in that: include: Obtaining small sample images of substation equipment and images of substation equipment to be identified; the small sample images of substation equipment are all marked with sample defect labels; The constructed inverse residual convolutional neural network fused with position coding is trained using a small sample image of the substation equipment to obtain a target inverse residual convolutional neural network fused with position coding; the inverse residual convolutional neural network fused with position coding and the target inverse residual convolutional neural network fused with position coding are both configured with an inverse residual structure and a position coding module; Inputting the substation equipment image to be identified into the target inverse residual convolutional neural network fused with position coding to obtain a corresponding defect recognition result; Determining whether to implement alarm processing based on the defect identification result; The inverse residual convolutional neural network fused with position coding includes an input layer, a convolutional layer, an inverse residual convolutional layer, a sam inverse residual convolutional layer, and a position coding module; The input layer is used to input the small sample image into the convolution layer; The convolution layer is used to obtain a feature map after performing a convolution operation on the small sample image, and input the feature map into the inverse residual convolution layer; The inverse residual convolution layer is used to perform inverse residual convolution on the feature map, and input the feature map after inverse residual convolution into the sam inverse residual convolution layer; The SAM inverse residual convolution layer is used to extract three-dimensional features from the feature map after the inverse residual convolution, generate a two-dimensional vector based on the three-dimensional features, activate the two-dimensional vector using an activation function, obtain a weight representing the importance of the local area, and generate a three-dimensional tensor using a broadcast mechanism and the weight, multiply the three-dimensional tensor and the three-dimensional feature, and add the multiplication result to the three-dimensional feature to obtain an enhanced feature map, and input the enhanced feature map into the position encoding module; The position encoding module is used to map the enhanced feature map using learnable parameters after obtaining the enhanced feature map to obtain aligned features, and adjust the aligned features using a convolutional layer to obtain a feature map after position encoding.
2. The method for determining substation equipment defects according to claim 1, characterized in that: The constructed inverse residual convolutional neural network fused with position coding is trained using a small sample image of the substation equipment to obtain an inverse residual convolutional neural network fused with position coding, including: Inputting a small sample image of the substation equipment into the inverse residual convolutional neural network fused with position coding to obtain a corresponding predicted defect result; According to the predicted defect result and the sample defect label, a target inverse residual convolutional neural network fused with position encoding is obtained.
3. The method for determining substation equipment defects according to claim 2, characterized in that: According to the predicted defect result and the sample defect label, a target inverse residual convolutional neural network fused with position encoding is obtained, including: Determining a training error based on the predicted defect result and the sample defect label; Based on the training error, adjusting the inverse residual convolutional neural network to obtain optimal network parameters; The target inverse residual convolutional neural network is generated using the optimal network parameters.
4. The method for determining substation equipment defects according to claim 1, characterized in that: Determine whether to implement alarm processing based on the defect identification result, including: Determining whether the substation equipment image to be identified has defects based on the defect identification result; If so, an alarm is issued; If not, it is determined that the substation equipment corresponding to the substation equipment image to be identified is normal.
5. The method for determining substation equipment defects according to claim 1, characterized in that: Before inputting the substation equipment image to be identified into the target inverse residual convolutional neural network fused with position coding to obtain the corresponding defect identification result, the method further includes: The substation equipment image to be identified is preprocessed; the preprocessing includes: image cropping and scaling, image correction, image channel conversion and image standardization.
6. A device for determining defects in substation equipment, characterized in that: include: An acquisition module is used to acquire small sample images of substation equipment and images of substation equipment to be identified; the small sample images of substation equipment are all marked with sample defect labels; A training module is used to train the constructed inverse residual convolutional neural network fused with position coding using a small sample image of the substation equipment to obtain a target inverse residual convolutional neural network fused with position coding; the inverse residual convolutional neural network fused with position coding and the target inverse residual convolutional neural network fused with position coding are both configured with an inverse residual structure and a position coding module; An input module, configured to input the substation equipment image to be identified into the target inverse residual convolutional neural network fused with position coding to obtain a corresponding defect recognition result; A judgment module, used to determine whether to implement alarm processing based on the defect identification result; The constructed inverse residual convolutional neural network fused with position coding includes an input layer, a convolutional layer, an inverse residual convolutional layer, a SAM inverse residual convolutional layer, and a position coding module; The input layer is used to input the small sample image into the convolution layer; The convolution layer is used to obtain a feature map after performing a convolution operation on the small sample image, and input the feature map into the inverse residual convolution layer; The inverse residual convolution layer is used to perform inverse residual convolution on the feature map, and input the feature map after inverse residual convolution into the sam inverse residual convolution layer; The SAM inverse residual convolution layer is used to extract three-dimensional features from the feature map after the inverse residual convolution, generate a two-dimensional vector based on the three-dimensional features, activate the two-dimensional vector using an activation function, obtain a weight representing the importance of the local area, and generate a three-dimensional tensor using a broadcast mechanism and the weight, multiply the three-dimensional tensor and the three-dimensional features, and add the multiplication result to the three-dimensional features to obtain an enhanced feature map; The position encoding module is used to map the enhanced feature map using learnable parameters after obtaining the enhanced feature map to obtain aligned features, and adjust the aligned features using a convolutional layer to obtain a feature map after position encoding.
7. The device for determining a defect of substation equipment according to claim 6, characterized in that: The training module includes: An input submodule, configured to input a small sample image of the substation equipment into the inverse residual convolutional neural network fused with position coding to obtain a corresponding predicted defect result; The target network determination submodule is used to obtain a target inverse residual convolutional neural network fused with position coding based on the predicted defect result and the sample defect label.
8. The device for determining substation equipment defects according to claim 7, characterized in that: The target network determination submodule includes: A training error determination unit, configured to determine a training error based on the predicted defect result and the sample defect label; An adjustment unit, configured to adjust the inverse residual convolutional neural network based on the training error to obtain optimal network parameters; A generating unit is used to generate the target inverse residual convolutional neural network using the optimal network parameters.
9. The device for determining a defect of substation equipment according to claim 6, characterized in that: The judgment module is specifically used for: According to the defect identification result, it is determined whether the substation equipment image to be identified has defects; if so, an alarm is issued; if not, it is determined that the substation equipment corresponding to the substation equipment image to be identified is normal.
10. The device for determining a defect of substation equipment according to claim 6, characterized in that: Also includes: A preprocessing module, configured to preprocess the substation equipment image to be identified; The preprocessing includes: image cropping and scaling, image correction, image channel conversion and image standardization.
Citation Information
Patent Citations
Detection algorithm for power transmission line external force damage abnormal target and related device
CN113313032A
Transmission conductor broken strand and breakpoint identification method and device, and storage medium
CN114202582A
Small sample self-coding neural network model method based on fusion spatial relationship
CN115272500A
On-line yawning behavior identification method, equipment, medium and product
CN118247848A