Railway track detection method based on laser point cloud and application
By using a Transformer-based bi-branch encoder-decoder network model and spline curve fitting, the problems of track detection accuracy and automation in complex railway scenarios were solved, achieving high-precision track segmentation and extraction.
Patent Information
- Application Number
- CN202510760731.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-10-28
AI Technical Summary
Existing technologies for track detection in complex railway scenarios suffer from poor adaptability to complex scenarios, low automation, insufficient utilization of 3D features, and weak noise resistance and generalization, making it difficult to achieve high-precision, fully automated track segmentation and extraction.
We employ a Transformer-based dual-branch encoding/decoding network model, combining feature fusion of local geometric details and global context features. We accelerate neighborhood retrieval through spatial indexing and probability weighting strategies, and optimize the track alignment by fitting the track centerline with spline curves.
It improves the accuracy and automation of track detection in complex railway scenarios, enhances the ability to express the three-dimensional spatial features of tracks, solves the information loss problem of traditional methods, and achieves high-precision track segmentation and extraction.
Smart Images

Figure CN120853153A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of laser detection technology, and in particular to a method, apparatus, electronic device, and computer-readable storage medium for railway track detection based on laser point clouds. Background Technology
[0002] With the increasing demand for intelligent operation and maintenance of railways, track detection technology based on laser point clouds has gradually become a research hotspot. Traditional methods mainly rely on manual annotation, geometric feature matching, or model fitting based on prior knowledge. For example, the track line is fitted by rectangular space partitioning combined with the least squares method, or the track centerline is extracted by training a convolutional neural network using two-dimensional projection images. However, the existing technologies have the following problems: (1) Poor adaptability to complex scenarios: In scenarios with sparse point clouds, complex track lines (such as curves and turnouts), or noise interference, traditional geometric methods (such as rectangular space partitioning and polynomial fitting) are difficult to accurately capture the continuity of track space and are easily affected by missing local data, resulting in the accumulation of fitting errors. (2) Low degree of automation: Some methods rely on manual specification of initial seed points or prior parameters (such as track gauge and buffer radius), which are difficult to adapt to the changing railway environment, and manual intervention reduces processing efficiency. (3) Insufficient utilization of three-dimensional features: Methods based on two-dimensional projection or local windows cannot fully explore the three-dimensional spatial context information of point clouds. Especially in sparse point clouds at long distances, the joint modeling ability of track elevation changes and plane curvature is insufficient, affecting the segmentation accuracy. (4) Weak noise resistance and generalization: Existing deep learning models are sensitive to uneven point cloud density, occlusion and environmental noise, and lack robust feature fusion mechanisms, resulting in unstable segmentation results in complex railway scenarios and limited generalization ability.
[0003] Therefore, there is an urgent need for a railway laser point cloud track segmentation network that couples local and global features to achieve high-precision, fully automated track segmentation and extraction in complex railway scenarios. Summary of the Invention
[0004] To overcome the shortcomings of the prior art, this invention provides a railway track detection method and application based on laser point clouds. By making full use of the proposed railway laser point cloud track segmentation network, accurate extraction and structured reconstruction of track point clouds under complex terrain interference are achieved.
[0005] On one hand, this invention proposes a railway track detection method based on laser point clouds, comprising: collecting and preprocessing laser point cloud data of a railway scene to construct an enhanced training set and a validation set; constructing a Transformer-based dual-branch encoding and decoding network model and training the network model based on the training set and the validation set; segmenting the large scene point cloud by random sampling during the inference phase according to the trained network model, accelerating neighborhood retrieval through spatial indexing, performing network inference on each segmented point cloud block, and using a probability weighting strategy to fuse the prediction results of overlapping areas to obtain track category point clouds; performing a clustering algorithm on the track category point clouds to separate independent track instances, removing vertical outliers, and fitting the track centerline using spline curves for the remaining points; optimizing the track alignment based on the track centerline to obtain the track detection result.
[0006] In one embodiment of the present invention, the dual-branch encoding and decoding network model extracts multi-scale local geometric detail features through local branches, extracts global context features through global branches, and uses a feature attention interaction mechanism to fuse the local geometric detail features and the global context features.
[0007] In one embodiment of the present invention, the feature fusion of the local geometric detail features and the global context features using a feature attention interaction mechanism includes: Global contextual features and local detail features are extracted in parallel, and then a cross-modal similarity feature map is constructed. The spatial correspondence between global and local features is measured using the vector dot product:
[0008] For each point The attention weight matrix is generated by normalizing the similarity matrix along the local feature dimension using the SoftMax function. :
[0009] Based on this, spatial adaptive weighting is applied to local features to obtain enhanced features. :
[0010] Finally, attention-guided global and local feature fusion is achieved through addition and 1×1 convolution operations, represented as: .
[0011] In one embodiment of the present invention, after feature fusion, the method further includes: 32-dimensional features are processed using a multilayer perceptron. Mapping to the semantic segmentation space, the class probability distribution of each point is output:
[0012] in, The function is SoftMax, where K is the number of categories; The semantic segmentation of tracks in complex point cloud scenarios is achieved using the weighted cross-entropy loss function as follows:
[0013] in, Based on category frequency Dynamic adjustment To prevent division by zero smoothing factor.
[0014] In one embodiment of the present invention, the large-scene point cloud segmentation step includes: Through uniform sampling function ,generate A local point cloud patch ,satisfy Furthermore, there are overlapping areas between the blocks. ; Spatial index based on octree Define the neighborhood query function ,in The search radius is used to accelerate the spatial association calculation of point clouds within local blocks; For each sub-block Perform forward computation of the network and output the probability distribution of the point set. For points within the overlapping region The final probability is obtained by weighted averaging:
[0015] in, As the normalization factor, Indicates a sub-block The number of points.
[0016] In one embodiment of the present invention, the method of fitting the orbital line using spline curves includes: Cluster the segmented orbital point cloud and define the neighborhood radius. and minimum number of points threshold Generate an independent set of orbital clusters Each cluster satisfies:
[0017] For each cluster Sort the point set along the direction of the track extension:
[0018] Remove vertical outliers and retain the set of points that satisfy the constraints:
[0019] in For local windows Mean of the inner z-coordinate, The corresponding standard deviation; For the filtered point set Construct parameterized B-spline curves :
[0020] in As control points, For p-th degree B-spline basis functions; The final output B-spline curve The geometric shape that represents the centerline of the orbit.
[0021] In one embodiment of the present invention, the orbital alignment optimization step includes: performing spatial relationship analysis on the clustering results of adjacent orbits, achieving fusion optimization of similar orbital lines through minimum distance constraints, and obtaining the final orbital extraction result.
[0022] On the other hand, this invention also proposes a railway track detection device based on laser point clouds, comprising: a point cloud data acquisition module for acquiring and preprocessing laser point cloud data of a railway scene, and constructing an enhanced training set and a validation set; a network model module for constructing a Transformer-based dual-branch encoding and decoding network model, and training the network model based on the training set and the validation set; a track point cloud extraction module for segmenting large-scene point clouds by random sampling during the inference phase according to the trained network model, accelerating neighborhood retrieval through spatial indexing, performing network inference on each segmented point cloud block, and using a probability weighting strategy to fuse the prediction results of overlapping areas to obtain track category point clouds; a track line fitting module for performing clustering algorithms to separate independent track instances from the track category point clouds, removing vertical outliers, and fitting the track centerline using spline curves to the remaining points; and a track alignment optimization module for optimizing the track alignment based on the track centerline to obtain track detection results.
[0023] In another aspect, embodiments of the present invention also propose an electronic device, comprising: a memory and one or more processors connected to the memory, the memory storing a computer program, and the processors being used to execute the computer program to implement the railway track detection method based on laser point clouds as described in any of the above embodiments.
[0024] In another aspect, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions for performing the railway track detection method based on laser point clouds as described in any of the above embodiments.
[0025] As can be seen from the above, the embodiments of the present invention, compared with the prior art, can have at least one or more of the following beneficial effects: The proposed railway track detection method based on laser point clouds employs a Transformer-based dual-branch encoding and decoding end-to-end network architecture. The local branch extracts local geometric details through four-layer cascaded downsampling, while the global branch captures global contextual information by extracting features from the downsampled point cloud. Furthermore, cross-scale feature stitching achieves local-global feature fusion, enhancing the expressive power of three-dimensional track spatial features in complex scenarios and addressing the information loss problem of traditional two-dimensional projection methods. By performing DBSCAN clustering on the segmented track point cloud and then using B-spline curve fitting to describe the track centerline for the remaining points, the fitted B-spline curve is ultimately used as the track line of this cluster set, achieving the optimal geometric representation of the railway track centerline. Attached Figure Description
[0026] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings: Figure 1 A flowchart illustrating a railway track detection method based on laser point clouds, provided as an embodiment of the present invention; Figure 2 This is a structural diagram of a railway laser point cloud track segmentation network model provided in an embodiment of the present invention; Figure 3 This is a structural diagram of the global and local feature fusion module provided in an embodiment of the present invention; Figure 4 A schematic diagram of a railway track detection device based on laser point clouds provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of a computer-readable storage medium provided in an embodiment of the present invention. Detailed Implementation
[0027] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described with reference to the accompanying drawings and embodiments.
[0028] To enable those skilled in the art to better understand the technical solutions of the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments, and should all fall within the protection scope of the present invention.
[0029] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are applicable in distinguishing similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or applicable to such processes, methods, products, or apparatus.
[0030] It should also be noted that the division of multiple embodiments in this invention is only for the convenience of description and should not constitute a special limitation. Features in various embodiments can be combined and referenced in each other without contradiction.
[0031] The first embodiment of this invention proposes a railway track detection method based on laser point clouds, including steps S1-S5: Step S1, collecting and preprocessing laser point cloud data of a railway scene to construct an enhanced training set and a validation set; Step S2, constructing a Transformer-based dual-branch encoding and decoding network model and training the network model based on the training set and the validation set; Step S3, segmenting the large scene point cloud by random sampling during the inference phase according to the trained network model, accelerating neighborhood retrieval through spatial indexing, performing network inference on each segmented point cloud block, and using a probability weighting strategy to fuse the prediction results of overlapping areas to obtain a track category point cloud; Step S4, performing a clustering algorithm on the track category point cloud to separate independent track instances, removing vertical outliers, and fitting the track centerline using spline curves for the remaining points; Step S5, optimizing the track alignment based on the track centerline to obtain the track detection result.
[0032] Specifically, in combination Figure 1As shown, in step S1, for example, original railway scene point cloud data is acquired using a multi-platform laser scanning device. The acquired point cloud is then processed for denoising, coordinate registration, and intensity normalization. A labeled dataset containing diverse track morphologies such as straight sections, curved sections, and turnout areas is constructed. Data augmentation is achieved using random sampling, local rotation, and Gaussian noise injection techniques to generate augmented training and validation sets covering complex scenes.
[0033] In step S2, the network model adopts a Transformer-based dual-branch encoder-decoder network architecture, which integrates local details and global context information to achieve efficient segmentation of railway track point clouds. The overall network structure diagram is shown below. Figure 2 As shown.
[0034] Specifically, in the model encoder, the local branches of the model construct multi-scale feature representations through hierarchical downsampling. Given the point cloud sampling centers, the input is the spatial three-dimensional coordinates and point cloud attribute features of the original point cloud with N points and sampling centers. Let the input point cloud set be... , where each point Includes three-dimensional coordinates and 3D attribute features. Next, the initial input point cloud is fed into a feature embedding layer module consisting of a multilayer perceptron and a Transformer layer. In this process, the number of output feature points remains unchanged, but the feature dimension of the point cloud is mapped to 32 dimensions:
[0035] Then through 4 sets of downsampling modules The local geometric details of the point cloud are extracted step by step, and each module consists of a downsampling layer. and Transformer layer composition:
[0036] No. After grouping the modules, the number of point clouds was reduced to The corresponding feature dimensions are expanded to ,Right now: Group 1: , ; Group 2: , ; Group 3: , ; Group 4: , ; The features output by the local branches of the model With dimensions of (N / 256, 512), the local geometric structure features of the point cloud are fully characterized.
[0037] The global branch of the model constructs a global feature vector by extracting features from the downsampled point cloud. In the global branch, the original point cloud is first downsampled and thinned. Then, using the same point cloud sampling centers as the local branch, N points are sampled for their spatial 3D coordinates and attribute features. Similar to the local branch, the global branch also consists of 5 layers. The first layer consists of a multilayer perceptron and a Transformer layer, and the following four layers consist of downsampling layers and Transformer layers. Finally, the global branch outputs the features... The dimensions are also (N / 256, 512).
[0038] In the model's decoder, the global context features of the global branch output are first realized through a feature attention interaction mechanism. Local detail features of local branch output This fusion creates a hybrid feature representation that combines fine-grained local structure with macroscopic scene understanding, such as... Figure 3 As shown, firstly, the feature fusion module extracts global contextual features and local detail features in parallel, and then constructs a cross-modal similarity feature map. The spatial correspondence between global and local features is measured using the vector dot product:
[0039] For each point The attention weight matrix is generated by normalizing the similarity matrix along the local feature dimension using the SoftMax function. :
[0040] Based on this, spatial adaptive weighting is applied to local features to obtain enhanced features. :
[0041] Finally, attention-guided global and local feature fusion is achieved through addition and 1×1 convolution operations:
[0042] Final output The fusion feature representation, which combines global consistency and local discriminativeness, provides a highly discriminative semantic embedding space for subsequent processing.
[0043] Further, such as Figure 3As shown, after feature fusion, the decoder adopts a symmetrical progressive upsampling path, gradually restoring the number of point clouds to the initial number through feature upsampling layers. Each upsampling module reduces the feature dimension to half of the previous one. Simultaneously, a skip connection mechanism is introduced to concatenate global and local features from the encoder with features from the decoder at the same scale, effectively mitigating the problem of geometric detail loss. At the network's end, a multilayer perceptron is used to process the 32-dimensional features. Mapping to the semantic segmentation space, the class probability distribution of each point is output:
[0044] in, This is the SoftMax function, where K is the number of categories.
[0045] This model enhances the distinction between tracks and other ground features through multi-level feature abstraction and cross-branch information fusion. It employs a weighted cross-entropy loss function to address the class imbalance problem in track point clouds, achieving semantic segmentation of tracks in complex point cloud scenarios.
[0046] in, Based on category frequency Dynamic adjustment To prevent division by zero smoothing factor.
[0047] In step S3, the inference phase uses random sampling to dynamically segment the large scene point cloud, achieves fast neighborhood retrieval through spatial indexing, performs network forward computation on each sampled point cloud block, and then uses a probability weighting strategy to fuse the prediction results of overlapping regions. Non-track points are filtered out using a probability threshold, and noise points are also filtered out to obtain the selected track point set. Specifically, this includes: (1) Random block sampling Through uniform sampling function ,generate A local point cloud patch ,satisfy Furthermore, there are overlapping areas between the blocks. .
[0048] (2) Spatial index construction Spatial index based on octree Define the neighborhood query function ,in The search radius is used to accelerate the spatial correlation calculation of point clouds within local blocks.
[0049] (3) Sub-block reasoning and probability fusion For each sub-block Perform forward computation of the network and output the probability distribution of the point set. For points within the overlapping region Its final probability is fused through a weighted average:
[0050] in, As the normalization factor, Indicates a sub-block The number of points.
[0051] (4) Probability threshold filtering Set threshold , retain satisfaction The points constitute the candidate orbit point set .
[0052] (5) Noise point removal Based on density constraints Filtering sparse points to output a refined set of orbital points:
[0053] in Calculate the radius for density. The threshold is the minimum number of neighboring points. This scheme achieves robust extraction of orbital structures from massive point clouds through a cascaded process of block division, fusion, and filtering.
[0054] In step S4, DBSCAN clustering is performed on the segmented orbit point cloud. Points in each cluster are sorted horizontally, and outliers with the same horizontal coordinate but different vertical coordinates are discarded. Then, B-spline curves are used to fit the orbit centerlines of the remaining points, and the fitted B-spline curves are used as the orbit lines for this cluster. Specifically, this includes: (1) Examples of density clustering separation orbits The DBSCAN algorithm is applied to cluster the segmented orbital point cloud, and the neighborhood radius is defined. and minimum number of points threshold Generate an independent set of orbital clusters Each cluster satisfies:
[0055] (2) Horizontal coordinate sorting and outlier removal For each cluster Sort the set of points along the direction of the orbit (assuming it is the x-axis):
[0056] Remove outliers in the vertical direction (z-axis) and retain the set of points that satisfy the constraints:
[0057] in For local windows Mean of the inner z-coordinate, This represents the corresponding standard deviation.
[0058] (3) B-spline curve fitting of the orbit centerline For the filtered point set Construct parameterized B-spline curves :
[0059] in As control points, The basis functions are p-th degree B-spline functions. The control points are solved using least-squares optimization.
[0060] Regularization coefficient Control curve smoothness, parameters Determined by chord length parameterization. The final output B-spline curve. The geometric shape that represents the centerline of the orbit.
[0061] In step S5, spatial relationship analysis is performed on the clustering results of adjacent orbits. Minimum distance constraints are used to optimize the fusion of similar orbit lines, resulting in the final orbit extraction results. Finally, the corresponding file is generated according to the required vector format (such as DXF or SHP).
[0062] In summary, the railway track detection method based on laser point clouds proposed in the first embodiment of this invention, through the design of an end-to-end network architecture based on a Transformer dual-branch encoding and decoding, extracts local geometric details through four-layer cascaded downsampling in the local branch, and captures global contextual information by extracting features from the downsampled point cloud. Furthermore, it achieves local-global feature fusion through cross-scale feature stitching, enhancing the expressive power of the three-dimensional spatial features of the track in complex scenarios and solving the information loss problem of traditional two-dimensional projection methods. By performing DBSCAN clustering on the segmented track point cloud, and then using B-spline curve fitting to describe the track centerline for the remaining points, the fitted B-spline curve is finally used as the track line of this cluster set, achieving the geometric morphological representation of the optimal railway track centerline.
[0063] In addition, such as Figure 4 As shown, the second embodiment of the present invention also proposes a railway track detection device based on laser point cloud, including: a point cloud data acquisition module 201, a network model module 202, a track point cloud extraction module 203, a track line fitting module 204, and a track alignment optimization module 205.
[0064] The system includes the following modules: Point Cloud Data Acquisition Module 201, which acquires laser point cloud data of railway scenes and performs preprocessing to construct enhanced training and validation sets; Network Model Module 202, which constructs a Transformer-based dual-branch encoding and decoding network model and trains the network model based on the training and validation sets; Track Point Cloud Extraction Module 203, which segments large-scene point clouds by random sampling during the inference phase based on the trained network model, accelerates neighborhood retrieval through spatial indexing, performs network inference on each segmented point cloud block, and uses a probability weighting strategy to fuse the prediction results of overlapping areas to obtain track category point clouds; Track Line Fitting Module 204, which uses a clustering algorithm to separate independent track instances from the track category point clouds, removes vertical outliers, and fits the track centerline using spline curves for the remaining points; and Track Alignment Optimization Module 205, which optimizes the track alignment based on the track centerline to obtain track detection results.
[0065] The railway track detection method based on laser point clouds, implemented by the railway track detection device based on laser point clouds disclosed in the second embodiment of the present invention, is as described in the first embodiment above, and therefore will not be described in detail here. Optionally, each module and the other operations or functions mentioned above are for implementing the method described in the first embodiment, and the beneficial effects of the railway track detection device based on laser point clouds provided in this embodiment are the same as the beneficial effects of the railway track detection method based on laser point clouds provided in the first embodiment above. For the sake of brevity, they will not be repeated here.
[0066] like Figure 5 As shown, the third embodiment of the present invention also proposes an electronic device, for example including: at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the computer program is executed by the processing unit, the processing unit performs the method described in the first embodiment, and the beneficial effects of the electronic device provided in this embodiment are the same as the beneficial effects of the railway track detection method based on laser point cloud provided in the first embodiment.
[0067] like Figure 6 As shown, the fourth embodiment of the present invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the above-described method. The beneficial effects of the computer-readable storage medium provided in this embodiment are the same as those of the railway track detection method based on laser point clouds provided in the first embodiment.
[0068] The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, as well as magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.
[0069] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0070] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0071] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between devices or units may be electrical or other forms.
[0072] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0073] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0074] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0075] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0076] The foregoing description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Those skilled in the art will readily conceive of embodiments of this disclosure upon considering the specification and practicing the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described herein. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.
[0077] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0078] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A railway track detection method based on laser point clouds, characterized in that, include: Collect and preprocess laser point cloud data of railway scenes to construct enhanced training and validation sets; Construct a Transformer-based dual-branch encoder-decoder network model, and train the network model based on the training set and the validation set; Based on the trained network model, large scene point clouds are segmented by random sampling during the inference phase, and neighborhood retrieval is accelerated by spatial indexing. After performing network inference on each segmented point cloud block, the prediction results of overlapping areas are fused by a probability weighting strategy to obtain the orbit category point cloud. Clustering algorithms are used to separate independent track instances from the point cloud of the track categories. After removing vertical outliers, spline curves are used to fit the center line of the track for the remaining points. The track alignment is optimized based on the track centerline to obtain the track detection results.
2. The railway track detection method based on laser point clouds according to claim 1, characterized in that, The dual-branch encoding / decoding network model extracts multi-scale local geometric detail features through local branches and extracts global context features through global branches. It then uses a feature attention interaction mechanism to fuse the local geometric detail features and the global context features.
3. The railway track detection method based on laser point clouds according to claim 2, characterized in that, The feature fusion of the local geometric detail features and the global context features using the feature attention interaction mechanism includes: Global contextual features and local detail features are extracted in parallel, and then a cross-modal similarity feature map is constructed. The spatial correspondence between global and local features is measured using the vector dot product: For each point The attention weight matrix is generated by normalizing the similarity matrix along the local feature dimension using the SoftMax function. : Based on this, spatial adaptive weighting is applied to local features to obtain enhanced features. : Finally, attention-guided global and local feature fusion is achieved through addition and 1×1 convolution operations, represented as: 。 4. The railway track detection method based on laser point clouds according to claim 2, characterized in that, After feature fusion, it also includes: 32-dimensional features are processed using a multilayer perceptron. Mapping to the semantic segmentation space, the class probability distribution of each point is output: in, The function is SoftMax, where K is the number of categories; The semantic segmentation of tracks in complex point cloud scenarios is achieved using the weighted cross-entropy loss function as follows: in, Based on category frequency Dynamic adjustment To prevent division by zero smoothing factor.
5. The railway track detection method based on laser point clouds according to claim 1, characterized in that, The large-scene point cloud segmentation steps include: Through uniform sampling function ,generate A local point cloud patch ,satisfy Furthermore, there are overlapping areas between the blocks. ; Spatial index based on octree Define the neighborhood query function ,in The search radius is used to accelerate the spatial association calculation of point clouds within local blocks; For each sub-block Perform forward computation of the network and output the probability distribution of the point set. For points within the overlapping region The final probability is obtained by weighted averaging: in, As the normalization factor, Indicates a sub-block The number of points.
6. The railway track detection method based on laser point clouds according to claim 1, characterized in that, The method of fitting the orbital line using spline curves includes: Cluster the segmented orbital point cloud and define the neighborhood radius. and minimum number of points threshold Generate an independent set of orbital clusters Each cluster satisfies: For each cluster Sort the point set along the direction of the track extension: Remove vertical outliers and retain the set of points that satisfy the constraints: in For local windows Mean of the inner z-coordinate, The corresponding standard deviation; For the filtered point set Construct parameterized B-spline curves : in As control points, For p-th degree B-spline basis functions; The final output B-spline curve The geometric shape that represents the centerline of the orbit.
7. The railway track detection method based on laser point clouds according to claim 1, characterized in that, The steps for optimizing the trajectory alignment include: Spatial relationship analysis is performed on the clustering results of adjacent tracks, and the fusion optimization of similar track lines is achieved through minimum distance constraints to obtain the final track extraction results.
8. A railway track inspection device based on laser point clouds, characterized in that, include: The point cloud data acquisition module is used to collect laser point cloud data of railway scenes and perform preprocessing to build enhanced training and validation sets; The network model module is used to construct a Transformer-based two-branch encoder-decoder network model and train the network model based on the training set and the validation set. The orbit point cloud extraction module is used to segment large scene point clouds by random sampling during the inference phase based on the trained network model, and accelerate neighborhood retrieval by spatial indexing. After performing network inference on each segmented point cloud block, a probability weighting strategy is used to fuse the prediction results of overlapping areas to obtain the orbit category point cloud. The track line fitting module is used to perform clustering algorithms on the point cloud of the track categories to separate independent track instances, and after removing vertical outliers, to fit the track centerline using spline curves to the remaining points. The track alignment optimization module is used to optimize the track alignment based on the track centerline to obtain the track detection results.
9. An electronic device, characterized in that, include: A memory and one or more processors connected to the memory, the memory storing a computer program, the processors executing the computer program to implement the railway track detection method based on laser point clouds as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable commands for performing the railway track detection method based on laser point clouds as described in any one of claims 1-7.
Citation Information
Patent Citations
Rail center line extraction method and system based on unmanned aerial vehicle laser point cloud
CN116862976A
Context-driven large-scale garden scene point cloud semantic segmentation method
CN117036694A
Point cloud segmentation method and system based on double channels
CN119672036A
Railway track feature extraction method and system
CN119884707A
Cited By
Railway turnout curve-based inspection abnormity early warning method and system
CN122336692A
Railway turnout curve-based inspection anomaly early warning method and system
CN122336692B