A utility pole area segmentation positioning method and related device
Through the innovative design of the utility pole image segmentation network, utilizing depthwise dilated convolution and SimAM attention mechanisms, the problems of edge blurring and missegmentation in utility pole image segmentation are solved, achieving high-precision utility pole localization and segmentation, and adapting to complex environments.
Patent Information
- Application Number
- CN202510885923.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2045-06-30
AI Technical Summary
Existing technologies for segmenting utility pole images suffer from problems such as blurred edges, loss of details, and missegmentation, making it difficult to meet the needs of high-precision, real-time monitoring, especially in complex environments where utility poles are difficult to distinguish from similar structures.
A utility pole image segmentation network is adopted, including a continuous boundary extraction module (CBEM) and a global utility pole localization module (GUPLM). It combines depthwise dilated convolution, feature fusion, depthwise separable asymmetric convolution, and SimAM attention mechanism, and uses the edge similarity loss function to optimize boundary smoothness.
It improves the accuracy and robustness of pole area segmentation, ensures the precision and integrity of edge information, and enhances positioning accuracy and adaptability to complex backgrounds.
Smart Images

Figure CN120726328B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of image processing, more particularly, to a power pole region segmentation positioning method and related equipment. BACKGROUND
[0002] In the field of monitoring and maintenance of distribution network infrastructure, the stability and safety of power poles directly affect the reliability of the power system and public safety. The traditional manual inspection method relies on visual inspection or simple instrument measurement by field personnel, which has the problems of low efficiency, limited coverage, poor real-time performance, etc. Especially in the scene where natural disasters (such as strong wind, snow) frequently occur, it is difficult to capture the tilt or displacement risk of the power pole in time.
[0003] Although the existing automatic monitoring technology based on image processing can partially replace manual inspection, it still has significant defects due to the limitations of complex environmental interference and algorithm performance bottlenecks. First, the accuracy of power pole image segmentation is insufficient: affected by factors such as light changes, weather conditions (such as rain and fog), background interference (such as tree and building obstructions), traditional segmentation algorithms are prone to edge blurring, detail loss or missegmentation, leading to error accumulation in subsequent tilt detection. Second, the existing deep learning segmentation model lacks the ability to fuse multi-scale features and global context information. For example, although the U-Net-based architecture can extract local features, it is weak in modeling long-range dependencies of power poles, and it is difficult to distinguish power poles from similar structures (such as street light poles) in complex backgrounds. In addition, mainstream segmentation loss functions (such as cross-entropy loss and Dice loss) focus too much on pixel-level classification accuracy and ignore the continuity optimization of edge structure, resulting in jagged or irregular broken boundaries, which directly affects the calculation accuracy of the tilt angle.
[0004] The above defects make it difficult for existing technologies to meet the urgent needs of the power system for high-precision and real-time monitoring. Based on this, the present application provides a power pole region segmentation positioning scheme that avoids the defects of existing methods and has strong robustness, complete edge detail preservation, and adaptability to complex scenes. SUMMARY
[0005] The present application provides a power pole region segmentation positioning method and related equipment, which can more effectively ensure the accuracy and integrity of edge information, and the output segmentation result is more accurate and smooth, while fully utilizing the local self-similarity of deep feature maps, further improving the positioning accuracy and robustness, and having higher practical application value.
[0006] A power pole region segmentation positioning method, comprising:
[0007] Obtaining a power pole image to be segmented;
[0008] inputting the power pole image into the trained power pole image segmentation network to obtain a power pole segmentation result grayscale image, wherein the power pole image segmentation network comprises a down-sampling module, an up-sampling module, a continuous boundary extraction module CBEM and a global power pole positioning module GUPLM, the continuous boundary extraction module CBEM extracts multi-scale local features by connecting multiple boundary extraction sub-modules BEM, each BEM module sequentially performs a depth dilated convolution, a batch normalization, an SMU activation function and a feature fusion operation, the global power pole positioning module GUPLM fuses global and local features by splicing the intermediate feature map output by the continuous boundary extraction module CBEM and the up-sampled feature map obtained by using the up-sampling module, and performing a depth separable asymmetric convolution, an SMU activation function and a SimAM attention calculation;
[0009] locating the power pole region according to the gray value of each pixel in the power pole segmentation result grayscale image.
[0010] Optionally, the training process of the power pole image segmentation network comprises:
[0011] constructing a power pole image segmentation dataset, wherein the power pole image segmentation dataset comprises original images and corresponding real label image in single-channel digital form;
[0012] training the power pole image segmentation network based on the power pole image segmentation dataset by using an edge similarity loss function, wherein the edge similarity loss function optimizes network parameters by calculating the Laplacian filter difference and gradient difference between the segmentation result and the real label image.
[0013] Optionally, the processing process of the boundary extraction sub-module BEM on the input feature map comprises:
[0014] performing a depth dilated convolution on the input feature map to obtain an expanded feature map;
[0015] sequentially performing a batch normalization and a convolution operation with a convolution kernel of 1 on the expanded feature map to obtain a normalized feature map;
[0016] activating and convolving the normalized feature map by an SMU activation function to generate an activated feature map;
[0017] adding the activated feature map and the input feature map element by element to obtain a local feature map.
[0018] Optionally, the calculation expression of one fusion extraction of the boundary extraction sub-module BEM is:
[0019]
[0020]
[0021] in, For the input feature map, To activate the feature map, For local feature maps, in of This represents a convolution operation with a kernel of 1. For SMU activation function, For batch normalization, Is the expansion rate Depth-dilated convolution.
[0022] Optionally, the processing of the input intermediate feature map and the upsampled feature map by the Global Pole Localization Module (GUPLM) includes:
[0023] The intermediate feature map and the upsampled feature map are concatenated along the channel dimension, and then dimensionality reduction is achieved through convolution to obtain a dimensionality-reduced feature map;
[0024] The depth-separable asymmetric convolution with the first and second preset convolution kernels is performed on the reduced feature map respectively. The results are added together and then activated by SMU to generate a separable convolution feature map.
[0025] SimAM attention mechanism is used to calculate the separated convolutional feature map, and it is then fused with the reduced-dimensional feature map element by element to obtain a local fused feature map;
[0026] The local fusion feature map, the intermediate feature map, and the upsampled feature map are added and fused element by element to obtain the global fusion feature map.
[0027] Optionally, the edge similarity loss function is calculated as follows:
[0028]
[0029] in, The network segments utility pole images to output a pixel matrix. The pixel matrix of the real label image. For absolute values, For Laplace filtering operation, The stability coefficient, for and The gradient difference in the horizontal direction, for and The gradient difference in the vertical direction.
[0030] A utility pole area segmentation and positioning device, comprising:
[0031] The image acquisition unit is used to acquire images of utility poles to be segmented.
[0032] A segmentation network unit is used to input the image of the utility pole into a trained utility pole image segmentation network to obtain a grayscale image of the segmented utility pole. The utility pole image segmentation network includes a downsampling module, an upsampling module, a continuous boundary extraction module (CBEM), and a global utility pole localization module (GUPLM). The CBEM extracts multi-scale local features by concatenating multiple boundary extraction sub-modules (BEM). Each BEM module sequentially performs depth-dilated convolution, batch normalization, SMU activation function, and feature fusion operations. The GUPLM merges the intermediate feature map output by the CBEM and the upsampled feature map obtained by the upsampling module, and performs depth-separable asymmetric convolution, SMU activation function, and SimAM attention calculation to fuse global and local features.
[0033] The region positioning unit is used to locate the utility pole region based on the grayscale value of each pixel in the grayscale image of the utility pole segmentation result.
[0034] A utility pole area segmentation and positioning device includes a memory and a processor;
[0035] The memory is used to store programs;
[0036] The processor is configured to execute the program to implement the various steps of the utility pole area segmentation and positioning method as described in any of the preceding claims.
[0037] A readable storage medium having a computer program stored thereon, characterized in that, when the computer program is executed by a processor, it implements the steps of the utility pole area segmentation and positioning method as described in any of the preceding claims.
[0038] A computer program product includes a computer program, characterized in that the computer program, when run by a processor, executes the various steps of the utility pole area segmentation and positioning method as described in any of the preceding claims.
[0039] As can be seen from the above technical solutions, the utility pole area segmentation and positioning method and related equipment provided in this application have many significant beneficial effects and can effectively avoid many defects of the prior art.
[0040] For accurate multi-scale edge extraction, this application uses a continuous boundary extraction module (CBEM) in conjunction with a multi-level boundary extraction sub-module (BEM), and combines depthwise dilated convolution with feature fusion operations. Depthwise dilated convolution expands the receptive field of the convolutional kernel without adding too many parameters, thus fully capturing the local details of the utility pole. Simultaneously, feature fusion integrates feature maps of different scales, effectively preserving the global contour features of the utility pole. This innovative design significantly improves edge recognition accuracy in complex backgrounds, such as those with vegetation occlusion, and under adverse lighting conditions, successfully solving the edge blurring problem caused by the single feature scale in traditional methods.
[0041] For robust segmentation in complex backgrounds, the Global Pole Localization Module (GUPLM) fully utilizes image information at different resolutions by fusing CBEM output with multi-level feature maps from the upsampling stage. Building upon this, depthwise separable asymmetric convolution and the SimAM attention mechanism are introduced. Depthwise separable asymmetric convolution effectively captures the directional features of long, narrow objects like utility poles, while the SimAM attention mechanism enhances the model's focus on the main pole region, effectively suppressing background noise interference. This avoids mis-segmentation of utility poles with similar objects, significantly improving the model's segmentation accuracy in complex backgrounds.
[0042] Furthermore, the utility pole image segmentation network is trained using the edge similarity loss function ESLoss, and the smoothness of the network output boundary is constrained by gradient difference. Unlike traditional loss functions that optimize only one objective, the edge similarity loss function not only focuses on pixel-level classification accuracy but also emphasizes optimizing the continuity of the edge structure. In this way, the segmentation results can better reflect the physical structure of real utility poles.
[0043] Compared with existing technologies, this application can more effectively guarantee the accuracy and integrity of edge information, and the output segmentation results are more accurate and have smoother edges. At the same time, this invention can fully utilize the local self-similarity of deep feature maps, further improving positioning accuracy and robustness, and has higher practical application value. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0045] Figure 1 This is a flowchart of a method for segmenting and locating utility pole areas disclosed in an embodiment of this application;
[0046] Figure 2 This is a schematic diagram of the structure of a utility pole image segmentation network disclosed in an embodiment of this application;
[0047] Figure 3 This is a schematic diagram of a boundary extraction submodule (BEM) disclosed in an embodiment of this application;
[0048] Figure 4 This is a schematic diagram of the structure of a global utility pole positioning module (GUPLM) disclosed in an embodiment of this application;
[0049] Figure 5 This is a schematic diagram of a utility pole area segmentation and positioning device disclosed in an embodiment of this application;
[0050] Figure 6 This is a hardware structure block diagram of a utility pole area segmentation and positioning device disclosed in an embodiment of this application. Detailed Implementation
[0051] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0052] This application can be used in a wide variety of general-purpose or special-purpose computing device environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor devices, distributed computing environments including any of the above devices, etc.
[0053] The following section introduces the solution proposed in this application. The technical solution is as follows, and details are provided below.
[0054] Figure 1 This is a flowchart of a method for segmenting and locating utility pole areas disclosed in an embodiment of this application.
[0055] like Figure 1 As shown, the method may include:
[0056] Step S1: Obtain the image of the utility pole to be segmented.
[0057] Specifically, images of utility poles are acquired for subsequent segmentation operations. These images can come from various sources, such as:
[0058] Drone photography: In power line inspection work, drones are often used to photograph utility poles from the air to obtain images of utility poles from different angles and positions.
[0059] Surveillance cameras: Surveillance cameras installed around utility poles can capture images of the poles in real time, and these images can be used as objects for segmentation processing.
[0060] Historical image data: Images containing utility poles are selected from existing image databases. This data may have been accumulated from past inspections or other related work.
[0061] After acquiring the image, some preprocessing operations may be required, such as resizing the image, color correction, and noise removal, in order to ensure the image quality and prepare it for subsequent segmentation work.
[0062] Step S2: Input the image of the utility pole into the trained utility pole image segmentation network to obtain a grayscale image of the utility pole segmentation result.
[0063] Specifically, the utility pole image segmentation network includes a downsampling module, an upsampling module, a continuous boundary extraction (CBEM) module, and a global utility pole localization (GUPLM) module. The CBEM module extracts multi-scale local features by concatenating multiple boundary extraction sub-modules (BEM). Each BEM module sequentially performs depthwise dilated convolution, batch normalization, SMU activation function, and feature fusion operations. The GUPLM module merges the intermediate feature map output by the CBEM module and the upsampled feature map obtained by the upsampling module, and performs depthwise separable asymmetric convolution, SMU activation function, and SimAM attention calculation to fuse global and local features.
[0064] The downsampling module consists of conventional downsampling operations, including a convolutional layer, a batch normalization layer, and an activation function layer. The convolutional layer reduces the spatial resolution of the feature map and increases the number of channels, the batch normalization layer helps promote model convergence, and the activation function layer increases the model's non-linear expressive power.
[0065] Upsampling module: Consists of conventional upsampling operations, including a transposed convolutional layer, a batch normalization layer, and an activation function layer. The transposed convolutional layer increases the spatial resolution of the feature map and reduces the number of channels. The batch normalization layer and the activation function layer function similarly to those in the downsampling module.
[0066] Continuous Boundary Extraction Module (CBEM): This module extracts multi-scale local features by cascading multiple boundary extraction sub-modules (BEM). Each BEM module sequentially performs depthwise dilated convolution, batch normalization, SMU activation function, and feature fusion operations, effectively capturing the boundary information of utility poles.
[0067] Global Pole Localization Module (GUPLM): By stitching the intermediate feature map output by CBEM and the upsampled feature map obtained by the upsampling module, it then performs depthwise separable asymmetric convolution, SMU activation function and SimAM attention calculation to fuse global and local features, thereby more accurately locating the position of the utility pole in the image.
[0068] like Figure 2 As shown, the processing procedure of the utility pole image segmentation network is as follows:
[0069] Image input: Input the image of the utility pole to be segmented with a spatial resolution of H×W and 3 channels into the utility pole image segmentation network. After passing through a convolutional layer with a kernel size of 3×3 and an SMU activation function, the feature map of the utility pole with a spatial resolution of H×W and 3 channels is obtained.
[0070] Downsampling and CBEM processing: The pole features are processed through three downsampling modules and a continuous boundary extraction module (CBEM) in sequence. The BEM module is executed repeatedly in the CBEM module each time, resulting in feature maps of utility poles with spatial resolutions of H / 2×W / 2, H / 4×W / 4, and H / 8×W / 8, and with 2C, 4C, and 8C channels, respectively.
[0071] Intermediate processing: The downsampled feature map is used as input and passed through a 3×3 convolutional layer and an SMU activation function to obtain an intermediate feature map of the utility pole with a spatial resolution of H / 8×W / 8 and 8C channels.
[0072] Global localization and upsampling: The upsampled feature map and the feature map obtained from intermediate processing are used as inputs. The inputs are processed by the global pole localization module GUPLM, and then by the continuous boundary extraction module CBEM and the upsampling module in sequence. This process is repeated multiple times to finally obtain a pole feature map with a spatial resolution of H×W and C channels.
[0073] Output processing: The intermediate feature map is passed through a convolutional layer with a kernel size of 3×3 and an SMU activation function to obtain a grayscale image of the utility pole image segmentation result with a spatial resolution of H×W and 1 channel. The grayscale value of each pixel represents the probability or confidence that the pixel belongs to the utility pole.
[0074] Step S3: Locate the utility pole region based on the grayscale value of each pixel in the grayscale image of the utility pole segmentation result.
[0075] Specifically, after obtaining the grayscale image of the utility pole segmentation result, the utility pole area can be located based on the grayscale value of each pixel in the image.
[0076] By setting a suitable grayscale threshold, pixels with grayscale values greater than the threshold are identified as belonging to the utility pole, while pixels with grayscale values less than the threshold are identified as background pixels. This separates the utility pole from the background, creating a binary image. Connectivity analysis is then performed on the binary image to identify all interconnected pixel sets, each representing a possible utility pole region. Based on prior knowledge about the utility pole, such as its area and shape, the connected regions are filtered to remove those that do not meet the criteria, ultimately determining the precise location of the utility pole.
[0077] By following the three steps above, the image of the utility pole can be segmented and located, providing strong support for subsequent power inspections, fault detection, and other tasks.
[0078] As can be seen from the above technical solutions, the utility pole area segmentation and positioning method and related equipment provided in this application have many significant beneficial effects and can effectively avoid many defects of the prior art.
[0079] For accurate multi-scale edge extraction, this application uses a continuous boundary extraction module (CBEM) in conjunction with a multi-level boundary extraction sub-module (BEM), and combines depthwise dilated convolution with feature fusion operations. Depthwise dilated convolution expands the receptive field of the convolutional kernel without adding too many parameters, thus fully capturing the local details of the utility pole. Simultaneously, feature fusion integrates feature maps of different scales, effectively preserving the global contour features of the utility pole. This innovative design significantly improves edge recognition accuracy in complex backgrounds, such as those with vegetation occlusion, and under adverse lighting conditions, successfully solving the edge blurring problem caused by the single feature scale in traditional methods.
[0080] For robust segmentation in complex backgrounds, the Global Pole Localization Module (GUPLM) fully utilizes image information at different resolutions by fusing CBEM output with multi-level feature maps from the upsampling stage. Building upon this, depthwise separable asymmetric convolution and the SimAM attention mechanism are introduced. Depthwise separable asymmetric convolution effectively captures the directional features of long, narrow objects like utility poles, while the SimAM attention mechanism enhances the model's focus on the main pole region, effectively suppressing background noise interference. This avoids mis-segmentation of utility poles with similar objects, significantly improving the model's segmentation accuracy in complex backgrounds.
[0081] Furthermore, the utility pole image segmentation network is trained using the edge similarity loss function ESLoss, and the smoothness of the network output boundary is constrained by gradient difference. Unlike traditional loss functions that optimize only one objective, the edge similarity loss function not only focuses on pixel-level classification accuracy but also emphasizes optimizing the continuity of the edge structure. In this way, the segmentation results can better reflect the physical structure of real utility poles.
[0082] Compared with existing technologies, this application can more effectively guarantee the accuracy and integrity of edge information, and the output segmentation results are more accurate and have smoother edges. At the same time, this invention can fully utilize the local self-similarity of deep feature maps, further improving positioning accuracy and robustness, and has higher practical application value.
[0083] In some embodiments of this application, the training process of the utility pole image segmentation model is described, which may specifically include:
[0084] The first step is to construct a utility pole image segmentation dataset, which includes the original images and the corresponding single-channel digitally labeled images.
[0085] The second step involves training the utility pole image segmentation network based on the aforementioned utility pole image segmentation dataset using an edge similarity loss function. This edge similarity loss function optimizes the network parameters by calculating the Laplacian filter difference and gradient difference between the segmentation results and the real labeled images.
[0086] Specifically, training the utility pole image segmentation model includes dataset construction, loss function design, and network training and validation.
[0087] To construct a utility pole image segmentation dataset: images were first extracted from videos recording the tilting process of utility poles, and then images of utility poles in different states were collected to enrich the data diversity. After manually labeling the images, the RGB color labels were converted into single-channel digital labels, then cropped to a uniform size and paired to form the dataset. In other words, the utility pole image segmentation dataset contains a large number of original images and corresponding single-channel digitally labeled images.
[0088] In utility pole tilt monitoring, the segmentation boundary is crucial. The edge similarity loss function optimizes network parameters by calculating the Laplacian filter difference and gradient difference between the segmentation result and the true labeled image, thereby improving the network's sensitivity to boundary information and making the segmentation boundary more accurate and smooth.
[0089] The edge similarity loss function is calculated as follows:
[0090]
[0091] in, The network segments utility pole images to output a pixel matrix. The pixel matrix of the real label image. For absolute values, For Laplace filtering operation, The stability coefficient, for and The gradient difference in the horizontal direction, for and The gradient difference in the vertical direction.
[0092]
[0093]
[0094] in, This represents the horizontal gradient matrix of the image pixel matrix. This represents the vertical gradient matrix used to calculate the pixel matrix of an image.
[0095]
[0096]
[0097] in, This represents the input image pixel matrix. For filtering operations used to calculate gradients, This is a horizontal filter that extracts horizontal edge and linear features from an image. It is a vertical filter that extracts vertical edge and linear features from an image.
[0098] In a specific implementation of this invention, the stability coefficient in the loss function It can be set to 0.002. and The possible values are as follows:
[0099]
[0100]
[0101] In some embodiments of this application, combined with Figure 3 The process of the boundary extraction submodule (BEM) in processing the input feature map is described, which may include:
[0102] Perform depthwise dilation convolution on the input feature map to obtain the dilated feature map;
[0103] The expanded feature map is then subjected to batch normalization and convolution operations with a kernel of 1 in sequence to obtain a normalized feature map.
[0104] After activating and convolving the normalized feature map using the SMU activation function, an activated feature map is generated.
[0105] The activated feature map is added element-wise to the input feature map to obtain a local feature map.
[0106] Specifically, such as Figure 3 As shown, the BEM module aims to extract multi-scale local features. The input is a feature map X1 of a utility pole with a spatial resolution of H×W and C channels. First, a depthwise dilation convolution operation (DDWConv) with a dilation rate of r and a kernel size of 3×3 is performed to obtain X1a. Then, X1a is batch normalized (BatchNorm) and followed by a convolution operation with a kernel size of 1×1 to obtain X1b. Next, the SMU activation function is applied to X1b, followed by another 1×1 convolution operation to obtain X1c. Finally, X1c is element-wise added to X1 to obtain X2, which is the result of one boundary feature extraction. If the number of iterations n is not reached, the loop continues; if n is reached, the result is output.
[0107] The calculation expression for the first fusion extraction of the boundary extraction submodule BEM is as follows:
[0108]
[0109]
[0110] in, For the input feature map, To activate the feature map, For local feature maps, in of This represents a convolution operation with a kernel of 1. For SMU activation function, For batch normalization, Is the expansion rate Depth-dilated convolution.
[0111] Depthwise dilated convolutions can increase the receptive field without increasing computational cost or reducing resolution, achieved by setting the dilation rate parameter. The SMU (Smooth Maximum Unit) activation function is an activation function based on the smooth maximum technique, expressed as:
[0112]
[0113] in, and These are hyperparameters that can be learned through gradient descent.
[0114] In some embodiments of this application, combined withFigure 4 The processing procedure of the Global Upsampled Feature Map (GUPLM) module for the input intermediate feature map is described, which may specifically include:
[0115] The intermediate feature map and the upsampled feature map are concatenated along the channel dimension, and then dimensionality reduction is achieved through convolution to obtain a dimensionality-reduced feature map;
[0116] The depth-separable asymmetric convolution with the first and second preset convolution kernels is performed on the reduced feature map respectively. The results are added together and then activated by SMU to generate a separable convolution feature map.
[0117] SimAM attention mechanism is used to calculate the separated convolutional feature map, and it is then fused with the reduced-dimensional feature map element by element to obtain a local fused feature map;
[0118] The local fusion feature map, the intermediate feature map, and the upsampled feature map are added and fused element by element to obtain the global fusion feature map.
[0119] Specifically, utility poles may overlap with background trees or buildings in surveillance footage from certain angles. Furthermore, global information is diluted during the propagation of global information from higher-level feature maps to lower-level feature maps due to the long path, resulting in only partial segmentation of the utility pole. Therefore, this application utilizes a Global UtilityPole Localization Module (GUPLM) to more effectively utilize global information in higher-level feature maps, accurately locate utility pole targets, and improve the network's ability to accurately identify and segment utility poles in complex backgrounds.
[0120] like Figure 4 As shown, the feature map output by the adjacent CBEM module after the downsampling module is used as an input feature map of GUPLM, denoted as . .set up The dimensions are C×H×W, where C represents the number of channels, H represents the height, and W represents the width; the feature map output by the corresponding upsampling module is used as another input feature map of GUPLM, denoted as . . Size and The result is consistent, consisting of C×H×W. The specific execution process of this module is as follows:
[0121] ① and A concatenation operation is performed along the channel dimension to obtain a feature map with a spatial resolution of H×W and 2C channels. This feature map is then subjected to a 1×1 convolution operation to reduce the number of channels and achieve full fusion. and From the feature information, a feature map of the utility pole with a spatial resolution of H×W and C channels is obtained. .
[0122] ② After applying a pair of depthwise separable asymmetric convolutions (DWConv), with one of the depthwise separable asymmetric convolutions having a kernel size of 1×3, a feature map of the utility pole with a spatial resolution of H×W and C channels is obtained. Another depthwise separable asymmetric convolution has a kernel size of 3×1, resulting in a feature map of a utility pole with a spatial resolution of H×W and C channels. .
[0123] ③ and Element-wise addition is performed, followed by an SMU activation function calculation to enhance the model's nonlinearity, resulting in a utility pole feature map with a spatial resolution of H×W and C channels. .
[0124] ④ The SimAM module is used for attention calculation to obtain a feature map of utility poles with adaptive spatial feature enhancement. Its spatial resolution is H×W and the number of channels is C.
[0125] ⑤ and By adding elements together, we obtain a feature map of the utility pole with a spatial resolution of H×W and C channels. .
[0126] ⑥ , and By adding elements together, we obtain a feature map of the utility pole with a spatial resolution of H×W and C channels. , This is the output of the GUPLM module.
[0127] The following describes a utility pole area segmentation and positioning device provided in the embodiments of this application. The utility pole area segmentation and positioning device described below and the utility pole area segmentation and positioning method described above can be referred to and correspond to each other.
[0128] See Figure 5 , Figure 5 This is a schematic diagram of a utility pole area segmentation and positioning device disclosed in an embodiment of this application.
[0129] like Figure 5 As shown, the utility pole area segmentation and positioning device may include:
[0130] Image acquisition unit 110 is used to acquire images of utility poles to be segmented;
[0131] The segmentation network unit 120 is used to input the utility pole image into the trained utility pole image segmentation network to obtain a grayscale image of the utility pole segmentation result. The utility pole image segmentation network includes a downsampling module, an upsampling module, a continuous boundary extraction module (CBEM), and a global utility pole localization module (GUPLM). The continuous boundary extraction module (CBEM) extracts multi-scale local features by concatenating multiple boundary extraction sub-modules (BEM). Each BEM module sequentially performs depth-dilated convolution, batch normalization, SMU activation function, and feature fusion operations. The global utility pole localization module (GUPLM) stitches the intermediate feature map output by the continuous boundary extraction module (CBEM) and the upsampled feature map obtained by the upsampling module, and performs depth-separable asymmetric convolution, SMU activation function, and SimAM attention calculation to fuse global and local features.
[0132] The region positioning unit 130 is used to locate the utility pole region based on the grayscale value of each pixel in the grayscale image of the utility pole segmentation result.
[0133] As can be seen from the above technical solutions, the utility pole area segmentation and positioning method and related equipment provided in this application have many significant beneficial effects and can effectively avoid many defects of the prior art.
[0134] For accurate multi-scale edge extraction, this application uses a continuous boundary extraction module (CBEM) in conjunction with a multi-level boundary extraction sub-module (BEM), and combines depthwise dilated convolution with feature fusion operations. Depthwise dilated convolution expands the receptive field of the convolutional kernel without adding too many parameters, thus fully capturing the local details of the utility pole. Simultaneously, feature fusion integrates feature maps of different scales, effectively preserving the global contour features of the utility pole. This innovative design significantly improves edge recognition accuracy in complex backgrounds, such as those with vegetation occlusion, and under adverse lighting conditions, successfully solving the edge blurring problem caused by the single feature scale in traditional methods.
[0135] For robust segmentation in complex backgrounds, the Global Pole Localization Module (GUPLM) fully utilizes image information at different resolutions by fusing CBEM output with multi-level feature maps from the upsampling stage. Building upon this, depthwise separable asymmetric convolution and the SimAM attention mechanism are introduced. Depthwise separable asymmetric convolution effectively captures the directional features of long, narrow objects like utility poles, while the SimAM attention mechanism enhances the model's focus on the main pole region, effectively suppressing background noise interference. This avoids mis-segmentation of utility poles with similar objects, significantly improving the model's segmentation accuracy in complex backgrounds.
[0136] Furthermore, the utility pole image segmentation network is trained using the edge similarity loss function ESLoss, and the smoothness of the network output boundary is constrained by gradient difference. Unlike traditional loss functions that optimize only one objective, the edge similarity loss function not only focuses on pixel-level classification accuracy but also emphasizes optimizing the continuity of the edge structure. In this way, the segmentation results can better reflect the physical structure of real utility poles.
[0137] Compared with existing technologies, this application can more effectively guarantee the accuracy and integrity of edge information, and the output segmentation results are more accurate and have smoother edges. At the same time, this invention can fully utilize the local self-similarity of deep feature maps, further improving positioning accuracy and robustness, and has higher practical application value.
[0138] The utility pole area segmentation and positioning device provided in this application embodiment can be applied to utility pole area segmentation and positioning equipment. Figure 6 The hardware structure block diagram of the utility pole area segmentation and positioning device is shown. (Refer to...) Figure 6 The hardware structure of the utility pole area segmentation and positioning device may include: at least one processor 1, at least one communication interface 2, at least one memory 3, and at least one communication bus 4;
[0139] In this embodiment of the application, the number of processor 1, communication interface 2, memory 3, and communication bus 4 is at least one, and processor 1, communication interface 2, and memory 3 communicate with each other through communication bus 4;
[0140] Processor 1 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0141] Memory 3 may include high-speed RAM, and may also include non-volatile memory, such as at least one disk storage device;
[0142] The memory stores a program, which the processor can call. The program is used for:
[0143] Obtain the image of the utility pole to be segmented;
[0144] The image of the utility pole is input into a trained utility pole image segmentation network to obtain a grayscale image of the segmented utility pole. The utility pole image segmentation network includes a downsampling module, an upsampling module, a continuous boundary extraction module (CBEM), and a global utility pole localization module (GUPLM). The CBEM extracts multi-scale local features by concatenating multiple boundary extraction sub-modules (BEM). Each BEM module sequentially performs depth-dilated convolution, batch normalization, SMU activation function, and feature fusion operations. The GUPLM merges the intermediate feature map output by the CBEM and the upsampled feature map obtained by the upsampling module, and performs depth-separable asymmetric convolution, SMU activation function, and SimAM attention calculation to fuse global and local features.
[0145] The utility pole region is located based on the grayscale value of each pixel in the grayscale image of the utility pole segmentation result.
[0146] Optionally, the refined and extended functions of the program can be referred to the above description.
[0147] This application embodiment also provides a readable storage medium that can store a program suitable for execution by a processor, the program being used for:
[0148] Obtain the image of the utility pole to be segmented;
[0149] The image of the utility pole is input into a trained utility pole image segmentation network to obtain a grayscale image of the segmented utility pole. The utility pole image segmentation network includes a downsampling module, an upsampling module, a continuous boundary extraction module (CBEM), and a global utility pole localization module (GUPLM). The CBEM extracts multi-scale local features by concatenating multiple boundary extraction sub-modules (BEM). Each BEM module sequentially performs depth-dilated convolution, batch normalization, SMU activation function, and feature fusion operations. The GUPLM merges the intermediate feature map output by the CBEM and the upsampled feature map obtained by the upsampling module, and performs depth-separable asymmetric convolution, SMU activation function, and SimAM attention calculation to fuse global and local features.
[0150] The utility pole region is located based on the grayscale value of each pixel in the grayscale image of the utility pole segmentation result.
[0151] Optionally, the refined and extended functions of the program can be referred to the above description.
[0152] This application also provides a computer program product, including a computer program, wherein the computer program is executed by a processor using the following method:
[0153] Obtain the image of the utility pole to be segmented;
[0154] The image of the utility pole is input into a trained utility pole image segmentation network to obtain a grayscale image of the segmented utility pole. The utility pole image segmentation network includes a downsampling module, an upsampling module, a continuous boundary extraction module (CBEM), and a global utility pole localization module (GUPLM). The CBEM extracts multi-scale local features by concatenating multiple boundary extraction sub-modules (BEM). Each BEM module sequentially performs depth-dilated convolution, batch normalization, SMU activation function, and feature fusion operations. The GUPLM merges the intermediate feature map output by the CBEM and the upsampled feature map obtained by the upsampling module, and performs depth-separable asymmetric convolution, SMU activation function, and SimAM attention calculation to fuse global and local features.
[0155] The utility pole region is located based on the grayscale value of each pixel in the grayscale image of the utility pole segmentation result.
[0156] Optionally, the refined and extended functions of the program can be referred to the above description.
[0157] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0158] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0159] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method of pole area segmentation positioning, characterized by, The method comprises the following steps: obtaining a telegraph pole image to be segmented; inputting the telegraph pole image into a trained telegraph pole image segmentation network to obtain a telegraph pole segmentation result grayscale image, wherein the telegraph pole image segmentation network comprises a down-sampling module, an up-sampling module, a continuous boundary extraction module CBEM and a global telegraph pole positioning module GUPLM, the continuous boundary extraction module CBEM extracts multi-scale local features by connecting multiple boundary extraction sub-modules BEM, each BEM module sequentially performs deep dilated convolution, batch normalization, SMU activation function and feature fusion operation, the global telegraph pole positioning module GUPLM splices the intermediate feature map output by the continuous boundary extraction module CBEM and the up-sampling feature map obtained by using the up-sampling module, and performs deep separable asymmetric convolution, SMU activation function and SimAM attention calculation to fuse global and local features; locating a telegraph pole region according to the gray value of each pixel in the telegraph pole segmentation result grayscale image; the processing process of the boundary extraction sub-module BEM on the input feature map comprises: performing deep dilated convolution on the input feature map to obtain an expanded feature map; sequentially performing batch normalization and convolution operation with a convolution kernel of 1 on the expanded feature map to obtain a normalized feature map; generating an activated feature map after the normalized feature map is activated and convoluted by the SMU activation function; adding the activated feature map and the input feature map element by element to obtain a local feature map; the processing process of the global telegraph pole positioning module GUPLM on the input intermediate feature map and the up-sampling feature map comprises: splicing the intermediate feature map and the up-sampling feature map along the channel dimension, reducing dimension by convolution to obtain a reduced dimension feature map; performing deep separable asymmetric convolution of the first preset convolution kernel and the second preset convolution kernel on the reduced dimension feature map respectively, adding the results, and generating a separable convolution feature map after SMU activation; performing SimAM attention mechanism calculation on the separable convolution feature map, and adding and fusing the reduced dimension feature map element by element to obtain a local fusion feature map; adding and fusing the local fusion feature map, the intermediate feature map and the up-sampling feature map element by element to obtain a global fusion feature map.
2. The method of claim 1, wherein, The training process of the telegraph pole image segmentation network comprises: constructing a telegraph pole image segmentation data set, wherein the telegraph pole image segmentation data set comprises original images and corresponding single-channel digital form real label images; based on the telegraph pole image segmentation data set, training the telegraph pole image segmentation network by using an edge similarity loss function, wherein the edge similarity loss function optimizes network parameters by calculating the Laplace filter difference and gradient difference between the segmentation result and the real label image.
3. The method of claim 1, wherein, The calculation expression of one fusion extraction of the boundary extraction sub-module BEM is: ; ; wherein, is an input feature map, is an activation feature map, is a local feature map, in represents a convolution operation with a kernel of 1, is an SMU activation function, is batch normalization, is a depthwise separable convolution with a dilation rate of is a depthwise separable convolution with a dilation rate of 4. The method of claim 2, wherein, The calculation method of the edge similarity loss function is: ; wherein, is a pixel matrix of an output image of the electric pole image segmentation network, is a pixel matrix of a ground truth image, is an absolute value, is a Laplacian filter operation, is a stabilization coefficient, is and is a gradient difference in a horizontal direction, is and is a gradient difference in a vertical direction.
5. A utility pole area segmentation positioning apparatus, characterized by, The method comprises the following steps: an image acquisition unit configured to acquire a telegraph pole image to be segmented; The segmentation network unit is configured to input the power pole image into a trained power pole image segmentation network to obtain a power pole segmentation result grayscale image, wherein the power pole image segmentation network comprises a down-sampling module, an up-sampling module, a continuous boundary extraction module CBEM and a global power pole positioning module GUPLM, the continuous boundary extraction module CBEM extracts multi-scale local features by connecting a plurality of boundary extraction sub-modules BEM, each BEM module sequentially performs a depth dilated convolution, a batch normalization, an SMU activation function and a feature fusion operation, and the global power pole positioning module GUPLM fuses global and local features by splicing an intermediate feature map output by the continuous boundary extraction module CBEM and an up-sampled feature map obtained by using the up-sampling module, and performing a depth separable asymmetric convolution, an SMU activation function and a SimAM attention calculation. The region positioning unit is configured to locate a power pole region according to a grayscale value of each pixel in the power pole segmentation result grayscale image. The processing procedure of the boundary extraction sub-module BEM on the input feature map comprises: performing a depth dilated convolution on the input feature map to obtain a dilated feature map; sequentially performing a batch normalization and a convolution kernel of 1 on the dilated feature map to obtain a normalized feature map; generating an activated feature map after the normalized feature map is activated and convoluted by the SMU activation function; adding the activated feature map and the input feature map element by element to obtain a local feature map; The processing procedure of the global power pole positioning module GUPLM on the input intermediate feature map and the up-sampled feature map comprises: splicing the intermediate feature map and the up-sampled feature map along a channel dimension, reducing dimension by convolution to obtain a reduced dimension feature map; performing a depth separable asymmetric convolution of a first preset convolution kernel and a second preset convolution kernel on the reduced dimension feature map, adding the results and activating by the SMU to generate a separable convolution feature map; performing a SimAM attention mechanism calculation on the separable convolution feature map, and adding the reduced dimension feature map element by element to obtain a local fusion feature map; adding and fusing the local fusion feature map, the intermediate feature map and the up-sampled feature map element by element to obtain a global fusion feature map.
6. A utility pole area segmentation positioning apparatus characterized by, comprises a memory and a processor; the memory is configured to store a program; the processor is configured to execute the program to implement each step of the power pole region segmentation and positioning method according to any one of claims 1-4.
7. A readable storage medium, having stored thereon a computer program, characterized in that, The computer program, when executed by the processor, implements each step of the power pole region segmentation and positioning method according to any one of claims 1-4.
8. A computer program product comprising a computer program, characterized in that, The computer program, when executed by the processor, implements each step of the power pole region segmentation and positioning method according to any one of claims 1-4.