Grounding grid corrosion defect identification method based on edge enhancement model, medium and equipment
By adopting an identification method based on edge enhancement model in the recognition of grounding network corrosion defects, the problem of poor identification effect in the prior art is solved, and a higher recognition accuracy and a simpler network structure are achieved.
Patent Information
- Application Number
- CN202411725031.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-04
AI Technical Summary
The prior art has the problem of poor identification effect in the identification of corrosion defects in grounding grids, especially due to the concealment of the grounding grid and the dispersion of corrosion defects, it is difficult for the LeNet-5 model to accurately locate defect parts.
Using an identification method based on edge enhancement model, the three-channel parallel module, edge extraction module and SoftMax classifier are used to extract and fuse macroscopic and microscopic features to improve the network's representation ability to corrosion defects in different shapes.
It significantly improves the recognition accuracy of grounding net corrosion defects, avoids overfitting problems, and simplifies the network structure.
Smart Images

Figure CN119559510A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of grounding grid corrosion defect identification, and in particular to a grounding grid corrosion defect identification method, medium and equipment based on an edge enhancement model. Background Art
[0002] The grounding grid is a very important part of the power system. Its function is to provide safe grounding for different types of machinery and to direct current to the ground in case of faults to ensure the safety of equipment and personnel. However, the grounding grid has problems such as corrosion. If these problems are not discovered and handled in time, they will affect the stability and safety of the grounding grid, and may even cause damage to equipment and accidents. Therefore, the diagnostic research on grounding grid corrosion plays an important role in ensuring the safe, stable and smooth operation of the power grid. At present, the diagnostic research on grounding grid corrosion is mainly based on the principle of electromagnetic induction, such as transient electromagnetic method, which uses electromagnetic transceiver coils to collect grounding grid induced voltage data, identify the topological structure of the grounding grid, and determine the location of the defective points of the grounding grid.
[0003] The grounding grid is a concealed project, and the process of extracting surface electromagnetic response data is relatively complicated. Therefore, there are few fault sample data, and the conductor size of the grounding grid is large, which may lead to poor diagnostic results. At the same time, the corrosion defects of the grounding grid are relatively scattered, some of which are corrosion at the conductor connection points, while others are cross-grid corrosion. The size of the grounding grid corrosion defects varies, resulting in poor network focusing ability when the LeNet-5 model extracts surface electromagnetic response data, making it difficult to accurately locate the defective parts. Summary of the invention
[0004] The present application provides a method, medium and equipment for identifying corrosion defects of a grounding grid based on an edge enhancement model, which can improve the accuracy of identifying corrosion defects of a grounding grid.
[0005] According to a first aspect of the present application, a method for identifying corrosion defects of a grounding grid based on an edge enhancement model is provided, comprising: Obtaining a surface electromagnetic response characteristic map of the grounding grid to be identified; Input the surface electromagnetic response characteristic map of the grounding grid to be identified into the trained edge enhancement model to obtain defect identification results; the defect identification results include single grid corrosion, cross-grid corrosion, conductor connection point corrosion and grid node corrosion; The edge enhancement model includes a three-channel parallel module, an edge extraction module and a SoftMax classifier; the step of inputting the surface electromagnetic response characteristic map of the grounding grid to be identified into the trained edge enhancement model to obtain the defect identification result includes: Inputting the surface electromagnetic response feature map of the ground grid to be identified into a three-channel parallel module for feature extraction, wherein the three-channel parallel module includes a LeNet-5 model channel, an edge space attention channel, and a related channel attention channel; wherein the convolution kernel sizes used in the edge space attention channel and the related channel attention channel are different; The results of the edge space attention channel and the related channel attention channel are added, and then multiplied with the result of the LeNet-5 model channel output, and then processed by convolution and full connection to obtain a focused feature set; Inputting the focus feature set into an edge extraction module to obtain an attention weighted feature vector; The attention weighted feature vector is input into the SoftMax classifier to obtain a defect recognition result.
[0006] In one possible implementation, the training process of the trained edge enhancement model includes the following steps: Acquire ground surface electromagnetic response characteristic maps of grounding grids with various defect types, and divide them into training set data and test set data; the defect types include single grid corrosion, cross-grid corrosion, conductor connection point corrosion, and grid node corrosion; Based on the training set data and the test set data, the edge enhancement model is trained, and the weights and parameter values of the edge enhancement model are continuously updated by the stochastic gradient descent method until the error and recognition rate meet the preset requirements, thereby obtaining a trained edge enhancement model.
[0007] In one possible implementation manner, the step of acquiring the surface electromagnetic response characteristic map of the grounding grid to be identified includes: Obtain the surface electromagnetic response data of the grounding grid to be identified and perform normalization processing; Based on the normalized surface electromagnetic response data of the grounding grid to be identified, a surface electromagnetic response characteristic map of the grounding grid to be identified is drawn; The image size of the surface electromagnetic response characteristic map of the grounding grid to be identified is adjusted to a preset size matching the edge enhancement model, and the intersection of the grounding grid is used as the image center of the surface electromagnetic response characteristic map of the grounding grid to be identified.
[0008] In one possible implementation, the LeNet-5 model channel includes a first convolution layer, a first pooling layer, a second convolution layer, and a second pooling layer, and adopts a maximum pooling method; the surface electromagnetic response characteristic map of the grounding grid to be identified passes through the first convolution layer, the first pooling layer, the second convolution layer, and the second pooling layer in sequence; Among them, the convolution kernel size corresponding to the first convolution layer is 5×5, and the number is 16; the convolution kernel size corresponding to the second convolution layer is 5×5, and the number is 32; the pooling size of the first pooling layer is 2×2, and the step size is 2; the pooling size of the second pooling layer is 2×2, and the step size is 3.
[0009] In one possible implementation, the edge space attention channel includes a third convolution layer and a third pooling layer; wherein the convolution kernel size corresponding to the third convolution layer is 7×7, and the number is 24; the pooling size of the third pooling layer is 2×2, and the step size is 2; The surface electromagnetic response characteristic map of the grounding grid to be identified is first passed through the third convolution layer and the third pooling layer in sequence to output the characteristic map to be processed; Using a horizontal edge detection filter and a vertical edge detection filter to perform element-by-element multiplication on the feature map to be processed, respectively, to obtain a horizontal edge feature map Fh and a vertical edge feature map Fv; Perform convolution calculation on Fh along the horizontal direction to obtain the horizontal edge features; Perform convolution calculation on Fv along the vertical direction to obtain the vertical edge features; The horizontal edge feature and the vertical edge feature are combined into an edge feature through orthogonal calculation; Performing global maximum pooling and global average pooling on the edge features respectively to obtain maximum value features and average value features; Connecting the maximum value feature and the average value feature to form a new feature vector; Performing a convolution operation on the new feature vector to regain the spatial weight; Activating the spatial weight using a first activation function to obtain an activated spatial weight; The activated spatial weight is multiplied by the surface electromagnetic response characteristic map of the grounding grid to be identified to obtain an output result.
[0010] In one possible implementation, the relevant channel attention channel includes a fourth convolutional layer; The surface electromagnetic response characteristic map of the grounding grid to be identified is first passed through the fourth convolution layer, and then activated by the second activation function and batch normalized. After the processing is completed, the correlation coefficients are calculated with different grounding grid typical defect sets to obtain the corresponding correlation coefficient matrix; wherein the convolution kernel size corresponding to the fourth convolution layer is 3×3, and the number is 24; The correlation coefficient matrix is merged and activated by a third activation function to obtain an activated correlation coefficient feature; The activated correlation coefficient feature is multiplied by the surface electromagnetic response feature map of the grounding grid to be identified to obtain an output result.
[0011] In one possible implementation, the step of inputting the focus feature set into an edge extraction module to obtain an attention weighted feature vector comprises: Performing a convolution operation on the focused feature set to obtain a convolved feature map, and inputting the convolved feature map into two parallel branches for processing; In the first branch, the focused feature set is processed by using a fourth activation function, and then up-sampled by sub-pixel convolution, and the obtained sampling result is added to the focused feature set to obtain a first branch feature map; In the second branch, the focused feature set is processed by using a fifth activation function, and then a dot multiplication operation is performed with the focused feature set to obtain a second branch feature map; The first branch feature map and the second branch feature map are concatenated to obtain an attention weighted feature vector.
[0012] In one possible implementation, the SoftMax classifier outputs a probability distribution, compares the probabilities corresponding to different defect types, and selects the defect type corresponding to the maximum probability as the defect identification result; The SoftMax classifier uses the Taylor-Softmax function to normalize the probability information, and its mathematical expression is as follows: ; in, ; n is an even number; represents the probability corresponding to the i-th defect; k is the number of defect categories.
[0013] According to a second aspect of the present application, an electronic device is provided, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the grounding grid corrosion defect identification method based on the edge enhancement model described in the present application.
[0014] According to a third aspect of the present application, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the grounding grid corrosion defect identification method based on the edge enhancement model described in the present application.
[0015] The present invention discloses a method, medium and device for identifying corrosion defects of a grounding grid based on an edge enhancement model. The method is based on a traditional LeNet-5 network structure and connects two channels of different scales in parallel to form a three-channel parallel module. The method can extract macroscopic and microscopic information at different scales and capture the relationship between them through cross-scale convolution, thereby fusing information between the macroscopic and microscopic levels and improving the network's ability to represent corrosion defects of different shapes. By adding an edge extraction module and improving the traditional fully connected layer, the network parameters can be greatly reduced, effectively avoiding the overfitting problem, and at the same time simplifying the network structure, effectively improving the recognition accuracy of corrosion defects of the grounding grid.
[0016] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become readily understood. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, wherein: In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.
[0018] Figure 1 A flow chart of a grounding grid corrosion defect identification method based on an edge enhancement model provided in Embodiment 1 of the present application is shown; Figure 2 A schematic diagram showing different corrosion locations in a grounding grid model provided in Example 1 of the present application is shown; Figure 3 A schematic diagram of the structure of an edge enhancement model provided in Embodiment 1 of the present application is shown; Figure 4 A schematic diagram of the structure of an edge space attention channel provided in Example 1 of the present application is shown; Figure 5 A schematic diagram of the structure of a related channel attention channel provided in Example 1 of the present application is shown; Figure 6 A schematic diagram of the structure of an edge extraction module provided in Embodiment 1 of the present application is shown; Figure 7 A grounding grid corrosion defect diagram after being processed by ESA, CCA and EEM respectively is shown in Example 1 of the present application; Figure 7 Part (a) represents the corrosion defect image of the grounding grid after ESA treatment; Figure 7Part (b) represents the corrosion defect image of the grounding grid after CCA treatment; Figure 7 Part (c) represents the corrosion defect image of the grounding grid after EEM processing; Figure 8a A comparison chart of the recognition accuracy of a model provided in Example 1 of the present application is shown; Figure 8b A comparison diagram of a model test error provided in Example 1 of the present application is shown; Fig. 9 A schematic diagram of the structure of an electronic device provided in Embodiment 2 of the present application is shown. DETAILED DESCRIPTION
[0019] In order to make the purpose, features, and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0020] In order to solve the above-mentioned problems existing in the prior art, the embodiments of the present application provide a method, medium and equipment for identifying corrosion defects of a grounding grid based on an edge enhancement model, which are described in detail below.
[0021] Embodiment 1: like Figure 1 As shown, Figure 1 A flow chart of a method for identifying corrosion defects of a grounding grid based on an edge enhancement model provided in an embodiment of the present application, the method comprising the following steps: Obtain the surface electromagnetic response characteristic map of the grounding grid to be identified.
[0022] Firstly, the surface electromagnetic response data of the grounding grid to be identified is obtained, and the surface electromagnetic response data of the grounding grid is preprocessed to normalize the values of the surface electromagnetic response data of the grounding grid to 0~1.
[0023] According to the normalized surface electromagnetic response data of the grounding grid to be identified, an RGB color image is drawn to obtain a surface electromagnetic response characteristic map of the grounding grid to be identified, and the image size is adjusted to a preset size, and the intersection of the grounding grid is used as the image center of the surface electromagnetic response characteristic map of the grounding grid to be identified. In the embodiment of the present application, the size of 64×64 is taken as an example, which is not limited to this. The original grounding grid surface electromagnetic response characteristic map is adjusted to a fixed size of 64×64 pixels in order to meet the input requirements of the subsequent edge enhancement model and ensure that all input images have a uniform size.
[0024] When resizing the image, we try to keep the intersection of the ground grid at the center of the resized image. This is done to preserve important features in the image and facilitate subsequent feature extraction and recognition.
[0025] The surface electromagnetic response characteristic map of the grounding grid to be identified is input into the trained edge enhancement model to obtain the defect identification result.
[0026] Defect identification results include single grid corrosion, cross-grid corrosion, conductor connection point corrosion and grid node corrosion. Figure 2 As shown, Figure 2 A schematic diagram of different corrosion locations in a grounding grid model provided in Example 1 of the present application. The corrosion points are divided into four types, namely single grid corrosion (corrosion point A), cross-grid corrosion (corrosion point B), conductor connection point corrosion (corrosion point C) and grid node corrosion (corrosion point D).
[0027] Prior to this, an edge enhancement model needs to be built in advance and trained, including the following steps; The edge enhancement model includes a three-channel parallel module, an edge extraction module and a SoftMax classifier.
[0028] 2000 grounding grid corrosion degree models with a size of 64×64 were selected as the sample library, which included 500 images of each of the four types of defects: single grid corrosion, cross-grid corrosion, conductor connection point corrosion and grid node corrosion. The training set data accounted for 80% and the test set data accounted for 20%. When training the network, the learning rate was set to 0.005 and the number of iterations was set to 500.
[0029] Based on the training set data and the test set data, the edge enhancement model is trained, and the weights and parameter values of the edge enhancement model are continuously updated through the stochastic gradient descent method until the error and recognition rate meet the preset requirements, and a trained edge enhancement model is obtained. The specific training process is as follows: 1) Initialization: Preprocess the input image data and randomly initialize the weights.
[0030] 2) Forward propagation: After the convolution layer, pooling layer, and fusion layer (multi-layer, cross-layer, multi-core) operations, the feature map is input into the three-channel parallel module for feature focusing, and finally the focused feature set is used to obtain the result using the SoftMax classifier. The activation function uses the LeakyReLU function, and the BN layer is used for normalization after convolution.
[0031] 3) The output layer calculates the total error, outputs the recognition rate, and verifies the recognition rate and error value.
[0032] 4) Back propagation: Calculate the error based on the weight value of each layer, and update the weight and parameter values through the stochastic gradient descent method to continuously reduce the error.
[0033] 5) Repeat all the above operations for all training data.
[0034] 6) When the output error is minimized, the model training ends.
[0035] Specifically, the step of inputting the surface electromagnetic response characteristic map of the grounding grid to be identified into the trained edge enhancement model to obtain the defect identification result includes: The surface electromagnetic response feature map of the grounding grid to be identified is input into a three-channel parallel module for feature extraction. The three-channel parallel module includes a LeNet-5 model channel, an edge space attention channel, and a related channel attention channel. The convolution kernel sizes used in the edge space attention channel and the related channel attention channel are different.
[0036] The output results of the edge space attention channel and the related channel attention channel are added together, multiplied with the output result of the LeNet-5 model channel, and processed by convolution and full connection to obtain the focused feature set.
[0037] The focused feature set is input into the edge extraction module to obtain the attention weighted feature vector.
[0038] The attention-weighted feature vector is input into the SoftMax classifier to obtain the defect recognition result.
[0039] like Figure 3 As shown, Figure 3 This is a structural diagram of an edge enhancement model provided in Example 1 of the present application. Figure 3 In the figure, ESA is the edge space attention channel, CCA is the correlation channel attention channel, and EEM is the edge extraction module.
[0040] The LeNet-5 model channel includes the first convolution layer, the first pooling layer, the second convolution layer and the second pooling layer, using the maximum pooling method; the surface electromagnetic response characteristic map of the grounding grid to be identified passes through the first convolution layer, the first pooling layer, the second convolution layer and the second pooling layer in sequence.
[0041] Among them, the convolution kernel size corresponding to the first convolution layer C1 is 5×5, and the number is 16; the convolution kernel size corresponding to the second convolution layer C2 is 5×5, and the number is 32; the pooling size of the first pooling layer S1 is 2×2, and the step size is 2; the pooling size of the second pooling layer S2 is 2×2, and the step size is 3.
[0042] like Figure 4 As shown, Figure 4A schematic diagram of the structure of an edge space attention channel provided in Example 1 of the present application. The edge space attention channel includes a third convolution layer C3 and a third pooling layer S3. Among them, the convolution kernel size corresponding to the third convolution layer is 7×7, and the number is 24; the pooling size of the third pooling layer is 2×2, and the step size is 2.
[0043] The surface electromagnetic response feature map of the grounding grid to be identified first passes through the third convolution layer and the third pooling layer in sequence to output the feature map to be processed. The horizontal edge detection filter and the vertical edge detection filter are respectively used to perform element-by-element multiplication with the feature map to be processed to obtain the horizontal edge feature map Fh and the vertical edge feature map Fv.
[0044] Perform convolution calculation on Fh along the horizontal direction to obtain the horizontal edge features; perform convolution calculation on Fv along the vertical direction to obtain the vertical edge features. The horizontal edge features and the vertical edge features are combined into edge features through orthogonal calculation. The orthogonal calculation uses the Sobel operator, and its mathematical expression is as follows: ; Where Fs represents the edge feature.
[0045] Perform global maximum pooling and global average pooling on the edge features respectively to obtain the maximum value feature and the average value feature, and connect the maximum value feature and the average value feature to form a new feature vector.
[0046] Perform convolution operation on the new feature vector to regain the spatial weight. Use the first activation function Sigmoid function to activate the spatial weight to obtain the activated spatial weight. Multiply the activated spatial weight with the surface electromagnetic response characteristic map of the grounding grid to be identified to obtain the output result.
[0047] like Figure 5 As shown, Figure 5 A schematic diagram of the structure of a correlation channel attention channel provided in Example 1 of the present application. The correlation channel attention channel includes a fourth convolutional layer.
[0048] The surface electromagnetic response characteristic map of the grounding grid to be identified first passes through the fourth convolution layer, then is activated by the second activation function ReLU activation function and BN (Batch Normalization) processing. After the processing is completed, the correlation coefficients are calculated with the four typical defect sets of the grounding grid to obtain the corresponding correlation coefficient matrix. Among them, the convolution kernel size corresponding to the fourth convolution layer is 3×3, and the number is 24.
[0049] The correlation coefficient matrix is fused and activated using the third activation function to obtain the activated correlation coefficient feature. The activated correlation coefficient feature is multiplied with the surface electromagnetic response feature map of the grounding grid to be identified to obtain the output result. The calculation expression of the correlation coefficient matrix is as follows:
[0050] Among them, F' represents the feature map after ReLU function activation and BN processing; B i represents the i-th typical defect set; Indicates F' and B i The corresponding covariance matrix; Var|F'| and Var|B i | respectively F' and B i The corresponding variance matrix.
[0051] The features obtained from the ESA and CCA channels are added and then multiplied with the LeNet-5 model channel. After convolution and full connection processing, a focused feature set is obtained. The convolution layer passed is the fifth convolution layer C5, and the convolution kernel size corresponding to C5 is 1×1, and the number is 64. The features extracted from different convolution layers are fused, and the feature maps obtained from different convolution kernels are fused to obtain a focused feature set.
[0052] The activation function in the LeNet-5 model channel is the non-saturated activation function LeakyReLU. The formula of the LeakyReLU activation function is as follows: ; Among them, x i represents the input of the activation function, a represents a fixed numerical slope, which can be selected between 0.1 and 0.5, and is set to 0.15 in this embodiment.
[0053] like Figure 6 As shown, Figure 6 This is a schematic diagram of the structure of an edge extraction module provided in Example 1 of the present application. The edge extraction module includes two branches.
[0054] Perform a 1×1 convolution operation on the focused feature set to obtain a convolved feature map, which is then input into two parallel branches for processing; In the first branch, the focused feature set is processed using the fourth activation function ReLU activation function, and then upsampled through sub-pixel convolution. The sampling result is added to the focused feature set to obtain the first branch feature map.
[0055] In the second branch, the focused feature set is processed using the fifth activation function, and then a dot multiplication operation is performed with the focused feature set to obtain a second branch feature map; wherein the fifth activation function includes a Sigmoid activation function and a Tanh function.
[0056] The first branch feature map is concatenated with the second branch feature map by 1×1 convolution to obtain the attention weighted feature vector.
[0057] The attention-weighted feature vector is input into the SoftMax classifier, and finally the defect recognition result is obtained from the output layer.
[0058] The SoftMax classifier outputs a probability distribution, compares the probabilities corresponding to different defect types, and selects the defect type corresponding to the maximum probability as the defect recognition result; Among them, the SoftMax classifier uses the Taylor-Softmax function to normalize the probability information, and its mathematical expression is as follows: ; in, ; n is an even number; represents the probability corresponding to the i-th defect; k is the number of defect categories, and in this embodiment, k=4.
[0059] Four photos were randomly selected and processed using the edge enhancement model. After processing by the SoftMax classifier, the output values were converted into probability distributions, and the sum of all output values was guaranteed to be 1. The probability distribution results are shown in Table 1 below.
[0060] Table 1 SoftMax probability distribution results of edge enhancement model
[0061] It can be seen from Table 1 that the defect categories predicted by the edge enhancement model are consistent with the true labels.
[0062] like Figure 7 As shown, Figure 7 This is a corrosion defect diagram of a grounding grid after being processed by ESA, CCA and EEM respectively, provided in Example 1 of the present application. Figure 7 Part (a) represents the corrosion defect image of the grounding grid after ESA treatment; Figure 7 Part (b) represents the corrosion defect image of the grounding grid after CCA treatment; Figure 7 Part (c) in the figure represents the corrosion defect image of the grounding grid after EEM processing.
[0063] It can be seen that after step-by-step processing, the contour information of the grounding grid corrosion defects becomes clearer, which is helpful for the subsequent corrosion type identification.
[0064] like Figure 8a As shown, Figure 8a A comparison chart of the model recognition accuracy provided in Example 1 of the present application. Figure 8a It can be seen that the improved edge enhancement model pays more attention to significant features during feature extraction, reduces the probability of samples with unclear edges being missed, and improves the recognition accuracy.
[0065] like Figure 8b As shown, Figure 8b A comparison chart of model test errors provided in Example 1 of the present application. Figure 8b It can be seen that during the training process of the improved edge enhancement model based on the LeNet-5 network, as the number of iterations increases, the test error gradually decreases, and the final error approaches zero. In particular, after 500 iterations of training of the improved network, the recognition rate of the network on the test set reached 99.4%, which shows that after training, the network can efficiently identify the degree of grounding grid corrosion.
[0066] Embodiment 2: According to an embodiment of the present application, the present application also provides an electronic device and a readable storage medium.
[0067] Fig. 9 A schematic block diagram of an example electronic device 900 that can be used to implement an embodiment of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0068] like Fig. 9 As shown, the device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0069] A number of components in the device 900 are connected to the I / O interface 905, including: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0070] The computing unit 901 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 901 performs the various methods and processes described above, such as a method for identifying corrosion defects of a grounding grid based on an edge enhancement model. For example, in some embodiments, the method for identifying corrosion defects of a grounding grid based on an edge enhancement model may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the method for identifying corrosion defects of a grounding grid based on an edge enhancement model described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to execute the grounding grid corrosion defect identification method based on the edge enhancement model in any other appropriate manner (for example, by means of firmware).
[0071] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0072] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0073] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0074] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0075] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0076] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0077] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in this application can be achieved, and this document is not limited here.
[0078] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0079] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for identifying corrosion defects of grounding grid based on edge enhancement model, characterized in that: include: Obtaining a surface electromagnetic response characteristic map of the grounding grid to be identified; Inputting the surface electromagnetic response characteristic map of the grounding grid to be identified into the trained edge enhancement model to obtain a defect identification result; The defect identification results include single grid corrosion, cross-grid corrosion, conductor connection point corrosion and grid node corrosion; The edge enhancement model includes a three-channel parallel module, an edge extraction module and a SoftMax classifier; The step of inputting the surface electromagnetic response characteristic map of the grounding grid to be identified into the trained edge enhancement model to obtain the defect identification result includes: Inputting the surface electromagnetic response feature map of the ground grid to be identified into a three-channel parallel module for feature extraction, wherein the three-channel parallel module includes a LeNet-5 model channel, an edge space attention channel, and a related channel attention channel; wherein the convolution kernel sizes used in the edge space attention channel and the related channel attention channel are different; The results of the edge space attention channel and the related channel attention channel are added, and then multiplied with the result of the LeNet-5 model channel output, and then processed by convolution and full connection to obtain a focused feature set; Inputting the focus feature set into an edge extraction module to obtain an attention weighted feature vector; The attention weighted feature vector is input into the SoftMax classifier to obtain a defect recognition result.
2. The method for identifying grounding grid corrosion defects based on edge enhancement model according to claim 1 is characterized in that: The training process of the trained edge enhancement model includes the following steps: Acquire ground surface electromagnetic response characteristic maps of grounding grids with various defect types, and divide them into training set data and test set data; the defect types include single grid corrosion, cross-grid corrosion, conductor connection point corrosion, and grid node corrosion; Based on the training set data and the test set data, the edge enhancement model is trained, and the weights and parameter values of the edge enhancement model are continuously updated by the stochastic gradient descent method until the error and recognition rate meet the preset requirements, thereby obtaining a trained edge enhancement model.
3. The method for identifying grounding grid corrosion defects based on edge enhancement model according to claim 1 is characterized in that: The step of obtaining the surface electromagnetic response characteristic map of the grounding grid to be identified includes: Obtain the surface electromagnetic response data of the grounding grid to be identified and perform normalization processing; Based on the normalized surface electromagnetic response data of the grounding grid to be identified, a surface electromagnetic response characteristic map of the grounding grid to be identified is drawn; The image size of the surface electromagnetic response characteristic map of the grounding grid to be identified is adjusted to a preset size matching the edge enhancement model, and the intersection of the grounding grid is used as the image center of the surface electromagnetic response characteristic map of the grounding grid to be identified.
4. The method for identifying grounding grid corrosion defects based on edge enhancement model according to claim 1 is characterized in that: The LeNet-5 model channel includes a first convolution layer, a first pooling layer, a second convolution layer and a second pooling layer, and adopts a maximum pooling method; the surface electromagnetic response characteristic map of the grounding grid to be identified passes through the first convolution layer, the first pooling layer, the second convolution layer and the second pooling layer in sequence; Among them, the convolution kernel size corresponding to the first convolution layer is 5×5, and the number is 16; the convolution kernel size corresponding to the second convolution layer is 5×5, and the number is 32; the pooling size of the first pooling layer is 2×2, and the step size is 2; the pooling size of the second pooling layer is 2×2, and the step size is 3.
5. The method for identifying grounding grid corrosion defects based on edge enhancement model according to claim 1 is characterized in that: The edge space attention channel includes a third convolution layer and a third pooling layer; wherein the convolution kernel size corresponding to the third convolution layer is 7×7, and the number is 24; the pooling size of the third pooling layer is 2×2, and the step size is 2; The surface electromagnetic response characteristic map of the grounding grid to be identified is first passed through the third convolution layer and the third pooling layer in sequence to output the characteristic map to be processed; Using a horizontal edge detection filter and a vertical edge detection filter to perform element-by-element multiplication on the feature map to be processed, respectively, to obtain a horizontal edge feature map Fh and a vertical edge feature map Fv; Perform convolution calculation on Fh along the horizontal direction to obtain the horizontal edge features; Perform convolution calculation on Fv along the vertical direction to obtain the vertical edge features; The horizontal edge feature and the vertical edge feature are combined into an edge feature through orthogonal calculation; Performing global maximum pooling and global average pooling on the edge features respectively to obtain maximum value features and average value features; Connecting the maximum value feature and the average value feature to form a new feature vector; Performing a convolution operation on the new feature vector to regain the spatial weight; Activating the spatial weight using a first activation function to obtain an activated spatial weight; The activated spatial weight is multiplied by the surface electromagnetic response characteristic map of the grounding grid to be identified to obtain an output result.
6. The method for identifying corrosion defects of grounding grid based on edge enhancement model according to claim 1 is characterized in that: The relevant channel attention channel includes a fourth convolutional layer; The surface electromagnetic response characteristic map of the grounding grid to be identified is first passed through the fourth convolution layer, and then activated by the second activation function and batch normalized. After the processing is completed, the correlation coefficients are calculated with different grounding grid typical defect sets to obtain the corresponding correlation coefficient matrix; wherein the convolution kernel size corresponding to the fourth convolution layer is 3×3, and the number is 24; The correlation coefficient matrix is merged and activated by a third activation function to obtain an activated correlation coefficient feature; The activated correlation coefficient feature is multiplied by the surface electromagnetic response feature map of the grounding grid to be identified to obtain an output result.
7. The method for identifying grounding grid corrosion defects based on edge enhancement model according to claim 1 is characterized in that: The step of inputting the focus feature set into an edge extraction module to obtain an attention weighted feature vector comprises: Performing a convolution operation on the focused feature set to obtain a convolved feature map, and inputting the convolved feature map into two parallel branches for processing; In the first branch, the focused feature set is processed by using a fourth activation function, and then up-sampled by sub-pixel convolution, and the obtained sampling result is added to the focused feature set to obtain a first branch feature map; In the second branch, the focused feature set is processed by using a fifth activation function, and then a dot multiplication operation is performed with the focused feature set to obtain a second branch feature map; The first branch feature map and the second branch feature map are concatenated to obtain an attention weighted feature vector.
8. The method for identifying grounding grid corrosion defects based on edge enhancement model according to claim 1 is characterized in that: The SoftMax classifier outputs a probability distribution, compares the probabilities corresponding to different defect types, and selects the defect type corresponding to the maximum probability as the defect recognition result; The SoftMax classifier uses the Taylor-Softmax function to normalize the probability information, and its mathematical expression is as follows: ; in, ; n is an even number; represents the probability corresponding to the i-th defect; k is the number of defect categories.
9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-8.
Citation Information
Cited By
Metal surface microdefect identification method and system based on ultrasonic microscopy
CN120102710A
Ultrasonic microscopic-based metal surface micro-defect identification method and system
CN120102710B
Feature data processing method based on edge device and related device
CN120763718A