Rail Track Extraction from
Rasterized Classified Point Clouds Using a Full-Resolution,
Fully Convolutional Recurrent Neural Network


Abstract

Rail track extraction is essential for effective railway asset management and maintenance, especially in automated inspection and mapping workflows. This paper introduces a novel method for extracting rail tracks from classified 3D point clouds using a fully convolutional recurrent neural network that preserves full spatial resolution and is trained exclusively on synthetically generated data. This approach enhances per-pixel quality and is particularly suited for rail track extraction. The proposed method begins by rasterizing points corresponding to railroad tracks, then applies the neural network to reduce noise and yield a cleaner track representation suitable for vectorization [1]. Subsequent morphological operations further refine the resultant data, enabling accurate track centerline extraction. Next, the extracted centerlines undergo smoothing to eliminate residual irregularities [2], [3]. Finally, the algorithm transfers 3D information from lidar points onto 2D polylines and applies additional vertical smoothing. A single centerline for both tracks is found using the Dynamic Time Warping (DTW) algorithm [4]. The final outcome consists of rail top centerlines and track centerlines derived for rail pairs, with minimal manual intervention. Experimental validation confirms the effectiveness of this method in yielding high-quality rail track extraction.

1 Introduction↩︎

Accurate rail track information is critical for safe and efficient rail operations [5]. In particular, precise track centerlineslocated midway between the two railsare essential for systems such as Positive Train Control (PTC), which monitor train location and speed to automatically prevent collisions, overspeed derailments, and unauthorized movements through misaligned switches [6].

To meet the precision and safety requirements of modern rail systems, detailed 3D information about track geometry must be acquired and regularly updated. Mobile lidar scanners mounted on rail vehicles are capable of capturing dense, high-resolution point clouds at high acquisition rates, making them well-suited for mapping rail corridors, including tracks, switches, crossings, and other critical infrastructure components [7].

However, extracting rail points from large-scale, high-density lidar datasets remains a significant challenge, especially in complex or cluttered environments [8]. Manual inspection and semi-automated workflows can be time-consuming, and rule-based extraction methods often require careful tuning to specific sensors, rail layouts, and scene conditions. In contrast, deep learning offers a powerful alternative by learning patterns directly from data, enabling more automated and potentially more accurate rail classification. Recent studies [9][11] have demonstrated promising results in applying deep learning to classify rail environments from point clouds. Yet, most existing methods focus on broader scene classification, while only a few are dedicated specifically to extracting rail features themselves.

Even after rail points are classified, modeling them as 3D polylines introduces additional challenges. This step requires vectorization and smoothing, often relying on complex algorithms to address noise, gaps, curvature variations, and rail direction at intersections [12][15]. These processes are computationally intensive and sensitive to data quality, making them difficult to scale across diverse rail systems.

To address these challenges, we explore a synthetic-data-trained deep learning approach for rail vectorization from rasterized classified point clouds. We propose a novel method, Full-Resolution Progressive Dilated Fusion (FRPDF), for extracting 3D rail polylines and centerlines from classified rail points. To our knowledge, this specific combination of synthetic raster training, full-resolution recurrent dilated fusion, and rail-vectorization postprocessing has not been previously applied to rail track extraction. Our approach leverages a neural network trained on synthetic raster data, which eliminates dependence on real-world rail datasetsoften proprietary and restricted by rail companies. Using synthetic data enables the generation of diverse training samples representing varying rail widths, curves, gaps, and intersection configurations. To simulate real-world conditions, we introduce multiple levels of noise into the synthetic rasters. This significantly reduces the need for manual labeling while improving the model’s generalizability and robustness.

In addition, working with raster data simplifies the input structure compared to raw point cloud data and lowers computational costs. This allows us to build our model on top of established neural network architectures designed for raster inputs, offering greater flexibility and development efficiency.

The proposed FRPDF network operates at full resolution to preserve fine geometric details and employs a reduced number of channels to minimize computational overhead. In contrast to downsampling architectures styled after U-Net, FRPDF preserves full spatial resolution, which is advantageous for rail vectorization. FRPDF utilizes a lightweight encoder-decoder design with fused channel strategies that is well suited to handling high-noise scenarios. We conducted an exploratory comparison with Asymmetric Convolutional Neural Network (ACNN) [16] during development. However, because a fully fair parameter- and capacity-matched comparison would require substantial reengineering, we do not present this comparison as a definitive benchmark in this paper.

In summary, the main contributions of this paper are the following:

  1. FRPDF, a novel deep learning architecture for rail vectorization from classified point clouds

  2. A synthetic raster-based training strategy that avoids reliance on proprietary rail data and reduces the need for manual labeling

  3. Experimental evaluation of FRPDF on synthetic test rasters, together with qualitative validation on real lidar data

The proposed architecture was developed from a design process inspired by U-Net, but the final full-resolution formulation has conceptual similarities to ACNN while avoiding the limitations of downsampling-based architectures.

All preprocessing, labeling, training, classification, and extraction of rails was performed in ArcGIS Pro 3.7.

Although this work focuses on rail track extraction, the proposed FRPDF solution may also be relevant to other rasterized reconstruction problems involving smooth, continuous rail-like structures observed with noise or gaps. The method is most appropriate when the target features follow strong geometric regularity, such as continuity, limited curvature variation, and predictable local shape. It is not intended as a general solution for arbitrary line extraction or, particularly, for structures with abrupt or random direction changes, where different architectures or task-specific models may be required.

