A method for measuring the off-seam value of a spring tab fastener by fusing geometric constraints, semantic segmentation and skeleton modeling
Patent Information
- Application Number
- CN202610805325.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-05
- Publication Date
- 2026-10-09
AI Technical Summary
[0097]1、本发明以线激光传感器采集的轨道三维点云作为数据输入源,通过扣件区域点云提取锁定检测范围,将提取后的点云输入 GEPN 网络进行语义分割。分割过程中,通过几何感知自注意力模块(LGSA)增强弹条关键结构的特征表达能力,以获得结构完整且边界清晰的弹条点云。然后将弹条点云输入弹条骨架提取模块,通过引入主平面形态恢复与截面几何约束的分层建模策略,提取稳定的弹条三维初始骨架中心线。根据弹条骨架关键特征点构建扣压基准平面,并计算弹条中肢关键点到该平面的空间距离,从而获得弹条离缝值。
Smart Images

Figure CN122888261A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of machine vision inspection and measurement technology, and in particular relates to a method for measuring the gap value of elastic fasteners by integrating semantic segmentation with geometric constraints and skeleton modeling. Background Technology
[0002] The track fastening system is a crucial component of railway track structures. Its main functions include reliably securing the rails, maintaining track gauge stability, and transmitting dynamic loads generated during train operation. Especially under high-speed and heavy-haul railway operating conditions, the stress state and stability of the fastening system directly affect the geometrical retention capability of the track structure and the safety and smoothness of train operation. In existing fastening structures, the elastic clip, as a key elastic element, needs to maintain a balance between stiffness and elasticity within a certain range to effectively constrain the rails and suppress track structure vibration and displacement. However, under long-term high-frequency loads and the influence of complex environmental factors, elastic clip fasteners are prone to loosening or performance degradation, leading to uneven distribution of track support stiffness, increased wheel-rail interaction forces, and even affecting the overall service performance of the track structure. Therefore, effective monitoring of the condition of the elastic clip fasteners is of great significance.
[0003] Currently, the clamping pressure condition is typically assessed indirectly by measuring the torque of the fastener bolts in engineering projects. However, this method requires a significant amount of manual operation, resulting in low inspection efficiency and making it difficult to meet the needs of large-scale, rapid track inspections. Related research indicates a correlation between the change in the gap between the elastic clip and the gauge baffle and the clamping pressure of the fastener. Therefore, measuring this gap value to assess the fastener condition becomes a feasible alternative. According to existing maintenance standards, this gap needs to be controlled within the millimeter range in conventional railways, while the requirements are even stricter in high-speed railways.
[0004] Currently, the acquisition of this gap largely relies on manual measuring tools for on-site inspection. Although high accuracy can be achieved under certain conditions, it suffers from low inspection efficiency and poor result consistency. To improve the level of inspection automation, existing technologies have attempted to introduce vibration detection and visual inspection methods. Among them, vibration signal-based methods typically use sensors placed on vehicle or track structures to identify the condition of fasteners by utilizing structural response characteristics. However, these methods rely on contact measurement and are not sensitive enough to slight loosening. Visual inspection methods based on two-dimensional images mainly use cameras to acquire images of the fastener surface for defect identification. However, due to the lack of stable depth information, it is difficult to achieve accurate spatial scale reconstruction. Although binocular vision can provide some depth estimation capabilities, it is prone to measurement errors under complex lighting and texture conditions.
[0005] With the development of 3D vision measurement technology, methods for acquiring 3D point cloud data of track areas based on line laser scanning or structured light imaging are gradually being applied to the field of fastener inspection. Compared with 2D methods, 3D point clouds can more completely describe the spatial geometric features of each component of the fastener. Existing technologies typically determine the looseness of fasteners by segmenting or extracting features from the point cloud data and combining height information or changes in geometric parameters. However, existing methods mostly focus on the overall structure or local height feature analysis, and their ability to identify subtle geometric changes in cases of slight looseness remains limited. Furthermore, to achieve higher accuracy in state assessment, precise segmentation and modeling of key components such as spring clips are required. However, the spring clip structure has characteristics such as slender curvature, local occlusion, and uneven point cloud sampling, making it difficult for traditional segmentation methods based on regular geometric models to obtain stable results. In recent years, the development of point cloud semantic segmentation technology has provided new solutions for complex structure recognition, including point cloud processing methods based on multilayer perceptron structures, local feature aggregation, and graph structure modeling, all of which have shown certain advantages in complex target segmentation.
[0006] While the aforementioned methods have improved the automation level of fastener inspection to some extent, they still have the following shortcomings in practical applications: Firstly, there is a difference between the actual geometry of the elastic bar structure and the ideal model, and simple geometric assumptions are insufficient to meet the requirements of high-precision measurement; secondly, insufficient accuracy in extracting key feature regions will directly affect the reliability of the gap calculation results. Therefore, how to achieve accurate segmentation of the elastic bar structure in complex point cloud data and realize high-precision gap measurement based on real geometric features remains an urgent technical problem to be solved. Summary of the Invention
[0007] To address the problems mentioned in the prior art, this invention proposes a method for measuring the gap value of elastic fasteners by integrating geometrically constrained semantic segmentation (GeoPointNet++, GEPN) and skeleton modeling, thereby achieving automated and high-precision measurement of the gap of elastic fasteners in track fasteners.
[0008] To achieve the above objectives, the technical solution of the present invention is as follows:
[0009] A method for measuring the gap value of elastic fasteners by integrating semantic segmentation based on geometric constraints and skeleton modeling, characterized by comprising the following steps:
[0010] Step 1: Extract the fastener region from the track point cloud collected by the line laser sensor. Based on the fastener region accurate segmentation method with multi-feature constraints, extract the fastener region point cloud from the track point cloud to lock the detection range.
[0011] Step 2: Input the extracted fastener area point cloud into the GEPN network for semantic segmentation. The GEPN network takes the extracted fastener point cloud as input and achieves point-level semantic segmentation through layer-by-layer feature abstraction and feature propagation.
[0012] Step 3: Precise extraction of the 3D skeleton of the elastic bar; specifically including 2D skeleton extraction based on back projection, 3D initial skeleton extraction based on height restoration, and 3D precise skeleton extraction based on elastic bar cross-section geometry correction;
[0013] Step 4: Calculate the seam gap value.
[0014] Preferably, in step one, the collected track point cloud includes not only fasteners, but also other background information, such as sleepers and rail edge data.
[0015] Preferably, in step one, the method for precise segmentation of the fastener area is as follows: a height threshold is set in the Z-axis direction through a pass-through filter to remove the background and redundant point cloud of the area below the sleeper, retaining only the point cloud of the track structure above the sleeper; a sliding range box is further constructed along the Y-axis and the changes in the number of points are counted; the fastener area is determined by identifying the valley position of the sudden drop in point cloud density, thereby achieving precise positioning of the fastener area.
[0016] Preferably, in step two, the semantic segmentation includes the following steps:
[0017] Step 1: In the encoding stage, the input point cloud is first adaptively downsampled through the ADS module to obtain a more reasonable keypoint distribution and alleviate the problem of uneven point cloud density. Then, the geometric and semantic information of the point cloud is gradually extracted through two-level feature extraction and feature enhancement to obtain the output features (B, 1536, 128) of the encoding stage. Among them, the first-level feature extraction stage reduces the point cloud resolution and increases the feature dimension layer by layer through a three-layer feature abstraction module (Set Abstraction, SA) to expand the network receptive field and extract multi-scale local geometric features. The second-level feature extraction stage further maps and aggregates features based on the feature representation of the previous stage to enhance the high-level semantic feature expression capability of the fastener point cloud. The features extracted by different branches at each level are concatenated and fused in the channel dimension and then input into the LGSA module, and feature updates are achieved through residual connections. During the feature extraction process, each layer performs point-by-point nonlinear mapping through a shared multi-layer perceptron (MLP) to achieve feature dimension transformation.
[0018] Step 2: In the decoding stage, the point cloud resolution is gradually restored through a three-layer feature recovery module, and semantic and geometric information from different levels are fused. First, in the first-layer feature recovery module, the high-level semantic features output from the encoding stage are fused with the corresponding layer features from the encoding stage through the Feature Propagation (FP) module, and the feature dimension is adjusted and semantic information is enhanced by the MLP. Subsequently, the features continue to pass through the second-layer feature recovery module, where FP performs further upsampling and feature fusion, and the MLP performs feature reconstruction to gradually restore the mid-level geometric structure information. Finally, in the third-layer feature recovery module, high-resolution feature recovery is achieved again through FP, and the MLP further optimizes the fused features to obtain a fine point-level feature representation. After the three-layer feature recovery, the obtained high-resolution point features are mapped point by point by the convolutional layer and the class logits are output, ultimately achieving the semantic segmentation result of the track fastener point cloud.
[0019] Step 3: During the network training phase, cross-entropy loss (CE) and boundary consistency loss (BRL) are used for joint optimization to improve the boundary accuracy and structural consistency of the segmentation results.
[0020] Specifically, the density adaptive sampling strategy (ADS) is as follows:
[0021] The original fastener point cloud is ,That For the coordinates of each original point cloud point, calculate the local density based on K-nearest neighbors:
[0022] ,
[0023] in, Given the Gaussian kernel bandwidth, the sampling probability is:
[0024] ,
[0025] in, The smoothing term is a strategy that assigns higher sampling weights to sparse regions and suppresses redundant points in dense regions, thereby enhancing the expressive power of edges and elongated structures while controlling the computational scale.
[0026] Specifically, the geometrically perceptual self-attention module (LGSA) is as follows:
[0027] For each feature point in the encoding stage Based on K-nearest neighbors, a neighborhood set is constructed, and the position difference within the neighborhood is calculated. Normal similarity and curvature difference The above geometric features are linearly mapped to generate attention weights:
[0028] ,
[0029] in, This represents the concatenated geometric feature vector. For learnable mapping matrix, For bias terms;
[0030] Enhanced features are obtained through weighted aggregation and residual connections:
[0031] ,
[0032] in, For learnable weight matrix, for The original feature vector, The feature representation of each neighboring point, This represents the attention weight.
[0033] This mechanism enables the network to prioritize key points with high geometric recognizability during feature aggregation, thereby alleviating the problem of feature confusion between geometrically similar components.
[0034] Specifically, the Boundary Consistency Loss Function (BRL) is:
[0035] Filter the set of boundary points based on gradient prediction by category:
[0036] ,
[0037] in, Represents the category gradient, for The category prediction probability vector;
[0038] The distance loss between the predicted boundary and the true boundary is:
[0039] ,
[0040] in, To predict the coordinates of the boundary points, These are the coordinates of the actual boundary points;
[0041] The final optimization goal is:
[0042] ,
[0043] in, For cross-entropy loss, This is the balance coefficient;
[0044] This loss function explicitly constrains the consistency between the predicted boundary and the true boundary. BRL effectively reduces category adhesion in the contact area of components and improves the structural integrity of the segmentation results.
[0045] Preferably, in step three, the two-dimensional skeleton extraction based on principal plane morphology recovery includes:
[0046] First, let the point cloud of the pop-up bar obtained by semantic segmentation be:
[0047] ,
[0048] in, No. The three-dimensional coordinates of the points This represents the total number of point clouds;
[0049] Statistical filtering is used to denoise the point cloud to remove outliers while maintaining local structural consistency.
[0050] Then, the cloud edge Orthogonal projection of the axis onto the principal plane ( (Plane) to obtain a two-dimensional point set:
[0051] ,
[0052] To improve topological stability, the two-dimensional point set Q is rasterized, with a raster resolution of 1. Then the discrete coordinates are represented as:
[0053] ,
[0054] in, The minimum coordinate value of the point set in the principal plane;
[0055] After constructing the binary image, morphological closing operations are performed to enhance region connectivity, and a two-dimensional skeleton pixel set is further extracted using a thinning algorithm.
[0056] ,
[0057] in, This represents the number of pixels in the skeleton.
[0058] The initial two-dimensional skeleton obtained at this point has burrs. By recovering the continuous planar coordinates through inverse mapping, an ordered two-dimensional skeleton is obtained:
[0059] ,
[0060] By using two-dimensional projection to stably restore the topology of the centerline in the main bending plane, the center trajectory is determined only by the planar shape, thereby structurally reducing the direct impact of cross-sectional thickness direction disturbance on center estimation and achieving decoupling between main bending error and cross-sectional offset error.
[0061] Preferably, in step three, the extraction of the three-dimensional initial skeleton for robust elevation recovery is as follows:
[0062] To recover the three-dimensional geometric structure, height direction information is introduced into the two-dimensional skeleton, and for each skeleton point... Construct a planar domain (domain point set) from the original point cloud:
[0063] ,
[0064] in, The neighborhood search radius;
[0065] Robustness is adopted in the neighborhood point set. The estimation method recalculates the corresponding elevation:
[0066] ,
[0067] in, The height value of the neighborhood point. For the robust Huber loss function, Robust scaling estimation for a domain-height distribution;
[0068] This optimization problem is used to estimate the robust center value of local height, thereby reducing the effects of noise and local occlusion, and thus obtaining the initial 3D skeleton:
[0069] ,
[0070] To ensure spatial continuity, the skeleton sequence is sorted and interpolated to obtain a smooth three-dimensional curve.
[0071] Preferably, in step three, the three-dimensional precision skeleton for geometric correction of the elastic bar cross-section is:
[0072] The initial 3D skeleton serves as the reference path for cross-section construction, used to determine the position of the cut surface and the normal direction, thereby explicitly introducing the cross-section geometry information into the centerline optimization process, as detailed below:
[0073] exist In this iteration, the current skeleton is:
[0074] ,
[0075] For each skeleton point Calculate its local tangent vector Its normal plane is constructed as follows:
[0076] ,
[0077] in, The unit tangent vector calculated from adjacent skeleton points. Let be any point in the plane;
[0078] Extract the point set within the area of this section:
[0079] ,
[0080] in, Assuming a cross-sectional thickness threshold, robust circle fitting is performed on the cross-sectional point set, let... and To fit the center and radius of the circle, the optimization problem is expressed as:
[0081] ,
[0082] in, and The first In the nth iteration The optimal fitting center and fitting radius of each cross section;
[0083] To enhance geometric stability, in conjunction with the design radius Weak prior regularization constraints are introduced:
[0084] ,
[0085] in, To allow for a certain deviation range, when the above formula is satisfied and the residual is below a set threshold, the skeleton points are updated.
[0086] To ensure overall geometric continuity, a curvature consistency constraint is imposed on the update results, and a threshold based on the upper limit of curvature in the structural design is set. If the local curvature exceeds the threshold, the update is rolled back until the maximum number of iterations is reached. When the iteration stops, the final 3D skeleton representation is obtained:
[0087] ,
[0088] in, This represents the skeleton point of the j-th section during the T-th iteration.
[0089] Through the above-described layered modeling and local geometric correction process, the following can be obtained: Figure 7 The diagram shows a continuous, smooth, three-dimensional skeleton that is geometrically consistent with the cross-section of the elastic bar.
[0090] Preferably, in step four, the gap value is calculated as follows:
[0091] In the 3D skeleton of the elastic bar, the 3D skeleton is divided into four 3D spaces along the XY axis. In each region, the influence of high-frequency noise and outliers in the point cloud on the feature point position is further reduced by averaging the local neighborhood of the skeleton points. In each 3D space of the two side support regions, the point with the smallest Z coordinate is selected as the feature point, and four key skeleton feature points are extracted. , , , , for , The midpoint, through , and Determine the crimping reference plane:
[0092] ,
[0093] in, , , It is a plane normal vector. After obtaining the clamping reference plane by setting the plane intercept parameter, the point closest to the clamping reference plane is selected as the feature point in the middle limb region of the elastic bar. Point for Then the distance from that point to the clamping reference plane is:
[0094] ,
[0095] Take the characteristic points of the middle limb of the bullet. Distance to the crimping reference plane The minimum value is used as the gap value of the elastic bar.
[0096] The present invention has the following beneficial effects:
[0097] 1. This invention uses a 3D point cloud of the track acquired by a line laser sensor as the data input source. The detection range is locked by extracting the point cloud of the fastener region. The extracted point cloud is then input into a GEPN network for semantic segmentation. During segmentation, a geometrically perceptive self-attention module (LGSA) is used to enhance the feature representation capability of the key structure of the elastic bar, resulting in a structurally complete and clearly defined elastic bar point cloud. The elastic bar point cloud is then input into the elastic bar skeleton extraction module. By introducing a hierarchical modeling strategy that incorporates principal plane morphology recovery and cross-sectional geometric constraints, a stable initial 3D skeleton centerline of the elastic bar is extracted. A fastening reference plane is constructed based on the key feature points of the elastic bar skeleton, and the spatial distance from the key points of the elastic bar's middle limbs to this plane is calculated, thereby obtaining the elastic bar gap value.
[0098] 2. This invention constructs a geometry-aware point cloud segmentation network (GEPN). Through an adaptive density sampling (ADS) strategy, a geometry-aware self-attention (LGSA) module, and a boundary refinement loss (BRL) function, it improves semantic segmentation accuracy in complex structural scenes. A hierarchical 3D skeleton modeling strategy based on principal plane morphology recovery, robust elevation modeling, and cross-sectional geometric constraints is proposed to address the center positioning offset caused by the slender and curved structure of the elastic clip and uneven point cloud density. The proposed method can achieve robust and high-precision measurement of elastic clip gaps under complex railway conditions. Attached Figure Description
[0099] Figure 1 This is a diagram illustrating the overall technical framework of Embodiment 1 of the present invention;
[0100] Figure 2 This is a schematic diagram of the point cloud extraction process for the fastener area in Embodiment 1 of the present invention;
[0101] Figure 3 This is a schematic diagram of the GEPN network architecture in Embodiment 1 of the present invention;
[0102] Figure 4 This is a schematic diagram of two-dimensional skeleton extraction in Embodiment 1 of the present invention;
[0103] Figure 5 This is a schematic diagram of the extraction of the elastic bar skeleton in Embodiment 1 of the present invention;
[0104] Figure 6 This is a schematic diagram of the precise three-dimensional skeleton extraction of the elastic bar in Embodiment 1 of the present invention;
[0105] Figure 7 This is a schematic diagram of the gap value measurement in Embodiment 1 of the present invention;
[0106] Figure 8 This refers to the intelligent integrated rail network inspection vehicle in Embodiment 2 of the present invention;
[0107] Figure 9 This is a schematic diagram of the semantic segmentation results of point clouds in different networks in Embodiment 2 of the present invention;
[0108] Figure 10 This is a schematic diagram of the training progress in Embodiment 2 of the present invention;
[0109] Figure 11 This is a schematic diagram of the three-dimensional skeleton extraction result of the elastic bar in Embodiment 2 of the present invention;
[0110] Figure 12 This is a schematic diagram showing the measurement results of the elastic strip separation under different environmental conditions in Embodiment 2 of the present invention. Detailed Implementation
[0111] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0112] Example 1: A 3D Measurement Method for Elastic Bar Separation Integrating GEPN and Geometric Modeling
[0113] In the measurement of the gap between the elastic clips of rail fasteners, the actual inspection environment is usually characterized by complex structure, uneven point cloud density, and similar geometric shapes of components. These factors pose challenges to the measurement accuracy of the elastic clip gap, and high-precision measurement is crucial to ensuring that the elastic clip fasteners meet service requirements. Furthermore, 3D point clouds are easily affected by factors such as occlusion, noise, and uneven sampling, which can lead to blurred structural boundaries and center positioning errors, affecting the accuracy of the gap value calculation. Existing point cloud processing methods still have certain limitations in the rail fastener scenario. PointNet++ point cloud segmentation networks tend to ignore slender structural features when there are large local density variations, causing class adhesion between the elastic clip and adjacent components. Measurement methods based on simple geometric fitting are prone to center offset under conditions of uneven cross-sectional point cloud distribution or structural wear, thus reducing the accuracy of the gap measurement. This invention proposes a novel 3D measurement method for elastic clip gaps that combines deep learning technology and geometric modeling. By combining geometrically perceptual point cloud segmentation with 3D skeleton modeling, it achieves automated and high-precision measurement of the elastic clip gaps of rail fasteners.
[0114] In general, this invention uses the 3D point cloud of the track acquired by a line laser sensor as the data input source. The detection range is locked by extracting the point cloud of the fastener region. The extracted point cloud is then input into a GEPN network for semantic segmentation. During segmentation, a geometrically perceptive self-attention module (LGSA) is used to enhance the feature representation capability of the key structure of the elastic bar, obtaining a complete and clearly defined elastic bar point cloud. The elastic bar point cloud is then input into the elastic bar skeleton extraction module. By introducing a hierarchical modeling strategy that incorporates principal plane morphology recovery and cross-sectional geometric constraints, a stable initial 3D skeleton centerline of the elastic bar is extracted. A fastening reference plane is constructed based on the key feature points of the elastic bar skeleton, and the spatial distance from the key points of the elastic bar's middle limbs to this plane is calculated, thereby obtaining the elastic bar gap value. The overall technical framework diagram is shown below. Figure 1 As shown.
[0115] 1.1 Precise extraction of point cloud data for fastener area
[0116] The collected track point cloud not only includes fasteners, but also other background information, such as sleepers and rail edges. If the entire track point cloud data is directly segmented into fasteners and elastic bars, the data volume will be large and the computational efficiency will be low. Moreover, the segmentation accuracy will be severely hampered by interference from background and other cluttered information. Therefore, the point cloud of the fastener region is first located from the track point cloud, so as to perform subsequent point cloud semantic segmentation and elastic bar skeleton extraction.
[0117] In point cloud segmentation of the fastener region, single height threshold or sliding window methods are prone to causing blurred fastener boundaries and positioning errors under conditions of track undulation, measurement noise, and sleeper spacing deviation. This invention proposes a precise fastener region segmentation method based on multi-feature adaptive fusion. A height threshold is set in the Z-axis direction using a pass-through filter to remove background and redundant point clouds in and below the sleepers, retaining only the track structure point cloud above the sleepers. A sliding bounding box is further constructed along the Y-axis, and point count changes are statistically analyzed. The fastener region is determined by identifying the valley locations of sudden drops in point cloud density, achieving precise positioning of the fastener region. The processing steps are as follows: Figure 2 As shown.
[0118] 1.2 GEPN Point Cloud Segmentation Network
[0119] In the scenario of detecting the tightness of track fasteners, point cloud segmentation of track fasteners faces three key challenges: the small size and complex structure of the fasteners, uneven local density of the point cloud, and easy adhesion of component boundaries, leading to geometric feature aliasing and insufficient sampling of key structures. This results in limited capabilities of traditional point cloud segmentation methods in feature representation and boundary recognition, making it difficult to achieve fine-grained segmentation. To overcome these limitations, this invention proposes a geometry-aware point cloud segmentation network (GEPN) within the PointNet++ network framework, and makes three key innovations: introducing an adaptive density sampling strategy (ADS) to replace the fixed farthest point sampling strategy; embedding a geometry-aware self-attention module (LGSA) during multi-scale feature aggregation; and introducing a boundary consistency regularization term (BRL) during training and optimization. These innovations enable the network to more fully retain key structural information of sparse regions during feature abstraction, enhance the modeling ability of subtle differences between geometrically similar components, and constrain the boundary regions of components to improve the boundary clarity and overall coherence of the segmentation results.
[0120] The GEPN network takes the original track fastener point cloud as input and achieves point-level semantic segmentation through layer-by-layer feature abstraction and feature propagation. In the encoding stage, the input point cloud is first adaptively downsampled by the ADS module to obtain a more reasonable keypoint distribution and alleviate the problem of uneven point cloud density. Then, through two-level feature extraction and feature enhancement, the geometric and semantic information of the point cloud is gradually extracted, resulting in the output features (B, 1536, 128) of the encoding stage. The first-level feature extraction stage uses a three-layer feature abstraction module (Set Abstraction, SA) to progressively reduce the point cloud resolution while increasing the feature dimension, thereby expanding the network's receptive field and extracting multi-scale local geometric features. The second level further maps and aggregates features based on the previous level's feature representation to enhance the high-level semantic feature expression capability of the fastener point cloud. Features extracted from different branches at each level are concatenated and fused along the channel dimension before being input into the LGSA module, and feature updates are achieved through residual connections. During feature extraction, each layer uses a shared multi-layer perceptron (MLP) to perform point-by-point nonlinear mapping to achieve feature dimension transformation. After the encoding stage, the network enters the decoding stage, where a three-layer feature recovery module gradually restores the point cloud resolution and fuses semantic and geometric information from different levels. The high-level semantic features output from the encoding stage are fused with the corresponding layer features from the encoding stage through a Feature Propagation (FP) module, and then processed by an MLP to adjust feature dimensions and enhance semantic information. Subsequently, the features continue to pass through a second-layer feature recovery module, where FP performs further upsampling and feature fusion, and the MLP reconstructs the features to gradually recover mid-level geometric structure information. Finally, in the third-layer feature recovery module, FP again achieves high-resolution feature recovery, and the MLP further optimizes the fused features to obtain a refined point-level feature representation. After three layers of feature recovery, the resulting high-resolution point features are mapped point-by-point by convolutional layers, and class logits are output, ultimately achieving the semantic segmentation result of the track fastener point cloud. During the network training stage, cross-entropy loss (CE) and boundary consistency loss (BRL) are jointly optimized to improve the boundary accuracy and structural consistency of the segmentation result.
[0121] 1.2.1 Density Adaptive Sampling Strategy (ADS)
[0122] The point cloud of fasteners has significant density differences. Traditional fixed farthest point sampling (FPS) is prone to loss of sparse region features. Therefore, an adaptive sampling mechanism (ADS) based on local density estimation is introduced.
[0123] The original fastener point cloud is Local density is calculated based on K-nearest neighbors:
[0124] ,
[0125] in Given the Gaussian kernel bandwidth, the sampling probability is:
[0126] ,
[0127] in The smoothing term is a strategy that assigns higher sampling weights to sparse regions and suppresses redundant points in dense regions, thereby enhancing the expressive power of edges and elongated structures while controlling the computational scale.
[0128] 1.2.2 Geometric Awareness Self-Attention Module (LGSA)
[0129] Traditional PointNet++ only aggregates features based on spatial neighborhoods, without explicitly modeling the geometric similarity between points, making it difficult to distinguish between similarly shaped components in fasteners. To enhance local structure recognition capabilities, an LGSA module, which integrates three types of geometric features—spatial distance, normal consistency, and curvature difference—into the self-attention computation, is embedded after the multi-scale feature abstraction module in the encoding stage, performing geometrically perceptual weighted aggregation of local neighborhood features.
[0130] For each feature point in the encoding stage Based on K-nearest neighbors, a neighborhood set is constructed, and the position difference within the neighborhood is calculated. Normal similarity and curvature difference The above geometric features are linearly mapped to generate attention weights:
[0131] ,
[0132] in, This represents the concatenated geometric feature vector. For learnable mapping matrix, For bias terms;
[0133] Enhanced features are obtained through weighted aggregation and residual connections:
[0134] ,
[0135] in, For learnable weight matrix, for The original feature vector, The feature representation of each neighboring point, For attention weights.
[0136] This mechanism enables the network to prioritize key points with high geometric recognizability during feature aggregation, thereby alleviating the problem of feature confusion between geometrically similar components.
[0137] 1.2.3 Boundary Consistency Loss Function (BRL)
[0138] Traditional cross-entropy loss only constrains point-level classification accuracy and struggles to explicitly constrain boundary position consistency. Therefore, BRL is introduced during network optimization to improve the segmentation continuity of component boundary regions. The set of boundary points is selected based on the gradient predicted by the category:
[0139] ,
[0140] in Represents the category gradient, for The category prediction probability vector. The distance loss between the predicted boundary and the true boundary is:
[0141] ,
[0142] in To predict the coordinates of the boundary points, Given the true boundary point coordinates, the final optimization objective is:
[0143] ,
[0144] For cross-entropy loss, The balancing coefficient is used. This loss function explicitly constrains the consistency between the predicted boundary and the true boundary. BRL effectively reduces category adhesion in the contact area of components and improves the structural integrity of the segmentation results.
[0145] 1.3 Precise Extraction of the 3D Skeleton of the Elastic Bar
[0146] The three-dimensional skeleton of the spring clip is used to characterize its spatial centerline morphology and is the core geometric basis for calculating the gap value and determining the clamping force. In actual service environments, the radius of the spring clip cross-section often exhibits non-uniform variations or local wear along its length, causing the cross-section to show slight eccentricity or asymmetrical distribution. In this case, directly fitting the overall centerline to the three-dimensional point set will produce discretization errors in the main curvature morphology and will also be affected by the systematic bias of the non-uniform distribution of the cross-sectional thickness. The main curvature direction and the cross-sectional thickness direction are coupled during the optimization process in three-dimensional space. When the cross-sectional sampling distribution is uneven or there are structural thickness differences, the cross-sectional bias error will be amplified into a systematic drift of the center position through the fitting process, thus affecting the millimeter-level gap measurement accuracy. Therefore, the accurate extraction of the three-dimensional skeleton of the spring clip lies in how to restore the main curvature topology while suppressing the systematic influence of thickness direction disturbances on the center positioning and improving the numerical stability of the overall optimization process.
[0147] While preserving the original geometric topology, this invention proposes a hierarchical modeling strategy involving principal plane morphology restoration, robust elevation modeling, and cross-sectional geometry correction. By separating error propagation paths in different geometric directions, the influence of system bias on center estimation is reduced, and physical geometric constraints are used to improve optimization convergence stability.
[0148] 1.3.1 Two-dimensional skeleton extraction based on principal plane morphology restoration
[0149] Let the point cloud of the pop-up bar obtained by semantic segmentation be:
[0150] ,
[0151] in, No. The three-dimensional coordinates of the points The total number of point clouds is represented. Statistical filtering is used to denoise the point clouds, removing outliers while maintaining local structural consistency. Subsequently, the point clouds are... Orthogonal projection of the axis onto the principal plane ( (Plane) to obtain a two-dimensional point set:
[0152] ,
[0153] To improve topological stability, the two-dimensional point set Q is rasterized, with a raster resolution of 1. Then the discrete coordinates are represented as:
[0154] ,
[0155] in, This represents the minimum coordinates of the point set within the principal plane. After constructing the binary image, morphological closing operations are performed to enhance region connectivity, and a thinning algorithm is then used to extract the two-dimensional skeleton pixel set.
[0156] ,
[0157] The initial 2D skeleton obtained at this point contains glitch pixels. By recovering the continuous planar coordinates through inverse mapping, an ordered 2D skeleton is obtained.
[0158] ,
[0159] By using two-dimensional projection to stably restore the topology of the centerline in the main bending plane, the center trajectory is determined only by the planar shape, thereby structurally reducing the direct impact of cross-sectional thickness direction disturbance on center estimation and achieving decoupling between main bending error and cross-sectional offset error.
[0160] 1.3.2 Extraction of the 3D Initial Skeleton for Robust Elevation Restoration
[0161] To recover the three-dimensional geometric structure, height direction information is introduced on the basis of the two-dimensional skeleton, and for each skeleton point... Construct a planar domain (domain point set) from the original point cloud as follows:
[0162] ,
[0163] in, Let be the neighborhood search radius. A robust approach is used within the neighborhood point set. The estimation method recalculates the corresponding elevation:
[0164] ,
[0165] in, The height value of the neighborhood point. For the robust Huber loss function, Robust scaling estimation of the neighborhood height distribution. This optimization problem aims to estimate robust central values of local heights, thereby mitigating the effects of noise and local occlusion. This yields the initial 3D skeleton:
[0166] ,
[0167] To ensure spatial continuity, the skeleton sequence is sorted and interpolated to obtain a smooth three-dimensional curve. The resulting initial skeleton is a three-dimensional centerline on the upper surface of the elastic bar, as shown below. Figure 5 As shown.
[0168] 1.3.3 Three-dimensional precision skeleton for geometric correction of elastic bar cross-section
[0169] To obtain a centerline consistent with the cross-sectional geometry, cross-sectional geometric constraints are introduced into the initial skeleton for iterative optimization. The 3D initial skeleton serves as the reference path for cross-section construction, used to determine the position of the cut surface and the normal direction, thereby explicitly incorporating cross-sectional geometric information into the centerline optimization process.
[0170] exist In this iteration, the current skeleton is:
[0171] ,
[0172] For each skeleton point Calculate its local tangent vector Construct its normal plane as shown in the equation.
[0173] ,
[0174] in, The unit tangent vector calculated from adjacent skeleton points. Let be any point in the plane. Extract a set of points within the neighborhood of this tangent plane:
[0175] ,
[0176] in, Assuming a cross-sectional thickness threshold, robust circle fitting is performed on the cross-sectional point set, let... and To fit the center and radius of the circle, the optimization problem is expressed as:
[0177] ,
[0178] in, and The first In the nth iteration The optimal fitting center and fitting radius for each cross section. To enhance geometric stability, the design radius is considered. Weak prior regularization constraints are introduced:
[0179] ,
[0180] in, To allow for a certain deviation range, when the above formula is satisfied and the residual is below a set threshold, the skeleton points are updated.
[0181] To ensure overall geometric continuity, a curvature consistency constraint is imposed on the update results, and a threshold based on the upper limit of curvature in the structural design is set. If the local curvature exceeds the threshold, the update is rolled back until the maximum number of iterations is reached. When the iteration stops, the final 3D skeleton representation is obtained.
[0182] ,
[0183] Through the above-described layered modeling and local geometric correction process, the following can be obtained: Figure 6 The diagram shows a continuous, smooth, three-dimensional skeleton that is geometrically consistent with the cross-section of the elastic bar.
[0184] 1.4 Calculation of seam gap value
[0185] To improve the robustness and adaptability of the fastening reference plane, after completing the semantic segmentation of the fastener and the extraction of the elastic bar skeleton, the fastening reference plane is constructed using the elastic bar skeleton, thereby avoiding the influence of unstable factors on the baffle surface on the measurement results.
[0186] In the three-dimensional skeleton of the elastic bar, the three-dimensional skeleton is divided into four three-dimensional spaces according to the XY axis, such as Figure 7 As shown, within each region, the influence of high-frequency noise and outliers in the point cloud on the feature point position is further reduced by performing local neighborhood averaging on the skeleton points. The point with the smallest Z-coordinate in each three-dimensional space of the two supporting regions is selected as the feature point, and four key skeleton feature points are extracted. , , , , for , The midpoint, through , and Determine the crimping reference plane:
[0187] ,
[0188] in, , , It is a plane normal vector. After obtaining the clamping reference plane by setting the plane intercept parameter, the point closest to the clamping reference plane is selected as the feature point in the middle limb region of the elastic bar. Point for Then the distance from that point to the clamping reference plane is:
[0189] ,
[0190] like Figure 7 As shown, the characteristic points of the middle limb of the bullet are taken. Distance to the crimping reference plane The minimum value is used as the gap value of the elastic bar.
[0191] Example 2: Experimental Results and Analysis
[0192] 2.1 Experimental Environment and Dataset Description
[0193] This invention uses a self-developed intelligent integrated rail network inspection vehicle for track data acquisition. The system structure is as follows: Figure 8 As shown. The present invention relates to the measurement of the gap value of the track fastener, therefore, only two line laser sensors are used to acquire the three-dimensional point cloud data of the track fastener during the data acquisition process.
[0194] Data acquisition experiments were conducted on WJ-7 fasteners on the track of the intelligent rail laboratory and WJ-2 fasteners on an outdoor campus railway line. 200 track point cloud images were collected for each fastener type, resulting in 400 fastener samples after region extraction. Of these, 320 samples were used for network training, and 80 samples were used for model testing. Later, on-site testing was conducted on a section of currently in-service railway in Lanzhou during a maintenance window.
[0195] The experiment used Windows 11 (64-bit) as the operating environment. The network experimental platform hardware configuration was as follows: CPU: Intel Xeon Platinum 8488C, base frequency 2.40 GHz, running frequency approximately 3.11 GHz, 96 cores; 512 GB of memory; GPU: NVIDIA GeForce RTX 4090. Training was performed using the PyTorch framework.
[0196] 2.2 Experimental Results and Performance Analysis
[0197] 2.2.1 Effectiveness Analysis of GEPN Network Point Cloud Semantic Segmentation
[0198] To evaluate the network performance of the point cloud semantic segmentation design of this invention, performance comparisons were performed using multiple models, including PointNet, PointNet++, DGCNN, and PointNet Transformer. Figure 9 As shown, since the number of sampling points affects the segmentation effect, this invention performs fastener segmentation at 2048, 4096, 8192, and 16384 sampling points respectively. The experiment evaluates the segmentation results from multiple aspects such as structural integrity, component differentiation ability, and boundary continuity to determine whether they can meet the input requirements for subsequent 3D skeleton extraction of elastic bars and accurate calculation of seam values.
[0199] The segmentation results show significant differences in segmentation performance among different methods. Red boxes indicate local point cloud gaps, white boxes highlight blurred boundaries and component adhesion, and yellow boxes show local point cloud density distribution features. PointNet, limited by its local feature modeling capabilities, results in relatively coarse overall segmentation. At low sampling densities, structural gaps are more pronounced, especially at the boundaries of the elastic bar and the top of the bolt, where component boundaries show obvious adhesion, accompanied by uneven point cloud density. PointNet++ and DGCNN show improved segmentation quality with increasing sampling points, but some gaps still exist in upsampling at the edges of the elastic bar, and varying degrees of adhesion remain at component boundaries and contact areas. While Point Transformer possesses some global modeling capabilities, its detail representation is still insufficient under low sampling conditions, with uneven point cloud density and slight boundary adhesion at the bends of the elastic bar. In contrast, the GEPN network proposed in this paper can maintain good component structural integrity and boundary clarity at various sampling scales, reduce the error propagation of elastic bar skeleton modeling caused by incomplete elastic bar structure, reduce component adhesion and boundary ambiguity problems, and the fastener nut structure is basically unaffected by sampling density, with complete structure and more stable and reliable segmentation results.
[0200] 2.2.2 Segmentation Performance Evaluation
[0201] To verify the performance of this model in segmenting different fastener types and different numbers of sampling points, the GEPN network of this invention was compared with point cloud semantic segmentation networks such as PointNet, PointNet++, DGCNN, and PointNet Transformer. The evaluation metrics used were overall classification accuracy (Ac) and mean intersection-over-union ratio (mIoU). The results are shown in Table 1. The training process curves are shown below. Figure 10 As shown.
[0202] In terms of overall accuracy (Ac), the network of this invention achieves 99.3%, 99.5%, 99.5%, and 99.4% accuracy at 2048, 4096, 8192, and 16384 sampling points, respectively, all of which are the highest values among all compared models. Compared to PointNet++ and Point Transformer, the method of this invention improves accuracy by approximately 2%; compared to DGCNN, it improves accuracy by more than 3%, and still maintains accuracy above 99% at 2048 sampling points. The density adaptive sampling (ADS) and geometrically perceptual feature enhancement mechanism LGSA proposed in this invention can effectively preserve key structural information and still have strong expressive power under low sampling conditions.
[0203] Table 1. Performance Comparison of Semantic Segmentation Networks
[0204]
[0205] From the perspective of MIoU, the method of this invention achieves 98.2%, 98.5%, 98.6%, and 98.4% respectively at four sampling scales, significantly outperforming the Point Transformer network's highest score of 96.4%, the PointNet++ network's highest score of 96.1%, and the DGCNN network's highest score of 95.2%. The improved mIoU indicates that the method of this invention has better discrimination and boundary characterization capabilities in the component interface region, and the boundary consistency loss effectively alleviates the adhesion phenomenon between adjacent components such as elastic bars and bolts.
[0206] like Figure 10 As shown, the model gradually converges at the 50th epoch, and the training and validation segmentation accuracy curves basically overlap, demonstrating good generalization ability in the network structure and loss function design. Comprehensive analysis shows that the improved network model of this invention outperforms existing mainstream methods in both overall accuracy and structural segmentation quality, and maintains high stability under different sampling scales, providing a reliable semantic segmentation foundation for subsequent elastic bar skeleton extraction and high-precision measurement of seam values.
[0207] 2.2.3 Ablation Experiment of GEPN Point Cloud Semantic Segmentation Network
[0208] To verify the effectiveness of the improved modules in the GEPN network for semantic segmentation of track fastener point clouds, this invention conducted ablation experiments under a unified dataset and training configuration, with a sampling point scale of 4096. Using PointNet++ as a baseline, ADS, LGSA, and BRL modules were gradually introduced, with overall classification accuracy (Acc) and mean intersection-over-union ratio (mIoU) used as evaluation metrics. As shown in Table 2, the baseline model's Acc and MIoU were 96.9% and 95.8%, respectively. After introducing ADS, these improved to 97.5% and 96.3%, indicating that density-adaptive sampling can enhance the representation of sparse regions and slender structures of track fasteners. Further addition of the LGSA module improved performance to 98.7% and 97.4%, demonstrating that fusing local geometric information effectively improved component discrimination and reduced misclassification. Based on this, the introduction of BRL further improved model performance to 99.5% and 98.5%, indicating that boundary consistency constraints significantly optimized the continuity and precision of the segmentation boundaries. In summary, the gradual stacking of modules continuously improves the model performance, and the complete GEPN network achieves the optimal results, verifying the synergistic gain effect of each module and providing a reliable foundation for subsequent elastic bar skeleton extraction and seam value calculation.
[0209] Table 2. Experimental results of GEPN network ablation
[0210]
[0211] 2.3 Measurement of Fastener Elastic Strip Gap Value and Analysis of Error Propagation Mechanism
[0212] 2.3.1 Influence of Sampling Density on the Propagation of Error in Gap Value Measurement
[0213] Under different sampling scales, the point cloud geometric representation capability varies during the measurement of the elastic bar gap. The elastic bar center positioning error can be decomposed into two parts: the main curvature topology recovery error and the cross-sectional geometry estimation error. The cross-sectional geometry error is directly related to the local sampling density, while the main curvature error is affected by the topological stability of the two-dimensional skeleton. Therefore, changes in the sampling scale will affect the integrity of the cross-sectional point set coverage and the quality of local surface representation, thereby altering the error propagation path and the error component weights.
[0214] like Figure 11 As shown, under the condition of 2048 points, the overall shape of the elastic bar has been basically restored, but the point cloud of the local section is relatively sparse. As the number of sampling points increases, the section coverage tends to be uniform, and the stability of the circle fitting is significantly improved. When the sampling scale reaches 8192 points or more, the changes in the skeleton shape and the section fitting results tend to be stable, indicating that the geometric expression has basically converged.
[0215] To evaluate the impact of sampling scale on the accuracy of gap measurement, comparative experiments were conducted at sampling scales of 2048, 4096, 8192, and 16384, while maintaining consistency in network structure and detection process. The true gap value was obtained by manually measuring multiple times with a feeler gauge and averaging the results. The experiments were conducted in a controlled laboratory track environment to minimize the interference of environmental factors on the measurement results. The measurement results and corresponding error statistics for each sampling scale are shown in Table 3.
[0216] Table 3 Measurement results and corresponding error statistics for different sampling scales
[0217]
[0218] The sample-by-sample error results show that, under all four sampling scales, the measurement error of all samples is controlled within 0.10 mm, achieving an overall sub-millimeter level of accuracy. Further statistical analysis of the errors yielded the maximum error under different sampling scales (…). Mean absolute error ( ) and root mean square error ( (as shown in Table 4).
[0219] Table 4 Evaluation Indicators of Separation Measurement Error under Different Sampling Scales
[0220]
[0221] Table 4 shows that as the number of sampling points increases, all error indicators generally show a decreasing trend. Mean Absolute Error The root mean square error decreased from 0.055 mm at 2048 sampling points to 0.035 mm at 4096 sampling points, and further decreased to 0.027 mm and 0.021 mm at 8192 and 16384 sampling points, respectively. The error decreased from 0.061 mm to 0.041 mm, and then continued to decrease to 0.033 mm and 0.024 mm, with the maximum error... The error dispersion decreased from 0.10 mm to 0.07 mm, and further to 0.04 mm. As the sampling density increased, the error dispersion continued to decrease, and the measurement stability gradually improved.
[0222] Overall, increasing the sampling density effectively reduces measurement errors and their fluctuations. With 2048 sampling points, insufficient cross-sectional point cloud coverage leads to poor circle fitting stability and thus larger errors. When the number of sampling points increases to 4096, all errors decrease significantly. When the number of sampling points further increases to 8192 or more, the errors still decrease to some extent, but the overall improvement becomes gradual, the cross-sectional geometric information is essentially sufficient, and the system gradually enters a stable range. Sampling density, by adjusting the amplitude of the cross-sectional geometric error components, changes the overall error structure. Once the cross-sectional error stabilizes, the system error enters the saturation range.
[0223] 2.3.2 Analysis of the Coupling Mechanism between Semantic Segmentation Performance and Geometric Measurement Error
[0224] The measurement of the gap value of the elastic bar depends on the structural integrity and boundary continuity of the elastic bar point cloud. The skeleton extraction and reference plane fitting process is highly sensitive to local geometric stability. Misclassification and boundary perturbation in semantic segmentation will cause structural boundary perturbation, which will lead to the offset of the skeleton center positioning and be amplified to the final gap measurement result through the geometric fitting process.
[0225] To analyze the impact of semantic segmentation accuracy on gap measurement results, a comparative experiment was conducted on an outdoor campus railway section with a sampling scale of 4096 samples. Different semantic segmentation models were embedded into the complete gap measurement framework, and the same test samples as described above were used for the experiment. (Models...) , as well as The results are shown in Table 5.
[0226] Table 5 Evaluation Indicators of Separation Measurement Error for Different Semantic Segmentation Models
[0227]
[0228] As shown in Table 5, different semantic segmentation networks exhibit significant differences in seam measurement accuracy. The network of this invention achieves the best results across all three indicators of elastic bar seam measurement, with an average error of 0.06 mm, a root mean square error of 0.07 mm, and a maximum error of 0.12 mm. The overall error level and fluctuation range are significantly lower than other network models. In contrast, PointNet, due to its lower segmentation accuracy and incomplete structure recovery, has a maximum error and root mean square error reaching 0.43 mm and 0.26 mm, respectively, exhibiting high error dispersion. Although PointNet++ and DGCNN networks possess some local feature modeling capabilities, they still suffer from boundary adhesion problems in the component contact area, resulting in overall measurement errors higher than the algorithm of this invention.
[0229] 2.3.3 Robustness verification of gap measurement under different environments and different types of fasteners
[0230] To systematically evaluate the stability and generalization ability of the proposed method under different working conditions and different fastener models, based on the verification in a controlled experimental environment, comparative experiments were further conducted in outdoor testing environment and actual service environment to verify the measurement robustness of the method under different structural features and environmental disturbance conditions.
[0231] Under three conditions: controlled experimental environment, outdoor testing environment, and actual service environment, such as Figure 12 As shown, 50 sets of fastener samples were randomly selected for manual retesting. The experiment used a 4096 sampling point standard and a consistent data processing workflow. The error results under different environmental and model conditions are shown in Table 6.
[0232] Table 6. Gap Separation Error under Different Test Environments
[0233]
[0234] The results show that the overall measurement error varies little under different environmental conditions. Compared to the controlled experimental environment, the average error in the outdoor environment increased from 0.047 mm to 0.053 mm. The error further increased slightly in the actual service environment, but remained stable overall. Under different lighting conditions, the maximum error, average error, and root mean square error in the low-illuminance environment were all lower than those in the high-illuminance environment, demonstrating good stability and environmental adaptability even under complex conditions such as changes in lighting, surface contamination, and environmental noise.
[0235] Based on the accuracy verification using small samples in the actual service environment, further large-scale field application tests were conducted to evaluate the method's batch testing capability and result consistency under real operating conditions. Utilizing two track maintenance windows, approximately 100 meters of track was selected as the test section in an operating railway section in Lanzhou. Under unified testing procedures and parameter settings, two sets of fastener sample data were collected and batch tested and analyzed. The results, based on the 2 mm gap judgment standard for conventional railways, are shown in the figure.
[0236] Table 7. Results of Fastener Gap Inspection on Actual Service Lines
[0237]
[0238] As can be seen, the algorithm's judgment results were generally consistent with the manual verification results in the two large-scale tests, with no systematic misjudgments. The consistency rates reached 99.69% and 99.84%, respectively, indicating that the proposed method has high judgment accuracy and stability in actual operating environments. Regarding error analysis, no false alarms or missed alarms occurred in the first test, while only one false alarm occurred in the second test, with a false alarm rate of 0.16%, and no missed alarms occurred. The proposed method effectively controls the false alarm level while ensuring high detection accuracy, and the missed alarm rate for key safety indicators is 0. Furthermore, the detection results showed minimal fluctuation under different maintenance windows and on-site operating conditions, further verifying the method's good environmental adaptability and structural generalization ability.
[0239] 2.4 Time Consumption Analysis
[0240] To evaluate the operational efficiency of the proposed method under engineering deployment conditions, the time consumption of the complete gap detection process was statistically analyzed in stages, and the experimental results are shown in Table 8.
[0241] Table 8 Breakdown of running time for each stage of gap detection
[0242]
[0243] As shown in Table 8, the average processing time for a single fastener sample is 0.34 s, of which fastener region extraction takes 0.04 s and the semantic segmentation stage of the GEPN network takes 0.18 s, accounting for 52.9% of the total time. Compared with the baseline PointNet++ network (segmentation time is 0.15 s), the improved processing time increased by 0.03 s. The elastic bar skeleton extraction stage takes 0.10 s, accounting for 29.4% of the total time. This stage mainly performs geometric structure calculations based on the segmented elastic bar point cloud, which has relatively low computational complexity and does not involve large-scale point cloud search, so the overall computational cost of this stage is small. The gap value calculation process takes the least time globally, and the overall time cost is mainly concentrated in the network inference stage. Manually measuring the elastic bar gaps of 100 fasteners accurately requires at least 1.5 hours, and the measurement time for a single fastener is no less than 54 s.
[0244] From the perspective of algorithm complexity, the semantic segmentation stage mainly relies on deep network inference, and its time complexity increases approximately linearly with the point cloud size. In contrast, the skeleton extraction and seam separation calculation stages are mainly based on local geometric operations, resulting in lower complexity. Therefore, the overall computational efficiency is high, meeting the needs of engineering applications. Combined with the aforementioned measurement accuracy results, it can be seen that while maintaining sub-millimeter-level seam separation measurement accuracy, the overall system runtime is effectively controlled without introducing additional high-complexity calculations, and the efficiency is significantly improved compared to manual measurement.
[0245] In summary, this invention proposes a method for measuring the gap value of elastic fasteners by integrating geometrically constrained semantic segmentation (GeoPointNet++, GEPN) with geometric modeling. High-precision point cloud data was obtained using a line laser sensor mounted on a self-developed track network inspection vehicle. After extracting the point cloud of the fastener region, the PointNet++ network was improved to obtain accurate elastic fastener point clouds. During downsampling, the traditional FPS mechanism was replaced with an ADS mechanism, the LGSA module was integrated into the encoding, and BRL was introduced during network optimization. This enhanced the geometric structural representation of each fastener component and improved the continuity of segmentation at component boundaries, resulting in high-precision semantic segmentation results. The Acc (Accuracy) increased from 96.9% to 99.5% of the baseline network, and the mIoU value also increased from 95.8% to 98.5%. A hierarchical modeling strategy was used to extract the three-dimensional skeleton of the elastic fastener, achieving accurate characterization of its spatial structure. The average cross-sectional residual of the elastic fastener skeleton was 0.052, and the standard deviation of the residual was 0.019. Error propagation analysis was conducted on the gap measurement results based on sampling density and semantic segmentation accuracy. With 2048 to 16384 sampling points, the average error decreased from 0.055 mm to 0.021 mm. The error propagation of the GEPN network for the gap was reduced from 0.11 mm to 0.06 mm compared to the PointNet++ network. Gap values of the elastic clips were calculated for different models of elastic clip fasteners under different environments. The method of this invention maintained high-precision measurement results, with the average gap measurement error as low as 0.035 mm at 4096 sampling points and a maximum error of 0.070 mm. In two tests on actual service lines, the consistency rate between the algorithm's judgment and the manual verification results reached 99.69% and 99.84%, respectively, with false alarm rates of 0.00% and 0.16%, and a false negative rate of 0%, verifying the reliability of the method in engineering applications.
[0246] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
Claims
1. A method for measuring the gap value of elastic fasteners by integrating semantic segmentation based on geometric constraints and skeleton modeling, characterized in that, Includes the following steps: Step 1: Extract the fastener region from the track point cloud collected by the line laser sensor. Based on the fastener region accurate segmentation method with multi-feature constraints, extract the fastener region point cloud from the track point cloud to lock the detection range. Step 2: Input the extracted fastener area point cloud into the GEPN network for semantic segmentation. The GEPN network takes the extracted fastener point cloud as input and achieves point-level semantic segmentation through layer-by-layer feature abstraction and feature propagation. Step 3: Precise extraction of the 3D skeleton of the elastic bar; specifically including 2D skeleton extraction based on back projection, 3D initial skeleton extraction based on height restoration, and 3D precise skeleton extraction based on elastic bar cross-section geometry correction; Step 4: Calculate the seam gap value.
2. The method for measuring the gap value of elastic fasteners by integrating semantic segmentation based on geometric constraints and skeleton modeling as described in claim 1, characterized in that, In step one, the collected track point cloud includes not only fasteners, but also other background information, such as sleepers and rail edge data.
3. The method for measuring the gap value of elastic fasteners by integrating semantic segmentation based on geometric constraints and skeleton modeling according to claim 2, characterized in that, In step one, the method for precise segmentation of the fastener area is as follows: a height threshold is set in the Z-axis direction through a pass-through filter to remove the background and redundant point cloud of the area below the sleeper, and only the point cloud of the track structure above the sleeper is retained. A sliding range box is further constructed along the Y-axis and the changes in the number of points are counted. The fastener area is determined by identifying the valley position of the sudden drop in point cloud density, thereby achieving precise positioning of the fastener area.
4. The method for measuring the gap value of elastic fasteners by integrating semantic segmentation based on geometric constraints and skeleton modeling according to claim 3, characterized in that, In step two, the semantic segmentation includes the following steps: Step 1: In the encoding stage, the input point cloud is first adaptively downsampled through the Adaptive Density Sampling (ADS) module to obtain a more reasonable keypoint distribution and alleviate the problem of uneven point cloud density. Then, the geometric and semantic information of the point cloud is gradually extracted through two-level feature extraction and feature enhancement to obtain the output features of the encoding stage. In the first-level feature extraction stage, the point cloud resolution is reduced layer by layer through a three-layer feature abstraction module while increasing the feature dimension to expand the network's receptive field and extract multi-scale local geometric features. The second-level feature extraction stage further maps and aggregates features based on the previous-level feature representation to enhance the high-level semantic feature expression capability of the fastener point cloud. The features extracted from different branches at each level are spliced and fused in the channel dimension and then input into the Geometric Aware Self-Attention (LGSA) module, and feature updates are achieved through residual connections. During the feature extraction process, each layer achieves feature dimension transformation through point-by-point nonlinear mapping using a shared multilayer perceptron. Step 2: In the decoding stage, the point cloud resolution is gradually restored through a three-layer feature recovery module, and semantic and geometric information from different levels are fused. First, in the first-layer feature recovery module, the high-level semantic features output from the encoding stage are fused with the corresponding layer features from the encoding stage through the feature propagation module, and the feature dimension is adjusted and the semantic information is enhanced by MLP. Subsequently, the features continue to pass through the second-layer feature recovery module, where FP performs further upsampling and feature fusion, and MLP performs feature reconstruction to gradually restore the mid-level geometric structure information. Finally, in the third-layer feature recovery module, FP again achieves high-resolution feature recovery, and MLP further optimizes the fused features to obtain a fine point-level feature representation. After the three-layer feature recovery, the obtained high-resolution point features are mapped point-by-point by the convolutional layer and the class logits are output, ultimately achieving the semantic segmentation result of the track fastener point cloud. Step 3: During the network training phase, cross-entropy loss (CE) and boundary consistency loss function (BRL) are used for joint optimization to improve the boundary accuracy and structural consistency of the segmentation results.
5. The method for measuring the gap value of elastic fasteners by integrating semantic segmentation based on geometric constraints and skeleton modeling according to claim 4, characterized in that, The density adaptive sampling strategy module (ADS) is as follows: The original fastener point cloud is ,That For the coordinates of each original point cloud point, calculate the local density based on K-nearest neighbors: , in, Given the Gaussian kernel bandwidth, the sampling probability is: , in, The smoothing term is a strategy that assigns higher sampling weights to sparse regions and suppresses redundant points in dense regions, thereby enhancing the expressive power of edges and elongated structures while controlling the computational scale. The geometry-aware self-attention module (LGSA) is as follows: For each feature point in the encoding stage Based on K-nearest neighbors, a neighborhood set is constructed, and the position difference within the neighborhood is calculated. Normal similarity and curvature difference The above geometric features are linearly mapped to generate attention weights: , in, This represents the concatenated geometric feature vector. For learnable mapping matrix, For bias terms; Enhanced features are obtained through weighted aggregation and residual connections: , in, For learnable weight matrix, for The original feature vector, The feature representation of each neighboring point, Attention weights; This mechanism enables the network to prioritize key points with high geometric recognizability during feature aggregation, thereby alleviating the problem of feature confusion between geometrically similar components; The Boundary Consistency Loss Function (BRL) is: Filter the set of boundary points based on gradient prediction by category: , in, Represents the category gradient, for The category prediction probability vector; The distance loss between the predicted boundary and the true boundary is: , in, To predict the coordinates of the boundary points, These are the coordinates of the actual boundary points; The final optimization goal is: , in, For cross-entropy loss, This is the balance coefficient; This loss function explicitly constrains the consistency between the predicted boundary and the true boundary. BRL effectively reduces category adhesion in the contact area of components and improves the structural integrity of the segmentation results.
6. The method for measuring the gap value of elastic fasteners by integrating semantic segmentation based on geometric constraints and skeleton modeling according to claim 5, characterized in that, In step three, the two-dimensional skeleton extraction based on principal plane morphology restoration includes: First, let the point cloud of the pop-up bar obtained by semantic segmentation be: , in, No. The three-dimensional coordinates of the points This represents the total number of point clouds; Statistical filtering is used to denoise the point cloud to remove outliers while maintaining local structural consistency. Then, the cloud edge Orthogonal projection of the axis onto the principal plane ( (Plane) to obtain a two-dimensional point set: , To improve topological stability, the two-dimensional point set Q is rasterized, with a raster resolution of 1. Then the discrete coordinates are represented as: , in, The minimum coordinate value of the point set in the principal plane; After constructing the binary image, morphological closing operations are performed to enhance region connectivity, and a two-dimensional skeleton pixel set is further extracted using a thinning algorithm. , in, This represents the number of pixels in the skeleton. The initial two-dimensional skeleton obtained at this point has burrs. By recovering the continuous planar coordinates through inverse mapping, an ordered two-dimensional skeleton is obtained: , By using two-dimensional projection to stably restore the topology of the centerline in the main bending plane, the center trajectory is determined only by the planar shape, thereby structurally reducing the direct impact of cross-sectional thickness direction disturbance on center estimation and achieving decoupling between main bending error and cross-sectional offset error.
7. The method for measuring the gap value of elastic fasteners by integrating semantic segmentation based on geometric constraints and skeleton modeling according to claim 6, characterized in that, In step three, the three-dimensional initial skeleton for robust elevation recovery is extracted as follows: To recover the three-dimensional geometric structure, height direction information is introduced into the two-dimensional skeleton, and for each skeleton point... Construct a planar domain (domain point set) from the original point cloud: , in, The neighborhood search radius; Robustness is adopted in the neighborhood point set. The estimation method recalculates the corresponding elevation: , in, The height value of the neighborhood point. For the robust Huber loss function, Robust scaling estimation for a domain height distribution; This optimization problem is used to estimate the robust center value of local height, thereby reducing the effects of noise and local occlusion, and thus obtaining the initial 3D skeleton: , To ensure spatial continuity, the skeleton sequence is sorted and interpolated to obtain a smooth three-dimensional curve.
8. The method for measuring the gap value of elastic fasteners by integrating semantic segmentation based on geometric constraints and skeleton modeling according to claim 7, characterized in that, In step three, the three-dimensional precision skeleton for the geometric correction of the elastic bar cross-section is as follows: The initial 3D skeleton serves as the reference path for cross-section construction, used to determine the position of the cut surface and the normal direction, thereby explicitly introducing the cross-section geometry information into the centerline optimization process, as detailed below: exist In this iteration, the current skeleton is: , For each skeleton point Calculate its local tangent vector Its normal plane is constructed as follows: , in, The unit tangent vector calculated from adjacent skeleton points. Let be any point in the plane; Extract the point set within the area of this section: , in, Assuming a cross-sectional thickness threshold, robust circle fitting is performed on the cross-sectional point set, let... and To fit the center and radius of the circle, the optimization problem is expressed as: , in, and The first In the nth iteration The optimal fitting center and fitting radius of each cross section; To enhance geometric stability, in conjunction with the design radius Weak prior regularization constraints are introduced: , in, To allow for a certain deviation range, when the above formula is satisfied and the residual is below a set threshold, the skeleton points are updated. To ensure overall geometric continuity, a curvature consistency constraint is imposed on the update results, and a threshold based on the upper limit of curvature in the structural design is set. If the local curvature exceeds the threshold, the update is rolled back until the maximum number of iterations is reached. When the iteration stops, the final 3D skeleton representation is obtained: , in, This represents the skeleton point of the j-th section during the T-th iteration.
9. The method for measuring the gap value of elastic fasteners by integrating semantic segmentation based on geometric constraints and skeleton modeling according to claim 8, characterized in that, In step four, the seam gap value is calculated as follows: In the 3D skeleton of the elastic bar, the skeleton is divided into four 3D spaces along the XY axis. Within each region, the influence of high-frequency noise and outliers in the point cloud on the feature point position is further reduced by averaging the local neighborhood of the skeleton points. In each 3D space of the two side support regions, the point with the smallest Z coordinate is selected as the feature point, and four key skeleton feature points are extracted. , , , , for , The midpoint, through , and Determine the crimping reference plane: , in, , , It is a plane normal vector. After obtaining the clamping reference plane by setting the plane intercept parameter, the point closest to the clamping reference plane is selected as the feature point in the middle limb region of the elastic bar. Point for Then the distance from that point to the clamping reference plane is: , Take the characteristic points of the middle limb of the bullet. Distance to the crimping reference plane The minimum value is used as the gap value of the elastic bar.