A 3D semantic segmentation method for substation scenes based on point cloud augmentation and attention guidance
By employing a point cloud augmentation and multi-head attention-guided 3D semantic segmentation method in substation scenarios, combined with AGE and PCE modules, the problem of feature representation and context awareness of substation point cloud data is solved, achieving high-precision equipment identification and boundary preservation, and improving the intelligent operation and maintenance capabilities of power facilities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ANHUI UNIV
- Filing Date
- 2025-04-22
- Publication Date
- 2026-05-26
AI Technical Summary
Existing point cloud processing methods suffer from insufficient feature representation capabilities and weak context awareness in substation scenarios. They struggle to integrate local geometric details with global contextual information and have limited ability to process point clouds with uneven density, resulting in low accuracy in fine structure recognition.
A 3D semantic segmentation method based on point cloud augmentation and multi-head attention guidance is adopted. By constructing an attention-guided coding module (AGE) and a point context enhancement module (PCE), and combining local convolution and multi-attention head mechanism, neighborhood feature weights are dynamically allocated to achieve collaborative modeling of local details and global context. The model is trained by weighted loss function and parameter optimizer to solve the problem of uneven distribution of device categories.
It significantly improves the semantic segmentation accuracy of point cloud data in substation scenarios, especially the ability to identify slender structures such as wires and insulators, enhances the clarity of equipment boundaries and classification accuracy, and improves the robustness of the model in real-world environments.
Smart Images