The remainder of this paper is organized as follows. Section 2 reviews related work. Section 3 describes the point-cloud dataset, preprocessing, and rail classification. Section 4 details the synthetic data generation process. Section 5 introduces the FRPDF architecture. Section 6 presents the quality evaluation. Section 7 describes the application of the trained network to real lidar data. Sections 8 and 9 describe vectorization and railroad centerline reconstruction, respectively. Section 10 presents an example, and Section 11 concludes the paper and discusses future work.

2 Related Work↩︎

Several methods have been proposed for extracting track centerlines or rail top centerlines from point cloud data.

Data-driven and model-driven approaches to extract track centerlines located between rails from mobile laser scanning (MLS) point clouds were introduced in [12]. Rail points were identified based on their height relative to the surrounding ground and the linear, parallel characteristics of rail geometry. In the data-driven approach, for each point on one rail, the algorithm searches for the nearby points on the opposite rail that are in a similar direction, fits a line through those points, and draws a perpendicular line from the original point to the fitted line. The midpoint is stored as a center point. These midpoints are then interpolated and smoothed into a continuous centerline using Random Sample Consensus (RANSAC). In the model-driven approach, a simplified parametric model, consisting of two rail pieces, is fitted to each rail segment using a Markov chain Monte Carlo (MCMC) algorithm. A Fourier series function is applied to interpolate a smooth and continuous rail model, and the final centerlines are derived as the geometric center between the modeled rails. Both approaches achieve high accuracy (2 cm–3 cm); the data-driven approach performs well near switches and small gaps, while the model-driven method is more robust for missing data and outliers. However, both approaches show reduced accuracy on curves.

A fully automated method for extracting track centerlines from MLS point clouds was proposed in [14]. The approach begins by associating point cloud data with the vehicle trajectory and filtering out points located far from the railway corridor. Additional filters based on height and surface roughness exclude elevated structures and irregular surfaces, significantly reducing noise from objects like trees, poles, and overhead cables. The remaining data is projected into 2D rasters representing height differences and intensity, allowing efficient isolation of potential rail regions. Initial rail tip points are roughly identified and refined using cylindrical templates to ensure alignment with the actual railhead and to eliminate interference from ballast and sleepers. Straight segments of track are detected using principal component analysis (PCA), and in each segment, transverse slices are taken at regular intervals to extract innermost railhead points. Midpoints between these pairs are computed and connected to form a smooth, continuous centerline polyline. The method supports complex rail layoutsincluding multiple tracks, crossings, and switcheswhile maintaining an average rail delineation error of less than 3 cm.

A method for extracting railtop centerlines from MLS point clouds was proposed in [15]. The fully automated workflow first discards a majority of non-rail points through voxel-based pruning and subsequently identifies railhead points using local linearity and point-density filtering. Rail pairs are then detected within spatial voxels using a RANSAC-based model and aggregated into continuous track sections. Based on the detected rail pairs, approximate track centerlines are constructed, split into continuous paths, and subsequently smoothed using polynomial fitting. The smoothed track centerlines serve as reference paths for fitting railhead templates to the original point cloud, yielding the final railtop centerlines. The method achieves sub-centimeter accuracy on non-intersecting rails and comparable accuracy to existing methods in railway intersections while using only geometric information.

A method for detecting rail points and generating 3D rail models from photogrammetric point clouds generated from unpiloted aerial vehicle (UAV) imagery was proposed in [13]; these point clouds are typically noisier and less dense than laser scanning data. Candidate rail points are first identified by detecting local height jumps within a grid. Nonrail points are then filtered out based on color intensity. Surface planarity is assessed using PCA, allowing the removal of irregular or nonplanar structures. A second-degree polynomial is then fitted to the candidate rail points using the M-estimator Sample Consensus (MSAC) algorithm, enabling the construction of smooth and continuous rail paths. To reconstruct the 3D rail model, the point cloud is projected onto the XZ plane and a predefined 2D model of the rail piece is fitted to the points. After fine-tuning the model’s rotation and translation parameters, it is reprojected into 3D space. Finally, Fourier interpolation is applied to smooth transitions between segments, resulting in a continuous 3D rail model. While this method effectively reconstructs the rail surface from noisy UAV data, it does not address the extraction of accurate rail top centerlines from the refined model.

Overall, existing methods for rail geometry extraction differ significantly in data sources, algorithmic frameworks, and output objectives. Some approaches utilize MLS data, which offers high point density and precision, while others rely on UAV photogrammetric data, which is more accessible but typically noisier and less dense. Techniques span from data driven to model driven, with some targeting the extraction of track centerlines between rails while others focus on precise rail top centerlines. A few methods reconstruct rail models without explicitly generating centerlines. Across these approaches, a variety of fitting strategiessuch as RANSAC, MSAC, polynomial regression, and template matchingare employed, each with its own advantages and limitations depending on data quality and scene complexity. Most workflows involve considerable parameter tuning and are sensitive to specific data characteristics. Given this complexity and variability, deep-learning-based approaches provide growing potential for technology to learn spatial patterns and automatically generate accurate centerlines with reduced manual effort and improved adaptability across diverse datasets.

3 Data and Rail Classification↩︎

3.1 Dataset Description↩︎

Dense point clouds were acquired from a train-mounted MLS system along a multitrack railway corridor in India, as seen in Figure 1. Due to the scanner’s position on the rightmost track, this track and the adjacent center track exhibit high point density, capturing fine-scale rail geometry. In contrast, the leftmost track is sampled much more sparsely due to greater sensor-to-target range and oblique incidence angles, resulting in incomplete point coverage and reduced geometric fidelity.

Figure 1: Point clouds of a multitrack railway corridor acquired using a train-mounted MLS system. Data courtesy of Esri India.

