Lightning arrester surface defect detection method based on unmanned aerial vehicle

By using UAV image acquisition and feature fusion technology, combined with snow melting algorithm to optimize the path, the problems of high labor intensity, high safety risk and low detection efficiency of traditional surge arrester inspection have been solved. This has enabled automated detection and intelligent identification of surface defects in surge arresters, improving the safety and efficiency of power system operation and maintenance.

CN121504818APending Publication Date: 2026-02-10JIANGMEN MINGHAO IND GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511466966.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-14
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Traditional surge arrester inspections rely on manual methods, which are labor-intensive, inefficient, and pose safety hazards. Furthermore, they are difficult to conduct large-scale, continuous monitoring, and the test results are limited by the experience and subjective judgment of the inspectors, which carries the risk of misjudgment and omission.

Method used

A method for detecting surface defects in lightning arresters based on unmanned aerial vehicles (UAVs) is adopted. This method achieves automated defect detection by combining UAV image acquisition, multi-scale feature extraction, channel and spatial attention feature fusion, and snow melting algorithm to optimize path planning.

Benefits of technology

It improves the safety, efficiency, and intelligence of surge arrester surface defect detection, realizes multi-UAV collaborative path planning and intelligent defect identification, and meets the automated detection needs in complex power environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121504818A_ABST
    Figure CN121504818A_ABST
Patent Text Reader

Abstract

The invention provides a lightning arrester surface defect detection method based on an unmanned aerial vehicle. The method comprises the steps of extracting a first feature map from a lightning arrester image; generating a channel weight according to the first feature map, obtaining a channel refining feature according to the first feature map and the channel weight, and performing residual connection and coordinate convolution on the channel refining feature and the first feature map to obtain a second feature map; performing coordinate convolution up-sampling operation and aggregation operation on the second feature map to obtain up-sampling features, and performing coordinate convolution down-sampling operation and aggregation operation on the up-sampling features to obtain down-sampling features; obtaining a channel attention weight and a space attention weight according to the down-sampling feature, and obtaining an attention residual fusion feature according to the channel attention feature and the space attention weight; performing lightning arrester surface defect detection according to the attention residual fusion features; the problems of high labor intensity, high safety risk and low detection efficiency of manual inspection in a traditional method are solved, and the safety, efficiency and intelligent level are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing, and more particularly to a method for detecting surface defects in lightning arresters based on unmanned aerial vehicles (UAVs). Background Technology

[0002] As a critical overvoltage protection device in the power system, the operating status of surge arresters directly affects the safety and stability of the power system. With the continuous expansion of the power grid and the continuous increase in transmission voltage levels, surge arresters need to withstand the complex environmental effects of ultraviolet radiation, rain erosion, and salt spray corrosion year-round. If defects such as surface cracks and discharge marks appear, it may lead to a decrease in insulation level, or even cause equipment breakdown and power accidents. Therefore, surface defect detection is a key aspect of power operation and maintenance.

[0003] Traditional surge arrester inspections primarily rely on manual methods, typically involving maintenance personnel using telescopes, infrared thermometers, or aerial work platforms for visual inspection. This approach is not only labor-intensive and inefficient, but also poses significant safety hazards in high-voltage and high-altitude working environments. Furthermore, the results of manual inspections are limited by the inspectors' experience and subjective judgment, leading to risks of misjudgment and omissions, and making it difficult to meet the needs of large-scale, continuous monitoring. Summary of the Invention

[0004] The following is an overview of the topics described in detail in this article.

[0005] The purpose of this application is to at least partially solve one of the technical problems existing in the related technologies. The embodiments of this application provide a method for detecting surface defects of surge arresters based on drones, thereby improving the safety, efficiency and intelligence level of surface defect detection of surge arresters.

[0006] An embodiment of this application provides a method for detecting surface defects in lightning arresters based on unmanned aerial vehicles (UAVs), comprising: Obtain an image of the surge arrester; Multiple first feature maps of different scales are extracted from the lightning arrester image; Channel weights are generated based on the first feature map. The channel-optimized first feature map is multiplied element-wise with the channel weights to obtain channel refined features. The channel refined features are residually concatenated with the first feature map to obtain residual channel refined features. The residual channel refined features are then subjected to coordinate convolution to obtain a second feature map. Multiple second feature maps of different sizes are subjected to coordinate convolution upsampling and aggregation operations to obtain upsampled features, and the upsampled features are subjected to coordinate convolution downsampling and aggregation operations to obtain downsampled features. The channel attention weights are obtained based on the downsampling features. The channel attention weights and the downsampling features are multiplied element-wise to obtain the channel attention features. The spatial attention weights are obtained based on the channel attention features. The channel attention features and the spatial attention weights are multiplied element-wise to obtain the spatial attention features. The spatial attention features are concatenated with the residuals of the downsampling features to obtain the attention residual fusion features. The surface defects of the surge arrester are detected based on the attention residual fusion characteristics, and the surface defect detection results of the surge arrester are obtained.