Figure CN120431325B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical fields of computer vision and artificial intelligence, specifically to a three-dimensional semantic segmentation method for substation scenes based on point cloud enhancement and attention guidance. Background Technology
[0002] With the development of 3D laser scanning technology, point cloud data processing has become an important means of intelligent operation and maintenance of substation equipment. Substations contain various equipment such as transformers, circuit breakers, and insulators, which exhibit complex geometric features and multi-scale spatial distribution characteristics in point cloud data. Accurate identification and segmentation of these devices are of great significance for the condition assessment and fault early warning of power facilities.
[0003] Existing point cloud processing methods face multiple challenges in substation applications. Traditional methods based on handcrafted features cannot effectively handle the diverse types and complex shapes of equipment. While deep learning-based methods such as the PointNet series have made breakthroughs, they still suffer from insufficient feature representation and weak context awareness, especially low accuracy in recognizing fine structures. Although attention mechanisms have achieved significant results in computer vision in recent years, their direct application to point cloud data lacks consideration of geometric characteristics, and improved methods such as PointNeXt still face accuracy and efficiency issues in substation scenarios.
[0004] The main drawbacks of existing methods include: lack of feature enhancement mechanisms for the geometric characteristics of power equipment; difficulty in fusing local geometric details with global contextual information; underutilization of relative positional relationships in point clouds; and limited ability to process point clouds with uneven density.
[0005] To address these challenges, this invention proposes a semantic segmentation method that integrates an Attention-Guided Encoding (AGE) module and a Point Context Enhancement (PCE) module. AGE achieves dynamic enhancement of geometric features through a multi-head attention mechanism and residual connections, while PCE improves the ability to express fine structures through dual-path feature extraction. Together, they address the key challenges of semantic segmentation of substation site clouds. Summary of the Invention
[0006] To address the shortcomings of the existing technologies, this invention provides a three-dimensional semantic segmentation method for substation scenes based on point cloud enhancement and multi-head attention guidance, aiming to extract key features from complex point clouds and achieve accurate semantic segmentation of point cloud data for substation scenes.
[0007] To achieve the above-mentioned technical objectives, the present invention provides the following technical solution:
[0008] A 3D semantic segmentation method for substation scenes based on point cloud augmentation and attention guidance, specifically including the following steps:
[0009] S1. Divide and label the 3D point cloud data in the substation scene into regions, set semantic labels based on equipment type, and construct a semantic segmentation point cloud dataset adapted to the substation scene.
[0010] S2. Construct a three-dimensional semantic segmentation model. Through the point cloud enhancement module, perform density adaptive filtering and reflection intensity correction on the data in the input semantic segmentation point cloud dataset to suppress noise interference and enhance the geometric features of the device surface. At the same time, combined with the attention-guided encoding module, use local convolution and multi-attention head mechanism to dynamically allocate the weights of different neighborhood features to achieve collaborative modeling of local details and global context.
[0011] S3. A weighted loss function and parameter optimizer are used to train the model to solve the problem of uneven distribution of equipment categories in substation scenarios;
[0012] S4. Based on the trained model, perform semantic segmentation on the point cloud data of the substation scene and output high-precision equipment classification results.
[0013] Furthermore, step S1 specifically includes:
[0014] S11. Based on the spatial distribution characteristics and geometric attributes of point cloud data, the substation scene is divided into regions, the overall point cloud is divided into blocks of different spatial scales, and training set and test set are divided. The training set and test set are composed of multiple independent blocks of different numbers, each block covers a different spatial range and contains point cloud data of all defined categories.
[0015] S12. For point cloud data in substation scenarios, classify the data according to the object's appearance, functional attributes and spatial distribution information, dividing the point cloud data into non-electrical equipment and electrical equipment; among which, non-electrical equipment is further subdivided into busbars, wires, overhead structures, debris, buildings, ground and walls.
[0016] S13. Based on the physical size of the equipment and the number of points it contains, the power equipment is further subdivided into small equipment, medium equipment and large equipment.
[0017] S14. Use professional 3D annotation software to annotate the point cloud data after classifying them in steps S12 and S13 with unique semantic labels, and integrate them into a unified semantic label system to build a labeled semantic segmentation point cloud dataset adapted to the substation scenario.
[0018] S15. Then, use mainstream 3D semantic segmentation algorithms to evaluate the performance of the constructed semantic segmentation point cloud dataset. By recording and analyzing the precision, recall, and IoU of each mainstream 3D semantic segmentation algorithm in distinguishing different point cloud categories, verify the applicability of the obtained dataset in 3D semantic segmentation tasks. If the obtained dataset is verified to be applicable, it can be used for subsequent model training and 3D semantic segmentation tasks. If it is verified to be not universally applicable, it is necessary to re-divide the regions, classify the categories, and label them.
[0019] Furthermore, the construction of the 3D semantic segmentation model in step S2 specifically involves:
[0020] A 3D semantic segmentation model is constructed using the PointMetaBase network as the backbone network for point cloud data feature learning. The backbone network adopts an encoder-decoder structure, consisting of a multilayer perceptron (MLP) layer, four downsampling abstraction modules, and three upsampling propagation modules.
[0021] The 3D semantic segmentation model takes the semantic segmentation point cloud dataset obtained in step S1 as input and first passes it through a multilayer perceptron (MLP) layer to enrich the input point cloud data information.
[0022] The downsampling abstraction module is used to extract multi-level features; the input of the first downsampling abstraction module is the output of the MLP layer, and the input of the remaining downsampling abstraction modules is the output of the previous layer; each downsampling abstraction module includes an attention-guided coding module (AGE), a point cloud enhancement module (PCE), and an inverted bottleneck MLP module;
[0023] In this module, the Attention-Guided Encoding (AGE) module and the Point Cloud Enhancement (PCE) module are connected serially within the downsampling abstraction module as feature extraction modules. The AGE module takes center point features and neighborhood features as input and dynamically aggregates neighborhood information through a multi-head attention mechanism, focusing on capturing global contextual relationships and geometric structure features. The output features of the AGE module are then fed into the PCE module for further enhancement. The PCE module enhances local detail representation and fine geometric structure features through dual-path convolution and channel-spatial dual-path compression mechanisms. The inverted bottleneck MLP module receives the enhanced features output by the PCE module and further enriches the feature representation through channel transformation of expansion-compression-expansion.
[0024] The three upsampling propagation modules gradually restore the multi-level features extracted by the downsampling abstraction module to the original point cloud resolution through feature interpolation, feature fusion and residual refinement mechanisms, and connect with the corresponding downsampling abstraction modules through skip connection to achieve the fusion of high and low resolution features;
[0025] The output of the last upsampling propagation module is then fused with the output of the MLP layer to serve as the final output feature of the model. The final output feature outputs the class probability distribution of each point through the classification head, thus completing the semantic segmentation task.
[0026] More specifically, the input to the backbone network is divided into two parts: one part is the spatial information of the point cloud data, denoted by P, which includes the spatial coordinates x, y, z of the point cloud data; the other part is the feature information of the point cloud, denoted by F, which includes the color information r, g, b and the reflection intensity i of the point cloud. The spatial information P is used for location embedding, and the feature information F is fed into the backbone network to extract global and local features. After feature learning by the backbone network, a high-dimensional feature representation is obtained, which is used for subsequent semantic segmentation tasks.
[0027] Furthermore, the specific process of feature extraction by the attention-guided coding module AGE is as follows:
[0028] First, obtain the center point feature and neighborhood feature; the center point feature comes directly from the output feature of the previous module, denoted as... Then, a neighborhood is constructed around the center point using a ball query. Neighborhood features are extracted from the global feature matrix based on the neighborhood index, denoted as... ,in For batch size, The number of feature channels, For the number of center points, The number of neighboring points for each center point;
[0029] Next, batch normalization and linear transformation are performed on the input center point features and neighborhood features to encode the relative positions into three-dimensional coordinates, which are then input into the multi-head attention layer. The specific calculation formula is as follows:
[0030] ;
[0031] ;
[0032] ;
[0033] ;
[0034] ;
[0035] ;
[0036] in, Encoding for relative positions; This indicates a batch normalization operation, used to standardize the feature distribution; and These represent the centroid features and neighborhood features after batch normalization, respectively. , , These are the query matrix, key matrix, and value matrix, respectively. , , This is the corresponding weight matrix, used for linear transformation;
[0037] In the multi-head attention layer, attention weights based on geometry perception are computed to dynamically aggregate neighborhood features; attention weights based on geometry perception. The calculation formula is:
[0038] ;
[0039] in, For positional encoding items, based on relative position Obtained through nonlinear mapping; The square root of the feature dimension is used for numerical stability; therefore, the output of the multi-head attention layer... for:
[0040] ;
[0041] in, , Let be the outputs of the 1st attention head and the hth attention head, respectively. There are a total of h attention heads, where the output of the 1st attention head is... = ; It is a linear transformation matrix;
[0042] Then, by using the first residual connection, the original geometric information of the central feature is preserved; thus, we obtain...
[0043] ;
[0044] Then, nonlinear enhancement is performed using a two-layer feedforward neural network with an extended-compressed structure; specifically:
[0045] First, in the extended layer of the feedforward neural network, the feature dimension is reduced from... Expand to This increases the feature expressive power, resulting in extended features. The formula is expressed as:
[0046] ;
[0047] Then, the GELU activation function is used to introduce nonlinearity, and the feature dimension is compressed back from 2C to C through a feedforward neural network compression layer, resulting in the output of the two-layer feedforward neural network. The formula is expressed as:
[0048] ;
[0049] Finally, multi-level features are fused through quadratic residual connections, and layer normalization is applied to obtain the output features of the attention-guided coding module (AGE). The formula is expressed as:
[0050] ;
[0051] in, It is a linear transformation matrix. , For bias terms; () represents the GELU activation function. () indicates layer normalization.
[0052] Furthermore, the specific process of feature extraction by the point cloud enhancement module PCE is as follows:
[0053] First, a center point is selected, and an adaptive neighborhood of the center point is constructed using the KNN method, dividing the input point cloud into local neighborhoods containing relative coordinate differences and feature differences; where the relative coordinate difference matrix... The difference between the coordinates of neighboring points and the center point coordinates of the center point The feature difference matrix is obtained by concatenation. The feature difference between neighboring points and the center point Features of the center point obtained by piecing together;
[0054] Secondly, a dual-path convolutional network is used to extract neighborhood geometric features and feature difference information, specifically:
[0055] In the geometric feature paths of a dual-path convolutional network, the relative coordinate difference matrix is processed through convolution. The calculation formula is:
[0056] ;
[0057] Then, the feature difference matrix is processed by convolution in the feature difference path. The calculation formula is:
[0058] ;
[0059] The fused features are obtained through feature concatenation and max pooling operations:
[0060] ;
[0061] Then, a channel-space dual-path compression mechanism is used to generate global regularized features, which are then reduced in dimensionality through two independent convolutional paths.
[0062] ;
[0063] ;
[0064] in, Dimensionality reduction features for channel paths, Dimensionality reduction features for spatial paths; It is the ReLU activation function;
[0065] Channel features are obtained by average pooling along both the channel and spatial dimensions. and spatial features The formula is expressed as:
[0066] ;
[0067] ;
[0068] in, () () represent channel-dimensional average pooling and spatial-dimensional average pooling, respectively;
[0069] Globally regularized features are generated through cross operations and feature fusion. :
[0070] ;
[0071] Finally, dynamic calibration of local features and global context is achieved through residual differential connections, and the Mish activation function is used to output highly discriminative enhanced features, i.e., the output features of the PCE module. The calculation formula is as follows:
[0072] ;
[0073] Where B is the batch size, N is the number of center points, k is the number of neighborhood points of each center point, and C is the feature dimension. It is the numerical stability constant. To integrate features, the residual differential join uses a subtraction operation.
[0074] Furthermore, in S3:
[0075] The parameter optimizer is the AdamW optimizer;
[0076] The weighted loss function uses the cross-entropy loss function, and the formula is:
[0077] ;
[0078] Where n represents the number of categories; It is the one-hot encoding of the real label. It is the probability distribution of the class prediction for each point by the model.
[0079] Based on the above technical solution, the present invention has at least the following beneficial effects:
[0080] 1. This invention organically combines the attention-guided coding module (AGE) and the point cloud enhancement module (PCE), giving full play to the respective advantages of multi-head attention mechanism and local convolution, significantly improving the model's ability to extract local details and global context features, enhancing the accuracy of semantic segmentation of substation data, and solving the technical problem of insufficient accuracy of existing 3D semantic segmentation methods when facing complex point cloud data in substation scenarios.
[0081] 2. This invention innovatively designs a PCE module, which achieves high-quality feature representation of the fine structure of substation equipment through dual-path feature extraction and channel-space dual-path compression mechanism. In particular, it significantly improves the recognition ability of slender structures such as wires and insulators. At the same time, the application of the Mish activation function further enhances the feature discrimination.
[0082] 3. The AGE module of this invention employs a multi-head attention mechanism and a dual residual connection structure, which can dynamically adjust the importance of different neighborhood features. Simultaneously, it enhances the model's understanding of the point cloud spatial structure through positional encoding. Positional encoding is organically combined in attention weight calculation and feature fusion, enabling the model to better perceive the geometric relationships of substation equipment.
[0083] 4. Based on the PointMetaBase architecture, this invention effectively addresses the challenge of uneven point cloud density in substation scenarios through hierarchical downsampling and feature learning, employing an adaptive neighborhood construction approach, thereby improving the model's robustness in real-world environments. Compared to existing methods, this invention achieves higher classification accuracy and boundary detail preservation in substation equipment identification tasks. Attached Figure Description
[0084] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0085] Figure 1 This is a flowchart of the method proposed in this invention;
[0086] Figure 2 This is a schematic diagram of the point cloud enhancement module PCE designed in this invention;
[0087] Figure 3 This is a schematic diagram of the attention-guided coding module AGE designed in this invention;
[0088] Figure 4This is a schematic diagram of the feature extraction module of the present invention after combining the point cloud enhancement module and the attention-guided coding module;
[0089] Figure 5 This is a schematic diagram of the three-dimensional semantic segmentation network framework proposed in this invention;
[0090] Figure 6 This is a schematic diagram of the three-dimensional semantic segmentation result of the point cloud data in the substation dataset of this invention. Detailed Implementation
[0091] To make the objectives, technical solutions, and advantages of this invention clearer, the following description is provided in conjunction with the appendix. Figure 1-6 The present invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0092] Although the steps in this invention are arranged by reference numerals, this is not intended to limit the order of the steps. Unless the order of the steps is explicitly stated or the execution of a step requires other steps as a basis, the relative order of the steps can be adjusted. It is understood that the term "and / or" as used herein refers to and covers any and all possible combinations of one or more of the associated listed items.
[0093] To address the shortcomings of existing technologies when dealing with complex point cloud data in substation scenarios, this invention proposes a 3D semantic segmentation method for substation scenarios based on point cloud enhancement and attention guidance, such as... Figure 1 As shown, it specifically includes the following steps:
[0094] S1. Divide and label the 3D point cloud data in the substation scene into regions, set semantic labels based on equipment type, and construct a semantic segmentation point cloud dataset adapted to the substation scene.
[0095] In a preferred embodiment, step S1 specifically includes:
[0096] S11. Based on the spatial distribution characteristics and geometric attributes of point cloud data, the substation scene is divided into regions, and the overall point cloud is divided into blocks of different spatial scales, and training sets and test sets are also divided. The training set and the test set are each composed of multiple independent blocks of different numbers. Each block covers a different spatial range and contains point cloud data of all defined categories. In this embodiment, a total of 6 fixed regions are divided. Region 5 is used as the test set, which contains 16 blocks of different sizes and all categories. The other regions are used as the training set, which contains a total of 29 blocks of different sizes and all categories.
[0097] S12. For point cloud data in substation scenarios, classify the data according to the object's appearance, functional attributes and spatial distribution information, dividing the point cloud data into non-electrical equipment and electrical equipment; among which, non-electrical equipment is further subdivided into busbars, wires, overhead structures, debris, buildings, ground and walls.
[0098] S13. Based on the physical size of the equipment and the number of points it contains, the power equipment is further subdivided into small equipment, medium equipment and large equipment.
[0099] S14. Use professional 3D annotation software to annotate the point cloud data after classifying them in steps S12 and S13 with unique semantic labels, and integrate them into a unified semantic label system to build a labeled semantic segmentation point cloud dataset adapted to the substation scenario.
[0100] S15. Then, use mainstream 3D semantic segmentation algorithms to evaluate the performance of the constructed semantic segmentation point cloud dataset. By recording and analyzing the precision, recall, and IoU of each mainstream 3D semantic segmentation algorithm in distinguishing different point cloud categories, verify the applicability of the obtained dataset in 3D semantic segmentation tasks. If the obtained dataset is verified to be applicable, it can be used for subsequent model training and 3D semantic segmentation tasks. If it is verified to be not universally applicable, it is necessary to re-divide the regions, classify the categories, and label them.
[0101] S2. Construct a three-dimensional semantic segmentation model. The point cloud enhancement module performs density adaptive filtering and reflection intensity correction on the input data to suppress noise interference and enhance the geometric features of the device surface. At the same time, combined with the attention-guided coding module, the weights of different neighborhood features are dynamically allocated using local convolution and multi-attention head mechanism to achieve collaborative modeling of local details and global context.
[0102] As a preferred embodiment, the three-dimensional semantic segmentation model constructed in step S2 is specifically as follows:
[0103] A 3D semantic segmentation model is constructed using the PointMetaBase network as the backbone network for point cloud data feature learning; for example... Figure 5 As shown, the backbone network adopts an encoder-decoder structure, consisting of a multilayer perceptron (MLP) layer, four downsampling abstraction modules, and three upsampling propagation modules;
[0104] The 3D semantic segmentation model takes the semantic segmentation point cloud dataset obtained in step S1 as input and first passes it through a multilayer perceptron (MLP) layer to enrich the input point cloud data information.
[0105] The downsampling abstraction module is used to extract multi-level features; the input of the first downsampling abstraction module is the output of the MLP layer, and the input of the remaining downsampling abstraction modules is the output of the previous layer; each downsampling abstraction module includes an attention-guided coding module (AGE), a point cloud enhancement module (PCE), and an inverted bottleneck MLP module;
[0106] In this module, the Attention-Guided Encoding (AGE) module and the Point Cloud Enhancement (PCE) module are connected serially within the downsampling abstraction module as feature extraction modules. The AGE module takes center point features and neighborhood features as input, dynamically aggregating neighborhood information through a multi-head attention mechanism, focusing on capturing global contextual relationships and geometric structural features. The output features of the AGE module are then fed into the PCE module for further enhancement. The PCE module uses dual-path convolution and channel-space dual-path compression mechanisms to strengthen local detail representation and fine geometric structural features. Figure 4 As shown, the entire feature extraction module achieves collaborative modeling of local details and global context by concatenating AGE and PCE and combining local and global features. Then, the inverted bottleneck MLP module receives the enhanced features output by the PCE module and performs channel transformation of expansion-compression-expansion to further enrich the feature expression.
[0107] In this application, the input of the entire backbone network is divided into two parts: one part is the spatial information of the point cloud data, denoted by P, which contains the spatial coordinates x, y, z of the point cloud data, and its dimension is (B, N, 3), where B represents the batch size and N represents the number of points; the other part is the feature information of the point cloud, denoted by F, which contains the color information r, g, b and the reflection intensity i of the point cloud, and its dimension is (B, N, C). The spatial information P is used for location embedding, and the feature information F is fed into the backbone network to extract global and local features. After feature learning by the backbone network, a high-dimensional feature representation is obtained, which is used for subsequent semantic segmentation tasks.
[0108] The AGE module and the PCE module will be introduced below;
[0109] In this embodiment, as Figure 3 As shown, the process of the attention-guided coding module (AGE) extracting features is as follows:
[0110] First, obtain the center point feature and neighborhood feature; the center point feature comes directly from the output feature of the previous module, denoted as... Then, a neighborhood is constructed around the center point using a ball query. Neighborhood features are extracted from the global feature matrix based on the neighborhood index, denoted as... ,in For batch size, The number of feature channels, For the number of center points, The number of neighboring points for each center point;
[0111] It should be noted that the output features of the previous module, for the AGE module in the first downsampling abstraction module, are the point cloud data information enriched by the MLP layer. For the AGE modules in the remaining downsampling abstraction modules, they are the output features of the previous downsampling abstraction module. In this application, before the AGE module of the downsampling abstraction model, multiple center points are extracted from the input point cloud data information using the farthest point sampling method. The corresponding features are the center point features. The features corresponding to the neighborhood points of the center points are the neighborhood features. Global features refer to the complete feature set containing all point cloud data, which is continuously transformed and enriched in the overall network.
[0112] Next, batch normalization and linear transformation are performed on the input center point features and neighborhood features to encode the relative positions into three-dimensional coordinates, which are then input into the multi-head attention layer. The specific calculation formula is as follows:
[0113] ;
[0114] ;
[0115] ;
[0116] ;
[0117] ;
[0118] ;
[0119] in, Encoding for relative positions; This indicates a batch normalization operation, used to standardize the feature distribution; and These represent the centroid features and neighborhood features after batch normalization, respectively. , , These are the query matrix, key matrix, and value matrix, respectively. , , This is the corresponding weight matrix, used for linear transformation;
[0120] In the multi-head attention layer, attention weights based on geometry perception are computed to dynamically aggregate neighborhood features; attention weights based on geometry perception. The calculation formula is:
[0121] ;
[0122] in, For positional encoding items, based on relative position Obtained through nonlinear mapping; The square root of the feature dimension is used for numerical stability; therefore, the output of the multi-head attention layer... for:
[0123] ;
[0124] in, , Let be the outputs of the 1st attention head and the hth attention head, respectively. There are a total of h attention heads, where the output of the 1st attention head is... = ; It is a linear transformation matrix;
[0125] Then, by using the first residual connection, the original geometric information of the central feature is preserved; thus, we obtain...
[0126] ;
[0127] Then, nonlinear enhancement is performed using a two-layer feedforward neural network with an extended-compressed structure; specifically:
[0128] First, in the extended layer of the feedforward neural network, the feature dimension is reduced from... Expand to This increases the feature expressive power, resulting in extended features. The formula is expressed as:
[0129] ;
[0130] Then, the GELU activation function is used to introduce nonlinearity, and the feature dimension is compressed back from 2C to C through a feedforward neural network compression layer, resulting in the output of the two-layer feedforward neural network. The formula is expressed as:
[0131] ;
[0132] In this embodiment, the first step of dimensionality increase is to enhance expressive power. By expanding the dimension in the middle, the features have more space for nonlinear transformation and feature interaction. The second step of dimensionality reduction is to reduce computational overhead.
[0133] Finally, multi-level features are fused through quadratic residual connections, and layer normalization is applied to obtain the output features of the attention-guided coding module (AGE). The formula is expressed as:
[0134] ;
[0135] in, It is a linear transformation matrix. , For bias terms; () represents the GELU activation function. () indicates layer normalization.
[0136] For example Figure 2 As shown, the specific process of feature extraction by the point cloud enhancement module PCE is as follows:
[0137] First, a center point is selected, and an adaptive neighborhood of the center point is constructed using the KNN method, dividing the input point cloud into local neighborhoods containing relative coordinate differences and feature differences; where the relative coordinate difference matrix... The difference between the coordinates of neighboring points and the center point coordinates of the center point The feature difference matrix is obtained by concatenation. The feature difference between neighboring points and the center point Features of the center point obtained by piecing together;
[0138] It should be noted that the main purpose of the PCE module in this application is to enhance the local context information of the point cloud. It is necessary to construct new feature representations based on the spatial structure of the original point cloud. Therefore, even though the AGE module has already processed the center point and neighborhood points, they still need to be selected again in the PCE module. To reflect the difference from the AGE module, the neighborhood is constructed in the PCE module using the KNN method.
[0139] Secondly, a dual-path convolutional network is used to extract neighborhood geometric features and feature difference information, specifically:
[0140] In the geometric feature paths of a dual-path convolutional network, the relative coordinate difference matrix is processed through convolution. The calculation formula is:
[0141] ;
[0142] Then, the feature difference matrix is processed by convolution in the feature difference path. The calculation formula is:
[0143] ;
[0144] The fused features are obtained through feature concatenation and max pooling operations:
[0145] ;
[0146] Then, a channel-space dual-path compression mechanism is used to generate global regularized features, which are then reduced in dimensionality through two independent convolutional paths.
[0147] ;
[0148] ;
[0149] in, Dimensionality reduction features for channel paths, Dimensionality reduction features for spatial paths; It is the ReLU activation function;
[0150] Channel features are obtained by average pooling along both the channel and spatial dimensions. and spatial features The formula is expressed as:
[0151] ;
[0152] ;
[0153] in, () () represent channel-dimensional average pooling and spatial-dimensional average pooling, respectively;
[0154] Globally regularized features are generated through cross operations and feature fusion. :
[0155] ;
[0156] Finally, dynamic calibration of local features and global context is achieved through residual differential connections, and the Mish activation function is used to output highly discriminative enhanced features, i.e., the output features of the PCE module. The calculation formula is as follows:
[0157] ;
[0158] Where B is the batch size, N is the number of center points, k is the number of neighborhood points of each center point, and C is the feature dimension. It is the numerical stability constant. To integrate features; residual differential joins employ a subtraction operation;
[0159] In this embodiment, after four downsampling abstraction modules, rich and comprehensive multi-level features are extracted. Then, three upsampling propagation modules use feature interpolation, feature fusion, and residual refinement mechanisms to gradually restore the multi-level features extracted by the downsampling abstraction modules to the original point cloud resolution. These features are then connected to the corresponding level of the downsampling abstraction module via skip connections (i.e., as shown in the image). Figure 5As shown, the input of the upsampling propagation module 3 comes from the downsampling abstraction module 1 and the upsampling propagation module 2, the input of the upsampling propagation module 2 comes from the downsampling abstraction module 2 and the upsampling propagation module 1, and the input of the upsampling propagation module 1 comes from the downsampling abstraction module 3 and the downsampling abstraction module 4, thereby realizing the fusion of high and low resolution features;
[0160] The output of the last upsampling propagation module is then fused with the output of the MLP layer to serve as the final output feature of the model. The final output feature outputs the class probability distribution of each point through the classification head, thus completing the semantic segmentation task.
[0161] S3. A weighted loss function and parameter optimizer are used to train the model to solve the problem of uneven distribution of equipment categories in substation scenarios;
[0162] In a preferred embodiment, the parameter optimizer in step S3 is the AdamW optimizer; in this embodiment, the learner rate of the optimizer is set to 0.01, and the weight decay rate is... Iteratively update the model parameters until the loss function of the semantic segmentation model reaches its limit. Until convergence;
[0163] The weighted loss function uses the cross-entropy loss function, and the formula is:
[0164] ;
[0165] Where n represents the number of categories; It is the one-hot encoding of the real label. It is the probability distribution of the class prediction for each point by the model; through loss function and optimizer, the model can be trained to achieve the best prediction effect.
[0166] S4. Based on the trained model, perform semantic segmentation on the substation scene point cloud data and output high-precision equipment classification results; in this embodiment, the semantic segmentation results of the substation dataset are as follows using the method proposed in this invention. Figure 6 As shown; Figure 6 The paper presents a comparison between the original point cloud labels in a substation scenario and the prediction results processed by the method of this invention. The results show that the method of this invention can accurately identify various types of equipment in a substation, especially for slender structures (such as power lines) and small devices, where the identification accuracy is significantly better than existing methods, and the equipment boundaries are also clearer and more accurate.
[0167] In summary, this invention, by combining point cloud enhancement with attention guidance, fully integrates local geometric features and global contextual information, effectively solving the technical problem of insufficient accuracy of existing 3D semantic segmentation methods when facing complex point cloud data in substation scenarios, and providing strong technical support for the intelligent operation and maintenance of power facilities.
[0168] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
[0169] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A 3D semantic segmentation method for substation scenes based on point cloud augmentation and attention guidance, characterized in that, Includes the following steps: S1. Divide and label the 3D point cloud data in the substation scene into regions, set semantic labels based on equipment type, and construct a semantic segmentation point cloud dataset adapted to the substation scene. S2. A 3D semantic segmentation model is constructed using the PointMetaBase network as the backbone network for point cloud data feature learning. The backbone network adopts an encoder-decoder structure, including a multilayer perceptron (MLP) layer, four downsampling abstraction modules, and three upsampling propagation modules. The 3D semantic segmentation model takes the semantic segmentation point cloud dataset obtained in step S1 as input and first enriches the input point cloud data information through a multilayer perceptron (MLP) layer. The input of the first downsampling abstraction module is the output of the MLP layer, and the input of the remaining downsampling abstraction modules is the output of the previous layer. The downsampling abstraction modules are used to extract multi-level features. Each downsampling abstraction module includes an attention-guided coding module (AGE), a point cloud enhancement module (PCE), and an inverted bottleneck MLP module. Among them, the attention-guided coding module (AGE) and the point cloud enhancement module (PCE) are connected serially within the downsampling abstraction module as feature extraction modules: The AGE module takes center point features and neighborhood features as input, and dynamically aggregates neighborhood information through a multi-head attention mechanism, focusing on capturing global contextual relationships and geometric structure features. The specific process of feature extraction by the AGE module is as follows: First, obtain the center point feature and neighborhood feature; the center point feature comes directly from the output feature of the previous module, denoted as... Then, a neighborhood is constructed around the center point using a ball query. Neighborhood features are extracted from the global feature matrix based on the neighborhood index, denoted as... ; Secondly, batch normalization and linear transformation are performed on the input center point features and neighborhood features to encode the relative positions into three-dimensional coordinates, which are then input into a multi-head attention layer. In the multi-head attention layer, geometric perception attention weights are calculated to dynamically aggregate neighborhood features; the geometric perception attention weights... The calculation formula is: ; in, For positional encoding items, based on relative position Obtained through nonlinear mapping; The square root of the feature dimension is used for numerical stability. Then, by using the first residual connection, the original geometric information of the central feature is preserved, resulting in... ,in , , These are the query matrix, key matrix, and value matrix, respectively. Then, nonlinear enhancement is performed using a two-layer feedforward neural network with an extended-compressed structure; specifically: First, in the extended layer of the feedforward neural network, the feature dimension is reduced from... Expand to This increases the feature expressive power, resulting in extended features. The formula is expressed as: ; Then, the GELU activation function is used to introduce nonlinearity, and the feature dimension is compressed back from 2C to C through a feedforward neural network compression layer, resulting in the output of the two-layer feedforward neural network. The formula is expressed as: ; Finally, multi-level features are fused through quadratic residual connections, and layer normalization is applied to obtain the output features of the attention-guided coding module (AGE). The formula is expressed as: ; in, It is a linear transformation matrix. , For bias terms; () represents the GELU activation function. () indicates layer normalization; The output features of the AGE module are then fed into the PCE module for further enhancement. The PCE module enhances local detail representation and fine geometric structure features through dual-path convolution and channel-spatial dual-path compression mechanisms. The specific process of feature extraction by the point cloud enhancement module PCE is as follows: First, a center point is selected, and an adaptive neighborhood of the center point is constructed using the KNN method, dividing the input point cloud into local neighborhoods containing relative coordinate differences and feature differences; where the relative coordinate difference matrix... The difference between the coordinates of neighboring points and the center point coordinates of the center point The feature difference matrix is obtained by concatenation. The feature difference between neighboring points and the center point Features of the center point obtained by piecing together; Secondly, a dual-path convolutional network is used to extract neighborhood geometric features and feature difference information, specifically: In the geometric feature paths of a dual-path convolutional network, the relative coordinate difference matrix is processed through convolution. The calculation formula is: ; Then, the feature difference matrix is processed by convolution in the feature difference path. The calculation formula is: ; The fused features are obtained through feature concatenation and max pooling operations: ; Then, a channel-space dual-path compression mechanism is used to generate global regularized features, which are then reduced in dimensionality through two independent convolutional paths. ; ; in, Dimensionality reduction features for channel paths, Dimensionality reduction features for spatial paths; It is the ReLU activation function; Channel features are obtained by average pooling along both the channel and spatial dimensions. and spatial features The formula is expressed as: ; ; in, () () represent channel-dimensional average pooling and spatial-dimensional average pooling, respectively; Globally regularized features are generated through cross operations and feature fusion. : ; Finally, dynamic calibration of local features and global context is achieved through residual differential connections, and the Mish activation function is used to output highly discriminative enhanced features, i.e., the output features of the PCE module. The calculation formula is as follows: ; Where B is the batch size, N is the number of center points, k is the number of neighborhood points of each center point, and C is the feature dimension. It is the numerical stability constant. To integrate features; residual differential joins employ a subtraction operation; S3. A weighted loss function and parameter optimizer are used to train the model to solve the problem of uneven distribution of equipment categories in substation scenarios; S4. Based on the trained model, perform semantic segmentation on the point cloud data of the substation scene and output high-precision equipment classification results.
2. The method for 3D semantic segmentation of substation scenes based on point cloud enhancement and attention guidance according to claim 1, characterized in that, Step S1 specifically includes: S11. Based on the spatial distribution characteristics and geometric attributes of point cloud data, the substation scene is divided into regions, the overall point cloud is divided into blocks of different spatial scales, and training set and test set are divided. The training set and test set are composed of multiple independent blocks of different numbers, each block covers a different spatial range and contains point cloud data of all defined categories. S12. For point cloud data in substation scenarios, classify the data according to the object's appearance, functional attributes and spatial distribution information, dividing the point cloud data into non-electrical equipment and electrical equipment; among which, non-electrical equipment is further subdivided into busbars, wires, overhead structures, debris, buildings, ground and walls. S13. Based on the physical size of the equipment and the number of points it contains, the power equipment is further subdivided into small equipment, medium equipment and large equipment. S14. Use professional 3D annotation software to annotate the point cloud data after classifying them in steps S12 and S13 with unique semantic labels, and integrate them into a unified semantic label system to build a labeled semantic segmentation point cloud dataset adapted to the substation scenario. S15. Then, use mainstream 3D semantic segmentation algorithms to evaluate the performance of the constructed semantic segmentation point cloud dataset. By recording and analyzing the precision, recall, and IoU of each mainstream 3D semantic segmentation algorithm in distinguishing different point cloud categories, verify the applicability of the obtained dataset in 3D semantic segmentation tasks. If the obtained dataset is verified to be applicable, it can be used for subsequent model training and 3D semantic segmentation tasks. If it is verified to be not universally applicable, it is necessary to re-divide the regions, classify the categories, and label them.
3. The method for 3D semantic segmentation of substation scenes based on point cloud enhancement and attention guidance according to claim 1, characterized in that, In the 3D semantic segmentation model constructed in step S2: The inverted bottleneck MLP module receives the enhanced features output by the PCE module and further enriches the feature representation through an expanded-compressed-expanded channel transformation. The three upsampling propagation modules gradually restore the multi-level features extracted by the downsampling abstraction module to the original point cloud resolution through feature interpolation, feature fusion and residual refinement mechanisms, and connect with the corresponding downsampling abstraction modules through skip connection to achieve the fusion of high and low resolution features; The output of the last upsampling propagation module is then fused with the output of the MLP layer to serve as the final output feature of the model. The final output features are output through the classification head, which outputs the class probability distribution of each point, thus completing the semantic segmentation task.
4. The method for 3D semantic segmentation of substation scenes based on point cloud enhancement and attention guidance according to claim 3, characterized in that, The input to the backbone network consists of two parts: one part is the spatial information of the point cloud data, denoted by P, which includes the spatial coordinates x, y, z of the point cloud data; the other part is the feature information of the point cloud, denoted by F, which includes the color information r, g, b and the reflection intensity i of the point cloud. The spatial information P is used for location embedding, and the feature information F is fed into the backbone network to extract global and local features. After feature learning by the backbone network, a high-dimensional feature representation is obtained, which is used for subsequent semantic segmentation tasks.
5. The method for 3D semantic segmentation of substation scenes based on point cloud enhancement and attention guidance according to claim 1, characterized in that, The specific calculation process for performing batch normalization and linear transformation on the input center point features and neighborhood features in step S2, encoding the relative position into three-dimensional coordinates, and inputting them into the multi-head attention layer to obtain the output of the multi-head attention layer is as follows: ; ; ; ; ; ; in, Encoding for relative positions; This indicates a batch normalization operation, used to standardize the feature distribution; and These represent the centroid features and neighborhood features after batch normalization, respectively. , , These are the query matrix, key matrix, and value matrix, respectively. , , This is the corresponding weight matrix, used for linear transformation; In the multi-head attention layer, attention weights based on geometry perception are computed to dynamically aggregate neighborhood features; attention weights based on geometry perception. The calculation formula is: ; in, For positional encoding items, based on relative position Obtained through nonlinear mapping; The square root of the feature dimension is used for numerical stability; therefore, the output of the multi-head attention layer... for: ; in, , Let be the outputs of the 1st attention head and the hth attention head, respectively. There are a total of h attention heads, where the output of the 1st attention head is... = ; Let be a linear transformation matrix.
6. The method for 3D semantic segmentation of substation scenes based on point cloud enhancement and attention guidance according to claim 1, characterized in that, In step S3: The parameter optimizer is the AdamW optimizer; The weighted loss function uses the cross-entropy loss function, and the formula is: ; Where n represents the number of categories; It is the one-hot encoding of the real label. It is the probability distribution of the class prediction for each point by the model.