Power transmission equipment segmentation method fusing cross convolution and multi-layer attention mechanism
By integrating cross-convolution and multi-layer attention mechanisms, efficient and accurate segmentation of power transmission equipment is achieved, solving the problems of easy breakage of slender targets and unclear boundaries of complex structures. This approach adapts to different environmental changes and meets the needs of automated power grid inspection.
Patent Information
- Application Number
- CN202511812669.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-04
- Publication Date
- 2026-05-01
AI Technical Summary
Existing power transmission equipment segmentation technologies suffer from problems such as easy breakage when segmenting slender targets, inaccurate segmentation of complex structural boundaries, and poor environmental adaptability. In particular, it is difficult to achieve efficient and accurate segmentation under conditions of different terrains, weather, lighting, and scale.
A method combining cross-convolution and multi-layer attention mechanisms is adopted. Multi-level feature extraction is performed through the backbone network, and feature fusion and upsampling are performed by the detection head network. Finally, pixel-level classification is performed by the segmentation head to generate the segmentation results of the power transmission equipment.
It enables automatic identification and pixel-level accurate segmentation of equipment such as transmission lines and towers, solves the problems of easy breakage of slender targets and inaccurate boundaries of complex structures, meets the needs of automated power grid inspection, and improves segmentation stability and computational efficiency in complex environments.
Smart Images

