Corrosion detection method for electric tower footing
By building an intersection enhancement feature network, combining data enhancement and feature extraction technology, the accuracy and efficiency of power tower base corrosion detection are solved, and corrosion area detection with high accuracy and low false alarm rate is achieved.
Patent Information
- Application Number
- CN202411752790.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-03-14
Smart Images

Figure CN119625535A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for detecting corrosion of a power tower foundation, and belongs to the technical field of neural networks (G06N3 / 02). Background Art
[0002] With the rapid development of society, the power system has become an important infrastructure of modern society. As a key structure of the transmission network, the stability of the power tower is directly related to the safe operation of the power system. The power tower is exposed to the outdoor environment for a long time and is easily affected by wind, rain, humidity and pollutants, resulting in frequent corrosion problems, especially at the tower base and grounding part. The accumulation of tower base corrosion may lead to a decrease in the structural stability of the power tower, causing large-scale power grid failures, and may even cause power outages or personnel safety accidents. Therefore, timely and effective detection and maintenance of the corrosion problem of the power tower base has become a necessary measure to ensure the safe and stable operation of the power system.
[0003] Traditional methods for detecting corrosion on power tower foundations mainly rely on manual inspections or local surface inspections using specific instruments. However, these methods have limitations, such as limited detection range, low work efficiency, high safety risks, and high detection difficulty, making it difficult to cope with the widespread detection needs of power tower foundation corrosion. In addition, manual inspections are easily affected by environmental factors and cannot achieve real-time and all-round monitoring.
[0004] With the rapid development of drone technology and computer vision technology, drones are gradually used to obtain multi-angle image data of power tower foundations. Combined with deep learning algorithms to analyze and process images, corrosion areas can be identified efficiently and accurately, avoiding many problems in traditional detection methods. However, this method still has some technical bottlenecks. For example, the general deep learning model is not accurate enough in identifying complex and irregular corrosion areas, and the model training and parameter adjustment are difficult, which cannot meet the high precision and low false alarm rate requirements of power tower foundation corrosion detection.
[0005] Therefore, there is an urgent need for a highly accurate method for detecting corrosion of power tower foundations to ensure the safety of the power system. Summary of the invention
[0006] The technical problem to be solved by the present invention is: how to improve the accuracy of detecting the corrosion area of the power tower foundation.
[0007] The technical solution proposed by the present invention to solve the above technical problems is: a method for detecting corrosion of a power tower foundation, comprising the following steps:
[0008] Step 1: Obtain historical power tower foundation corrosion images;
[0009] Step 1.1: Perform data enhancement on each historical power tower base corrosion image through geometric transformation and pixel transformation to generate each historical power tower base corrosion enhanced image;
[0010] Step 1.2: Frame all the corrosion areas on the historical power tower base corrosion images and the historical power tower base corrosion enhanced images to form corrosion frames and mark the corrosion types;
[0011] The corrosion types include normal, slight and severe corrosion types;
[0012] Step 1.3: Divide all the images in step 1.2 into two sets: training set and validation set. Each set contains images of three corrosion types.
[0013] Step 2: Build and train the intersection enhancement feature network;
[0014] The structure of the intersection enhancement feature network includes a backbone ResNet-50 network, an intersection path encoder and a multi-path enhancement decoder;
[0015] Step 2.1: Input all images in the training set into the backbone ResNet-50 network, and calculate the feature map of each layer of the backbone ResNet-50 network according to the following formula (1):
[0016] (1);
[0017] In formula (1), l is the number of layers of the backbone ResNet-50 network; W l is the first convolution kernel; Conv means convolution, It is the feature map of the previous layer of each layer of the backbone ResNet-50 network;
[0018] Step 2.2: Convert the feature map of any layer of the backbone ResNet-50 network Input the intersection path encoder and calculate the residual connection feature map X1 according to the following formula (2):
[0019] (2);
[0020] In formula (2), Y is the detail feature map; W Y is the second convolution kernel; b Y is the first bias term; Q is the query matrix of Y; K is the key matrix of Y; V is the value matrix of Y; W Q is the first weight matrix; W k is the second weight matrix; W v is the third weight matrix; a is the attention weight; softmax is the normalized exponential function; T is the transpose; is the key vector dimension of Y; b A is the second bias term; Z is the weighted feature map; M is the activated feature map; ReLu is the ReLu activation function; N is the first layer normalized feature map; μ is the mean; σ is the standard deviation; ε = 10 -5 ; γ is the scaling parameter; β is the offset parameter; G is the enhanced feature map; · is the element-wise multiplication; sigmoid is the sigmoid activation function; W H is the fourth weight matrix; b H is the third bias term; is the second layer normalized feature map; H is the first downsampled feature map; Downsample is the downsample function; A is the representation feature map; Mish is the Mish activation function; tanh is the hyperbolic tangent function; L is the normalized feature map; O is the iterative feature map; t is the number of iterations; α is the noise intensity hyperparameter; λ is the inverse noise parameter; is the prediction noise; q is the random noise; It is the normalized feature map of the third layer; kernel_size and stride are parameters of Conv; is the transposed feature map; B I is the fourth bias term;
[0021] Step 2.3: Input the residual connection feature map X1 into the multi-path enhancement decoder, and calculate each training prediction box X2 and the probability U of the corrosion type in each training prediction box X2 according to the following formula (3);
[0022] (3);
[0023] In formula (3), is a tensor feature map; m is the number of features; P is the initialization tensor; f and g are mapping functions; i and j are position indices; B is a self-attention feature map; yes The query matrix of yes The key matrix of yes The value matrix of yes The key vector dimension is: C is the scaled offset feature map; E is the upsampled feature map; Upsample is the upsample function; F is the first convolution feature map; W F is the third convolution kernel, b F is the fifth bias term, is a nonlinear characteristic map; is the fourth layer normalized feature map; I is the second down-sampling feature map; K is the information feature map; M is the second convolution feature map; W M is the fourth convolution kernel; bM is the sixth bias term; M avg and M max are all feature vectors of M; GlobalAvgPool is global average pooling; GlobalAvgPool is global maximum pooling; C avg It is M avg Channel attention map of C max It is M max Channel attention mapping; FC is a fully connected network layer; M C is the intermediate feature map; ⊙ represents channel-by-channel multiplication; M C,avg is the first spatial feature map; M C,max is the second spatial feature map; S is the spatial attention map;
[0024] Step 2.4: Perform bipartite graph matching on all training prediction boxes X2 and the erosion boxes on all images in the training set to obtain the training prediction box X2 corresponding to each erosion box;
[0025] Step 2.5: Calculate the loss function value D1 of the erosion box on the image in the training set and the corresponding training prediction box according to formula (4):
[0026] (4);
[0027] In formula (4), c is the corrosion type; y is c It is the sum of the label values of all corrosion boxes with the cth corrosion type; is the sum of the probabilities of the cth corrosion type in all training prediction boxes; Ac is the sum of the minimum closure areas of all corrosion boxes and corresponding training prediction boxes; Au is the sum of the intersection areas of all corrosion boxes and corresponding training prediction boxes; IoU is the sum of the intersection-over-union ratios of all corrosion boxes and corresponding training prediction boxes;
[0028] Step 2.6: Repeat steps 2.1 to 2.5, and update the scaling parameter γ and the offset parameter β each time until the loss function value no longer changes, and then stop repeating until the trained intersection enhancement feature network is obtained. The loss function value that no longer changes is recorded as D2.
[0029] Step 2.7: Input all images in the validation set into the trained intersection enhancement feature network to obtain the probability of each validation prediction box and the erosion type in each validation prediction box, and calculate the loss function value D3 of the erosion box on the image in the validation set and the corresponding validation prediction box according to formula (4);
[0030] Step 2.8: If , the intersection enhancement feature network training is completed;
[0031] like , then repeat step 2.7, and reduce the learning rate of the intersection enhancement feature network each time, until the difference between the calculated loss function value of the erosion box on the image in the verification set and the corresponding verification prediction box and D2 is less than 0.05, and then stop repeating, and the training of the intersection enhancement feature network is completed;
[0032] Step 3: Collect real-time power tower base images, input the intersection enhancement feature network trained in step 2.8, frame the corrosion area on the real-time power tower base image and mark the corrosion type.
[0033] Furthermore, in step 3, a real-time power tower base image is collected by a drone equipped with RGB.
[0034] Furthermore, in step 2.6, the back propagation algorithm is first used to calculate the gradient, and then the gradient descent algorithm is used to update the parameters.
[0035] The beneficial effects of the present invention are as follows: since an intersection enhanced feature network model including a backbone ResNet-50 network, an intersection path encoder and a multi-path enhanced decoder is constructed, simple to complex step feature extraction tasks are performed through the backbone ResNet-50 network, and the multi-path enhanced decoder is used to enhance the focus on key features in complex and irregular images. Finally, the enhanced multi-path decoder is combined with a variety of feature enhancement and fusion mechanisms to improve the quality of image generation and detail capture capabilities, and jointly achieve the prediction of corrosion areas and types of power tower base images; the intersection enhanced feature network model composed of this special structure avoids the complex hyperparameter adjustment of traditional neural learning networks, and at the same time achieves high accuracy and low false alarms in the detection of complex and irregular corrosion areas. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] A method for detecting corrosion of a power tower foundation according to the present invention will be further described below in conjunction with the accompanying drawings.
[0037] Figure 1 It is a structural schematic diagram of the intersection enhancement feature network in the power tower foundation corrosion detection method of the embodiment.
[0038] Figure 2 It is a structural schematic diagram of an intersection path encoder in a method for detecting corrosion of a power tower foundation in an embodiment.
[0039] Figure 3 It is a structural schematic diagram of a multi-path enhanced decoder in the power tower base corrosion detection method of an embodiment. DETAILED DESCRIPTION
[0040] Example
[0041] The power tower foundation corrosion detection method of this embodiment includes the following steps:
[0042] Step 1: Obtain historical power tower foundation corrosion images;
[0043] Step 1.1: Perform data enhancement on each historical power tower base corrosion image through geometric transformation and pixel transformation to generate each historical power tower base corrosion enhanced image;
[0044] Step 1.2: Frame all the corrosion areas on the historical power tower base corrosion images and the historical power tower base corrosion enhanced images to form corrosion frames and mark the corrosion types;
[0045] The corrosion types include normal, slight and severe corrosion types;
[0046] Step 1.3: Divide all the images in step 1.2 into two sets: training set and validation set. Each set contains images of three corrosion types.
[0047] Step 2: Build and train the intersection enhancement feature network;
[0048] like Figure 1 As shown, the structure of the intersection enhancement feature network includes a backbone ResNet-50 network, an intersection path encoder, and a multi-path enhancement decoder;
[0049] The backbone network is the ResNet-50 network, in which the residual connection enables ResNet to maintain effective gradient descent in very deep networks, which is suitable for simple to complex step feature extraction tasks and multi-pixel image extraction;
[0050] Step 2.1: Input all images in the training set into the backbone ResNet-50 network, and calculate the feature map of each layer of the backbone ResNet-50 network according to the following formula (1):
[0051] (1);
[0052] In formula (1), l is the number of layers of the backbone ResNet-50 network; W l is the first convolution kernel; Conv means convolution, It is the feature map of the previous layer of each layer of the backbone ResNet-50 network;
[0053] Step 2.2: Convert the feature map of any layer of the backbone ResNet-50 network Input the intersection path encoder and calculate the residual connection feature map X1 according to the following formula (2):
[0054] (2);
[0055] In formula (2), Y is the detail feature map; W Yis the second convolution kernel; b Y is the first bias term; Q is the query matrix of Y; K is the key matrix of Y; V is the value matrix of Y; W Q is the first weight matrix; W k is the second weight matrix; W v is the third weight matrix; a is the attention weight; softmax is the normalized exponential function; T is the transpose; is the key vector dimension of Y; b A is the second bias term; Z is the weighted feature map; M is the activated feature map; ReLu is the ReLu activation function; N is the first layer normalized feature map; μ is the mean; σ is the standard deviation; ε = 10 -5 ; γ is the scaling parameter; β is the offset parameter; G is the enhanced feature map; · is the element-wise multiplication; sigmoid is the sigmoid activation function; W H is the fourth weight matrix; b H is the third bias term; is the second layer normalized feature map; H is the first downsampled feature map; Downsample is the downsample function; A is the representation feature map; Mish is the Mish activation function; tanh is the hyperbolic tangent function; L is the normalized feature map; O is the iterative feature map; t is the number of iterations; α is the noise intensity hyperparameter; λ is the inverse noise parameter; is the prediction noise; q is the random noise; It is the normalized feature map of the third layer; kernel_size and stride are parameters of Conv; is the transposed feature map; B I is the fourth bias term;
[0056] The structure of the cross-path encoder of this embodiment is as follows Figure 2 As shown, the feature map After further extracting detail features through the convolution layer, the detail feature map Y is obtained; the detail feature map Y enters the self-attention mechanism module, calculates the query matrix Q, key matrix K and value matrix V of Y to capture contextual information and long-distance dependencies, improves the focus on key features, and obtains the weighted feature map Z; the input and output of the self-attention mechanism module are added and nonlinearity is introduced through the activation function ReLU to help capture complex feature relationships, and obtain the activated feature map M; then layer normalization is performed to ensure the stability and consistency of the features, and the first layer normalized feature map N is obtained; then it enters the GLU unit, and by combining the input and gating mechanism, the feature representation capability is further enhanced, thereby improving the ability to capture details, and obtaining the enhanced feature map G; then G is layer normalized to obtain the second layer normalized feature map , and downsample to obtain the first downsampled feature map H, so that H has a lower resolution and can maintain global context information, which is suitable for capturing global features;
[0057] In addition, the weighted feature map Z output by the self-attention mechanism module is further improved through the activation function Mish to obtain the feature map A; then Sigmoid normalization is performed to obtain the normalized feature map L; and then the diffusion model (DDPM) is entered. In DDPM, the forward operation is to add noise to the input feature map, and gradually add noise to the input features. After several steps of noise addition, the final output is a highly noisy feature representation. The backward operation of DDPM is to gradually restore the feature map through the inverse diffusion process. Starting from the noise feature, DDPM gradually removes the noise through the learned denoising network to generate a clearer feature map. After t iterations, it generates the iterative feature map O, and normalizes its layer to obtain the third layer normalized feature map. ; Then upsampling through convolution transposition can restore more local detail information and obtain the transposed feature map ;
[0058] Finally, H and Perform residual connection to obtain the residual connection feature map X1 and output it;
[0059] Step 2.3: Input the residual connection feature map X1 into the multi-path enhancement decoder, and calculate each training prediction box X2 and the probability U of the corrosion type in each training prediction box X2 according to the following formula (3);
[0060] (3);
[0061] In formula (3), is a tensor feature map; m is the number of features; P is the initialization tensor; f and g are mapping functions; i and j are position indices; B is a self-attention feature map; yes The query matrix of yes The key matrix of yes The value matrix of yes The key vector dimension is: C is the scaled offset feature map; E is the upsampled feature map; Upsample is the upsample function; F is the first convolution feature map; W F is the third convolution kernel, b F is the fifth bias term, is a nonlinear characteristic map; is the fourth layer normalized feature map; I is the second down-sampling feature map; K is the information feature map; M is the second convolution feature map; W Mis the fourth convolution kernel; b M is the sixth bias term; M avg and M max are all feature vectors of M; GlobalAvgPool is global average pooling; GlobalAvgPool is global maximum pooling; C avg It is M avg Channel attention map of C max It is M max Channel attention mapping; FC is a fully connected network layer; M C is the intermediate feature map; ⊙ represents channel-by-channel multiplication; M C,avg is the first spatial feature map; M C,max is the second spatial feature map; S is the spatial attention map;
[0062] The structure of the enhanced multi-path decoder of this embodiment is as follows Figure 3 As shown in Figure 1, by combining multiple feature enhancement and fusion mechanisms, the quality of image generation and the ability to capture details are improved to generate high-resolution image outputs with rich contextual information. First, a learning tensor P is initialized, and then the non-local module captures long-distance dependencies and extracts global features to obtain a tensor feature map. ; Then enter the self-attention mechanism to refine the features, improve the intersection enhancement feature network's attention to local information, and obtain higher attention on important areas to obtain the self-attention feature map B; then perform batch normalization and scaling plus offset operations to obtain the scaled offset feature map C;
[0063] At this time, the scaled offset feature map C is combined with the residual connection feature map X1, and then upsampled to obtain the upsampled feature map E to increase the spatial dimension of the feature map, provide suitable input for the subsequent convolution layer, and facilitate the restoration of the size of the original image; then, the features are extracted through convolution, the feature expression ability is enhanced, and the image information is further refined to obtain the first convolution feature map F; then, the activation function is used to introduce nonlinearity so that the intersection enhancement feature network has stronger expression ability and can learn more complex mappings, and obtain a nonlinear feature map ;
[0064] In addition, the tensor feature map After layer normalization, the fourth layer normalized feature map is obtained ; Then reduce the resolution by downsampling and aggregate information to obtain the second downsampled feature map I;
[0065] The second downsampled feature map I is combined with the nonlinear feature map Combined, this process can further combine the features of the two paths, enhancing the model's attention to important information. Then upsampling is performed to help restore the spatial resolution of the feature map, preparing for subsequent fusion and processing, and obtaining the information feature map K; then the information feature map K and the second downsampled feature map I are combined and convolved to obtain the second convolution feature map M; then enter the CBMA module to further enhance the information of the input feature map to ensure that the important information in the feature map is amplified, while redundant or irrelevant information is suppressed. First, the CBMA module extracts the feature information of the channel dimension from the second convolution feature map M. The channel attention mechanism generates a weight for each channel to emphasize or weaken the information of a specific channel. In order to calculate the channel attention, global average pooling and maximum pooling are usually used to obtain the feature vector M avg and M max ; Then M avg and M max Input into a shared fully connected network (FC) to obtain two channel attention maps C avg and M avg , and add and multiply the second convolutional feature map M channel by channel to enhance the important channel information in the input feature map to obtain the intermediate feature map M C ; Then by M C Perform global average pooling and global maximum pooling along the channel dimension to obtain two spatial feature maps M C,avg and M C,max ; M C,avg and M C,max Concatenate along the channel dimension and then input into a 7×7 convolutional layer to generate a spatial attention map S;
[0066] Finally, the spatial attention map S and M C By multiplying the elements one by one, we get the training prediction box X2; and then through a convolution layer, we can get the corrosion type and probability U in the training prediction box.
[0067] Step 2.4: Perform bipartite graph matching on all training prediction boxes X2 and the erosion boxes on all images in the training set to obtain the training prediction box X2 corresponding to each erosion box;
[0068] Step 2.5: Calculate the loss function value D1 of the erosion box on the image in the training set and the corresponding training prediction box according to formula (4):
[0069] (4);
[0070] In this embodiment, D1=0.1 is calculated according to formula (1);
[0071] In formula (4), c is the corrosion type; y is cIt is the sum of the label values of all corrosion boxes with the cth corrosion type; is the sum of the probabilities of the cth corrosion type in all training prediction boxes; Ac is the sum of the minimum closure areas of all corrosion boxes and corresponding training prediction boxes; Au is the sum of the intersection areas of all corrosion boxes and corresponding training prediction boxes; IoU is the sum of the intersection-over-union ratios of all corrosion boxes and corresponding training prediction boxes;
[0072] Step 2.6: Repeat steps 2.1 to 2.5, and update the scaling parameter γ and the offset parameter β each time until the loss function value no longer changes, and then stop repeating until the trained intersection enhancement feature network is obtained. The loss function value that no longer changes is recorded as D2.
[0073] In this embodiment, the back propagation algorithm is first used to calculate the gradient, and then the gradient descent algorithm is used to update the scaling parameter γ and the offset parameter β; the final loss function value does not change D2=0.005;
[0074] Step 2.7: Input all images in the validation set into the trained intersection enhancement feature network to obtain the probability of each validation prediction box and the erosion type in each validation prediction box, and calculate the loss function value D3 of the erosion box on the image in the validation set and the corresponding validation prediction box according to formula (4);
[0075] The loss function value D3 calculated in this embodiment is 0.05;
[0076] Step 2.8: If , the intersection enhancement feature network training is completed;
[0077] like , then repeat step 2.7, and reduce the learning rate of the intersection enhancement feature network each time, until the difference between the calculated loss function value of the erosion box on the image in the verification set and the corresponding verification prediction box and D2 is less than 0.05, and then stop repeating, and the training of the intersection enhancement feature network is completed;
[0078] This embodiment , the intersection enhancement feature network training is completed.
[0079] Step 3: Collect real-time power tower base images, input the intersection enhancement feature network trained in step 2.8, frame the corrosion area on the real-time power tower base image and mark the corrosion type.
[0080] In this embodiment, a drone equipped with RGB is used to collect real-time images of the power tower base.
[0081] The above description is only a preferred embodiment of the present invention, but the present invention is not limited thereto. All equivalent replacements or equivalent changes of the concepts and technical solutions according to the present invention should be included in the protection scope of the present invention.
Claims
1. A method for detecting corrosion of a power tower foundation, characterized in that The steps include: Step 1: Obtain historical power tower foundation corrosion images; Step 1.1: Perform data enhancement on each historical power tower base corrosion image through geometric transformation and pixel transformation to generate each historical power tower base corrosion enhanced image; Step 1.2: Frame all the corrosion areas on the historical power tower base corrosion images and the historical power tower base corrosion enhanced images to form corrosion frames and mark the corrosion types; The corrosion types include normal, slight and severe corrosion types; Step 1.3: Divide all the images in step 1.2 into two sets: training set and validation set. Each set contains images of three corrosion types. Step 2: Build and train the intersection enhancement feature network; The structure of the intersection enhancement feature network includes a backbone ResNet-50 network, an intersection path encoder and a multi-path enhancement decoder; Step 2.1: Input all images in the training set into the backbone ResNet-50 network, and calculate the feature map of each layer of the backbone ResNet-50 network according to the following formula (1): (1); In formula (1), l is the number of layers of the backbone ResNet-50 network; W l is the first convolution kernel; Conv means convolution, It is the feature map of the previous layer of each layer of the backbone ResNet-50 network; Step 2.2: Convert the feature map of any layer of the backbone ResNet-50 network Input the intersection path encoder and calculate the residual connection feature map X1 according to the following formula (2): (2); In formula (2), Y is the detail feature map; W Y is the second convolution kernel; b Y is the first bias term; Q is the query matrix of Y; K is the key matrix of Y; V is the value matrix of Y; W Q is the first weight matrix; W k is the second weight matrix; W v is the third weight matrix; a is the attention weight; Softmax is the normalized exponential function; T is the transpose; is the key vector dimension of Y; b A is the second bias term; Z is the weighted feature map; M is the activated feature map; ReLu is the ReLu activation function; N is the first layer normalized feature map; μ is the mean; σ is the standard deviation; ε = 10 -5 ; γ is the scaling parameter; β is the offset parameter; G is the enhanced feature map; · is the element-wise multiplication; sigmoid is the sigmoid activation function; W H is the fourth weight matrix; b H is the third bias term; is the second layer normalized feature map; H is the first downsampled feature map; Downsample is the downsample function; A is the representation feature map; Mish is the Mish activation function; tanh is the hyperbolic tangent function; L is the normalized feature map; O is the iterative feature map; t is the number of iterations; α is the noise intensity hyperparameter; λ is the inverse noise parameter; is the prediction noise; q is the random noise; It is the normalized feature map of the third layer; kernel_size and stride are parameters of Conv; is the transposed feature map; B I is the fourth bias term; Step 2.3: Input the residual connection feature map X1 into the multi-path enhancement decoder, and calculate each training prediction box X2 and the probability U of the corrosion type in each training prediction box X2 according to the following formula (3); (3); In formula (3), is the tensor feature map; m is the number of features; P is the initialization tensor; f and g are mapping functions; i and j are position indexes; B is the self-attention feature map; yes The query matrix of yes The key matrix of yes The value matrix of yes The key vector dimension is: C is the scaled offset feature map; E is the upsampled feature map; Upsample is the upsample function; F is the first convolution feature map; W F is the third convolution kernel, b F is the fifth bias term, is a nonlinear characteristic map; It is the fourth layer normalized feature map; I is the second down-sampled feature map; K is the information feature map; M is the second convolutional feature map; W M is the fourth convolution kernel; b M is the sixth bias term; M avg and M max are all feature vectors of M; GlobalAvgPool is global average pooling; GlobalAvgPool is global maximum pooling; C avg It is M avg Channel attention map of C max It is M max Channel attention mapping of ; FC is the fully connected network layer; M C is the intermediate feature map; ⊙ represents channel-by-channel multiplication; M C,avg is the first spatial feature map; M C,max is the second spatial feature map; S is the spatial attention map; Step 2.4: Perform bipartite graph matching on all training prediction boxes X2 and the erosion boxes on all images in the training set to obtain the training prediction box X2 corresponding to each erosion box; Step 2.5: Calculate the loss function value D1 of the erosion box on the image in the training set and the corresponding training prediction box according to formula (4): (4); In formula (4), c is the corrosion type; y is c It is the sum of the label values of all corrosion boxes with the cth corrosion type; is the sum of the probabilities of the cth corrosion type in all training prediction boxes; Ac is the sum of the minimum closure areas of all corrosion boxes and corresponding training prediction boxes; Au is the sum of the intersection areas of all corrosion boxes and corresponding training prediction boxes; IoU is the sum of the intersection-over-union ratios of all corrosion boxes and corresponding training prediction boxes; Step 2.6: Repeat steps 2.1 to 2.5, and update the scaling parameter γ and the offset parameter β each time until the loss function value no longer changes, and then stop repeating until the trained intersection enhancement feature network is obtained. The loss function value that no longer changes is recorded as D2. Step 2.7: Input all images in the validation set into the trained intersection enhancement feature network to obtain the probability of each validation prediction box and the erosion type in each validation prediction box, and calculate the loss function value D3 of the erosion box on the image in the validation set and the corresponding validation prediction box according to formula (4); Step 2.8: If , the intersection enhancement feature network training is completed; like , then repeat step 2.7, and reduce the learning rate of the intersection enhancement feature network each time, until the difference between the calculated loss function value of the erosion box on the image in the verification set and the corresponding verification prediction box and D2 is less than 0.05, and then stop repeating, and the training of the intersection enhancement feature network is completed; Step 3: Collect real-time power tower base images, input the intersection enhancement feature network trained in step 2.8, frame the corrosion area on the real-time power tower base image and mark the corrosion type.
2. The method for detecting corrosion of a power tower foundation according to claim 1, characterized in that: The step 3 collects real-time power tower base images by using an RGB-equipped drone.
3. The method for detecting corrosion of a power tower foundation according to claim 1, characterized in that: In step 2.6, the back propagation algorithm is first used to calculate the gradient, and then the gradient descent algorithm is used to update the parameters.