[0007] According to certain embodiments of this application, obtaining the surge arrester image includes: Initialize the drone swarm; Calculate the fitness of individuals in the drone swarm, determine the current optimal position and the fitness corresponding to the current optimal position; Based on the fitness of individuals in the drone swarm, elite individuals are selected from the individuals to construct an elite swarm; Snowmelt rate is calculated based on the elite population; Based on the snow melting rate, the elite population is divided into a locally optimal subpopulation and a globally optimal subpopulation; Local optimization is performed on the local optimization subgroup to update the position of individuals in the local optimization subgroup, and global optimization is performed on the global optimization subgroup to update the position of individuals in the global optimization subgroup; Greedy selection is performed based on the positions of individuals in the updated local optimization subgroup and the updated global optimization subgroup to obtain a greedy selection population, and the positions are updated in the greedy selection population. Update the current best position and elite population based on the fitness of individuals in the updated greedy selection population; Once the minimum fitness of the drone swarm is found, the corresponding current optimal position is returned to obtain the target flight path; The drone is instructed to fly along the target flight path and collect images of the lightning arrester.

[0008] According to certain embodiments of this application, the step of selecting elite individuals from the individuals in the drone swarm based on their fitness to construct an elite swarm includes: The individuals are subjected to chaotic mapping, and the first candidate elite population is obtained by constraining the inter-machine distance. Based on the first candidate elite population, perform elite reverse learning to obtain the second candidate elite population; Elite populations are constructed by selecting elite individuals from the first and second candidate elite populations based on the fitness of individuals in the drone swarm.

[0009] According to certain embodiments of this application, during the process of local optimization of the local optimization subgroup, the intensity of local optimization is controlled by escape energy; The escape energy is expressed as: In the formula, Let t be the escape energy, and t be the current iteration number. The maximum number of iterations, This represents the initial energy level.

[0010] According to certain embodiments of this application, during the global optimization of the global optimization subgroup, the search direction is updated according to the following formula: ; In the formula, X(t) represents the search direction. This is the best position at present. The average value at the current position is given by G, where G is the gravity factor, S is the acceleration, TF is the transfer factor, x(t) represents the x-axis direction coefficient, and y(t) represents the y-axis direction coefficient.

[0011] According to certain embodiments of this application, feature extraction is performed on the lightning arrester image through a backbone network. Different feature extraction layers of the backbone network output first feature maps of different sizes, and the output of the previous feature extraction layer is used as the input of the next feature extraction layer.

[0012] According to certain embodiments of this application, the feature extraction layer is a residual block; in the residual block, the input features of the residual block are concatenated with the outputs of the first CBM convolutional block, the second CBM convolutional block, the residual linking block and the third CBM convolutional block, and the input features are concatenated with the outputs of the first CBM convolutional block and the fourth CBM convolutional block, and the concatenation result is concatenated with the fifth CBM convolutional block to obtain the output features of the residual block.

[0013] According to certain embodiments of this application, the coordinate convolution upsampling operation is performed by a coordinate convolution upsampling module; in the coordinate convolution upsampling module, the input features of the coordinate convolution upsampling module are sequentially passed through a coordinate channel attention module, an upsampling module, and a CBL convolution block to obtain the output features of the coordinate convolution upsampling module; The coordinate convolution downsampling operation is performed by the coordinate convolution downsampling module; in the coordinate convolution downsampling module, the input features of the coordinate convolution downsampling module pass through the coordinate channel attention module, the downsampling module and the CBL convolution block in sequence to obtain the output features of the coordinate convolution downsampling module; In the coordinate channel attention module, a second channel attention weight is generated based on the input features of the coordinate channel attention module. The input features of the channel-optimized coordinate channel attention module are multiplied element-wise with the second channel attention weight to obtain the second channel refined features. The second channel refined features are residually concatenated with the input features of the coordinate channel attention module to obtain the second residual channel refined features. The second residual channel refined features are then subjected to coordinate convolution to obtain the output features of the coordinate channel attention module.

[0014] According to certain embodiments of this application, obtaining the channel attention weights based on the downsampling features includes: Average pooling features are obtained through average pooling operations and MLP operations; Max pooling features are obtained through max pooling and MLP operations; The average pooling feature and the max pooling feature are fused to obtain the fused pooling feature; The first sum feature is obtained by adding the fused pooling feature and the average pooling feature, the second sum feature is obtained by adding the fused pooling feature and the max pooling feature, the third sum feature is obtained by adding the first sum feature and the second sum feature, and the channel attention weight is obtained by applying the Sigmoid function to the third sum feature.

[0015] According to certain embodiments of this application, obtaining the spatial attention weights based on the channel attention features includes: The spatial attention weights are obtained by sequentially performing coordinate convolution, average pooling, max pooling, and one-dimensional convolution operations on the channel attention features.

[0016] The above scheme has at least the following beneficial effects: First feature map is extracted from the surge arrester image; channel weights are generated based on the first feature map; refined channel features are obtained based on the first feature map and channel weights; the refined channel features are residually concatenated with the first feature map and subjected to coordinate convolution to obtain a second feature map; upsampled features are obtained from the second feature map through coordinate convolution upsampling and aggregation operations; downsampled features are obtained from the upsampled features through coordinate convolution downsampling and aggregation operations; channel attention weights and spatial attention weights are obtained from the downsampled features; attention residual fusion features are obtained from the channel attention features and spatial attention weights; and surface defect detection of the surge arrester is performed based on the attention residual fusion features. This solves the problems of high labor intensity, high safety risk, and low detection efficiency associated with traditional manual inspection methods, improving safety, efficiency, and intelligence levels. Attached Figure Description