The scene contains typical railway corridor features captured in MLS data, including rails, sleepers, ballast, and ground surfaces, along with vegetation growing between the parallel tracks. Overhead railway electrification infrastructure is also present, consisting of masts and supporting wires along the corridor. Adjacent terrain and roadside objects are partially captured. This dataset provides a representative MLS scenario for evaluating rail classification and extraction under different data quality conditions.

The track gauge is 1.0 m, and each rail exhibits a thickness of 61.91 mm. The railhead surface is typically 0.15 m above the surrounding ground.

3.2 Preprocessing and Rail Point Labeling↩︎

All preprocessing and labeling was performed using interactive rail selection [17] and class code editing tools in ArcGIS Pro.

Processing boundaries were first delineated along the tracks, extending 1.5 m outward on both sides to restrict the analysis to the immediate vicinity of the tracks. Ground points were classified using the Classify LAS Ground tool with the conservative option so that sleepers and ballast were also included as ground. The Classify LAS By Height tool was then used to identify low (< 0.1 m) and high (> 0.25 m) points relative to the ground; these were excluded from further processing as they fall outside the expected rail height zone.

Rail top points (points on the railhead) were labeled using the Interactive Rail Selection tool. Beginning with a small set of manually selected seed points, the tool iteratively expanded the selection along the track by evaluating neighboring candidates within a defined search radius. Points were added only if they satisfied geometric constraints characteristic of the rail: They had to fall within the expected rail width envelope, maintain minimum vertical separation from the ground, and remain within a narrow elevation tolerance relative to the prevailing railhead height.

Finally, the Thin LAS tool was applied to thin ground points using a 0.1 m grid and to remove low and high points outside the rail height zone. This significantly reduced the dataset size and improved the efficiency of subsequent model training. After preprocessing, the dataset consisted primarily of rail top points, thinned ground points, and unclassified rail-side points and intertrack vegetation within the 0.1 m–0.25 m height range.

3.3 Model Training and Inferencing↩︎

ArcGIS Pro was used for preparing training data [18], model training [19], and inferencing [20]. The labeled dataset was split into training and validation subsets. Training and validation samples were exported using the Prepare Point Cloud Training Data tool, which partitioned the data into 4 m \(\times\) 4 m blocks (stored in H5 format) with a maximum of \(3,000\) points per block to produce fixed-size inputs suitable for deep neural network training. When a block exceeded the point limit, the points were randomly partitioned into several blocks of point-limit size, with each point being used in no more than two blocks. The number of blocks was no more than necessary to ensure that each point appears in at least one block. For example, if a block has \(10,000\) points, four blocks of \(3,000\) points will be generated.

Model training was conducted using the Train Point Cloud Classification Model tool with the RandLA-Net architecture. RandLA-Net is a lightweight and computationally efficient network designed for large-scale point cloud segmentation. It combines random sampling with local feature aggregation to effectively capture fine-scale geometric and texture information while remaining computationally efficient for large-scale point clouds.

Both training and validation loss exhibited a decreasing trend across epochs, indicating effective model convergence. The model achieved a validation recall of approximately \(0.99\) for the rail class.

Inference was performed using the Classify Point Cloud Using Trained Model tool. To maintain consistency across datasets, the same preprocessing and thinning procedures were applied to the test dataset prior to classification. The trained model successfully classified the majority of rail top points across the test area. However, several misclassification patterns were observed. A few low vegetation points were incorrectly classified as rail due to similarities in elevation and local geometry. Some rail top points on the leftmost track were missed, and classification ambiguity occurred along the upper rail edges where class boundaries were less distinct. Classification performance varied across tracks, reflecting the underlying data quality: The right and center tracks produced the most accurate results, while the left track showed reduced performance due to lower point density and increased geometric uncertainty.

4 Synthetic Data Generation↩︎

Synthetic data was generated through a systematic pipeline designed to simulate realistic railroad track conditions for training neural networks in rail extraction tasks. The process commenced with the generation of idealized railroad centerlines, followed by deliberate distortions and transformations to replicate various real-world imperfections and artifacts.

4.1 Parameter Choices and Validation↩︎

Track gauge and rail thickness parameters were defined by U.S. and European railway specifications. Synthetic rail thicknesses were varied randomly to simulate real-world variations encountered in practice. Rasterization cell size was selected to yield a rail representation spanning a few pixels, balancing resolution and computational efficiency.

Figure 2 shows five representative synthetic track layouts rendered with the following U.S. 132 RE parameters: gauge 1.435 m, railhead thickness 76.2 mm, and raster cell size 4 cm. At this resolution each rail spans roughly two pixels, giving the network just enough detail to capture sub-pixel offsets while keeping the rasters compact. The generator produces a broad range of geometriesbroad curves, tight bends, transitions, and split junctionswhich are visible in the top row. Each clean raster is paired with a corrupted counterpart created by combining rail shifts, missing segments, local thickness variations, pixel flips, and random blob artifacts. Training on this aggressively distorted set encourages the model to rely on track-level geometrytwo continuous, parallel rails at constant gaugerather than superficial pixel patterns.

Figure 2: Synthetic training examples. The top row shows the original noiseless track rasters; the bottom row shows the corresponding distorted rasters with added noise. Each column pairs the same layout before and after corruption.

Validation of neural network performance was conducted primarily using synthetic datasets, as substantial volumes of synthetic data allowed comprehensive training and comparative analyses of different neural network architectures.

4.2 Simulation of Railroad Network and Rail Track Centerlines↩︎

