Railway track feature extraction method and system
By preprocessing railway track point cloud data and building a feature extraction model, the imbalance problem between track and non-track data categories in the existing technology is solved, and high-precision track feature extraction and cost reduction are achieved.
Patent Information
- Application Number
- CN202411882582.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-12-19
AI Technical Summary
Existing technologies in railway track detection suffer from an imbalance between track and non-track data categories, making it difficult to capture global and local features simultaneously. Furthermore, the efficiency of multi-source data processing is low, resulting in low accuracy in track feature extraction.
The railway track feature extraction method is adopted to preprocess the point cloud data and construct a railway track feature extraction model, which includes an input module, an encoder module, a decoder module and a railway track feature classification module. The encoder module is used to extract multi-scale features, and the decoder module restores the resolution. The model parameters are optimized through the loss function to improve the adaptability to the imbalance problem of track and non-track data categories.
It improves the accuracy of track feature extraction and reduces the cost of track extraction. It can effectively capture global and local features, establish dependencies between different channels, and enhance the generalization ability of the model.
Smart Images

Figure CN119884707B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of deep learning and point cloud data processing, and in particular to a railway track feature extraction method and system. Background Art
[0002] With the rapid expansion of the global railway network, track maintenance needs are increasing year by year. Therefore, the development of railway track inspection technology is particularly important. Currently, traditional manual inspection methods are unable to meet the complex requirements of modern railway maintenance. Existing methods include two-dimensional image methods and three-dimensional point cloud methods.
[0003] In two-dimensional image-based methods, track detection is performed using collected railway track point cloud data. For example, DeepLabV3+ is a deep learning-based semantic segmentation model that performs well in image segmentation tasks, classifying each pixel in an image into its category (e.g., railway track, background, etc.). This model primarily consists of two parts: an encoder and a decoder. The encoder typically employs a deep convolutional neural network (such as ResNet or Xception) to extract image features with varying resolutions and semantic levels. The decoder is responsible for upsampling and fusing the features extracted by the encoder to restore the image to its original resolution and generate the final segmentation result. However, this method has limitations in capturing the three-dimensional structural information of the track and is less adaptable to the imbalance between track and non-track data.
[0004] 3D point cloud methods typically employ techniques based on point cloud segmentation, such as the PointNet series. These methods directly process unordered point cloud data and use a multi-layer perceptron (MLP) to learn point features for point cloud classification and segmentation. Building on PointNet, PointNet++ introduces a hierarchical feature learning structure, improving segmentation capabilities for complex point clouds. However, this method still suffers from limitations in feature extraction, classification accuracy, and data imbalance. These issues include difficulty in simultaneously capturing global and local features and establishing dependencies between different channels, resulting in low trajectory feature extraction accuracy, low processing efficiency for multi-source data, and significant susceptibility to color feature errors. Summary of the Invention
[0005] In order to overcome the shortcomings of the above-mentioned existing track extraction technology, the purpose of the present invention is to propose a railway track feature extraction method and system, which can effectively improve the adaptability to the imbalance problem of track and non-track data categories, simultaneously capture global and local features, and effectively establish dependencies between different channels, thereby improving the accuracy of track feature extraction and reducing the cost of track extraction.
[0006] To achieve the purpose of the present invention, the present invention adopts the following technical solutions:
[0007] A railway track feature extraction method, the method comprising the following steps:
[0008] Acquiring railway track point cloud data and preprocessing the railway track point cloud data;
[0009] Constructing a railway track feature extraction model, wherein the railway track feature extraction model includes an input module, an encoder module, a decoder module and a railway track feature classification module;
[0010] The railway track feature extraction model is used to extract railway track features based on the preprocessed track point cloud data, and the railway track is classified based on the extracted railway track features, and the classification results are output.
[0011] In the above technical solution, data preprocessing is performed on the acquired initial railway track point cloud data, which can improve the practicality and reliability of the data and reduce data errors. By constructing a railway track feature extraction model that can effectively grasp the changes in railway track point cloud data, and then using the constructed model to extract track features, it is possible to effectively improve the adaptability to the imbalance problem of track and non-track data categories, so as to simultaneously capture global and local features and effectively establish dependencies between different channels, thereby improving the accuracy of track feature extraction and reducing the cost of track extraction.
[0012] Furthermore, the process of preprocessing the railway track point cloud data includes:
[0013] Crop and denoise the acquired railway track point cloud data;
[0014] The railway track point cloud data after cropping and denoising is divided into training set, validation set and test set.
[0015] In the above technical solution, the obtained railway track point cloud data is cropped and denoised, which can improve the practicality and reliability of the data, reduce data errors, and improve computing efficiency.
[0016] Furthermore, the training set is input into the railway track feature extraction model, and several rounds of iterative optimization training are set to iteratively optimize the parameters of the railway track feature extraction model. The process includes:
[0017] Use the input module to divide the original point cloud data in the training set into several non-overlapping data blocks;
[0018] The encoder module extracts multi-scale features of the original point cloud data based on several non-overlapping data blocks;
[0019] The decoder module restores the point cloud resolution based on the multi-scale features and classifies track points and non-track points based on the restored point cloud resolution;
[0020] The railway track feature classification module generates a labeled point cloud consistent with the input point cloud based on the track points and non-track points obtained by classification, and classifies the railway tracks based on the labeled point cloud; the classification results include track points and non-track points;
[0021] The railway track feature extraction model after each round of training is tested using the test set, and the classification results of each round of testing are verified using the validation set. A loss function is set to optimize the parameters of the railway track feature extraction model after each round of training. When the set iterative round ends or the loss function converges, the trained railway track feature extraction model is obtained.
[0022] In the above technical solution, the constructed railway track feature extraction model is divided into modules according to different functions, and the training set is used to iteratively optimize and train each module in the model, so that the trained railway track feature extraction model can effectively grasp the changes in railway track point cloud data, thereby effectively improving the adaptability to the imbalance problem of track and non-track data categories, so as to simultaneously capture global and local features and effectively establish dependencies between different channels, thereby improving the accuracy of track feature extraction and reducing track extraction costs.
[0023] Furthermore, the process of using the input module to divide the original point cloud data in the training set into several non-overlapping data blocks includes:
[0024] The track neighborhood range is calculated based on the original point cloud data, and the track category weight is calculated based on the track neighborhood range. The expression is:
[0025] ;
[0026] A number of points are randomly selected from the original point cloud data, and the orbital neighborhood range of each point is calculated. A number of points are selected within the orbital neighborhood range of each point to be combined into a data block, thereby obtaining a number of non-overlapping data blocks, and data normalization processing is performed on the non-overlapping data blocks.
[0027] Furthermore, the process of segmenting the point cloud data according to the calculated track category weights includes:
[0028] Randomly select a center point from the point cloud data ;
[0029] According to the center point Set at the boundary of the data block, the expression is:
[0030]
[0031]
[0032] Randomly select several data points within the data block boundary and perform a To normalize the coordinates, the expression is:
[0033]
[0034]
[0035]
[0036]
[0037] Adjust the coordinates of the data point relative to the center of the data block. The expression is:
[0038]
[0039]
[0040] Among them, X, Y, and Z represent spatial coordinates. 、 、 、 Both represent non-overlapping data blocks.
[0041] In the above technical solution, the original point cloud is divided into multiple non-overlapping data blocks through the input module and standardized to reduce the consumption of GPU resources, thereby improving the training efficiency of the model and the feature extraction accuracy of the model.
[0042] Furthermore, the process of extracting multi-scale features of the original point cloud data according to a number of non-overlapping data blocks by the encoder module includes:
[0043] The encoder module includes a triple set abstract submodule and a plurality of basic set abstract submodules connected in sequence;
[0044] The triplet set abstraction submodule consists of a sampling layer, a multi-layer perceptron layer, several parallel processing units, and a maximum pooling layer;
[0045] The farthest point sampling is performed on several non-overlapping data blocks through the sampling layer, and the sampled points are combined into a point set;
[0046] A multi-layer perceptron is used to perform feature dimensionality upgrade on the point set, and several parallel processing units are used to construct the correlation features between the global features, local features and general features in the point cloud.
[0047] A multi-layer perceptron layer is used to perform feature dimensionality upgrade on the constructed correlation features, and a maximum pooling layer is used to perform maximum pooling processing on the upgraded correlation features to obtain multi-scale features of the original point cloud data.
[0048] In the above technical solution, the triplet set abstraction submodule can enhance the interaction between global and local features by constructing a dependency relationship between the point dimension, the local neighborhood sampling dimension, and the feature dimension, thereby improving the ability to distinguish between track points and non-track points. Several basic set abstraction submodules can be combined with the triplet set abstraction submodule to perform multi-scale feature extraction to effectively establish a dependency relationship between different channels, thereby improving the accuracy of track feature extraction and reducing the cost of track extraction.
[0049] Furthermore, the process of the decoder module to restore the point cloud resolution based on the multi-scale features includes:
[0050] The decoder module includes several feature propagation units and skip connection units;
[0051] Use several feature propagation units to perform linear interpolation on the three nearest points of each point in the multi-scale feature and upsample the points;
[0052] The upsampled features are summed up using a skip connection unit, and the summed feature dimensions are reduced using a multi-layer perceptron layer to obtain the restored point cloud resolution.
[0053] In the above technical solution, several feature propagation units and jump connection units can effectively restore the point cloud resolution and achieve accurate classification of track points and non-track points.
[0054] Furthermore, the process of setting a loss function to optimize the parameters of the railway track feature extraction model after each round of training includes:
[0055] Count the number of points in orbitals and non-orbitals , according to the points Calculate the initial weights of orbitals and non-orbitals , the expression is:
[0056]
[0057] in, Indicates the maximum number of samples in all categories;
[0058] The logarithmic function plus the bias is used to adjust the weight distribution and optimize the loss function. The expression is:
[0059]
[0060]
[0061] in, represents the scaled weight, represents the positive category weight, Represents the negative category weight, y represents the true label of the sample, and p represents the probability that the model predicts that the sample belongs to the positive category.
[0062] In the above technical solution, the set loss function can address the problem of imbalanced track data categories. By calculating the weight of each category, it can enhance the model's attention to track categories and effectively reduce misclassification.
[0063] Furthermore, a decoupled weight decay optimizer AdamW is set to optimize the parameters of the railway track feature extraction model during the iterative optimization training process. The expression is:
[0064] ;
[0065] in, represents the learning rate, represents the momentum estimate of the gradient, represents a smoothing term that prevents the denominator from reaching zero.
[0066] In the above technical solution, the use of the AdamW optimizer can solve the overfitting problem of the model on small sample data sets in the track extraction task and improve the generalization ability of the model.
[0067] A railway track feature extraction system, comprising:
[0068] Data acquisition module, used to obtain railway track point cloud data;
[0069] A data processing module, used for preprocessing the railway track point cloud data;
[0070] A model construction module is used to construct a railway track feature extraction model, wherein the railway track feature extraction model includes an input module, an encoder module, a decoder module and a railway track feature classification module;
[0071] The railway track feature extraction module is used to extract railway track features based on the preprocessed track point cloud data using the railway track feature extraction model, and to classify the railway tracks based on the extracted railway track features and output classification results.
[0072] Compared with the prior art, the present invention has the following beneficial effects:
[0073] The present invention proposes a railway track feature extraction method and system. By preprocessing the acquired initial railway track point cloud data, the practicality and reliability of the data can be improved and data errors can be reduced. By constructing a railway track feature extraction model that can effectively grasp the changes in railway track point cloud data, and then using the constructed model to extract track features, the system can effectively improve the adaptability to the imbalance problem of track and non-track data categories, simultaneously capture global and local features, and effectively establish dependencies between different channels, thereby improving the accuracy of track feature extraction and reducing the cost of track extraction. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 A flowchart of a railway track feature extraction method provided in an embodiment of the present application;
[0075] Figure 2 A framework diagram of a railway track feature extraction model provided in an embodiment of the present application;
[0076] Figure 3 A schematic diagram of the principle of the input module provided in an embodiment of the present application;
[0077] Figure 4 A structural diagram of the triple attention set abstract submodule provided in an embodiment of the present application;
[0078] Figure 5 A schematic diagram of the principle of the decoder module provided in an embodiment of the present application;
[0079] Figure 6 A schematic diagram of the principle of the railway track feature classification module provided in an embodiment of the present application;
[0080] Figure 7 A schematic diagram of the results of simple scene trajectory extraction in the experiment provided in the embodiment of the present application;
[0081] Figure 8 A second schematic diagram of complex scene trajectory extraction results in the experiment provided in the embodiment of this application;
[0082] Figure 9 A comparison diagram of local details of the model in the easily misclassified area in a complex scene in the experiment provided by the embodiment of the present application;
[0083] Figure 10 A schematic diagram of the structure of a railway track feature extraction system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0084] To facilitate understanding of the present invention, the present invention will be described more fully below with reference to the accompanying drawings. Preferred embodiments of the present invention are shown in the accompanying drawings. However, the present invention may be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and comprehensive understanding of the present disclosure.
[0085] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this invention pertains. The terms used in this specification of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0086] Example 1:
[0087] This embodiment provides a railway track feature extraction method. Figure 1 , the method comprises the following steps:
[0088] Step S1: Acquire railway track point cloud data and preprocess the railway track point cloud data;
[0089] Step S2: constructing a railway track feature extraction model, wherein the railway track feature extraction model includes an input module, an encoder module, a decoder module, and a railway track feature classification module;
[0090] Step S3: using the railway track feature extraction model to extract railway track features based on the preprocessed track point cloud data, and performing railway track classification based on the extracted railway track features, and outputting the classification results.
[0091] In step S1, the process of preprocessing the railway track point cloud data includes:
[0092] Obtain railway track point cloud data through LiDAR, and perform cropping and noise reduction on the obtained railway track point cloud data;
[0093] The railway track point cloud data after cropping and denoising is divided into training set, validation set and test set.
[0094] It can be understood that cropping and denoising the acquired railway track point cloud data can improve the practicality and reliability of the data, reduce data errors, and improve computing efficiency.
[0095] In step S2, see Figure 2 , input the training set into the railway track feature extraction model, and set several rounds of iterative optimization training to iteratively optimize the parameters of the railway track feature extraction model. The process includes:
[0096] Step S21: using the input module to divide the original point cloud data in the training set into several non-overlapping data blocks;
[0097] Step S22: the encoder module extracts multi-scale features of the original point cloud data based on a number of non-overlapping data blocks;
[0098] Step S23: The decoder module restores the point cloud resolution based on the multi-scale features and classifies track points and non-track points based on the restored point cloud resolution;
[0099] Step S24: The railway track feature classification module generates a labeled point cloud consistent with the input point cloud based on the track points and non-track points obtained by classification, and classifies the railway tracks based on the labeled point cloud; wherein the classification result includes track points and non-track points;
[0100] Step S25: Use the test set to test the railway track feature extraction model after each round of training, use the validation set to verify the classification results of each round of testing, and set the loss function to optimize the parameters of the railway track feature extraction model after each round of training. When the set iterative round ends or the loss function converges, the trained railway track feature extraction model is obtained.
[0101] Specifically, the railway track feature extraction model described in this embodiment adopts the TripletA-Net model.
[0102] In this embodiment, the railway track feature classification module is an output module of the railway track feature extraction model.
[0103] It can be understood that the constructed railway track feature extraction model is divided into modules according to different functions, and the training set is used to iteratively optimize the various modules in the model, so that the trained railway track feature extraction model can effectively grasp the changes in railway track point cloud data, thereby effectively improving the adaptability to the imbalance problem of track and non-track data categories, so as to capture global and local features at the same time, and effectively establish dependencies between different channels, thereby improving the accuracy of track feature extraction and reducing track extraction costs.
[0104] As a preferred embodiment, in step S21, see Figure 2 and Figure 3 ,The process of using the input module to divide the original point cloud data in the training set into several non-overlapping data blocks includes:
[0105] The track neighborhood range is calculated based on the original point cloud data, and the track category weight is calculated based on the track neighborhood range. The expression is:
[0106] ;
[0107] A number of points are randomly selected from the original point cloud data, and the orbital neighborhood range of each point is calculated. A number of points are selected within the orbital neighborhood range of each point to be combined into a data block, thereby obtaining a number of non-overlapping data blocks, and data normalization processing is performed on the non-overlapping data blocks.
[0108] In this embodiment, after the model obtains the input of the original point cloud, it calculates the maximum value of the X, Y, and Z coordinates of the point cloud in the scene to obtain the range of the scene, and dynamically adjusts the weight of the category according to the label of the point cloud and the number of points corresponding to the label. :
[0109]
[0110] in, is the maximum number of samples in all categories.
[0111] Finally, the logarithmic function plus the bias is used to adjust the weight distribution to obtain the adjusted weight:
[0112]
[0113] Then, we randomly select a portion of the point cloud in the scene as the center point, and use the farthest point sampling (FPS) to sample N = 8192 points within its X, Y neighborhood (3m × 3m) as a data block. The point cloud coordinates are then normalized, and the intensity features of the point cloud are also normalized.
[0114] Specifically, see Figure 3 ,The process of segmenting point cloud data according to the calculated track category weights includes:
[0115] Randomly select a center point from the point cloud data ;
[0116] According to the center point Set at the boundary of the data block, the expression is:
[0117]
[0118]
[0119] Randomly select several data points within the data block boundary and perform a To normalize the coordinates, the expression is:
[0120]
[0121]
[0122]
[0123]
[0124] Adjust the coordinates of the data point relative to the center of the data block. The expression is:
[0125]
[0126]
[0127] Among them, X, Y, and Z represent spatial coordinates. 、 、 、 Both represent non-overlapping data blocks.
[0128] It can be understood that the original point cloud is divided into multiple non-overlapping data blocks and standardized through the input module to reduce the consumption of GPU resources, thereby improving the training efficiency of the model and the feature extraction accuracy of the model.
[0129] As a preferred embodiment, in step S22, the process of the encoder module extracting multi-scale features of the original point cloud data according to a plurality of non-overlapping data blocks includes:
[0130] The encoder module includes a triple set abstract submodule and a plurality of basic set abstract submodules connected in sequence;
[0131] The triplet set abstraction submodule consists of a sampling layer, a multi-layer perceptron layer, several parallel processing units, and a maximum pooling layer;
[0132] The farthest point sampling is performed on several non-overlapping data blocks through the sampling layer, and the sampled points are combined into a point set;
[0133] A multi-layer perceptron is used to perform feature dimensionality upgrade on the point set, and several parallel processing units are used to construct the correlation features between the global features, local features and general features in the point cloud.
[0134] A multi-layer perceptron layer is used to perform feature dimensionality upgrade on the constructed correlation features, and a maximum pooling layer is used to perform maximum pooling processing on the upgraded correlation features to obtain multi-scale features of the original point cloud data.
[0135] Specifically, see Figure 4In the triplet set abstraction submodule (TASA), TASA takes an N×4 (N is the number of input point clouds, and 4 is the coordinates X, Y, Z and intensity information of the point cloud) matrix as input. First, it passes through a sampling layer, which reduces the number of points to N / 8 through farthest point sampling to reduce the computer memory usage. Then, through the ball query method, 256 points are found for each point to combine and construct a local area. After sampling and combination, N / 8 point sets are obtained, each of which contains 256 points and their 4 attribute matrices of size N / 8×256×4. The obtained point set is passed through a layer of MLP layer to increase the features from 4 dimensions to 64 dimensions, and the resulting matrix size is N / 8×256×32. Subsequently, the mutual dependency relationship between these three dimensions is constructed through the triplet attention module, which does not change the matrix size. The output of the constructed mutual relationship is passed through two layers of MLP layers to increase the feature dimension to 64 dimensions, and finally passed through a maxpool layer (maximum pooling layer). The module structure is as follows Figure 2 The main difference between BSA and TASA is whether it has a triplet attention module, the downsampling ratio is changed from 1 / 8 to 1 / 4, the number of point sets is changed from 256 to 64, 32, 32, and the output feature dimension is changed from 64 to 128, 256, and 512 dimensions.
[0136] Specifically, the triplet attention module consists of three parallel processing units. In the first branch, the input tensor's point dimension Npoint is permuted with the local neighborhood sampling dimension Nsample, resulting in a tensor of Nsample×Npoint×C+D. A max pooling layer with dimension 0 and an average pooling layer with dimension 0 are then used to establish a relationship between the local neighborhood sampling dimension Nsample and the feature dimension C+D. At this point, the dimension is reduced to 2×Nsample×C+D. A convolutional layer and a sigmoid activation layer are then used to generate attention weights, which are applied to the original tensor. The tensor is then permuted back to its original shape. In the second branch, the input tensor's point dimension Npoint is permuted with the feature dimension C+D, resulting in a tensor of C+D×Nsample×Npoint. The relationship between the neighborhood sampling dimension Nsample and the point dimension Npoint is established, following similar processing steps as in the first branch. The original tensor remains unpermuted, and a relationship between the local neighborhood sampling dimension Nsample and the point feature dimension C+D is established, forming the third branch. Finally, the attention weighted tensors generated by the three branches are fused by simple averaging to construct the global features, local features and interdependencies between features of the point cloud.
[0137] It can be understood that the triplet set abstraction submodule can enhance the interaction between global and local features by constructing the dependency relationship between point dimension, local neighborhood sampling dimension and feature dimension, thereby improving the ability to distinguish between track points and non-track points; several basic set abstraction submodules can be combined with the triplet set abstraction submodule to perform multi-scale feature extraction to effectively establish the dependency relationship between different channels, thereby improving the accuracy of track feature extraction and reducing the cost of track extraction.
[0138] As a preferred embodiment, in step S23, the process of the decoder module restoring the point cloud resolution according to the multi-scale features includes:
[0139] The decoder module includes several feature propagation units and skip connection units;
[0140] Use several feature propagation units to perform linear interpolation on the three nearest points of each point in the multi-scale feature and upsample the points;
[0141] The upsampled features are summed up using a skip connection unit, and the summed feature dimensions are reduced using a multi-layer perceptron layer to obtain the restored point cloud resolution.
[0142] Specifically, see Figure 5 The decoder module includes four feature propagation modules. The first layer's input comes from the encoder output (N / 512×512), where N / 512 is the number of points in the region downsampled and 512 is the feature dimension. The input data is first linearly interpolated using the three nearest neighbors of each point, upsampling the points to N / 128. The feature dimensions are then summed using skip connections, resulting in a total of 768 dimensions. Finally, a layer of multi-layered layer processing (MLP) reduces the feature dimensions to 256, resulting in the output of the first layer's feature propagation module (N / 128×256). The subsequent three layers have the same structure, differing only in the dimensionality transformation.
[0143] It can be understood that several feature propagation units and skip connection units can effectively restore the point cloud resolution and achieve accurate classification of track points and non-track points.
[0144] As a preferred embodiment, in step S24, see Figure 6 ,The railway track feature classification module generates a labeled point cloud with the same size as the input point cloud, and the classification result is track or non-track.
[0145] As a preferred embodiment, in step S25, the process of setting a loss function to optimize the parameters of the railway track feature extraction model after each round of training includes:
[0146] Count the number of points in orbitals and non-orbitals , according to the points Calculate the initial weights of orbitals and non-orbitals , the expression is:
[0147]
[0148] in, Indicates the maximum number of samples in all categories;
[0149] The logarithmic function plus the bias is used to adjust the weight distribution and optimize the loss function. The expression is:
[0150]
[0151]
[0152] in, represents the scaled weight, represents the positive category weight, Represents the negative category weight, y represents the true label of the sample, and p represents the probability that the model predicts that the sample belongs to the positive category. It will increase the penalty for misclassified positive samples, making the model pay more attention to track categories and improving the performance of model track extraction.
[0153] It can be understood that the set loss function can address the problem of track data category imbalance by calculating the weight of each category, enhancing the model's attention to track categories and effectively reducing misclassification.
[0154] As a preferred embodiment, a decoupled weight decay optimizer AdamW is set to optimize the parameters of the railway track feature extraction model during the iterative optimization training process, and the expression is:
[0155] ;
[0156] in, represents the learning rate, represents the momentum estimate of the gradient, represents a smoothing term that prevents the denominator from reaching zero.
[0157] Specifically, TripletA-Net uses the AdamW optimizer instead of the classic Adam optimizer. AdamW's main improvement lies in decoupling weight decay from gradient updates, which makes the model's parameter updates more stable and improves its generalization capabilities. Experiments have shown that the AdamW optimizer with decoupled weight decay regularization plays a key role in resolving track misclassification issues.
[0158] In the Adam optimizer, weight decay is mixed with the gradient update process, which makes it difficult to impose effective constraints on the parameters during the training process, especially on small-scale datasets, which can easily cause the model to overfit the training data. The weight update formula of the Adam optimizer is:
[0159]
[0160] in, represents the learning rate, represents the momentum estimate of the gradient, represents a smoothing term that prevents the denominator from reaching zero.
[0161] AdamW can better control the update of weights by separating weight decay and avoid the model's excessive dependence on training data. The weight update formula of the AdamW optimizer is:
[0162]
[0163] Here Represents the weight decay coefficient. By decoupling the weight decay term from the gradient update process, AdamW can better constrain model parameters and reduce overfitting, especially when the amount of data is small.
[0164] It is understandable that using the AdamW optimizer can solve the overfitting problem of the model on small sample data sets in the track extraction task and improve the generalization ability of the model.
[0165] In this embodiment, the triplet attention mechanism can be moved from the encoder module to the decoder module to enhance the information fusion capability during feature propagation.
[0166] In this embodiment, data preprocessing is performed on the acquired initial railway track point cloud data to improve the practicality and reliability of the data and reduce data errors. By constructing a railway track feature extraction model that can effectively grasp the changes in railway track point cloud data, and then using the constructed model to extract track features, the adaptability to the imbalance problem of track and non-track data categories can be effectively improved, so as to simultaneously capture global and local features and effectively establish dependencies between different channels, thereby improving the accuracy of track feature extraction and reducing the cost of track extraction.
[0167] Example 2:
[0168] This embodiment provides corresponding experimental instructions based on the method of embodiment 1, which are as follows:
[0169] The data collected using the UAV-mounted LiDAR contains 59,653,663 points, including 676,172 track points and 58,977,491 non-track points.
[0170] Comparative experiment:
[0171] Comparison methods included PointNet, PointNet++, and RandLANet. Test scenarios included both simple (0-4) and complex (4-5) scenarios. Results showed that TripletA-Net achieved the highest accuracy in all scenarios, with an average mean Intersection Over Union (MIoU) of 94.36%. Details are shown in Table 1 below.
[0172] Table 1: Track extraction accuracy of each model
[0173]
[0174] The proposed model achieved the highest accuracy in all scenarios except scenario 2, where it was slightly lower than the Stratified Transformer model. The average mIoU improved by 40.42%, 6.49%, 2.90%, 12.43%, and 4.87% compared to the PointNet, PointNet++, RandLANet, Swin3Dtransformer, and Stratified Transformer models, respectively. In the simple railway scene, the PointNet++ model performed relatively well in extracting tracks, with only a few segmentation errors, mainly occurring at the edges of the scene, and a few missing tracks, such as Figure 7 As shown in a. The RandLANet model performs better than the PointNet++ model, with no obvious classification errors, but there are still a few track breaks, such as Figure 7 As shown in b. The Swin3D transformer model has a poor extraction effect, with multiple errors at the scene boundary and obvious and large-scale fractures in the track, as shown in Figure 7 c. Stratified Transformer and the proposed model perform satisfactorily in simple scenarios, with no obvious misclassification and good track continuity, as shown in Figure 7 d and Figure 7 As shown in e. Figure 7Middle: (a) Segmentation results of the PointNet++ model; (b) Segmentation results of the RandLA Net model; (c) Segmentation results of the Swin3D Transformer model; (d) Segmentation results of the Stratified Transformer model; (e) Segmentation results of the TripletA-Net model; (f) A real track scene. Yellow boxes indicate misclassification, and green boxes indicate missing track extraction.
[0175] In complex scenes, although the PointNet++ model can identify most of the track point clouds, the segmentation results are still not up to the level of usability. Figure 8 As shown in Figure a, when extracting the track, the model not only misclassifies some point cloud boundaries, but also misclassifies the guardrails (rails laid on the inside of the rails on the track that do not bear the vertical load of the wheels) in the scene as tracks. In addition, the track continuity is also poor, with obvious defects and breaks, which cannot meet the needs of actual production. RandLANet also has the problem of misclassifying guardrails as tracks, but no obvious misclassification occurs in other places, such as Figure 8 As shown in b, the continuity of the track has been significantly improved compared to the PointNet++ model. The segmentation results of the Transformer-based Swin3D Transformer and Stratified Transformer models are also not ideal. In addition to misclassifying the guardrail as track, some misclassifications also occur in some areas with large elevation fluctuations, such as Figure 8 c and Figure 8 d. The TripletA-Net model significantly improves the accuracy of track extraction in complex scenes, as shown in Figure 8 As shown in e, no obvious errors are found, and the extracted tracks maintain integrity and reach a usable level. Figure 8 Middle: (a) PointNet++ model segmentation result; (b) RandLA Net model segmentation result; (c) Swin3D Transformer model segmentation result (d) Stratified Transformer model segmentation result; (e) TripletA-Net model segmentation result; (f) real track scene.
[0176] In order to analyze the performance of each model in complex scenes, the local details of the areas that are prone to misclassification (Area1-4) are displayed to show the track extraction performance of different models in these areas. The selected areas include guardrails beside the track (Area1-2) or obvious height changes (Area3-4) to more clearly compare the recognition accuracy and classification errors of the models. Figure 9 shown.
[0177] Depend on Figure 9 It can be seen that in Areas 1 and 2, while TripletA-Net correctly distinguished between track and guardrail, the other four models misclassified the guardrail as track. In particular, Swin3D Transformer and StratifiedTransformer exhibited widespread misclassification, indicating overfitting. In Areas 3 and 4, TripletA-Net and RandLANet did not misclassify, while the other three models exhibited significant misclassification. Based on the results from all four areas, it can be concluded that pointNet++, Swin3D Transformer, and Stratified Transformer lacked awareness of overall structure and over-rely on local structure, leading to the misclassification of similar structures. While RandLANet possessed the largest receptive field, its inability to extract local detail features also led to misclassification. TripletA-Net achieved a balance between global and local features and linked them with point features, successfully achieving high classification accuracy.
[0178] Ablation experiment:
[0179] In order to evaluate the effectiveness of the triplet attention mechanism and weight scaling strategy, as well as the impact of the decoupled weight decay optimizer and the intensity information of the point cloud on the model, ablation experiments were performed on the TripletA-Net model.
[0180] Model A: The first feature extraction module in the model is replaced by the triple set abstraction module to the basic set abstraction module; Model B: The AdamW optimizer is replaced by the Adam optimizer; Model C: The input is replaced by to remove the intensity information; Model D: The weight in the loss function is fixed to 1:1; as shown in Table 2. The obtained results are shown in Table 3.
[0181] Table 2: Comparison of various models
[0182]
[0183] Table 3: Track extraction results for each model
[0184]
[0185] As can be seen from Table 3, after removing any module, the track extraction accuracy decreases, indicating that the module proposed in this invention can significantly improve the extraction accuracy of track point clouds.
[0186] Complexity Analysis:
[0187] The TripletA-Net proposed in this application not only demonstrates excellent performance in track extraction tasks, but also maintains model compactness. TripletA-Net uses TASA (Tasting Agents and Analyses) to build dependencies between dimensions, enabling adaptive weight distribution across different dimensions without the need for additional complex structures. The TASA module uses simple pooling (MaxPool, AvgPool) and convolution operations, generating attention weights through sigmoid activation. These operations require less computation and fewer parameters than complex attention models (such as the Transformer). Even though there are three parallel paths processing tensor relationships of different dimensions, the structure they use is simple and efficient. When adaptively allocating weights, no additional redundant channels or dimensions are introduced, thus preventing a significant increase in model parameters. At the same time, the multi-scale feature extraction structure effectively reduces the reliance on deep networks. To evaluate the complexity and efficiency of the proposed model, the number of parameters of each comparison model is listed in Table 4.
[0188] Table 4: Number of parameters for each comparison model
[0189]
[0190] With less than 1M parameters, TripletA-Net achieves higher performance in track extraction tasks than more complex models such as the Swin3D Transformer and Stratified Transformer. This efficient design enables TripletA-Net to run in resource-constrained environments, providing a practical solution for track extraction in real-world applications.
[0191] Example 3:
[0192] This embodiment provides a railway track feature extraction system. Figure 10 , the system includes:
[0193] Data acquisition module, used to obtain railway track point cloud data;
[0194] A data processing module, used for preprocessing the railway track point cloud data;
[0195] A model construction module is used to construct a railway track feature extraction model, wherein the railway track feature extraction model includes an input module, an encoder module, a decoder module and a railway track feature classification module;
[0196] The railway track feature extraction module is used to extract railway track features based on the preprocessed track point cloud data using the railway track feature extraction model, and to classify the railway tracks based on the extracted railway track features and output classification results.
[0197] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention's description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A railway track feature extraction method, characterized in that: The method comprises the following steps: Acquiring railway track point cloud data and preprocessing the railway track point cloud data; Constructing a railway track feature extraction model, wherein the railway track feature extraction model includes an input module, an encoder module, a decoder module and a railway track feature classification module; The railway track feature extraction model extracts railway track features based on the preprocessed track point cloud data, classifies the railway track based on the extracted railway track features, and outputs the classification results; The process of preprocessing the railway track point cloud data includes: Crop and reduce noise on the acquired railway track point cloud data; The railway track point cloud data after cropping and denoising is divided into training set, validation set and test set; The training set is input into the railway track feature extraction model, and several rounds of iterative optimization training are set to iteratively optimize the parameters of the railway track feature extraction model. The process includes: Use the input module to divide the original point cloud data in the training set into several non-overlapping data blocks; The encoder module extracts multi-scale features of the original point cloud data based on several non-overlapping data blocks; The decoder module restores the point cloud resolution based on the multi-scale features and classifies track points and non-track points based on the restored point cloud resolution; The railway track feature classification module generates a labeled point cloud consistent with the input point cloud based on the track points and non-track points obtained by classification, and classifies the railway tracks based on the labeled point cloud; the classification results include track points and non-track points; The railway track feature extraction model after each round of training is tested using the test set, and the classification results of each round of testing are verified using the validation set. A loss function is set to optimize the parameters of the railway track feature extraction model after each round of training. When the set iteration round ends or the loss function converges, the trained railway track feature extraction model is obtained. The process of using the input module to divide the original point cloud data in the training set into several non-overlapping data blocks includes: Randomly selecting a number of points from the original point cloud data, calculating the orbital neighborhood range of each point, selecting a number of points within the orbital neighborhood range of each point to combine into a data block, obtaining a number of non-overlapping data blocks, and performing data normalization processing on the number of non-overlapping data blocks; The process of the encoder module extracting multi-scale features of the original point cloud data based on several non-overlapping data blocks includes: The encoder module includes a triple attention set abstract submodule and a plurality of base set abstract submodules connected in sequence; The triplet attention set abstract submodule includes a sampling layer, a multi-layer perceptron layer, several parallel processing units, and a maximum pooling layer; The farthest point sampling is performed on several non-overlapping data blocks through the sampling layer, and the sampled points are combined into a point set; A multi-layer perceptron is used to perform feature dimensionality upgrade on the point set, and several parallel processing units are used to construct the dependency features among global features, local features and general features in the point cloud. A multi-layer perceptron layer is used to perform feature dimensionality upgrade on the constructed dependency features, and a maximum pooling layer is used to perform maximum pooling processing on the dimension-upgraded dependency features to obtain multi-scale features of the original point cloud data; The process of setting the loss function to optimize the parameters of the railway track feature extraction model after each round of training includes: Count the number of points in orbitals and non-orbitals , according to the points Calculate the initial weights of orbitals and non-orbitals , the expression is: in, Indicates the maximum number of samples in all categories; The logarithmic function plus the bias is used to adjust the weight distribution and optimize the loss function. The expression is: in, represents the scaled weight, represents the positive category weight, Represents the negative category weight, y represents the true label of the sample, and p represents the probability that the model predicts that the sample belongs to the positive category.
2. The railway track feature extraction method according to claim 1, characterized in that: The process of the decoder module to restore the point cloud resolution based on multi-scale features includes: The decoder module includes several feature propagation units and skip connection units; Use several feature propagation units to perform linear interpolation on the three nearest points of each point in the multi-scale feature and upsample the points; The upsampled features are summed up using a skip connection unit, and the summed feature dimensions are reduced using a multi-layer perceptron layer to obtain the restored point cloud resolution.
3. The railway track feature extraction method according to claim 1, characterized in that: The decoupled weight decay optimizer AdamW is set to optimize the parameters of the railway track feature extraction model during the iterative optimization training process. The expression is: ; in, represents the learning rate, represents the momentum estimate of the gradient, represents a smoothing term that prevents the denominator from reaching zero.
4. A railway track feature extraction system, the system being based on the method according to any one of claims 1 to 3, characterized in that: The system includes: Data acquisition module, used to obtain railway track point cloud data; A data processing module, used for preprocessing the railway track point cloud data; A model construction module is used to construct a railway track feature extraction model, wherein the railway track feature extraction model includes an input module, an encoder module, a decoder module and a railway track feature classification module; The railway track feature extraction module is used to extract railway track features based on the preprocessed track point cloud data using the railway track feature extraction model, and to classify the railway tracks based on the extracted railway track features and output classification results.
Citation Information
Patent Citations
Three-dimensional point cloud semantic segmentation method based on multi-feature information enhancement coding
CN113392841A
Semantic codec training method, semantic codec transmission method and semantic codec training system for point cloud transmission
CN117135179A