[0017] The accompanying drawings are used to provide a further understanding of the technical solutions of this application and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of this application and do not constitute a limitation on the technical solutions of this application.

[0018] Figure 1 This is a step diagram of a method for detecting surface defects in lightning arresters based on unmanned aerial vehicles (UAVs). Figure 2 This is a diagram showing the sub-steps for obtaining an image of a surge arrester; Figure 3 This is a structural diagram of a surge arrester surface defect detection network based on coordinate convolution; Figure 4 This is a structural diagram of the coordinate channel attention module; Figure 5 This is a structural diagram of the coordinate residual fusion module; Figure 6 This is a structural diagram of the channel attention module; Figure 7 This is a structural diagram of the spatial attention module. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0020] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, or the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0021] The embodiments of this application will be further described below with reference to the accompanying drawings.

[0022] The embodiments of this application provide a method for detecting surface defects in lightning arresters based on unmanned aerial vehicles (UAVs).

[0023] Reference Figure 1 A method for detecting surface defects in lightning arresters based on unmanned aerial vehicles (UAVs) includes the following steps: Step S100: Obtain the image of the surge arrester; Step S200: Extract multiple first feature maps of different scales from the surge arrester image; Step S300: Generate channel weights based on the first feature map; multiply the first feature map optimized by the channel weights element-wise to obtain the channel refined features; perform residual connection between the channel refined features and the first feature map to obtain the residual channel refined features; and perform coordinate convolution on the residual channel refined features to obtain the second feature map. Step S400: Multiple second feature maps of different sizes are subjected to coordinate convolution upsampling and aggregation operations to obtain upsampled features, and the upsampled features are subjected to coordinate convolution downsampling and aggregation operations to obtain downsampled features; Step S500: Obtain channel attention weights based on downsampling features; multiply channel attention weights and downsampling features element-wise to obtain channel attention features; obtain spatial attention weights based on channel attention features; multiply channel attention features and spatial attention weights element-wise to obtain spatial attention features; and concatenate spatial attention features with downsampling feature residuals to obtain attention residual fusion features. Step S600: Perform surface defect detection on the surge arrester based on the attention residual fusion characteristics to obtain the surface defect detection results of the surge arrester.

[0024] For step S100, the drone swarm works together to fly along the target flight path and collect images of the lightning arrester.

[0025] Reference Figure 2 Specifically, obtaining an image of a surge arrester includes, but is not limited to, the following steps: Step S101: Initialize the drone swarm; Step S102: Calculate the fitness of individuals in the drone swarm, and determine the current optimal position and the fitness corresponding to the current optimal position; Step S103: Select elite individuals from the drone swarm based on their fitness to construct an elite swarm. Step S104: Calculate the snow melt rate based on the elite population; Step S105: Divide the elite population into a locally optimal subgroup and a globally optimal subgroup based on the snow melting rate; Step S106: Perform local optimization on the local optimization subgroup to update the position of individuals in the local optimization subgroup, and perform global optimization on the global optimization subgroup to update the position of individuals in the global optimization subgroup; Step S107: Based on the positions of individuals in the updated local optimization subgroup and the updated global optimization subgroup, a greedy selection population is obtained by performing greedy selection, and the positions of the greedy selection population are updated. Step S108: Update the current best position and elite population based on the fitness of individuals in the updated greedy selection population; Step S109: Once the minimum fitness of the drone swarm is found, return the corresponding current optimal position to obtain the target flight path; Step S110: The UAV is made to fly along the target flight path and collect images of the lightning arrester.

[0026] The completely random initialization method used in traditional SAO algorithms can easily lead to uneven population distribution, slow early convergence, and even getting trapped in local optima. In the Snowmelt algorithm, for multi-UAV collaborative inspection scenarios, to address initial path conflicts and uneven task area coverage, a synergistic enhancement of the Tent chaotic mapping and elite reverse learning strategy is employed. The dual initialization mechanism used in the Snowmelt algorithm effectively enhances the coverage of the solution space, improving the quality and diversity of solutions.

[0027] To construct an elite population, elite individuals are selected from the drone swarm based on their fitness, including but not limited to the following steps: The individuals are subjected to chaotic mapping, and the first candidate elite population is obtained by constraining the inter-machine distance. Based on the first candidate elite population, perform elite reverse learning to obtain the second candidate elite population; Elite individuals are selected from the first and second candidate elite populations based on their fitness in the drone swarm to construct an elite population.

[0028] Specifically, firstly, the Tent chaotic mapping generates a more uniformly distributed chaotic sequence through a nonlinear mapping method. This mapping has strong ergodicity, which is beneficial for generating more dispersed initial solutions in the search space and avoiding premature population aggregation. For each UAV, individual path nodes are generated as initial solutions through the Tent chaotic mapping, while inter-UAV distance pre-constraints are introduced to obtain the first candidate elite population.