Two strategies were implemented to generate the railroad network. The first strategy randomly selects parameters for railroad splits and determines whether segments will be straight or curved. The second strategy involves generating random points with randomly assigned directions within a defined rectangular area, simulating varied railroad layouts. These points are subsequently randomly connected using clothoid curves, ensuring continuous and smooth transitions between rail track segments. This process utilizes a precomputed table containing combinations of clothoid curves for optimal point-to-point connectivity.

This approach generates both realistic and unrealistic railroad designs. The primary objective is to achieve sufficient variability to encompass all realistic layouts, accepting the inclusion of numerous unrealistic configurations as a necessary trade-off.

To derive the individual rail track centerlines, the computed railroad centerline must be shifted by the half-gauge distance plus the half-rail thickness in both directions.

4.3 Track Distortion and Noise Addition↩︎

Subsequent to generating the idealized centerlines, the data underwent several distortion processes to mimic realistic track conditions. Initial distortion was applied by perturbing rail geometries and occasionally omitting segments, simulating potential data-capture errors.

The distorted rail lines were rasterized into grid-based representations, facilitating the introduction of pixel-level noise. This additional noise included random pixel flips based on predefined probabilities. Additional randomized blob-like artifacts, varying in size and number, were introduced to further represent diverse and realistic noise scenarios. Noise probabilities and blob characteristics were randomly selected to ensure broad coverage of potential noise scenarios, ranging from large-scale disturbances to minor, localized irregularities.

5 Neural Network Architecture↩︎

The architecture is built upon a full-resolution, fully convolutional recurrent neural network (RNN) design. Each recurrent block within this structure consists of a fully convolutional neural network employing dilated convolutions to effectively capture spatial details and multiscale contextual information.

While conceptually similar to the U-Net architecture [21], [22] initially introduced in [23], our method differs fundamentally by replacing max-pooling layers with dilation layers. This critical modification ensures that full spatial resolution is maintained throughout the network, preventing the loss of detail commonly encountered with downsampling methods. Our empirical observations indicate that conventional downsampling architectures are insufficient for reconstructing railroad tracks due to uneven pixel processing, which introduces artifacts problematic for vectorization tasks. Addressing this challenge, our approach integrates dilated convolutional layers (also referred to as atrous convolutions) [24], which produce high-quality, uniformly processed pixel representations essential for accurate rail track centerline reconstruction.

Similar to the ACNN [16], [25], our architecture operates at full resolution to prevent these common artifacts. Although maintaining full resolution does increase computational demands due to the absence of downsampling, it does not inherently require more parameters. We mitigate the additional computational burden by decreasing the number of channels, thus removing the necessity to aggregate information from lower-resolution feature maps.

Through empirical experimentation, we found that skip connectionswidely used in U-Net for transferring detailed layer informationwere not beneficial in our context. Since our neural network maintains full resolution, these skip connectionsby continuously reintroducing raw, unprocessed featuresunintentionally restricted the network’s capacity to derive more complex and abstract features.

Our findings align with those presented in the ACNN architecture, which similarly identified the absence of skip connections as being advantageous for detailed pixel-wise prediction tasks. Furthermore, dilated convolutions allow our network to substantially increase its receptive field without a significant increase in parameters, effectively capturing broader spatial contexts while preserving computational efficiency.

The proposed architecture, FRPDF, integrates progressive fusion via recurrent dilated convolutions. This design effectively merges multiscale information without reducing input resolution, making it particularly well-suited for precise pixel-level tasks such as rail track extraction.

Throughout this section, we use kernel radius \(r\) to denote the integer half-width of a square convolution kernel; thus, the corresponding kernel size is \((2r + 1) \times (2r + 1)\). Figure 3 shows the custom convolution block, CustomConv2d, from [22], which comprises a Conv2d layer configured with \(C_{\mathrm{in}}\) input channels and \(C_{\mathrm{out}}\) output channels, a kernel radius \(r\), padding \(r \cdot d\), dilation factor \(d\), and no bias. The output is subsequently processed by a BatchNorm2d layer [26] and activated with ReLU, both operating on \(C_{\mathrm{out}}\) channels.

Figure 3: A custom 2D convolution block. The Conv2d node has C_{\mathrm{in}} input channels and C_{\mathrm{out}} output channels, kernel radius r, padding r \cdot d, dilation d, and no bias. The subsequent BatchNorm2d and ReLU use C_{\mathrm{out}} channels.

Figure 4 shows the stacked convolution module, StackedConv2d, from [22], which consists of two sequential custom convolution blocks. The first block processes the input with \(C_{\mathrm{in}}\) channels and produces \(C_{\mathrm{out}}\) channels, while the second block uses \(C_{\mathrm{out}}\) channels for both its input and output. Both convolution blocks use kernel radius \(r\) and dilation factor \(d\).

Figure 4: A stacked arrangement of two consecutive CustomConv2d blocks. Here, C_\mathrm{in} and C_\mathrm{out} denote the number of input and output feature channels, respectively; r is the kernel radius; and d is the dilation factor. The first block uses C_\mathrm{in} as input channels and C_\mathrm{out} as output channels, while the second block reuses C_\mathrm{out} for both its input and output.

Figure 5 shows a progressively combined block, ProgressiveCombine2d. In this block, an initial CustomConv2d layer with \(c\) channels is applied to the input. Its output is concatenated with the original input via a skip connection, forming \(2 c\) channels that are then reduced back to \(c\) channels by a subsequent CustomConv2d layer.

Figure 5: A ProgressiveCombine2d block. The first CustomConv2d has c input/output channels. Its output is concatenated with the original input (via a dashed skip) to form 2 c channels, which the second CustomConv2d then reduces back to c channels.

