A railway scene point cloud segmentation method and system based on mutual attention
By constructing a mutual-attention-based point cloud segmentation method for railway scenes and utilizing bidirectional recursive attention and multi-view feature fusion modules, the problem of insufficient accuracy in sparse point cloud segmentation is solved, and efficient point cloud segmentation and target recognition in railway scenes are achieved.
Patent Information
- Application Number
- CN202411567120.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-11-05
AI Technical Summary
Existing 3D point cloud segmentation methods have difficulty effectively processing sparse point clouds in railway scenarios, especially under long-distance conditions, resulting in insufficient segmentation accuracy. Traditional methods are also difficult to adapt to the particularity of railway scenarios, resulting in poor results in identifying and segmenting key targets in complex environments.
A railway scene point cloud segmentation method based on mutual attention is adopted. By constructing a point cloud preprocessing module, a feature extraction module and a feature reconstruction module, a bidirectional recursive attention module, a sparse spatial feature extraction module and a multi-view feature fusion module are used, combined with a multi-head cross attention mechanism and residual connection to perform point cloud feature extraction and segmentation.
It improves the accuracy and robustness of railway scene point cloud segmentation, enhances the model's ability to understand complex scenes, improves the segmentation efficiency and accuracy under sparse point cloud conditions, and adapts to the special needs of railway scenes.
Smart Images