[0029] Individual path nodes are represented as: ; In the formula, x represents a random number between [0,1]. x i , x i+1 These represent the position variables before and after the chaotic mapping, respectively.

[0030] To further improve the quality of the population, an elite reverse learning strategy is employed. From the chaotically initialized multi-machine paths, individuals with "superior individual quality + compliant inter-machine distance" are selected. Then, for these individuals, corresponding reverse individuals are constructed to obtain a second candidate elite population, which enhances the coverage of the search space.

[0031] The reverse individual is represented as: ; ; in, This represents an elegant individual created using an elegant method of chaotic inverse. The corresponding extreme vertex is considered an elegant individual, and s belongs to the range (0,1). , .

[0032] The initial solution generated by Tent chaos and its reverse individuals are merged into a candidate set, and the best N individuals are selected from this set according to their fitness as the initial elite population. This multi-strategy initialization mechanism effectively improves the diversity and quality of the population.

[0033] During path optimization, each iteration may involve adjustments to the flight trajectory. To prevent fluctuations or degradation in path quality, a greedy selection mechanism is used, whereby only individuals with better fitness are retained after each path update. This strategy achieves continuous evolution of path quality through the following rules: ; in, This represents the position of the i-th individual at the t-th iteration, i.e., the current path solution; This represents the new candidate path generated by this individual after this round of search; function This is the fitness function, used to measure the quality of a path, typically calculated based on comprehensive indicators such as path length, energy consumption, and obstacle avoidance capability. This strategy not only ensures that the performance of each generation of path solutions is continuously optimized, but also provides a fundamental guarantee for flight safety and mission reliability.

[0034] As the path search progresses, the drone may gradually approach areas with dense obstacles. To improve the algorithm's fine-grained search capability in such local environments, the intensity of local optimization is controlled by escape energy during the local optimization subgroup process; the escape energy is expressed as: In the formula, Let t be the escape energy, and t be the current iteration number. The maximum number of iterations, This represents the initial energy level.

[0035] when When the current individual is close to the optimal path point, a soft or hard encirclement mechanism is initiated to fine-tune and refine the path nodes, thereby better adapting to flight restrictions and obstacle avoidance requirements in complex spaces. The escape energy strategy allows the path to be flexibly adjusted when approaching obstacles, turning points, or blind spots, thereby improving the safety and feasibility of the path.

[0036] During the global optimization of the global optimization subgroup, the search direction is updated according to the following formula: ; In the formula, X(t) represents the search direction. This is the best position at present. The average value at the current position is given by G, where G is the gravity factor, S is the acceleration, TF is the transfer factor, x(t) represents the x-axis direction coefficient, and y(t) represents the y-axis direction coefficient.

[0037] This updated exploration strategy, by simulating the process of a raptor swooping down from high altitude to hunt, guides path solutions to jump from the current area to a more distant and optimal search area. It provides powerful spatial divergence capabilities, enabling the algorithm to quickly escape local traps and cover a broader path solution space.

[0038] The "coarse search – steady search – fine search" search pattern not only improves the path quality, but also significantly enhances the algorithm's convergence efficiency and robustness.

[0039] In the path optimization process, the total time cost mainly comes from three stages: initial solution generation, path update, and fitness evaluation. Although Tent chaotic mapping and elite back-learning strategies are introduced in the initialization stage to improve population quality, the complexity of this stage remains consistent with traditional methods, at O(N·D), where N is the population size and D is the problem dimension. In the main loop stage of path search, the snowmelt algorithm integrates multiple strategies, but these strategies are simplified and integrated without causing a significant increase in complexity. The core computational complexity of the entire algorithm remains at: Where T is the time complexity, M is the number of policy fusions, N represents the number of individuals experiencing position updates, and D is the dimension of the optimization problem.

[0040] This level of complexity enhances optimization capabilities while maintaining high computational efficiency. This complexity control is particularly crucial for UAV path planning. It means the snowmelt algorithm can run on embedded devices or edge computing platforms without relying on high-performance servers. When performing tasks such as dynamic obstacle avoidance, continuous path replanning, or cooperative flight of multiple UAVs, the algorithm can provide feasible solutions within a limited time, thus meeting the stringent real-time and stability requirements of flight systems.

[0041] An image is collected once by an automated drone inspection system, and then another image is collected after a period of time. The collected images are then manually annotated, and a dataset for detecting surface defects in surge arresters is constructed from these annotated images.

[0042] In low-altitude remote sensing image processing, defect detection requires higher accuracy. Remote sensing images are inevitably affected by factors such as sensor pose, distance, and image quality. Therefore, before defect detection, precise geometric correction, atmospheric correction, and cross-registration of different remote sensing images are essential preprocessing steps to improve the accuracy of defect detection. Image registration aims to reduce errors caused by differences in shooting angles and other factors, preventing misalignment of the same spatial location between different images. Subsequent feature point comparisons involve analyzing feature points from one image with feature points from other locations in another image, potentially leading to a higher false detection rate.

[0043] Reference Figure 3 The preprocessed surge arrester image is input into a surge arrester surface defect detection network based on coordinate convolution for surge arrester surface defect detection. The surge arrester surface defect detection network utilizes a coordinate channel attention module, a multi-scale defect feature localization module, and a coordinate attention residual fusion module to enhance feature representation capabilities, thereby meeting the requirements for multi-scale defect detection on the surge arrester surface.