FRPDF architecture is shown in Figure 6. The architecture leverages dilated convolutions at varying dilation rates within its central fusion bridge to efficiently integrate multiscale contextual information without compromising spatial resolution. These dilated convolutions effectively expand the receptive field, allowing the network to consider broader spatial contexts and maintain high-resolution feature maps simultaneously.

Figure 6: The network begins with a channel-expansion front endinformally called an “encoder”that projects the two-channel input into 24 feature maps while preserving full spatial resolution. These 24-channel maps feed into the Full-Resolution Dilated Fusion bridge, which comprises seven dilated-convolution blocks with dilation rates 2^n - 1, n = \overline{1\dots7} (i.e. \left\{1,3,7,15,31,63,127\right\}), to sequentially aggregate multiscale context without any spatial down- or up-sampling. A symmetric 24-channel back endserving as a “decoder” only in the sense of mirroring the front-end convolutionsfurther processes these features but retains the same channel count. Finally, a 1\times1 convolution collapses the 24 channels to a single feature map, and a sigmoid activation produces the per-pixel single-class probability output.

The FRPDF layer is used as a recurrent layer, as shown in Figure 7. In our experiments, we found that performing two iterations of the FRPDF processing significantly improves the quality of the results, especially when handling datasets containing larger gaps or noisy regions. Additional iterations beyond two further enhance results, but the improvement is less dramatic compared to the benefit gained from the initial two iterations. Although this paper uses a fixed number of iterations, the criteria for deciding the optimal number of iterations can be designed dynamically to better adapt to varying input data conditions.

Figure 7: A recurrent architecture with a decision diamond after the FRPDF layer. From the diamond block, the No arrow (exiting left and down) proceeds to the \tfrac12 threshold and then to the final output, and the Yes arrow (exiting right and up) loops recurrently via the \tfrac34 threshold, which feeds back to the Concat block.

6 Quality Evaluation↩︎

Our evaluation focuses on rail track extraction performance using confusion-matrix metricsfalse negatives (FN), false positives (FP), and true positives (TP)but not true negatives (TN) since they predominantly cover nonrail areas and add little insight. We have opted not to include a direct ACNN baseline herewe found that a truly fair parameter- and capacity-matched comparison was infeasible without extensive reengineering beyond the scope of this workso we instead report FRPDF’s stand-alone performance in Table 1.

Table 1: FRPDF performance was evaluated on \(1024\times1024\) test images (batch size of 2) using a Dell workstation with an Intel Xeon W-2265 (3.5 GHz, 12-core, Hyper-Threading), 64   RAM, and an NVIDIA RTX A6000 GPU. Metrics: precision, recall, and F1 score. Resource measures: parameter count, peak GPU memory, and per-image inference time.
Model FN FP TP Precision Recall F1 Parameters GPU Memory Time
FRPDF 214,014 875,941 3,716,533 0.809 0.946 0.872 293,545 1{,}554   98 ms

7 Applying the Neural Network to Real Data↩︎

The FRPDF networks were trained entirely on synthetic data covering common European and U.S. track standards, along with a sparse set of additional pairs of track gauge and railhead thickness to improve generalization.

We first select the model whose training parameters have the ratio closest to the target track gauge and railhead thickness. We scale the input lidar points accordingly, rasterize them, and then pass them through the network. To remove edge effects, an overlapping tiling scheme is used. This procedure allows several pretrained models to cover a wide range of real-world rail configurations without retraining.

8 Vectorization↩︎

After inference, the FRPDF network yields a cleaned binary raster in which most noise is suppressed, small gaps are bridged, and the rail profile is enforced. Minor artifacts nevertheless remain, so direct vectorization would still introduce spurious branches. We therefore apply a morphological closing to fill small holes and bridge short gaps. The resultant raster is vectorized using veinerization algorithm after applying parity-fix transformation, described in [1]. A comparable workflow is provided by the ArcScan [27], [28] extension for ArcGIS.

8.1 Postprocessing of Vectorized Geometry↩︎

The polylines obtained from vectorization are smoothed using the algorithm described in [2], [3]. Each lidar point classified as rail is orthogonally projected onto the nearest smoothed polyline while preserving its original \(z\)-coordinate, and the projected points are ordered along the rail. The extremal-boundary algorithm described in [29] is applied and only those points lying on the railhead top surface are retained. Finally, the \(z\)-profile is smoothed with the same one-dimensional smoothing algorithm [2], [3], yielding geometrically smooth 3D polylines representing the centerlines of the top of the rails.

9 Railroad Track Centerline Reconstruction↩︎

9.1 Matching Pairs of Polylines↩︎

The matching of polyline pairs is based on DTW [4]. Given two polylines, \(P_I\) and \(P_J\), the algorithm identifies common subpolylines within the specified distance tolerance \(T\).

Element Pairing↩︎

To reduce complexity, the algorithm focuses on point-to-segment (or segment-to-point) matches. A pair is deemed valid if the minimum distance between the point and the segment is less than \(T\). In a point-to-segment match, two point-to-point relationships are implicitly formed: one between the point and the segment’s start vertex, and another between the point and the segment’s end vertex. Because polylines can overlap in multiple areas, numerous candidate pairs may be generated.

Sorting Candidates↩︎

All valid pairs are sorted by their positions along both polylines, ensuring that each unique pair is considered only once. The sorting enforces the rule that no pair \((p_1, q_1)\) follows another pair \((p_2, q_2)\) if \(p_2 < p_1\) but \(q_2 \leq q_1\), or vice versa. This consistent ordering is crucial for subsequent steps. Sorting by the indices of one polyline and then by the other allows for efficient binary searches that verify pair existence and update the best match. Each pair stores its longest match length, the best (lowest) penalty found so far, and a reference to its predecessor in the match sequence.