Figure CN119444771B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of three-dimensional point cloud processing, and in particular to a railway scene point cloud segmentation method and system based on mutual attention. Background Art
[0002] A large number of LiDAR-based 3D point cloud segmentation (PCS) research results have been achieved, but these methods are mainly focused on urban road scenarios, and their application in railway environments still faces some unique challenges. Compared with road environments, the typical targets and spatial layouts in railway scenarios are unique, and existing 3D PCS methods are often difficult to directly transplant or the results are unsatisfactory. Although these methods can effectively capture dense point cloud features at close range, thereby accurately identifying and segmenting objects in urban environments, in railway scenarios, especially at long distances exceeding 100 meters, the density of the point cloud is significantly reduced, resulting in the perception range of these methods being insufficient to cover a large enough space, making it difficult to capture sufficient contextual information, affecting the accuracy of segmentation.
[0003] Furthermore, point cloud data becomes increasingly sparse with increasing distance, making it difficult for traditional methods, which are often designed to process dense point clouds, to establish dependencies between point cloud features in such sparse environments. In distant railroad scenes, the lack of distinct appearance makes it difficult for conventional 3DPCS methods to effectively distinguish the railroad from other surrounding elements, further limiting their effectiveness.
[0004] First, some methods use columnar segmentation to address the variable density of point clouds. While this approach improves the feature representation of both near- and far-distance point clouds to some extent, it primarily optimizes the uneven density distribution of local point clouds in the vertical and horizontal directions. However, in scenarios with linear structures such as railroad tracks, this segmentation approach still struggles to cope with the extreme sparsity inherent in long-distance features. Another approach partitions the point cloud space into radial windows based on spherical coordinates and incorporates an attention mechanism to better capture global context. While this approach theoretically improves understanding of long-distance point clouds, in real-world railway scenarios, attention mechanisms can still struggle to extract effective features from low-information-density point clouds when faced with highly sparse data. Because long-distance point clouds lack distinct features, even traditional attention mechanisms struggle to establish effective information associations between these sparse points, thus compromising segmentation performance. This makes effective feature extraction and utilization of point cloud features a significant challenge in railway scenarios, especially at long distances. Therefore, it is necessary to design a network model that can effectively extract features from long-distance, sparse point clouds.
[0005] Secondly, railway scenes differ significantly from urban road scenes, primarily in terms of environmental structure, target type, and point cloud density. These differences result in poor performance of traditional urban road point cloud segmentation methods in railway environments. Therefore, to address these challenges, it is imperative to design a network model with high generalization capabilities that can adapt to the particularities of railway scenes. This model must not only handle the sparsity of point clouds at long distances, but also operate stably in various complex environments to ensure accurate identification and segmentation of key targets in railway scenes. This requires the model to have stronger contextual understanding capabilities and robustness under different environmental conditions to meet the unique needs of railway scenes.
[0006] To this end, we designed a 3D point cloud segmentation network, which relies on point cloud information as input. We also employed improved methods to enhance the robustness and accuracy of segmentation results for long-range sparse point cloud data in railway scenarios. Experiments demonstrate the model's adaptability and performance, providing an effective point cloud segmentation solution for safe and efficient autonomous train operation. Summary of the Invention
[0007] The purpose of this section is to summarize some aspects of embodiments of the present invention and to briefly introduce some preferred embodiments.
[0008] In view of the above existing problems, the present invention is proposed.
[0009] Therefore, the present invention provides a railway scene point cloud segmentation method and system based on mutual attention, which can solve the problems mentioned in the background technology.
[0010] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0011] In a first aspect, the present invention provides a railway scene point cloud segmentation method based on mutual attention, which includes using a laser radar to collect point cloud data of different railway track scenes;
[0012] Build a railway scene point cloud segmentation network model based on mutual attention and point cloud serialization, and perform point cloud feature extraction;
[0013] Performing model training on the railway scene point cloud segmentation network model according to the point cloud data to obtain a trained model weight;
[0014] The trained model weights are applied, and a model test is performed based on the point cloud data to generate a segmentation result of the railway scene point cloud.
[0015] As a preferred solution of the railway scene point cloud segmentation method based on mutual attention of the present invention, wherein: the point cloud data of different railway track scenes collected includes:
[0016] Use lidar to collect data for different track scenarios;
[0017] Perform format conversion, filtering and data annotation processing on the collected point cloud data;
[0018] The point cloud data after data annotation is used as the training and testing data set for the point cloud segmentation network.
[0019] As a preferred solution of the railway scene point cloud segmentation method based on mutual attention of the present invention, wherein: the railway scene point cloud segmentation network model includes a point cloud preprocessing module, a point cloud feature extraction module and a point cloud feature reconstruction module;
[0020] The point cloud preprocessing module includes:
[0021] Voxelize the input point cloud to reduce the number of points and select an appropriate voxel size;
[0022] Serialize the voxelized point cloud to maintain the spatial proximity of the point cloud voxels;
[0023] The point cloud feature extraction module includes a bidirectional recursive attention module, a sparse spatial feature extraction module and a multi-view feature fusion module;
[0024] The point cloud feature extraction module includes:
[0025] Use the bidirectional recursive attention module and the sparse spatial feature extraction module to extract features from a single actual input point cloud;
[0026] The extracted point cloud features are input into the multi-view feature fusion module and feature fusion is performed. After downsampling, the layer-by-layer feature point cloud is obtained, as follows:
[0027]
[0028]
[0029]
[0030]
[0031]
[0032] Through residual connection, different feature point clouds are upsampled and feature adjusted respectively, and the ;
[0033] The output point cloud features are obtained through the fully connected layer .
[0034] As a preferred solution of the railway scene point cloud segmentation method based on mutual attention of the present invention, the global feature extraction of the bidirectional recursive attention module includes:
[0035] Take serialized point cloud data as input;
[0036] Use bidirectional gated recurrent units to process serialized point cloud data and capture spatial sequence dependencies in the sequence;
[0037] Apply a multi-head cross-attention mechanism to capture features of different subspaces by processing multiple attention heads in parallel;
[0038] After the multi-head cross attention, normalization is performed and features are extracted through a multi-layer perceptron;
[0039] Perform multi-head cross attention, normalization and multi-layer perceptron operations again;
[0040] Add the features after multiple processing;
[0041] After the addition operation, a multi-head cross attention, normalization and multi-layer perceptron operation are performed to obtain the processed output features.
[0042] As a preferred solution of the railway scene point cloud segmentation method based on mutual attention of the present invention, the multi-feature fusion process of the multi-view feature fusion module includes:
[0043] Receive output features from the bidirectional recursive attention module and the sparse spatial feature extraction module;
[0044] A multi-head cross-attention mechanism is applied to the two input features respectively, capturing features of different subspaces by processing multiple attention heads in parallel;
[0045] Normalize the features processed by multi-head cross attention and then extract features again through multi-layer perceptron;
[0046] The normalized and multi-layer perceptron processed features are fed into another multi-layer perceptron for further processing and then added to the original features.
[0047] Pass features to the next module or layer through residual connections;
[0048] After the above processing, the final result is obtained by integrating the output features of the bidirectional recursive attention module and the sparse spatial feature extraction module.
[0049] As a preferred solution of the railway scene point cloud segmentation method based on mutual attention of the present invention, the training of the railway scene point cloud segmentation network model includes:
[0050] Using bidirectional gated recurrent units to enhance the model's understanding of sparse variations in point clouds;
[0051] Improve feature expression capabilities and capture subspace features through multi-head cross-attention mechanism;
[0052] Apply layer normalization operations for training and accelerating convergence;
[0053] Use multi-layer perceptron to perform addition operation with features.
[0054] As a preferred solution of the railway scene point cloud segmentation method based on mutual attention of the present invention, wherein: the segmentation result of the railway scene point cloud generated includes:
[0055] Use the trained model weights to perform point cloud data segmentation testing on railway scenes;
[0056] Output and verify the accuracy of segmentation results and model performance;
[0057] The accuracy of the segmentation results and the model performance are verified as follows:
[0058] The point cloud containing multi-scale segmentation features output by the railway scene point cloud segmentation network model is input into a fully connected layer to obtain the probability value of each point in the railway scene point cloud for each classification;
[0059] If the classification corresponding to the highest probability of a point is consistent with the actual classification, the prediction is considered correct;
[0060] The segmentation accuracy of the entire point cloud is calculated by the ratio of the number of correctly predicted points to the total number of points, and the segmentation intersection-union ratio is calculated by comparing the ratio of the number of correctly predicted points to the actual number of points in the point cloud and the union of the prediction results.
[0061] In a second aspect, the present invention provides a railway scene point cloud segmentation system based on mutual attention, which includes: a data acquisition module, a model construction module, a model training module and a model verification module;
[0062] The data acquisition module is used to collect point cloud data of different railway track scenes using laser radar;
[0063] The model building module is used to build a railway scene point cloud segmentation network model based on mutual attention and point cloud serialization, and perform point cloud feature extraction;
[0064] The model training module is used to perform model training on the railway scene point cloud segmentation network model according to the point cloud data to obtain a trained model weight;
[0065] The model verification module is used to apply the trained model weights and perform model testing based on the point cloud data to generate a segmentation result of the railway scene point cloud.
[0066] In a third aspect, the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the processor executes the computer program, it implements the steps of a railway scene point cloud segmentation method based on mutual attention.
[0067] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, the steps of a railway scene point cloud segmentation method based on mutual attention are implemented.
[0068] Compared with the existing technology, the beneficial effect of the present invention is that it improves the dataset of railway scenes based on the research of existing mainstream point cloud datasets; on the one hand, for the situation where it is difficult to use cameras synchronously in railway scenes, it is hoped that the detection of railways and obstacles ahead can be completely relied upon by lidar, and single-path orientation features are selected as the final retained point cloud features; this method is more in line with the actual needs of railway scenes; on the other hand, since high-frequency radar scanning can easily lead to ghosting when the train is traveling at high speed, in order to adapt to this situation, sparse point clouds generated at low scanning frequencies are selected as the input of the model, thereby reducing the interference of ghosting and improving the accuracy of detection; on this basis, a point cloud segmentation network for railway scenes based on mutual attention and point cloud serialization is constructed; in the point cloud segmentation network, by combining the application of local feature extraction and global feature extraction as an overall fusion mechanism, the structural information of long-distance sparse point clouds is retained as much as possible, and the features of the input point cloud are effectively learned, reducing the impact of a large amount of interference in an unrestricted environment on the accuracy of point cloud segmentation of sparse track scenes. Generating serialized point clouds through voxelization and serialization processing helps to maintain spatial context information during deep learning; the bidirectional recursive attention module can effectively capture the contextual dependencies in spatial sequence data and strengthen the representation of important features by utilizing bidirectional gated recursive units and cross-attention mechanisms; the sparse spatial feature extraction module can effectively extract key spatial structure information by efficiently encoding spatial features of point clouds, thereby enhancing the model's ability to understand complex scenes; the multi-view feature fusion module can deeply integrate features from different perspectives and modalities, so that the railway scene point cloud segmentation network model can learn richer and more robust scene representations; the network structure is based on a symmetric framework, and through five downsampling and upsampling processes, it extracts and fuses multi-scale spatial features, thereby enhancing the model's ability to process global context information and improving the model's feature extraction capability and segmentation efficiency; in summary, the railway scene point cloud segmentation network model proposed in the present invention improves the segmentation accuracy of railway scene point clouds in real environments, and effectively improves the current status of railway scene point cloud segmentation in real environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0070] Figure 1 A flowchart of a method and system for railway scene point cloud segmentation based on mutual attention provided by one embodiment of the present invention;
[0071] Figure 2An internal structure diagram of a computer device for a railway scene point cloud segmentation method and system based on mutual attention provided by one embodiment of the present invention;
[0072] Figure 3 A schematic diagram of a global feature extraction method and system for railway scene point cloud segmentation based on mutual attention provided by one embodiment of the present invention;
[0073] Figure 4 A multi-feature fusion flowchart of a railway scene point cloud segmentation method and system based on mutual attention is provided in one embodiment of the present invention. DETAILED DESCRIPTION
[0074] To make the above-mentioned objects, features, and advantages of the present invention more easily understood, the following detailed description of the specific embodiments of the present invention is given in conjunction with the accompanying drawings. It is obvious that the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in this field without creative work should fall within the scope of protection of the present invention.
[0075] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0076] Secondly, the term "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in various places throughout this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive of other embodiments.
[0077] Example 1
[0078] Reference Figure 1-Figure 4 , which is the first embodiment of the present invention, provides a railway scene point cloud segmentation method based on mutual attention, including:
[0079] Before introducing the embodiments of the present application in detail, some related concepts are first explained for the sake of clarity.
[0080] Voxelization: Voxelization is the process of converting 3D point cloud data into a voxel grid. Each voxel is a 3D cube representing a small area in the point cloud. Voxelization simplifies dense point cloud data into a more manageable format while preserving important spatial information. Voxelization can reduce the number of point clouds, reduce computational complexity, and improve processing efficiency.
[0081] Bidirectional Recurrent Attention Module: The Bidirectional Recurrent Attention Module is a network module that combines a bidirectional gated recurrent unit (BiGRU) and a multi-head crisscross attention mechanism. It processes point cloud sequence data in both forward and reverse directions to capture spatial sequence dependencies in the point cloud. The multi-head crisscross attention mechanism captures features from different subspaces by processing multiple attention heads in parallel, enhancing the expressiveness of features and the focus of the model.
[0082] Multi-head Cross Attention Mechanism: The multi-head cross attention mechanism is a variant of the attention mechanism. It captures features of different subspaces by processing multiple attention heads in parallel. Each attention head can focus on different aspects of the point cloud data, thereby improving the expressiveness of the features. The multi-head cross attention mechanism can process multiple features simultaneously and perform cross-attention, allowing different input features to be fused with each other and considering the correlation between the two.
[0083] Layer Normalization: Layer normalization is a regularization technique used to improve the training speed and stability of deep learning models. By normalizing the activation values of each layer in the network, it can reduce internal covariate shift, making the training process smoother and accelerating the convergence of the model. Layer normalization helps stabilize the training process and improve the generalization ability of the model.
[0084] Residual Connection: Residual connection is a technique used in deep neural networks. By adding the output of the previous layer directly to the output of the subsequent layer, a "shortcut" is formed. This connection method can ensure the direct transmission of information and avoid the gradient vanishing problem. Especially in deep networks, residual connection helps to maintain the integrity of the information flow and improve the training effect and performance of the model.
[0085] This application provides an effective solution to the above-mentioned problems. Next, we will combine multiple embodiments to elaborate on how to implement the railway scene point cloud segmentation method based on mutual attention;
[0086] Figure 1 A method flow chart of a railway scene point cloud segmentation method and system based on mutual attention is shown, including:
[0087] S1: Use LiDAR to collect point cloud data of different railway track scenes;
[0088] Furthermore, point cloud data of different railway track scenes are collected, including:
[0089] Use lidar to collect data for different track scenarios;
[0090] Perform format conversion, filtering and data annotation processing on the collected point cloud data;
[0091] The point cloud data after data annotation is used as the training and testing data set for the point cloud segmentation network.
[0092] S2: Build a railway scene point cloud segmentation network model based on mutual attention and point cloud serialization, and perform point cloud feature extraction;
[0093] Furthermore, the railway scene point cloud segmentation network model includes a point cloud preprocessing module, a point cloud feature extraction module and a point cloud feature reconstruction module.
[0094] Furthermore, the point cloud preprocessing module includes,
[0095] Voxelize the input point cloud to reduce the number of points and select an appropriate voxel size;
[0096] The voxelized point cloud is serialized to maintain the spatial proximity of the point cloud voxels.
[0097] Specifically, point cloud feature extraction includes:
[0098] The initial point cloud is used as the input of the point cloud network. The size of the input point cloud data is about 24000×4. After voxelization and serialization, a single actual input point cloud is finally obtained. .
[0099] Use the bidirectional recursive attention module and the sparse spatial feature extraction module to extract features from a single actual input point cloud;
[0100] The extracted point cloud features are input into the multi-view feature fusion module and feature fusion is performed. After downsampling, the layer-by-layer feature point cloud is obtained, as follows:
[0101]
[0102]
[0103]
[0104]
[0105]
[0106] Through residual connection, different feature point clouds are upsampled and feature adjusted respectively, and the ;
[0107] The output point cloud features are obtained through the fully connected layer .
[0108] S3: Use the collected point cloud data as input to train the railway scene point cloud segmentation network model and obtain the trained model weights;
[0109] Furthermore, the point cloud feature extraction module includes a bidirectional recursive attention module, a sparse spatial feature extraction module, and a multi-view feature fusion module;
[0110] Specifically, the global feature extraction of the bidirectional recursive attention module includes,
[0111] Take serialized point cloud data as input;
[0112] Use bidirectional gated recurrent units to process serialized point cloud data and capture spatial sequence dependencies in the sequence;
[0113] Applying a multi-head cross-attention mechanism, by processing multiple attention heads in parallel to capture features from different subspaces, it improves feature expression and model focus.
[0114] After the multi-head cross attention, normalization is performed, and the multi-layer perceptron (MLP) is used to increase the nonlinear processing capability of the network and extract more complex features;
[0115] Multi-head cross attention, normalization, and multi-layer perceptron operations are performed again to further enhance the expressiveness of features;
[0116] Add the features after multiple processing and combine the information of each feature stream to make the final output of the model more comprehensive;
[0117] After the addition operation, a multi-head cross attention, normalization and multi-layer perceptron operation are performed to ensure the comprehensiveness and accuracy of the features;
[0118] Finally, the output features are obtained after being processed by the bidirectional recursive attention module.
[0119] Specifically, the multi-feature fusion process of the multi-view feature fusion module includes:
[0120] Receive output features from the bidirectional recursive attention module and the sparse spatial feature extraction module;
[0121] A multi-head cross-attention mechanism is applied to the two input features respectively. By processing multiple attention heads in parallel, features of different subspaces are captured to achieve interaction and fusion between features.
[0122] Normalize the features processed by multi-head cross attention, and then use a multi-layer perceptron to increase the nonlinear processing capability of the network and extract more complex features;
[0123] The normalized and multi-layer perceptron processed features are fed into another multi-layer perceptron for further processing, and then added to the original features to combine the information of each feature stream;
[0124] The features are passed to the next module or layer through residual connections to ensure the preservation and transmission of information flow and avoid the gradient disappearance problem;
[0125] After the above processing, the final result is obtained by integrating the output features of the bidirectional recursive attention module and the sparse spatial feature extraction module, which provides input for subsequent network layers.
[0126] Furthermore, the training of the railway scene point cloud segmentation network model includes:
[0127] Using bidirectional gated recurrent units to enhance the model's understanding of sparse variations in point clouds;
[0128] Improve feature expression capabilities and capture subspace features through multi-head cross-attention mechanism;
[0129] Application layer normalization stabilizes training and accelerates convergence;
[0130] Use multi-layer perceptrons to increase the nonlinear processing capabilities of the network;
[0131] Perform multi-layer perceptron and feature addition operations to ensure comprehensive representation of features.
[0132] S4: Apply the trained model weights and test the point cloud data of the railway scene to generate the segmentation results of the railway scene point cloud.
[0133] Furthermore, the segmentation results of the railway scene point cloud are generated, including:
[0134] Use the trained model weights to perform point cloud data segmentation testing on railway scenes;
[0135] Output and verify the accuracy of segmentation results and model performance;
[0136] The residual connection is combined to ensure the integrity of information flow and the stability of segmentation results.
[0137] Furthermore, the accuracy of the segmentation results and the performance of the model are verified by,
[0138] The point cloud containing multi-scale segmentation features output by the railway scene point cloud segmentation network model is input into a fully connected layer, and finally the probability value of each point in the railway scene point cloud belonging to each classification is obtained;
[0139] If the classification corresponding to the highest probability of a point is consistent with its actual classification, the prediction is considered correct;
[0140] The segmentation accuracy of the entire point cloud is calculated, that is, the ratio of correctly predicted points to the total number of points. At the same time, the segmentation intersection-over-union ratio is calculated, which is determined by comparing the ratio of the correctly predicted points to the actual number of points in the point cloud and the union of the predicted results.
[0141] Furthermore, this embodiment also provides a railway scene point cloud segmentation system based on mutual attention, including: a data acquisition module, a model construction module, a model training module and a model verification module;
[0142] The data acquisition module is used to collect point cloud data of different railway track scenes using lidar;
[0143] The model building module is used to build a railway scene point cloud segmentation network model based on mutual attention and point cloud serialization, and perform point cloud feature extraction;
[0144] The model training module is used to perform model training on the railway scene point cloud segmentation network model according to the point cloud data to obtain the trained model weight;
[0145] The model verification module is used to apply the trained model weights and perform model testing based on the point cloud data to generate a segmentation result of the railway scene point cloud.
[0146] This embodiment also provides a computer device, which may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 2As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner. The wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a comprehensive evaluation method suitable for orderly access of large-scale distributed power sources is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the computer device housing, or an external keyboard, touchpad or mouse.
[0147] This embodiment further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps: collecting point cloud data of different railway track scenes using a laser radar;
[0148] Build a railway scene point cloud segmentation network model based on mutual attention and point cloud serialization, and perform point cloud feature extraction;
[0149] Performing model training on the railway scene point cloud segmentation network model according to the point cloud data to obtain a trained model weight;
[0150] The trained model weights are applied, and a model test is performed based on the point cloud data to generate a segmentation result of the railway scene point cloud.
[0151] Example 2
[0152] Reference Figure 1 This is the second embodiment of the present invention, which provides a railway scene point cloud segmentation method based on mutual attention. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.
[0153] This example demonstrates the effectiveness of a point cloud segmentation method for railway scenes based on mutual attention and point cloud serialization. The experiment selected three typical track scenarios (single track, double track, and elevated track) for data collection within a railway section to ensure data richness under diverse environments and conditions. Data collection was performed using LiDAR equipment, with each scenario measured continuously for three days. The LiDAR scan frequency was set at 10Hz, collecting approximately 24,000 point cloud data points per scan. The collected point cloud data was then format converted, filtered, and annotated to ensure data quality and accuracy.
[0154] The processed point cloud data is used as a training set and a test set, respectively. The constructed railway scene point cloud segmentation network model includes a point cloud preprocessing module, a feature extraction module, and a feature reconstruction module. The point cloud preprocessing module uses voxelization to reduce the data volume to 40% of the original data to ensure the efficiency of the network input; the voxel size is selected to be 0.1m to balance accuracy and computational efficiency. The feature extraction module uses a bidirectional recursive attention mechanism to extract features, capture the spatial relationship between point clouds, and ultimately generate a vector representation with a feature dimension of 128. Next, the multi-view feature fusion module combines feature information from different angles to achieve a more comprehensive feature representation.
[0155] To evaluate model performance, segmentation accuracy and intersection-over-union (IoU) were selected as evaluation metrics. During model training, the Adam optimizer was used, with a learning rate of 0.001 and 50 training iterations. During testing, the trained model was used to segment newly collected point cloud data and compared with the actual annotation results to ensure objectivity and accuracy.
[0156] Table 1: Railway scene point cloud data collection and processing
[0157] Scenario Type Data collection time (hours) Scanning frequency (Hz) Number of original point clouds Number of point clouds after processing Feature Dimension Segmentation accuracy (%) Monorail 24 10 1,200,000 480,000 128 92.5 Dual Track 24 10 1,200,000 480,000 128 90.3 elevated track 24 10 1,200,000 480,000 128 93.1
[0158] Table 2: Performance comparison of railway scene point cloud segmentation models
[0159] Model Version Training set size Test set size Segmentation accuracy (%) Intersection ratio (%) Training time (hours) Test time (seconds) Basic Model 1,500 500 85.0 75.0 10 5 Model of the present invention 1,500 500 92.5 80.5 12 4
[0160] As shown in Table 1, for the three different railway scenarios, after LiDAR point cloud data collection and processing, the final segmentation accuracy achieved was above 90%, with the accuracy for the elevated track scenario reaching 93.1%. These data demonstrate that the method proposed in this paper improves data quality and model learning effectiveness through the use of advanced voxelization and serialization during data processing and feature extraction, thereby enhancing segmentation accuracy.
[0161] In the comparison in Table 2, the performance difference between the basic model and the model of the present invention is obvious. The segmentation accuracy of the basic model is only 85.0%, and the intersection-over-union ratio is 75.0%. The segmentation accuracy of the model of the present invention is improved to 92.5%, and the intersection-over-union ratio is improved to 80.5%. The training time is slightly increased but the test time is significantly shortened, indicating that the efficiency and performance of the model of the present invention in the training phase have reached an optimized balance. This improvement not only reflects the enhancement of the model's feature extraction capabilities, but more importantly, through the bidirectional recursive attention mechanism and multi-view feature fusion, it ensures the effective interaction and integration between features in different subspaces, thereby enhancing the generalization ability of the model.
[0162] The present invention proposes a new point cloud segmentation neural network, which uses a long-distance sparse point cloud that is more suitable for railway scenes as input to extract features from the input point cloud and obtain feature dependencies between long-distance sparse point clouds. It also performs a multi-view feature fusion based on multi-head cross-attention and performs attention-weighted complementary enhancement to achieve effective integration of local and global features. While improving the overall feature extraction capability of the network model, it introduces the special structural information of the railway scene as fully as possible, thereby improving the feature extraction capability and segmentation efficiency of the model.
[0163] In summary, the data and analysis results in this embodiment fully verify the effectiveness and innovation of the railway scene point cloud segmentation method based on mutual attention and point cloud serialization. Compared with the existing technology, it has higher segmentation accuracy and better processing performance, demonstrating the significant advantages of the present invention in practical applications.
[0164] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
[0165] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a fully hardware embodiment, a fully software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present application may be implemented in various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.
[0166] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0167] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0168] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0169] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.
[0170] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.
Claims
1. A railway scene point cloud segmentation method based on mutual attention, characterized by: include, Use LiDAR to collect point cloud data of different railway track scenes. include, Use lidar to collect data for different track scenarios; Perform format conversion, filtering and data annotation processing on the collected point cloud data; The point cloud data after data annotation is used as the training and testing data set of the point cloud segmentation network; A railway scene point cloud segmentation network model based on mutual attention and point cloud serialization is constructed, and point cloud feature extraction is performed; wherein the railway scene point cloud segmentation network model includes a point cloud preprocessing module, a point cloud feature extraction module, and a point cloud feature reconstruction module; the point cloud feature extraction module includes a bidirectional recursive attention module, a sparse spatial feature extraction module, and a multi-view feature fusion module; The point cloud feature extraction module includes using a bidirectional recursive attention module and a sparse spatial feature extraction module to extract features from a single actual input point cloud; The global feature extraction of the bidirectional recursive attention module includes, Take serialized point cloud data as input; Use bidirectional gated recurrent units to process serialized point cloud data and capture spatial sequence dependencies in the sequence; Apply a multi-head cross-attention mechanism to capture features of different subspaces by processing multiple attention heads in parallel; After the multi-head cross attention, normalization is performed and features are extracted through a multi-layer perceptron; Perform multi-head cross attention, normalization and multi-layer perceptron operations again; Add the features after multiple processing; After the addition operation, a multi-head cross attention, normalization and multi-layer perceptron operation are performed to obtain the processed output features; The multi-feature fusion process of the multi-view feature fusion module includes: Receive output features from the bidirectional recursive attention module and the sparse spatial feature extraction module; A multi-head cross-attention mechanism is applied to the two input features respectively, capturing features of different subspaces by processing multiple attention heads in parallel; Normalize the features processed by multi-head cross attention and then extract features again through multi-layer perceptron; The normalized and multi-layer perceptron processed features are fed into another multi-layer perceptron for further processing and then added to the original features. Pass features to the next module or layer through residual connections; After the above processing, the final result is obtained by integrating the output features of the bidirectional recursive attention module and the sparse spatial feature extraction module; Performing model training on the railway scene point cloud segmentation network model according to the point cloud data to obtain a trained model weight; The trained model weights are applied, and a model test is performed based on the point cloud data to generate a segmentation result of the railway scene point cloud.
2. The railway scene point cloud segmentation method based on mutual attention according to claim 1, characterized in that: The point cloud preprocessing module includes: Voxelize the input point cloud to reduce the number of points and select an appropriate voxel size; Serialize the voxelized point cloud to maintain the spatial proximity of the point cloud voxels; Among them, feature extraction is performed on a single actual input point cloud, specifically, The extracted point cloud features are input into the multi-view feature fusion module and feature fusion is performed. After downsampling, the layer-by-layer feature point cloud is obtained, as follows: ; ; ; ; ; Through residual connection, different feature point clouds are upsampled and feature adjusted respectively, and the ; The output point cloud features are obtained through the fully connected layer .
3. The railway scene point cloud segmentation method based on mutual attention according to claim 1, characterized in that: Training the railway scene point cloud segmentation network model includes: Using bidirectional gated recurrent units to enhance the model's understanding of sparse variations in point clouds; Improve feature expression capabilities and capture subspace features through multi-head cross-attention mechanism; Apply layer normalization operations for training and accelerating convergence; Use multi-layer perceptron to perform addition operation with features.
4. The railway scene point cloud segmentation method based on mutual attention according to claim 1, characterized in that: The segmentation results of generating railway scene point cloud include: Use the trained model weights to perform point cloud data segmentation testing on railway scenes; Output and verify the accuracy of segmentation results and model performance; The accuracy of the segmentation results and the model performance are verified as follows: The point cloud containing multi-scale segmentation features output by the railway scene point cloud segmentation network model is input into a fully connected layer to obtain the probability value of each point in the railway scene point cloud for each classification; If the classification corresponding to the highest probability of a point is consistent with the actual classification, the prediction is considered correct; The segmentation accuracy of the entire point cloud is calculated by the ratio of the number of correctly predicted points to the total number of points, and the segmentation intersection-union ratio is calculated by comparing the ratio of the number of correctly predicted points to the actual number of points in the point cloud and the union of the prediction results.
5. A railway scene point cloud segmentation system based on mutual attention, based on the railway scene point cloud segmentation method based on mutual attention according to any one of claims 1 to 4, characterized in that: It includes data acquisition module, model building module, model training module and model verification module; The data acquisition module is used to collect point cloud data of different railway track scenes using laser radar; The model building module is used to build a railway scene point cloud segmentation network model based on mutual attention and point cloud serialization, and perform point cloud feature extraction; The model training module is used to perform model training on the railway scene point cloud segmentation network model according to the point cloud data to obtain a trained model weight; The model verification module is used to apply the trained model weights and perform model testing based on the point cloud data to generate a segmentation result of the railway scene point cloud.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the railway scene point cloud segmentation method based on mutual attention are implemented in any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the railway scene point cloud segmentation method based on mutual attention are implemented.