[0044] For step S200, feature extraction is performed on the arrester image through the backbone network of the arrester surface defect detection network. Different feature extraction layers of the backbone network output first feature maps of different sizes, and the output of the previous feature extraction layer is used as the input of the next feature extraction layer.

[0045] The first feature extraction layer is a CBM convolutional block; the second, third, fourth, fifth, and sixth feature extraction layers are residual blocks; the seventh feature extraction layer is a combination of CBL convolutional blocks, SPP modules, and CBL convolutional blocks.

[0046] In the residual block, the input features of the residual block are concatenated with the outputs of the first CBM convolutional block, the second CBM convolutional block, the residual linking block, and the third CBM convolutional block, and the input features are concatenated with the outputs of the first CBM convolutional block and the fourth CBM convolutional block. The concatenated result is then concatenated with the fifth CBM convolutional block to obtain the output features of the residual block.

[0047] A CBM convolutional block consists of a convolutional layer, a batch normalization layer, and a Mish activation layer.

[0048] CBL convolutional blocks consist of convolutional layers, batch normalization layers, and LeakyRELU activation layers.

[0049] The SPP module consists of a 5*5 max pooling layer, a 9*9 max pooling layer, and a 13*13 max pooling layer.

[0050] The input of the residual link block goes into the first CBM convolutional block. The output of the first CBM convolutional block is used as the input of the second CBM convolutional block. The outputs of the first and second CBM convolutional blocks are added together, and the sum of the outputs of the first and second CBM convolutional blocks is used as the output of the residual link block.

[0051] Backbone network given input image The backbone network extracts multi-scale feature maps. Their channel dimensions are 64, 128, 256, 512, and 1024, respectively. Then, the features... Spatial pyramid pooling (SPP) is applied to aggregate feature maps of different scales, thereby improving the detection capability of defects of different scales on the surface of surge arresters.

[0052] The neck network of the surge arrester surface defect detection network fully utilizes the backbone features for defect detection by aggregating features at different scales. Feature fusion is enhanced through a coordinate channel attention module, a multi-scale defect feature localization module, and a coordinate attention residual fusion module.

[0053] First, an efficient channel attention module based on residual coordinate convolution is used to apply features at four different scales. , , and To enhance channel and coordinate awareness, the system optimizes backbone feature representation. Furthermore, coordinate convolutional upsampling and downsampling are implemented, incorporating a coordinate channel attention module into the upsampling / downsampling process. Simultaneously, a multi-scale defect feature localization module is proposed to introduce a novel feature fusion path into the neck network. Finally, a coordinate attention residual fusion module is employed to integrate features at three different scales. , and The optimized fusion features are used for detection. Therefore, in the feature fusion process of the neck, the main trunk features... and This will be further optimized using an efficient channel attention module based on residual coordinate convolution. Subsequently, the features optimized by the efficient channel attention module based on residual coordinate convolution... Upsampling is performed through residual coordinate convolution, and then combined with the optimized features. Connection. Merged features This will be further upsampled through residual coordinate convolution, and then combined with... Connection. The multi-scale defect feature localization module connects the fused features. Large-scale features Aggregation further introduces new feature fusion paths. Downsampling will be performed using residual coordinate convolution, and... Aggregation to obtain fusion features Similarly, fusion features and Will be through aggregation and as well as and Finally, the residual feature fusion module based on coordinate convolutional attention integrates the channel and spatial information of the fused features to ensure that the network can accurately capture the category and location of defects.

[0054] In step S300, a coordinate channel attention module is used to effectively enhance the network's channel and coordinate awareness capabilities. Specifically, an efficient channel attention module based on residual coordinate convolution is used to enhance the backbone feature representation, making the backbone features more sensitive to the structure and distribution of defects on the surge arrester surface.

[0055] Reference Figure 4 In the coordinate channel attention module, channel weights are generated based on the first feature map. The first feature map optimized by the channel is multiplied element-wise with the channel weights to obtain the channel refined features. The channel refined features are residually concatenated with the first feature map to obtain the residual channel refined features. The residual channel refined features are then subjected to coordinate convolution to obtain the second feature map.

[0056] Specifically, the coordinate channel attention module first applies global average pooling to the input feature f, adjusting its dimension to 1×1×C. Then, it generates channel attention weights using a 1×1 convolution and a sigmoid activation function. Therefore, the channel-optimized features... It is generated by element-wise multiplication of input features and channel attention weights. Furthermore, to avoid gradient vanishing, features are redistributed between the input features and channels. Residual connections are introduced between them. Since the type of surface defects in the surge arrester is related to its location, coordinate convolution operations are used to provide additional coordinate information for the extracted backbone features.

[0057] The features reassigned by the coordinate channel attention module are represented as follows: ; In the formula, It is the channel attention weight. This indicates a global average pooling layer. Represents 1D convolution. It is element-wise multiplication. These are input features. It is a feature of channel reallocation. It is a channel redistribution feature after residual connection. It is the final output feature after coordinate convolution.