Continuation Check and Cluster Formation↩︎

For each pair, the algorithm checks whether it can be extended by advancing one step along \(P_I\) or \(P_J\). If a valid continuation is found, the clusters containing these pairs are merged. The algorithm tracks the total length of the matched subpolylines; if extending the match results in a length greater than the current maximumor matches the current maximum while having a lower penaltythe match is updated. The penalty is computed as the integral of the squared distance between a point on one polyline and its corresponding segment on the other, as described in 12. By maintaining a reference to the previous pair, the algorithm can reconstruct the entire matched subpolylines.

Selection of Final Matches↩︎

After all candidate pairs have been processed, the algorithm selects matches in descending order of their subpolyline length. It skips any pairs belonging to clusters already in use, to avoid overlap. Finally, the matching subpolylines for each selected match are reconstructed using references to previous pairs.

10 Example↩︎

The proposed algorithm has been implemented in the Extract Rails From Point Cloud tool in ArcGIS Pro 3.4 [30]. In this section, we use the tool to extract rail geometries from the rail points classified in Section 3:.

The LAS file consists of \(75,499\) classified rail points (class \(10\)). The classification of rail points took 42 s. The dataset spans three railway tracks, each about 160 m in length and exhibiting varying point densities, discontinuities, and noise, with a small number of misclassified rail points located along or between the rails.

Parameters are configured to match the physical characteristics of the rail tracks. A track gauge of 1 m and a rail thickness of 61.91 mm are specified to reflect the actual rail geometry. Detected rail points are rasterized and processed by the FRPDF network to produce a binary raster representation. This raster is subsequently vectorized to produce preliminary rail line features. The classified rail points are used to transfer \(z\)-values. The extracted rail lines are then refined using the smoothing and simplification algorithms. Finally, rail centerlines are derived from the pairs of matched rail polylines.

The example was calculated on the same computer as described in the Section 6:. Rail reconstruction from point cloud took 1 min 12 s. Rail lines and centerlines were correctly extracted; see Figure 8.

Figure 8: Example of extracting the railhead top-center polylines (red) for each rail and the resultant track center polyline (blue). Data courtesy of Esri India.

11 Conclusion and Future Work↩︎

11.1 Conclusion↩︎

This paper presents a novel framework for extracting rail tracks and centerlines from classified mobile lidar point clouds using a raster-based deep learning approach. The method combines rasterization, the recurrent FRPDF neural network, and geometric postprocessing to generate accurate rail polylines and track centerlines. The proposed method provides several practical benefits.

  • The workflow is highly automated. Once rail points are classified, the algorithm automatically extracts rail geometry and centerlines without manual editing, enabling efficient processing of large railway networks.

  • The approach produces accurate and robust rail models. The FRPDF module operates in a recurrent refinement loop that progressively suppresses noise and restores rail continuity. By both maintaining full spatial resolution and training on diverse synthetic rail scenarios, this approach effectively bridges gaps and preserves the geometric detail required for vectorization.

  • The method does not rely on proprietary training datasets. The neural network is trained entirely on procedurally generated synthetic rail scenarios, avoiding limitations related to data availability and copyright while also eliminating the cost of manually labeling large training datasets.

  • The combination of using a raster-based approach and training on high-noise synthetic data improves the robustness of the algorithm to varying point cloud characteristics. Mobile lidar datasets often exhibit large variations in point density and noise levels due to sensor distance, occlusion, and scanning angle. The algorithm is able to handle these variations across diverse datasets.

Experimental results demonstrate that the proposed framework can reliably reconstruct rail geometries and centerlines from noisy lidar point clouds. By automating rail extraction and reducing manual intervention, the method improves the efficiency of railway mapping workflows and supports safer and more effective railway infrastructure management.

11.2 Future Work↩︎

Although the proposed approach demonstrates promising results, several areas remain for further improvement. Future work will focus on more complex railway configurations, such as turnouts, rail crossings, and rail yards, where diverging or merging tracks and additional rail components (e.g., switch rails and guard rails) introduce geometric complexity and may interfere with point classification and feature extraction. Extending the synthetic data generation and model training to explicitly include these scenarios could improve the network’s ability to recognize and separate branching tracks. Additional postprocessing or specialized submodels may be needed to accurately separate individual rails in switch areas. In addition, the fidelity of the synthetic training data can be further improved. Incorporating more realistic noise patterns, occlusions, and structural elements into the simulation process may enhance the model’s generalizability to challenging real-world conditions.

11.3 Summary↩︎

This paper presents a raster-based deep learning framework for extracting rail tracks and centerlines from mobile lidar point clouds using synthetic training data. The approach enables efficient and automated reconstruction of rail geometry while avoiding reliance on proprietary datasets as well as the cost of manual labeling.

Beyond railway applications, the combination of a carefully designed neural network and synthetic training data suggests a practical pathway for applying deep learning to other 3D feature extraction and reconstruction tasks. Such approaches could enable more reliable automation of infrastructure mapping workflows, reducing manual processing and improving the efficiency and safety of infrastructure management systems.

Acknowledgments↩︎

The authors thank Lois Stuart for copyediting the manuscript.

12 Integral of the Squared Distance from a Line Segment to a Point↩︎