Figure CN121962590A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer vision and intelligent power system technology, and in particular to a method for segmenting power transmission equipment that integrates cross-convolution and multi-layer attention mechanisms. Background Technology
[0002] The rapid development of ultra-high-voltage (UHV) power transmission networks and the in-depth advancement of smart grid construction have placed higher demands on the automated inspection and intelligent monitoring of transmission channels. Traditional manual inspection methods are not only inefficient and costly, but also pose safety risks. Automated inspection methods based on computer vision are gradually becoming mainstream, among which deep learning methods have shown great potential due to their powerful feature learning capabilities.
[0003] Precise segmentation of power transmission equipment is a key technology for achieving automated inspection, but it faces unique technical challenges. First, power transmission equipment has unique morphological characteristics. Transmission lines exhibit extremely long and thin linear structures, with aspect ratios reaching thousands to one; transmission towers, on the other hand, are complex three-dimensional steel frame structures, comprising multiple components such as the main tower body, crossarms, and insulator strings, resulting in significant morphological variations. Second, transmission lines often traverse diverse terrains, including mountains, rivers, and cities, with backgrounds containing obstructions such as trees, buildings, and roads, and their appearance varies significantly under different seasons, weather, and lighting conditions. Furthermore, in aerial images, due to variations in shooting distance and angle, the same power transmission equipment can exhibit drastically different scales; in close-up shots, a transmission tower can occupy the entire image, while in distant shots, the transmission line may only be a few pixels wide. Simultaneously, drone inspections require real-time processing of high-resolution images, placing stringent demands on the computational efficiency of the algorithms. However, existing power transmission equipment segmentation technologies have the following technical problems: Difficulty in segmenting slender targets: Power transmission lines present a slender and extended linear structure, and the square convolution kernels used by traditional convolutional neural networks are difficult to effectively capture their highly directional slender features, resulting in segmentation results that are prone to breakage; Blurred boundaries of complex structures: Power transmission towers exhibit complex three-dimensional frame structures, and existing methods often suffer from unclear identification of detailed structures and imprecise boundary segmentation when dealing with such targets. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of existing technologies, such as easy breakage of slender targets in power transmission equipment segmentation, inaccurate segmentation of complex structural boundaries, and poor environmental adaptability when facing different terrains, weather, lighting and scale differences. It provides a power transmission equipment segmentation method that integrates cross-convolution and multi-layer attention mechanisms.
[0005] The objective of this invention is achieved through the following technical solution: A method for segmenting power transmission equipment that integrates cross-convolution and multi-layer attention mechanisms includes the following steps: Step 1: Obtain the image of the power transmission equipment to be segmented, and extract multi-level features from the image through the backbone network to obtain a multi-scale feature map with direction sensitivity and semantic richness; Step 2: The multi-scale feature maps are fused and upsampled using the detection head network to obtain the fused feature map; Step 3: Perform pixel-level classification and mask prediction on the fused feature map using the segmentation head to obtain the power transmission equipment segmentation result containing target category, confidence score, bounding box, and instance mask.
[0006] Preferably, in step 1, the backbone network includes a first convolutional layer, a second convolutional layer, a first C3x cross-convolutional module, a first C2PSA attention module, a third convolutional layer, a second C3x cross-convolutional module, a fourth convolutional layer, a third C3x cross-convolutional module, a second C2PSA attention module, a fifth convolutional layer, a fourth C3x cross-convolutional module, a fast spatial pyramid pooling module, a third C2PSA attention module, and a fourth C2PSA attention module, all connected in sequence.
[0007] Preferably, step 1 specifically includes: Step 1.1: The first convolutional layer performs initial feature extraction on the image of the power transmission equipment to be segmented, and obtains the first feature map; Step 1.2: The second convolutional layer downsamples the first feature map output by the first convolutional layer to obtain the second feature map; Step 1.3: The first C3x cross-convolution module performs orientation-sensitive feature extraction on the second feature map output by the second convolutional layer to obtain the first enhanced feature map; Step 1.4: The first C2PSA attention module performs spatial-channel attention modeling on the first enhanced feature map output by the first C3x cross-convolution module to obtain the first attention feature map; Step 1.5: The third convolutional layer downsamples the first attention feature map output by the first C2PSA attention module to obtain the third feature map; Step 1.6: The second C3x cross-convolution module performs deep feature extraction on the third feature map output by the third convolutional layer to obtain the second enhanced feature map; Step 1.7: The fourth convolutional layer downsamples the second enhanced feature map output by the second C3x cross-convolutional module to obtain the fourth feature map; Step 1.8: The third C3x cross-convolution module extracts features from the fourth feature map output by the fourth convolutional layer to obtain the third enhanced feature map; Step 1.9: The second C2PSA attention module performs mid-level semantic enhancement on the third enhanced feature map output by the third C3x cross-convolution module to obtain the second attention feature map; Step 1.10: The fifth convolutional layer downsamples the second attention feature map output by the second C2PSA attention module to obtain the fifth feature map; Step 1.11: The fourth C3x cross-convolution module performs high-level semantic feature extraction on the fifth feature map output by the fifth convolutional layer to obtain the fourth enhanced feature map; Step 1.12: The fast spatial pyramid pooling module performs multi-scale spatial pyramid pooling on the fourth enhanced feature map output by the fourth C3x cross convolution module to obtain the pooled feature map. Step 1.13: The third C2PSA attention module performs deep attention modeling on the pooled feature map output by the fast spatial pyramid pooling module to obtain the third attention feature map; Step 1.14: The fourth C2PSA attention module performs secondary attention enhancement on the third attention feature map output by the third C2PSA attention module to obtain the fourth attention feature map.
[0008] Preferably, the first, second, third, and fourth C3x cross-convolution modules all include an improved bottleneck unit. The improved bottleneck unit internally employs a cross-convolution kernel group. Let the tensor of the input feature map be X∈R^(C×H×W), where C represents the number of channels, H represents the height, and W represents the width. Then, the two paths of the cross-convolution perform the following operations respectively: Lateral convolution: ; Vertical convolution: ; in, This represents the feature map after horizontal convolution. This represents a 1×3 convolution kernel. This represents the feature map after vertical convolution. This represents a 3×1 convolution kernel.
[0009] Preferably, the processing procedures of the first C2PSA attention module, the second C2PSA attention module, the third C2PSA attention module, and the fourth C2PSA attention module are as follows: The input feature map X∈R^(B×C×H×W) is first compressed to 2C' channels by a 1×1 convolution, where C'=e·C, e is the compression ratio, and B represents the number of feature map samples; The feature map is divided into two parts along the channel dimension: a, b∈R^(B×C'×H×W), where a represents that the residual information is directly retained, and b represents that the input is a set of stacked self-attention modules PSABlock, used for cross-space-channel modeling.
[0010] Preferably, in step 2, the detection head network includes a first upsampling layer, a first splicing layer, a first C3k2 module, a second upsampling layer, a second splicing layer, a second C3k2 module, a sixth convolutional layer, a third splicing layer, a third C3k2 module, a seventh convolutional layer, a fourth splicing layer, and a fourth C3k2 module connected in sequence.
[0011] Preferably, step 2 specifically includes: Step 2.1: The first upsampling layer performs a 2x nearest neighbor upsampling on the fourth attention feature map output by the backbone network to obtain the upsampled feature map; Step 2.2: The first concatenation layer concatenates the upsampled feature map with the fourth feature map output by the backbone network along the channel dimension to obtain the first fused feature map; Step 2.3: The first C3k2 module refines the first fused feature map by using two bottleneck structural units to output the first refined feature map. Step 2.4: The second upsampling layer performs a 2x nearest neighbor upsampling on the first refined feature map to obtain the second upsampled feature map; Step 2.5: The second concatenation layer concatenates the second upsampled feature map with the second enhanced feature map output by the backbone network to obtain the second fused feature map; Step 2.6: The second C3k2 module refines the second fused feature map and outputs the second refined feature map as the P3 / 8-small detection layer. Step 2.7: The sixth convolutional layer downsamples the second refined feature map to obtain the downsampled feature map; Step 2.8: The third concatenation layer concatenates the downsampled feature map with the first refined feature map output in step 2.3 to obtain the third fused feature map; Step 2.9: The third C3k2 module refines the third fused feature map and outputs the third refined feature map as the P4 / 16-medium detection layer. Step 2.10: The seventh convolutional layer downsamples the third refined feature map to obtain the sixth feature map; Step 2.11: The fourth splicing layer splices the sixth feature map with the final output of the backbone network to obtain a 20×20×1536 fourth fused feature map; Step 2.12: The fourth C3k2 module refines the fourth fused feature map, enables the bottleneck structure, and outputs the fourth refined feature map as the P5 / 32-large detection layer.
[0012] Preferably, step 3 specifically includes: Step 3.1: The segmentation head receives detection feature maps from three scales: P3 / 8-small, P4 / 16-medium, and P5 / 32-large. Step 3.2: Perform target detection on the detection feature map at each scale to obtain the detection results, and predict the bounding box coordinates, class probability and target confidence of different categories of power equipment based on the detection results; Step 3.3: Generate the mask prototype through the prototype mask branch; Step 3.4: Combine the detection results with the mask prototype, and generate an instance segmentation mask for each target detection by predicting the mask coefficients; Step 3.5: Apply mask scaling to upsample the image to obtain a segmentation result of the same size as the input image; Step 3.6: Through non-maximum suppression and post-processing, the final power transmission equipment segmentation result is output. The final power transmission equipment segmentation result includes target category, confidence score, bounding box coordinates, and pixel-level instance mask.
[0013] The beneficial effects of this invention are: This invention can directly output a complete segmentation result including target category, confidence level, bounding box and instance mask, realize automatic identification and pixel-level accurate segmentation of equipment such as transmission lines and transmission towers, meet the core requirements of power grid automated inspection, and solve the key problems of easy breakage of slender targets and inaccurate boundary of complex structures in the prior art.
[0014] In the backbone network structure, the C3x cross-convolution enhances the extraction of orientation-sensitive features by combining (1,3) and (3,1) convolution kernels, the C2PSA attention module highlights the saliency of the target by spatial-channel cross-dimensional modeling, and the SPPF module captures global contextual information. The three work together to effectively address the challenges of inspecting power transmission equipment in scenarios involving complex terrain, different seasons / weather / lighting interference, and large differences in the scale of the same equipment, thereby reducing the impact of background interference on the segmentation results and significantly improving the segmentation stability of the algorithm in complex environments.
[0015] The detection head network design simplifies redundant computation while ensuring sufficient feature fusion. Combined with the logic of hierarchical processing of multi-scale feature maps, it avoids the inefficiency problem caused by traditional algorithms when processing high-resolution images. This design can meet the stringent requirements of real-time processing of high-resolution images in UAV inspections, achieving high-precision segmentation while maintaining computational efficiency. It can be directly applied to real-time scenarios such as smart grid monitoring and power facility maintenance. Attached Figure Description
[0016] Figure 1 This is a flowchart of the present invention; Figure 2 This is a schematic diagram of the cross-convolution module of the present invention; Figure 3 This is a schematic diagram of the segmentation results of the present invention applied to images in the TTPLA dataset. Detailed Implementation
[0017] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.
[0018] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0019] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0020] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0021] Example: A segmentation method for power transmission equipment that integrates cross-convolution and multi-layer attention mechanisms, such as Figure 1 As shown, it includes the following steps: Step 1: Obtain the image of the power transmission equipment to be segmented, and extract multi-level features from the image through the backbone network to obtain a multi-scale feature map with direction sensitivity and semantic richness; Step 2: The multi-scale feature maps are fused and upsampled using the detection head network to obtain the fused feature map; Step 3: Perform pixel-level classification and mask prediction on the fused feature map using the segmentation head to obtain the power transmission equipment segmentation result containing target category, confidence score, bounding box, and instance mask.
[0022] In step 1, the backbone network includes a first convolutional layer, a second convolutional layer, a first C3x cross-convolutional module, a first C2PSA attention module, a third convolutional layer, a second C3x cross-convolutional module, a fourth convolutional layer, a third C3x cross-convolutional module, a second C2PSA attention module, a fifth convolutional layer, a fourth C3x cross-convolutional module, a fast spatial pyramid pooling module, a third C2PSA attention module, and a fourth C2PSA attention module, all connected in sequence.
[0023] Step 1 specifically includes: Step 1.1: The first convolutional layer performs initial feature extraction on the 640×640×3 image of the power transmission equipment to be segmented, using 64 3×3 convolutional kernels with a stride of 2, to obtain a first feature map of 320×320×64. Step 1.2: The second convolutional layer downsamples the first feature map output by the first convolutional layer using 128 3×3 convolutional kernels with a stride of 2, resulting in a second feature map of 160×160×128. Step 1.3: The first C3x cross-convolution module performs orientation-sensitive feature extraction on the second feature map output by the second convolutional layer. Through two repeated cross-convolution units, each unit contains a combination of (1,3) and (3,1) convolutional kernels, and the number of output channels is 256, resulting in a 160×160×256 first enhanced feature map. Step 1.4: The first C2PSA attention module performs spatial-channel attention modeling on the first enhanced feature map output by the first C3x cross-convolution module. The saliency expression of shallow features is enhanced by two stacked PSABlock units to obtain a 160×160×256 first attention feature map. Step 1.5: The third convolutional layer downsamples the first attention feature map output by the first C2PSA attention module, using 256 3×3 convolutional kernels with a stride of 2, to obtain an 80×80×256 third feature map, which is used as the output of the P3 / 8 layer. Step 1.6: The second C3x cross-convolution module performs deep feature extraction on the third feature map output by the third convolutional layer. Through two repeated cross-convolution units, the number of output channels is 512, resulting in an 80×80×512 second enhanced feature map. Step 1.7: The fourth convolutional layer downsamples the second enhanced feature map output by the second C3x cross-convolutional module, using 512 3×3 convolutional kernels with a stride of 2, to obtain a 40×40×512 fourth feature map, which is used as the output of the P4 / 16 layer. Step 1.8: The third C3x cross-convolution module extracts features from the fourth feature map output by the fourth convolutional layer. Through two repeated cross-convolution units, and with the bottleneck structure enabled (shortcut=True), a third enhanced feature map of 40×40×512 is obtained. Step 1.9: The second C2PSA attention module performs mid-level semantic enhancement on the third enhanced feature map output by the third C3x cross-convolution module, and establishes a complex spatial association through two stacked PSABlock units to obtain a 40×40×512 second attention feature map. Step 1.10: The fifth convolutional layer downsamples the second attention feature map output by the second C2PSA attention module using 1024 3×3 convolutional kernels with a stride of 2, resulting in a 20×20×1024 fifth feature map, which is used as the output of the P5 / 32 layer. Step 1.11: The fourth C3x cross-convolution module performs high-level semantic feature extraction on the fifth feature map output by the fifth convolutional layer. By using two repeated cross-convolution units and enabling the bottleneck structure, a fourth enhanced feature map of 20×20×1024 is obtained. Step 1.12: The fast spatial pyramid pooling module performs multi-scale spatial pyramid pooling on the fourth enhanced feature map output by the fourth C3x cross-convolution module. A 5×5 pooling kernel is used, and global context information is captured through parallel pooling operations of different scales to obtain a 20×20×1024 pooled feature map. Step 1.13: The third C2PSA attention module performs deep attention modeling on the pooled feature map output by the fast spatial pyramid pooling module. Through two stacked PSABlock units, a third attention feature map of 20×20×1024 is obtained. Step 1.14: The fourth C2PSA attention module performs secondary attention enhancement on the third attention feature map output by the third C2PSA attention module. The high-level semantic expression is further enhanced by two stacked PSABlock units to obtain a fourth attention feature map of 20×20×1024.
[0024] like Figure 2 As shown, the first, second, third, and fourth C3x cross-convolution modules all include an improved bottleneck unit, which decomposes the standard 3×3 two-dimensional convolution kernel to achieve orientation-sensitive feature extraction. Let the tensor of the input feature map be X∈R^(C×H×W), where C represents the number of channels, H represents the height, and W represents the width. Then, the two paths of the cross-convolution perform the following operations respectively: Lateral convolution: ; Vertical convolution: ; in, This represents the feature map after horizontal convolution. This represents a 1×3 convolution kernel. This represents the feature map after vertical convolution. This represents a 3×1 convolution kernel.
[0025] The final output enhances the ability to model spatial structures by fusing the feature representations of the horizontal and vertical paths.
[0026] The processing procedures of the first C2PSA attention module, the second C2PSA attention module, the third C2PSA attention module, and the fourth C2PSA attention module are as follows: The input feature map X∈R^(B×C×H×W) is first compressed to 2C' channels by a 1×1 convolution, where C'=e·C, e is the compression ratio, in this embodiment e=0.5, and B represents the number of feature map samples; The feature map is divided into two parts along the channel dimension: a, b ∈ R^(B×C'×H×W), where a represents the direct retention of residual information, and b represents the input of a set of stacked self-attention modules PSABlock for cross-space-channel modeling. in, These represent the two branch feature maps after the split operation, where Split indicates channel segmentation and Conv indicates convolution. This represents n stacked self-attention modules, where n=2 in this embodiment. express Attention-enhanced feature map after n PSABlocks processing This represents the final generated output feature map. This indicates a concatenation operation. The PSABlock module internally integrates a multi-head self-attention mechanism with a feed-forward network, and improves training stability and feature expressiveness through residual connections. In step 2, the detection head network includes a first upsampling layer, a first splicing layer, a first C3k2 module, a second upsampling layer, a second splicing layer, a second C3k2 module, a sixth convolutional layer, a third splicing layer, a third C3k2 module, a seventh convolutional layer, a fourth splicing layer, and a fourth C3k2 module connected in sequence.
[0027] Step 2 specifically includes: Step 2.1: The first upsampling layer performs a 2x nearest neighbor upsampling on the fourth attention feature map output by the backbone network to obtain a 40×40×1024 upsampled feature map; Step 2.2: The first splicing layer splices the upsampled feature map with the 40×40×512 fourth feature map output by the backbone network along the channel dimension to obtain a 40×40×1536 first fused feature map. Step 2.3: The first C3k2 module refines the first fused feature map by using two bottleneck structural units to output a 40×40×512 first refined feature map. Step 2.4: The second upsampling layer performs a 2x nearest neighbor upsampling on the first refined feature map to obtain a second upsampled feature map of 80×80×512. Step 2.5: The second splicing layer splices the second upsampled feature map with the 80×80×512 second enhanced feature map output by the backbone network to obtain an 80×80×1024 second fused feature map. Step 2.6: The second C3k2 module refines the second fused feature map and outputs a second refined feature map of 80×80×256, which is used as the P3 / 8-small detection layer. Step 2.7: The sixth convolutional layer downsamples the second refined feature map using 256 3×3 convolutional kernels with a stride of 2, resulting in a 40×40×256 downsampled feature map. Step 2.8: The third stitching layer stitches the downsampled feature map with the first refined feature map output in step 2.3 to obtain a third fused feature map of 40×40×768. Step 2.9: The third C3k2 module refines the third fused feature map and outputs a 40×40×512 third refined feature map as the P4 / 16-medium detection layer. Step 2.10: The seventh convolutional layer downsamples the third refined feature map to obtain a 20×20×512 feature map; Step 2.11: The fourth splicing layer splices the sixth feature map with the final output of the backbone network to obtain a 20×20×1536 fourth fused feature map; Step 2.12: The fourth C3k2 module refines the fourth fused feature map, enables the bottleneck structure, and outputs a 20×20×1024 fourth refined feature map as the P5 / 32-large detection layer.
[0028] Step 3 specifically includes: Step 3.1: The segmentation head receives detection feature maps from three scales: P3 / 8-small, P4 / 16-medium, and P5 / 32-large. Step 3.2: Perform target detection on the detection feature map at each scale to obtain the detection results. Based on the detection results, predict the bounding box coordinates, class probability, and target confidence of the four categories (transmission line, truss transmission tower, pole tower, and wooden structure transmission tower). Step 3.3: Generate a 256×256 mask prototype through the prototype mask branch; Step 3.4: Combine the detection results with the mask prototype, and generate an instance segmentation mask for each target detection by predicting the mask coefficients; Step 3.5: Apply a mask scaling factor of 4 (enlarge the spatial size of the original instance segmentation mask by 4 times) to perform upsampling, and obtain a 640×640 segmentation result with the same size as the input image; Step 3.6: Through non-maximum suppression and post-processing, the final power transmission equipment segmentation result is output. The final power transmission equipment segmentation result includes target category, confidence score, bounding box coordinates, and pixel-level instance mask.
[0029] Using the method in this embodiment, the segmentation results on the images in the TTPLA (Transmission Towers and Power Lines Aerial-Image Dataset) dataset are as follows: Figure 3 As shown, the segmentation effect is quite good.
[0030] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0031] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A power transmission equipment segmentation method integrating cross-convolution and multi-layer attention mechanisms, characterized by: Includes the following steps: Step 1: Obtain the image of the power transmission equipment to be segmented, and extract multi-level features from the image through the backbone network to obtain a multi-scale feature map with direction sensitivity and semantic richness; Step 2: The multi-scale feature maps are fused and upsampled using the detection head network to obtain the fused feature map; Step 3: Perform pixel-level classification and mask prediction on the fused feature map using the segmentation head to obtain the power transmission equipment segmentation result containing target category, confidence score, bounding box, and instance mask.
2. The power transmission equipment segmentation method integrating cross-convolution and multi-layer attention mechanisms according to claim 1, characterized in that, In step 1, the backbone network includes a first convolutional layer, a second convolutional layer, a first C3x cross-convolutional module, a first C2PSA attention module, a third convolutional layer, a second C3x cross-convolutional module, a fourth convolutional layer, a third C3x cross-convolutional module, a second C2PSA attention module, a fifth convolutional layer, a fourth C3x cross-convolutional module, a fast spatial pyramid pooling module, a third C2PSA attention module, and a fourth C2PSA attention module, all connected in sequence.
3. The power transmission equipment segmentation method integrating cross-convolution and multi-layer attention mechanisms according to claim 2, characterized in that, Step 1 specifically includes: Step 1.1: The first convolutional layer performs initial feature extraction on the image of the power transmission equipment to be segmented, and obtains the first feature map; Step 1.2: The second convolutional layer downsamples the first feature map output by the first convolutional layer to obtain the second feature map; Step 1.3: The first C3x cross-convolution module performs orientation-sensitive feature extraction on the second feature map output by the second convolutional layer to obtain the first enhanced feature map; Step 1.4: The first C2PSA attention module performs spatial-channel attention modeling on the first enhanced feature map output by the first C3x cross-convolution module to obtain the first attention feature map; Step 1.5: The third convolutional layer downsamples the first attention feature map output by the first C2PSA attention module to obtain the third feature map; Step 1.6: The second C3x cross-convolution module performs deep feature extraction on the third feature map output by the third convolutional layer to obtain the second enhanced feature map; Step 1.7: The fourth convolutional layer downsamples the second enhanced feature map output by the second C3x cross-convolutional module to obtain the fourth feature map; Step 1.8: The third C3x cross-convolution module extracts features from the fourth feature map output by the fourth convolutional layer to obtain the third enhanced feature map; Step 1.9: The second C2PSA attention module performs mid-level semantic enhancement on the third enhanced feature map output by the third C3x cross-convolution module to obtain the second attention feature map; Step 1.10: The fifth convolutional layer downsamples the second attention feature map output by the second C2PSA attention module to obtain the fifth feature map; Step 1.11: The fourth C3x cross-convolution module performs high-level semantic feature extraction on the fifth feature map output by the fifth convolutional layer to obtain the fourth enhanced feature map; Step 1.12: The fast spatial pyramid pooling module performs multi-scale spatial pyramid pooling on the fourth enhanced feature map output by the fourth C3x cross convolution module to obtain the pooled feature map. Step 1.13: The third C2PSA attention module performs deep attention modeling on the pooled feature map output by the fast spatial pyramid pooling module to obtain the third attention feature map; Step 1.14: The fourth C2PSA attention module performs secondary attention enhancement on the third attention feature map output by the third C2PSA attention module to obtain the fourth attention feature map.
4. The power transmission equipment segmentation method integrating cross-convolution and multi-layer attention mechanisms according to claim 3, characterized in that, The first, second, third, and fourth C3x cross-convolution modules all include an improved bottleneck unit. The improved bottleneck unit internally employs a cross-convolution kernel group. Let the tensor of the input feature map be X∈R^(C×H×W), where C represents the number of channels, H represents the height, and W represents the width. Then, the two paths of the cross-convolution perform the following operations: Lateral convolution: ; Vertical convolution: ; in, This represents the feature map after horizontal convolution. This represents a 1×3 convolution kernel. This represents the feature map after vertical convolution. This represents a 3×1 convolution kernel.
5. The power transmission equipment segmentation method integrating cross-convolution and multi-layer attention mechanisms according to claim 4, characterized in that, The processing procedures of the first C2PSA attention module, the second C2PSA attention module, the third C2PSA attention module, and the fourth C2PSA attention module are as follows: The input feature map X∈R^(B×C×H×W) is first compressed to 2C' channels by a 1×1 convolution, where C' = e·C, e is the compression ratio, and B represents the number of feature map samples; The feature map is divided into two parts along the channel dimension: a, b∈R^(B×C'×H×W), where a represents that the residual information is directly retained, and b represents that the input is a set of stacked self-attention modules PSABlock, used for cross-space-channel modeling.
6. The power transmission equipment segmentation method integrating cross-convolution and multi-layer attention mechanisms according to claim 3, characterized in that, In step 2, the detection head network includes a first upsampling layer, a first splicing layer, a first C3k2 module, a second upsampling layer, a second splicing layer, a second C3k2 module, a sixth convolutional layer, a third splicing layer, a third C3k2 module, a seventh convolutional layer, a fourth splicing layer, and a fourth C3k2 module connected in sequence.
7. The power transmission equipment segmentation method integrating cross-convolution and multi-layer attention mechanisms according to claim 6, characterized in that, Step 2 specifically includes: Step 2.1: The first upsampling layer performs a 2x nearest neighbor upsampling on the fourth attention feature map output by the backbone network to obtain the upsampled feature map; Step 2.2: The first concatenation layer concatenates the upsampled feature map with the fourth feature map output by the backbone network along the channel dimension to obtain the first fused feature map; Step 2.3: The first C3k2 module refines the first fused feature map by using two bottleneck structural units to output the first refined feature map. Step 2.4: The second upsampling layer performs a 2x nearest neighbor upsampling on the first refined feature map to obtain the second upsampled feature map; Step 2.5: The second concatenation layer concatenates the second upsampled feature map with the second enhanced feature map output by the backbone network to obtain the second fused feature map; Step 2.6: The second C3k2 module refines the second fused feature map and outputs the second refined feature map as the P3 / 8-small detection layer. Step 2.7: The sixth convolutional layer downsamples the second refined feature map to obtain the downsampled feature map; Step 2.8: The third concatenation layer concatenates the downsampled feature map with the first refined feature map output in step 2.3 to obtain the third fused feature map; Step 2.9: The third C3k2 module refines the third fused feature map and outputs the third refined feature map as the P4 / 16-medium detection layer. Step 2.10: The seventh convolutional layer downsamples the third refined feature map to obtain the sixth feature map; Step 2.11: The fourth splicing layer splices the sixth feature map with the final output of the backbone network to obtain a 20×20×1536 fourth fused feature map; Step 2.12: The fourth C3k2 module refines the fourth fused feature map, enables the bottleneck structure, and outputs the fourth refined feature map as the P5 / 32-large detection layer.
8. The power transmission equipment segmentation method integrating cross-convolution and multi-layer attention mechanisms according to claim 7, characterized in that, Step 3 specifically includes: Step 3.1: The segmentation head receives detection feature maps from three scales: P3 / 8-small, P4 / 16-medium, and P5 / 32-large. Step 3.2: Perform target detection on the detection feature map at each scale to obtain the detection results, and predict the bounding box coordinates, class probability and target confidence of different categories of power equipment based on the detection results; Step 3.3: Generate the mask prototype through the prototype mask branch; Step 3.4: Combine the detection results with the mask prototype, and generate an instance segmentation mask for each target detection by predicting the mask coefficients; Step 3.5: Apply mask scaling to upsample the image to obtain a segmentation result of the same size as the input image; Step 3.6: Through non-maximum suppression and post-processing, the final power transmission equipment segmentation result is output. The final power transmission equipment segmentation result includes target category, confidence score, bounding box coordinates, and pixel-level instance mask.