[0058] The efficient channel attention module of residual coordinate convolution improves the network's channel and coordinate awareness, enabling better feature representation for effective learning. Introducing this module into the backbone features significantly reduces noise in complex backgrounds of surge arrester surface defect images and enhances the backbone feature representation to capture the structure and distribution of defects.

[0059] The features output from the third, fourth, fifth, and last feature extraction layers are input into the coordinate channel attention module. The features output from the third feature extraction layer are input into the coordinate channel attention module of the multi-size defect feature localization module.

[0060] For step S400, multiple second feature maps of different sizes are subjected to coordinate convolution upsampling and aggregation operations to obtain upsampled features, and the upsampled features are subjected to coordinate convolution downsampling and aggregation operations to obtain downsampled features.

[0061] The coordinate convolution upsampling module performs the coordinate convolution upsampling operation; in the coordinate convolution upsampling module, the input features of the coordinate convolution upsampling module pass through the coordinate channel attention module, the upsampling module and the CBL convolution block in sequence to obtain the output features of the coordinate convolution upsampling module; The coordinate convolution downsampling module performs the coordinate convolution downsampling operation. In the coordinate convolution downsampling module, the input features of the coordinate convolution downsampling module pass through the coordinate channel attention module, the downsampling module, and the CBL convolution block in sequence to obtain the output features of the coordinate convolution downsampling module. In the coordinate channel attention module, a second channel attention weight is generated based on the input features of the coordinate channel attention module. The input features of the coordinate channel attention module after channel optimization are multiplied element-wise with the second channel attention weight to obtain the second channel refined features. The second channel refined features are residually concatenated with the input features of the coordinate channel attention module to obtain the second residual channel refined features. The second residual channel refined features are then subjected to coordinate convolution to obtain the output features of the coordinate channel attention module.

[0062] Specifically, the features output from the last feature extraction layer are upsampled by coordinate convolution after passing through the coordinate channel attention module, and then processed by Concat and CBL convolutional blocks together with the features output from the fifth feature extraction layer (also processed by the coordinate channel attention module). The result of the first Concat and CBL convolutional block is upsampled by coordinate convolution and then processed by Concat and CBL convolutional blocks together with the features output from the fourth feature extraction layer (also processed by the coordinate channel attention module). The result of the second Concat and CBL convolutional block enters the multi-scale defect feature localization module, is upsampled by coordinate convolution, and then processed by Concat and CBL convolutional blocks together with the features output from the third feature extraction layer (also processed by the coordinate channel attention module). The result of the third Concat and CBL convolutional block is downsampled by coordinate convolution and then processed by the fourth Concat and CBL convolutional block. The result of the fourth Concat and CBL convolutional block is downsampled by coordinate convolution and then processed by the fifth Concat and CBL convolutional block. The result of the fifth Concat and CBL convolutional block is processed by coordinate convolution downsampling, and the features output from the last feature extraction layer are processed by the output of the coordinate channel attention module and then processed by the sixth Concat and CBL convolutional block.

[0063] In the coordinate convolution downsampling path, the results of the fourth Concat and CBL convolutional blocks, the fifth Concat and CBL convolutional blocks, and the sixth Concat and CBL convolutional blocks are respectively input into the coordinate attention residual fusion module.

[0064] It should be noted that, due to the significant differences in shape, size, and location of different types of defects on the surface of surge arresters, the network must focus on accurately identifying and distinguishing these different defects. This is achieved through a multi-scale defect feature localization module, which integrates large-scale features... Incorporate into the traditional feature fusion process. Features First, optimization is achieved through an efficient channel attention module based on residual coordinate convolution. Simultaneously, features from bottom-up path aggregation are utilized. Upsample by convolution of residual coordinates, then with Connection. Subsequently, the characteristics of the connection. This will be further downsampled through residual coordinate convolution, and then combined with... Connect to obtain fusion features Because large-size feature maps typically contain more detailed image information, large-scale features... Combining it with three other smaller-scale features can significantly help the network locate multi-scale defects, thereby enhancing the network's robustness to multi-scale defects.

[0065] For step S500, the coordinate attention residual fusion module obtains the channel attention weights based on the downsampled features, multiplies the channel attention weights and downsampled features element-wise to obtain the channel attention features, obtains the spatial attention weights based on the channel attention features, multiplies the channel attention features and spatial attention weights element-wise to obtain the spatial attention features, and concatenates the spatial attention features with the downsampled feature residuals to obtain the attention residual fusion features.

[0066] Reference Figure 5 The coordinate attention residual fusion module optimizes fused features by maintaining the channels and coordinate awareness of the fused features, so as to enable effective learning and prediction.

[0067] Specifically, given an input feature map First, a one-dimensional channel attention is calculated using a channel attention module based on feature fusion. .pass and Element-wise multiplication yields the channel-optimized features. .have: .

[0068] Subsequently, We apply a coordinate convolution-based spatial attention module to compute a two-dimensional spatial attention map. Subsequently, by... and Multiplication generates space-optimized features .have: .

[0069] Introducing residual connections to generate output features .have: .

[0070] in, This represents element-wise multiplication. These are features resulting from channel optimization. These are the channel attention weights of the channel attention module based on feature fusion. These are features optimized for space. These are the spatial attention weights of the spatial attention module based on coordinate convolution. These are input features.