Let \(\overline{{\boldsymbol{\mathbf{p}}}\,{\boldsymbol{\mathbf{q}}}}\) be a line segment of length \(L \;=\; \|{\boldsymbol{\mathbf{q}}} - {\boldsymbol{\mathbf{p}}}\|.\) Given a point \({\boldsymbol{\mathbf{r}}}\), we seek the integral of the squared distance from every point on the segment to \({\boldsymbol{\mathbf{r}}}\). Without loss of generality, translate \({\boldsymbol{\mathbf{r}}}\) to the origin (i.e., replace \({\boldsymbol{\mathbf{p}}}\) and \({\boldsymbol{\mathbf{q}}}\) with \({\boldsymbol{\mathbf{p}}} - {\boldsymbol{\mathbf{r}}}\) and \({\boldsymbol{\mathbf{q}}} - {\boldsymbol{\mathbf{r}}}\)), and assume henceforth that \({\boldsymbol{\mathbf{r}}} = {\boldsymbol{\mathbf{0}}}\).

Parametrize \(\overline{{\boldsymbol{\mathbf{p}}}\,{\boldsymbol{\mathbf{q}}}}\) by \(t \in [-1,1]\): \[\begin{align} {\boldsymbol{\mathbf{s}}}\left(t\right) \;=\; \frac{1}{2} \left( {\boldsymbol{\mathbf{p}}} \left(1 + t\right) + {\boldsymbol{\mathbf{q}}} \left(1 - t\right) \right). \end{align}\]

The integral of \(\|{\boldsymbol{\mathbf{s}}}\left(t\right)\|^2\) over the segment is \[\begin{align} I &\;=\; \frac{L}{2} \int_{-1}^{1} \|{\boldsymbol{\mathbf{s}}}\left(t\right)\|^2 \, dt \\ &=\; \frac{L}{2} \int_{-1}^{1} \left\| \frac{ {\boldsymbol{\mathbf{p}}} \left(1 + t\right) + {\boldsymbol{\mathbf{q}}} \left(1 - t\right) }{2} \right\|^2 dt \\ &=\; \frac{L}{8} \int_{-1}^{1} \|{\boldsymbol{\mathbf{p}}} \left(1 + t\right) + {\boldsymbol{\mathbf{q}}} \left(1 - t\right)\|^2 \, dt \\ &=\; \frac{L}{8} \int_{-1}^{1} \left( \|{\boldsymbol{\mathbf{p}}}\|^2 \left(1 + t\right)^2 + 2 \left({\boldsymbol{\mathbf{p}}} \cdot {\boldsymbol{\mathbf{q}}}\right) \left(1 - t^2\right) + \|{\boldsymbol{\mathbf{q}}}\|^2 \left(1 - t\right)^2 \right) dt \\ &=\; \frac{L}{8} \cdot \frac{8}{3} \left( \|{\boldsymbol{\mathbf{p}}}\|^2 + {\boldsymbol{\mathbf{p}}} \cdot {\boldsymbol{\mathbf{q}}} + \|{\boldsymbol{\mathbf{q}}}\|^2 \right) \\ &=\; \frac{L}{3} \left( \|{\boldsymbol{\mathbf{p}}}\|^2 + {\boldsymbol{\mathbf{p}}} \cdot {\boldsymbol{\mathbf{q}}} + \|{\boldsymbol{\mathbf{q}}}\|^2 \right). \end{align}\]

Therefore, the integral of the squared distance from the segment to the \({\boldsymbol{\mathbf{r}}}\) is \[\boxed{ I \;=\; \frac{L}{3} \left( \|{\boldsymbol{\mathbf{p}}}\|^2 + {\boldsymbol{\mathbf{p}}} \cdot {\boldsymbol{\mathbf{q}}} + \|{\boldsymbol{\mathbf{q}}}\|^2 \right). }\]

References↩︎