[0071] Reference Figure 6For the channel attention module, the channel attention weights are obtained based on the downsampled features, including the following steps: obtaining average pooling features through average pooling and MLP operations; obtaining max pooling features through max pooling and MLP operations; fusing the average pooling features and max pooling features to obtain fused pooling features; adding the fused pooling features and average pooling features to obtain a first sum feature; adding the fused pooling features and max pooling features to obtain a second sum feature; adding the first sum feature and the second sum feature to obtain a third sum feature; and calculating the channel attention weights by applying the Sigmoid function to the third sum feature.

[0072] First, the input feature map is aggregated through average pooling and max pooling operations. The spatial information is then processed. The generated feature map is then forwarded to a shared multilayer perceptron, outputting an average pooled feature map. and max pooling features .have: .in, The input features are MLP, which stands for shared multilayer perceptron, AP stands for average pooling, and MP stands for max pooling.

[0073] By summing and fusing elements one by one and To enhance the network's generalization ability. Further, F is compared with... and Fusion. There are: .

[0074] The channel attention weights are represented as follows: .

[0075] Reference Figure 7 For the spatial attention module, the spatial attention weights are obtained based on the channel attention features, including the following steps: performing coordinate convolution, average pooling, max pooling and one-dimensional convolution operations on the channel attention features in sequence to obtain the spatial attention weights.

[0076] Specifically, coordinate convolution is first used to enable the network to better capture spatial attention. Then, the features after coordinate convolution are flattened and stacked through average pooling and max pooling layers, respectively. One-dimensional convolution is then used to generate spatial attention weights. The residual feature fusion module based on coordinate convolutional attention maintains the channel and coordinate information of the fused features at scales of 13×13, 26×26, and 52×52, which is beneficial for the network to learn multi-scale defects on the surface of the surge arrester.

[0077] For step S600, surface defects of the surge arrester are detected based on the attention residual fusion characteristics to obtain the surface defect detection results of the surge arrester.

[0078] Specifically, the head network is equipped with three detection heads, and the outputs of the three coordinate attention residual fusion modules of the neck network are used as inputs to the three detection heads respectively.

[0079] The loss function is defined as: Where IoU represents the intersection-over-union ratio between the ground truth bounding box and the predicted bounding box, d represents the distance between the ground truth bounding box and the predicted bounding box, c represents the diagonal length of the minimum bounding box that covers both boxes, and v is used to measure the aspect ratio of the ground truth bounding box. Aspect Ratio of the Predicted Bounding Box The relationship between them, v, is calculated using the following formula: .

[0080] The images captured by the drone are preprocessed, then input into the defect detection network, and then the changed segmentation map is output. It is then transmitted to the relevant application of the staff via the Internet, and finally the staff further judges whether there are surface defects of the surge arrester in the corresponding area.

[0081] This UAV-based method for detecting surface defects in surge arresters solves the problems of high labor intensity, high safety risks, and low detection efficiency associated with traditional manual inspections. It enables collaborative path planning and intelligent defect identification among multiple UAVs, and can efficiently complete the automated detection and recording of surface defects in surge arresters in complex power environments. This provides technical support for the refined operation and maintenance of power equipment such as substations and high-voltage transmission lines, and significantly improves the safety, efficiency, and intelligence of power system operation and maintenance.

[0082] The above is a detailed description of the preferred embodiments of this application, but this application is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application, and these equivalent modifications or substitutions are all included within the scope defined by the claims of this application.

Claims

1. A method for detecting surface defects in surge arresters based on unmanned aerial vehicles (UAVs), characterized in that, include: Obtain an image of the surge arrester; Multiple first feature maps of different scales are extracted from the lightning arrester image; Channel weights are generated based on the first feature map. The channel-optimized first feature map is multiplied element-wise with the channel weights to obtain channel refined features. The channel refined features are residually concatenated with the first feature map to obtain residual channel refined features. The residual channel refined features are then subjected to coordinate convolution to obtain a second feature map. Multiple second feature maps of different sizes are subjected to coordinate convolution upsampling and aggregation operations to obtain upsampled features, and the upsampled features are subjected to coordinate convolution downsampling and aggregation operations to obtain downsampled features. The channel attention weights are obtained based on the downsampling features. The channel attention weights and the downsampling features are multiplied element-wise to obtain the channel attention features. The spatial attention weights are obtained based on the channel attention features. The channel attention features and the spatial attention weights are multiplied element-wise to obtain the spatial attention features. The spatial attention features are concatenated with the residuals of the downsampling features to obtain the attention residual fusion features. The surface defects of the surge arrester are detected based on the attention residual fusion characteristics, and the surface defect detection results of the surge arrester are obtained.