[1]
A. Gribov and E. Bodansky, “Vectorization and parity errors,” in Graphics recognition. Ten years review and future perspectives, 2006, pp. 1–10, doi: 10.1007/11767978_1.
[2]
E. Bodansky, A. Gribov, and M. Pilouk, “Smoothing and compression of lines obtained by raster-to-vector conversion,” in Graphics recognition algorithms and applications, 2002, vol. 2390, pp. 256–265, doi: 10.1007/3-540-45868-9_22.
[3]
A. Gribov and E. Bodansky, “Smoothing a network of planar polygonal lines obtained with vectorization,” in Graphics recognition. Recent advances and new opportunities, 2008, vol. 5046, pp. 213–234, doi: 10.1007/978-3-540-88188-9_21.
[4]
P. Senin, “Dynamic time warping algorithm review,” 2008, [Online]. Available: https://api.semanticscholar.org/CorpusID:16629907.
[5]
B. Yang and L. Fang, “Automated extraction of 3-D railway tracks from mobile laser scanning point clouds,” IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, vol. 7, no. 12, pp. 4750–4761, Dec. 2014, doi: 10.1109/JSTARS.2014.2312378.
[6]
United States Department of Transportation, Retrieved July 11, 2025“Positive train control (PTC).” [Online]. Available: https://railroads.dot.gov/research-development/program-areas/train-control/ptc/positive-train-control-ptc.
[7]
Bartlett & West, Retrieved July 11, 2025“Three emerging LiDAR applications for rail data capture.” [Online]. Available: https://www.bartlettwest.com/insight/three-emerging-lidar-applications-rail-data-capture.
[8]
Y. Lou, T. Zhang, J. Tang, W. Song, Y. Zhang, and L. Chen, Article number: 1998“A fast algorithm for rail extraction using mobile laser scanning data,” Remote Sensing, vol. 10, no. 12, pp. 1–22, 2018, doi: 10.3390/rs10121998.
[9]
M. Soilán, A. Nóvoa, A. Sánchez-Rodrı́guez, B. Riveiro, and P. Arias, “SEMANTIC SEGMENTATION OF POINT CLOUDS WITH POINTNET AND KPCONV ARCHITECTURES APPLIED TO RAILWAY TUNNELS,” ISPRS Annals of the Photogrammetry, Remote Sensing and Spatial Information Sciences, vol. V–2–2020, pp. 281–288, 2020, doi: 10.5194/isprs-annals-V-2-2020-281-2020.
[10]
J. Grandio, B. Riveiro, M. Soilán, and P. Arias, Article number: 104425“Point cloud semantic segmentation of complex railway environments using deep learning,” Automation in Construction, vol. 141, pp. 1–18, 2022, doi: 10.1016/j.autcon.2022.104425.
[11]
J. Grandio, B. Riveiro, D. Lamas, and P. Arias, Article number: 104854“Multimodal deep learning for point cloud panoptic segmentation of railway environments,” Automation in Construction, vol. 150, pp. 1–12, 2023, doi: 10.1016/j.autcon.2023.104854.
[12]
S. O. Elberink and K. Khoshelham, “Automatic extraction of railroad centerlines from mobile laser scanning data,” Remote Sensing, vol. 7, no. 5, pp. 5565–5583, 2015, doi: 10.3390/rs70505565.
[13]
S. Sahebdivani, H. Arefi, and M. Maboudi, Article number: 5220“Rail track detection and projection-based 3D modeling from UAV point cloud,” Sensors, vol. 20, no. 18, pp. 1–15, 2020, doi: 10.3390/s20185220.
[14]
M. Soilán, A. Nóvoa, A. Sánchez-Rodrı́guez, A. Justo, and B. Riveiro, Article number: 103684“Fully automated methodology for the delineation of railway lanes and the generation of IFC alignment models using 3D point cloud data,” Automation in Construction, vol. 126, pp. 1–21, 2021, doi: 10.1016/j.autcon.2021.103684.
[15]
A. Kononen, H. Kaartinen, A. Kukko, M. Lehtomäki, J. Taher, and J. Hyyppä, Article number: 105812“Fully automated extraction of railtop centerline from mobile laser scanning data,” Automation in Construction, vol. 168, pp. 1–10, 2024, doi: 10.1016/j.autcon.2024.105812.
[16]
X.-Y. Zhou, J.-Q. Zheng, P. Li, and G.-Z. Yang, ACNN: A full resolution DCNN for medical image segmentation.” 2020, [Online]. Available: https://arxiv.org/abs/1901.09203.
[17]
J. Chang and A. Gribov, Retrieved May 14, 2025“Classify rail points in mobile lidar point clouds.” [Online]. Available: https://www.esri.com/arcgis-blog/products/3d-gis/3d-gis/classify-rail-points-in-mobile-lidar-point-clouds.
[18]
Retrieved February 4, 2026“Prepare point cloud training data (3D Analyst).” [Online]. Available: pro.arcgis.com/en/pro-app/3.4/tool-reference/3d-analyst/prepare-point-cloud-training-data.htm.
[19]
Retrieved February 4, 2026“Train point cloud classification model (3D Analyst).” [Online]. Available: pro.arcgis.com/en/pro-app/3.4/tool-reference/3d-analyst/train-point-cloud-classification-model.htm.
[20]
Retrieved February 4, 2026“Classify point cloud using trained model (3D Analyst).” [Online]. Available: pro.arcgis.com/en/pro-app/3.4/tool-reference/3d-analyst/classify-point-cloud-using-trained-model.htm.
[21]
M. Buda, A. Saha, and M. A. Mazurowski, “Association of genomic subtypes of lower-grade gliomas with shape features automatically extracted by a deep learning algorithm,” Computers in Biology and Medicine, vol. 109, 2019, doi: 10.1016/j.compbiomed.2019.05.002.
[22]
mateuszbuda, Retrieved January 5, 2024U-Net for brain segmentation.” 2019, [Online]. Available: https://github.com/mateuszbuda/brain-segmentation-pytorch.
[23]
O. Ronneberger, P. Fischer, and T. Brox, U-Net: Convolutional networks for biomedical image segmentation,” in Medical image computing and computer-assisted intervention – MICCAI 2015, 2015, pp. 234–241, doi: 10.1007/978-3-319-24574-4_28.
[24]
F. Yu and V. Koltun, “Multi-scale context aggregation by dilated convolutions.” 2016, [Online]. Available: https://arxiv.org/abs/1511.07122.
[25]
XiaoYunZhou27, Retrieved May 25, 2025ACNN: A full resolution DCNN for medical image segmentation.” 2020, [Online]. Available: https://github.com/XiaoYunZhou27/ACNN.
[26]
S. Ioffe and C. Szegedy, “Batch normalization: Accelerating deep network training by reducing internal covariate shift,” in Proceedings of the 32nd international conference on international conference on machine learning - volume 37, 2015, pp. 448–456, [Online]. Available: https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/43442.pdf.
[27]
Environmental Systems Research Institute (ESRI), Using ArcScan for ArcGIS. 2004, p. 140.
[28]
Esri, Retrieved March 17, 2025“What is ArcScan?” [Online]. Available: https://desktop.arcgis.com/en/arcmap/latest/extensions/arcscan/what-is-arcscan-.htm.
[29]
A. Gribov, “Efficient computation of the directional extremal boundary of a union of equal-radius circles,” ArXiv e-prints. pp. 1–6, 2025, [Online]. Available: https://arxiv.org/abs/2503.21711.
[30]
Retrieved February 4, 2026“Extract rails from point cloud (3D Analyst).” [Online]. Available: pro.arcgis.com/en/pro-app/latest/tool-reference/3d-analyst/extract-rails-from-point-cloud.htm.