2. The method for detecting surface defects of surge arresters based on unmanned aerial vehicles (UAVs) according to claim 1, characterized in that, The acquisition of the surge arrester image includes: Initialize the drone swarm; Calculate the fitness of individuals in the drone swarm, determine the current optimal position and the fitness corresponding to the current optimal position; Based on the fitness of individuals in the drone swarm, elite individuals are selected from the individuals to construct an elite swarm; Snowmelt rate is calculated based on the aforementioned elite population; Based on the snow melting rate, the elite population is divided into a locally optimal subpopulation and a globally optimal subpopulation; Local optimization is performed on the local optimization subgroup to update the position of individuals in the local optimization subgroup, and global optimization is performed on the global optimization subgroup to update the position of individuals in the global optimization subgroup; Greedy selection is performed based on the positions of individuals in the updated local optimization subgroup and the updated global optimization subgroup to obtain a greedy selection population, and the positions are updated in the greedy selection population. Update the current best position and elite population based on the fitness of individuals in the updated greedy selection population; Once the minimum fitness of the drone swarm is found, the corresponding current optimal position is returned to obtain the target flight path; The drone is instructed to fly along the target flight path and collect images of the lightning arrester.

3. The method for detecting surface defects of surge arresters based on unmanned aerial vehicles (UAVs) according to claim 2, characterized in that, The process of selecting elite individuals from the drone swarm based on their fitness to construct an elite swarm includes: The individuals are subjected to chaotic mapping, and the first candidate elite population is obtained by constraining the inter-machine distance. Based on the first candidate elite population, perform elite reverse learning to obtain the second candidate elite population; Elite populations are constructed by selecting elite individuals from the first and second candidate elite populations based on the fitness of individuals in the drone swarm.

4. The method for detecting surface defects of surge arresters based on unmanned aerial vehicles (UAVs) according to claim 2, characterized in that, During the local optimization process of the aforementioned local optimization subgroup, the intensity of local optimization is controlled by the escape energy. The escape energy is expressed as: In the formula, Let t be the escape energy, and t be the current iteration number. The maximum number of iterations, This represents the initial energy level.

5. The method for detecting surface defects of surge arresters based on unmanned aerial vehicles (UAVs) according to claim 2, characterized in that, During the global optimization of the aforementioned global optimization subgroup, the search direction is updated according to the following formula: ; In the formula, X(t) represents the search direction. This is the best position at present. The average value at the current position is given by G, where G is the gravity factor, S is the acceleration, TF is the transfer factor, x(t) represents the x-axis direction coefficient, and y(t) represents the y-axis direction coefficient.

6. The method for detecting surface defects of surge arresters based on unmanned aerial vehicles (UAVs) according to claim 1, characterized in that, The lightning arrester image is feature extracted by a backbone network. Different feature extraction layers of the backbone network output first feature maps of different sizes, and the output of the previous feature extraction layer is used as the input of the next feature extraction layer.

7. The method for detecting surface defects of surge arresters based on unmanned aerial vehicles (UAVs) according to claim 6, characterized in that, The feature extraction layer is a residual block; in the residual block, the input features of the residual block are concatenated with the outputs of the first CBM convolutional block, the second CBM convolutional block, the residual linking block and the third CBM convolutional block, and the input features are concatenated with the outputs of the first CBM convolutional block and the fourth CBM convolutional block. The concatenated result is then concatenated with the fifth CBM convolutional block to obtain the output features of the residual block.

8. The method for detecting surface defects of surge arresters based on unmanned aerial vehicles (UAVs) according to claim 1, characterized in that, The coordinate convolution upsampling operation is performed by the coordinate convolution upsampling module; in the coordinate convolution upsampling module, the input features of the coordinate convolution upsampling module pass through the coordinate channel attention module, the upsampling module and the CBL convolution block in sequence to obtain the output features of the coordinate convolution upsampling module; The coordinate convolution downsampling operation is performed by the coordinate convolution downsampling module; in the coordinate convolution downsampling module, the input features of the coordinate convolution downsampling module pass through the coordinate channel attention module, the downsampling module and the CBL convolution block in sequence to obtain the output features of the coordinate convolution downsampling module; In the coordinate channel attention module, a second channel attention weight is generated based on the input features of the coordinate channel attention module. The input features of the channel-optimized coordinate channel attention module are multiplied element-wise with the second channel attention weight to obtain the second channel refined features. The second channel refined features are residually concatenated with the input features of the coordinate channel attention module to obtain the second residual channel refined features. The second residual channel refined features are then subjected to coordinate convolution to obtain the output features of the coordinate channel attention module.

9. The method for detecting surface defects of surge arresters based on unmanned aerial vehicles (UAVs) according to claim 1, characterized in that, The step of obtaining the channel attention weights based on the downsampling features includes: Average pooling features are obtained through average pooling operations and MLP operations; Max pooling features are obtained through max pooling and MLP operations; The average pooling feature and the max pooling feature are fused to obtain the fused pooling feature; The first sum feature is obtained by adding the fused pooling feature and the average pooling feature, the second sum feature is obtained by adding the fused pooling feature and the max pooling feature, the third sum feature is obtained by adding the first sum feature and the second sum feature, and the channel attention weight is obtained by applying the Sigmoid function to the third sum feature.

10. The method for detecting surface defects of surge arresters based on unmanned aerial vehicles (UAVs) according to claim 1, characterized in that, The step of obtaining spatial attention weights based on the channel attention features includes: The spatial attention weights are obtained by sequentially performing coordinate convolution, average pooling, max pooling, and one-dimensional convolution operations on the channel attention features.