Rail fastener defect detection method and system
Patent Information
- Application Number
- CN202610647188.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-12
- Publication Date
- 2026-10-09
AI Technical Summary
[0006]时序信息利用型:如3D-CNN处理视频序列(Zhou et al., IEEE TII 2023),但计算复杂度高,难以满足车载实时性要求
[0045]1、突破通用模型迁移局限:将轨道物理几何约束显式、动态地融入深度学习特征提取全过程,非简单后处理或附加模块。实验表明:在道砟遮挡率>40%场景下,背景噪声抑制能力提升5.2倍。
Smart Images

Figure CN122887756A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of rail transit vehicle operation safety monitoring technology, and in particular to a method and system for detecting defects in rail fasteners. Background Technology
[0002] As the core component connecting rails and sleepers, the track fastening system undertakes the crucial functions of fixing rails, transmitting loads, and maintaining track gauge. Its health directly affects train operation safety and track structure stability. According to statistics from China State Railway Group, in 2022, safety incidents caused by fastener failure accounted for 17.3% of all railway safety incidents nationwide, with missed detection of minor defects (such as early cracks and slight loosening) being the main contributing factor. Therefore, achieving early, accurate, and reliable detection of fastener defects has significant engineering value.
[0003] Currently, track fastener inspection technology is mainly divided into three categories: (1) Manual inspection method: It relies on visual inspection by track inspectors, which is inefficient (one person can inspect about 5 kilometers per day), highly subjective, unreliable at night and in bad weather, and poses a risk to personal safety. China's "Railway Line Repair Rules" (TG / GW 102-2019) has clearly required the gradual elimination of the pure manual inspection mode. (2) Methods based on traditional image processing: such as template matching (Zhang et al., Measurement 2020) and edge detection combined with Hough transform (Li et al., IEEE TIM 2021). These methods are sensitive to changes in lighting and background interference. In scenarios with ballast obstruction and oil pollution, the false detection rate is as high as 15% or more, and they cannot identify small defects (<2mm cracks). (3) Methods based on deep learning: In recent years, these have become a research hotspot, mainly including:
[0004] Improved single-stage detectors: such as YOLOv5+CBAM and YOLOv7+FocalLoss. These methods migrate general object detection algorithms to orbital scenarios, improving performance by adding channel / spatial attention modules or adjusting the loss function.
[0005] Two-stage detector optimization: such as Faster R-CNN combined with feature pyramids.
[0006] Time-series information utilization: such as 3D-CNN processing of video sequences (Zhou et al., IEEE TII 2023), but the computational complexity is high and it is difficult to meet the real-time requirements of vehicle-mounted applications.
[0007] Despite some progress in deep learning methods, systematic research and practical testing have revealed the following insurmountable technical bottlenecks that severely restrict their reliability and applicability in engineering practice:
[0008] (i) Insufficient Specific Innovation: The "Incompatibility" of General Model Transfer Existing improvements are mostly concentrated on simple combinations of "skeleton network + attention module + loss function," which are direct transfers of general computer vision techniques. For example:
[0009] Existing technology simply inserts the CBAM module after the YOLOv5 backbone, without considering the strict geometric topological relationship between fasteners and rails in the track scene;
[0010] Existing technologies also employ FocalLoss to mitigate class imbalance, but fail to address the feature confusion caused by background interference. This type of "black box" improvement lacks in-depth modeling of prior track physics, resulting in high false alarm rates in complex environments such as dense ballast areas and oil-covered zones. More importantly, the aforementioned combined solutions have been widely disclosed in academia.
[0011] Geometric constraints are used in shallow processing: limitations of post-processing corrections. Some studies attempt to introduce geometric constraints, but have fundamental flaws.
[0012] Existing technologies use Hough transform to extract rails and then perform post-processing matching between the detection box and the theoretical position. This is a two-stage process of "detection-correction" and cannot suppress background noise during the feature extraction stage.
[0013] Existing technologies propose ROI clipping based on preset coordinates, but tracks undergo dynamic changes such as settlement and thermal expansion and contraction, making fixed coordinates unsuitable for actual working conditions and leading to increased false negative rates. The aforementioned methods treat geometric information as an independent module, failing to deeply integrate it with the deep learning feature extraction process, thus violating the design principle of "perception-cognition" collaborative optimization.
[0014] Fragmented utilization of temporal information: The lack of track scene-specific modeling means that while track images acquired by linear scan cameras exhibit strong temporal continuity (changes in fastener positions between adjacent frames conform to kinematic laws), current technologies...
[0015] Existing technologies use 3D-CNN to process short sequences (3-5 frames), which has a large computational cost and does not utilize the fixed geometry of the orbit for trajectory prediction;
[0016] Most methods only detect individual frames independently, failing to distinguish between transient interference (such as bird obstruction or water stain reflection) and actual defects, leading to frequent false alarms. Under the operating conditions of high-speed rail at 250km / h, single-frame detection is significantly affected by sudden changes in illumination (illuminance changes of >10000 lux when entering and exiting tunnels) and vibration ambiguity, necessitating the establishment of a time-series verification mechanism that conforms to the physical characteristics of track inspection.
[0017] The perception of defects is limited in scope: Current methods lack a clear understanding of their evolution from mere "presence" to "evolution," outputting only a binary "normal / defective" judgment and failing to provide quantitative modeling of the defect development process.
[0018] The inability to distinguish between "newly developed cracks" and "stable old damage" leads to a misallocation of maintenance resources;
[0019] The lack of a dynamic correlation between defect parameters (crack length, loosening angle) and safety thresholds makes it difficult to support graded early warning decisions. The "Maintenance Rules for Ballastless Track Lines of High-Speed Railways" (TG / GW 203-2022) clearly requires monitoring of defect development trends, and existing technologies are insufficient to meet this mandatory standard.
[0020] In summary, existing track fastener inspection technologies have four core problems:
[0021] Innovation is homogenized: general CV technologies are simply stacked together, lacking specific design for track scenarios;
[0022] Geometric utilization is superficial: geometric constraints are not deeply integrated into the feature learning process;
[0023] Fragmented timing modeling: No timing verification mechanism conforming to the physical laws of orbits has been constructed;
[0024] Limited cognitive dimensions: lacking the ability to model defect evolution and predictive maintenance. Therefore, there is an urgent need to develop a new detection method that deeply integrates prior knowledge of track physics, possesses strong anti-interference capabilities, and supports defect evolution prediction, in order to overcome existing technological bottlenecks and meet the high reliability requirements of high-speed rail safe operation and maintenance. Summary of the Invention
[0025] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method and system for detecting defects in track fasteners. Through the three-in-one architecture of "geometric-semantic dual-drive feature extraction + temporal consistency logic verification + defect evolution prediction", it achieves the following: (1) explicitly and dynamically integrating the physical geometric constraints of the track into the entire process of deep learning feature extraction, suppressing background interference from the source; (2) constructing a temporal verification mechanism that conforms to the imaging characteristics of a linear array camera, effectively filtering instantaneous noise; (3) establishing a dynamic correlation model between the quantitative parameters of fastener defects and the safety threshold, realizing hierarchical early warning and predictive maintenance; (4) forming a continuous optimization closed loop of end-cloud collaboration model to adapt to the complex and ever-changing track environment.
[0026] The present invention provides a method and system for detecting defects in rail fasteners, which adopts the following technical solution:
[0027] A method for detecting defects in rail fasteners includes the following steps:
[0028] S1: Acquire continuous grayscale sequence images of the orbit and perform adaptive radiometric correction based on motion blur kernel estimation;
[0029] S2: Based on the rail edge extraction results and the track geometry topology relationship, calculate the theoretical position of the fastener and generate a dynamic geometric soft attention mask. The dynamic geometric soft attention mask is dynamically generated based on the geometric parameters of the real-time rail edge curve, rather than a preset fixed coordinate, and can adapt to track geometry changes and fastener installation errors.
[0030] S3: Construct a geometry-guided deep neural network, explicitly embed the dynamic geometric soft attention mask into multiple scales of the feature extraction layer to form a geometry-guided attention module, inject physical geometric priors into deep features through additive fusion, and output single-frame defect detection results;
[0031] S4: Establish a sliding window time-series verification mechanism, use Kalman filtering to track the motion trajectory of the fastener in consecutive frames, filter instantaneous false detections through a multi-frame confidence accumulation function, and output the final defect judgment result; S5: Construct a fastener defect evolution map based on historical detection data, extract the time series of defect quantification parameters, use a time-series prediction model to fit the defect development trajectory, and execute graded early warning based on the correlation between the defect development rate and the preset safety threshold;
[0032] S6: Through the end-to-cloud collaboration mechanism, the vehicle terminal automatically selects fuzzy samples with confidence levels in the uncertain range and uploads them to the cloud. After manual review and annotation, the cloud uses a federated learning algorithm to update the global model parameters and sends the differential weight package to the vehicle terminal to achieve hot model updates.
[0033] Furthermore, the adaptive radiometric correction based on motion blur kernel estimation described in step S1 specifically includes: performing gradient domain analysis on the original image to estimate the motion blur direction θ and blur scale k; constructing a Wiener filter for deblurring, wherein the ratio of noise to signal power spectrum is dynamically adjusted according to the tunnel / open-air scene; and performing radiometric correction in conjunction with a local illumination estimation model, wherein the correction parameters α and β are adaptively set according to the ambient light intensity.
[0034] Furthermore, the fastener type parameter library stores fastener laying parameters corresponding to ballast track and ballastless track, wherein: the Gaussian standard deviation σ corresponding to ballast track is set to 812 pixels, and the Gaussian standard deviation σ corresponding to ballastless track is set to 58 pixels; the local tilt angle of the track is obtained by estimating the pose change between adjacent frame images, and is used to correct the longitudinal coordinate of the theoretical position of the fastener.
[0035] Furthermore, the calculation process of the geometrically guided attention module in step S3 includes: upsampling the dynamic geometric soft attention mask to the same size as the feature map of the current layer of the backbone network; fusing the feature map and the mask through 1×1 convolution to generate geometrically guided weights; calculating the attention response matrix through the Sigmoid activation function; multiplying the attention response matrix element-wise with the input feature map and then adding it to the original feature map to achieve feature weighted fusion; wherein, the calculation of the geometrically guided weights explicitly includes physical location information, so that the network is guided by orbital geometric constraints during the feature extraction stage.
[0036] Furthermore, the sliding window timing verification mechanism described in step S4 specifically includes: initializing the state vector of the Kalman filter, including the fastener center coordinates and movement velocity; predicting the fastener position in the current frame based on the state transition model; updating the filter state by fusing single-frame detection results; and calculating the timing cumulative confidence. ,in The length of the sliding window. For the first Frame detection confidence, To determine the overlap between the detection box and the predicted box, The distance of the trajectory deviation. The attenuation coefficient is used when... When the number of frames that exceed the preset total threshold and continuously meet the single-frame threshold reaches the minimum frame count requirement, it is determined to be a genuine defect.
[0037] Furthermore, the graded early warning in step S5 includes three levels: immediate stop level: detection of missing fasteners, completely broken spring clips, or loose bolts, with a confidence level higher than the first threshold; speed-limited operation level: detection of crack length exceeding the first length threshold or loosening offset exceeding the first offset threshold; planned maintenance level: based on the defect evolution map, it is predicted that the defect parameters will develop to the speed-limited operation level threshold within a preset time window, and a preventive maintenance work order is generated; wherein, the threshold is set according to the "Rules for Maintenance of Ballastless Track Lines of High-Speed Railways" or the "Rules for Repair of Railway Lines".
[0038] Furthermore, the defect quantification parameters mentioned in step S5 include: the length, width, and propagation angle of crack-type defects; the offset and rotation angle of loosening-type defects; and the confidence decay curve of missing-type defects. The time-series prediction model uses a Long Short-Term Memory (LSTM) network, with the input being the defect parameter sequence of historical days T and the output being the predicted value for the next T days.
[0039] Furthermore, the vehicle-mounted terminal sets the confidence uncertainty interval to [0.3, 0.7] and automatically filters the detection samples within this interval; the samples are uploaded to the cloud annotation platform through an encrypted communication channel; the cloud uses a federated learning framework to aggregate the local gradients of multiple vehicle-mounted terminals and update the global model parameters; a differential weight package is generated and downloaded to the vehicle-mounted terminal via over-the-air (OTA) technology; the vehicle-mounted terminal performs hot updates, and the update process does not affect the real-time detection service.
[0040] Furthermore, the end-to-cloud collaboration mechanism described in step S6 includes: the vehicle terminal sets the confidence uncertainty interval to [0.3, 0.7] and automatically filters the detection samples within this interval; the samples are uploaded to the cloud annotation platform through an encrypted communication channel; the cloud uses a federated learning framework to aggregate the local gradients of multiple vehicle terminals and update the global model parameters; a differential weight package is generated and distributed to the vehicle terminal via over-the-air (OTA) download technology; the vehicle terminal performs hot updates, and the update process does not affect the real-time detection service.
[0041] A track fastener defect detection system includes: an image acquisition unit: a linear array camera and a synchronous triggering device, used to acquire continuous grayscale sequence images of the track; an edge computing unit: an embedded computing device, deploying a geometrically guided deep neural network and a geometrically guided attention module; a timing verification unit: running a Kalman filter algorithm and a confidence accumulation function; an evolution analysis unit: storing historical detection data, constructing a defect evolution map and executing graded early warnings; a communication unit: a module supporting 5G communication to realize edge-cloud data interaction; and an early warning output unit: generating structured early warning reports and pushing them to a railway operation and maintenance management platform.
[0042] Furthermore, the edge computing unit adopts the NVIDIA Jetson AGX Orin platform, and after TensorRT optimization, the inference speed is no less than 40 FPS, which meets the real-time detection requirements of speeds above 250 km / h.
[0043] Furthermore, the system supports both ballasted and ballastless track scenarios and is compatible with defect detection of WJ-7, WJ-8, FC type, DTVI2 type, and Nabla type fasteners.
[0044] The beneficial effects of the track fastener defect detection method and system provided by this invention are as follows:
[0045] 1. Overcoming the limitations of general model transfer: Track physical geometric constraints are explicitly and dynamically integrated into the entire deep learning feature extraction process, rather than being a simple post-processing or additional module. Experiments show that background noise suppression capability is improved by 5.2 times in scenarios with ballast occlusion rate >40%.
[0046] 2. Significantly reduced false alarm rate: Through the dual mechanism of "geometric mask source shielding + time-series verification secondary filtering", the actual false alarm rate of high-speed rail is reduced to 0.08% (93.3% lower than the YOLOv5+CBAM solution of 1.2%), meeting the mandatory requirement of "false alarm rate <0.1%" in the "Technical Specification for Railway Intelligent Detection System".
[0047] 3. Enhanced detection capability for minute defects: The geometrically guided attention mechanism enables the network to focus on minute areas, achieving a detection rate of 92.5% for cracks with a length ≥1.5mm and looseness with an offset ≥0.8mm (compared to 78.3% in the prior art), an improvement of 18.1 percentage points.
[0048] 4. Outstanding robustness in extreme environments: In scenarios such as tunnel entry and exit (sudden changes in illuminance > 10,000 lux) and rainy / foggy weather (visibility < 100m), the detection accuracy fluctuates by < 5% (compared to 25% for existing technologies), and the stability is improved by 80%.
[0049] 5. Enable predictive maintenance upgrades: The defect evolution map supports early warnings 5-10 days in advance, shifting the maintenance mode from "post-fault repair" to "predictive maintenance," which is expected to reduce operation and maintenance costs by 23.7% and extend the service life of fasteners by more than 15%.
[0050] 6. Continuous model evolution capability: The edge-cloud collaboration mechanism enables the system to learn online. After 3 months of field operation, the model's recognition rate of new defects (such as aging of composite fasteners) increased from 68.2% to 89.5%.
[0051] 7. Strong engineering applicability: After optimization by TensorRT, the algorithm achieves an inference speed of 42FPS on the Jetson AGX Orin platform, meeting the real-time requirements of high-speed detection at 250km / h; it supports mainstream fastener types such as WJ-7 / 8, FC, and DTⅥ2, and is compatible with ballast / ballastless tracks. Attached Figure Description
[0052] Figure 1 This is a schematic diagram of the method flow of the present invention;
[0053] Figure 2 This is a schematic diagram of the system architecture of the present invention. Detailed Implementation
[0054] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Unless otherwise defined, the technical or scientific terms used herein should have the ordinary meaning understood by those skilled in the art. The terms "comprising" and similar expressions used herein mean that the element or object preceding the word covers the element or object listed after the word and its equivalents, but does not exclude other elements or objects. Example 1:
[0055] See Figures 1 to 2 As shown, this embodiment of the invention provides a method for detecting defects in track fasteners, including the following steps:
[0056] S1: Acquire continuous grayscale sequence images of the orbit and perform adaptive radiometric correction based on motion blur kernel estimation;
[0057] S2: Based on the rail edge extraction results and the track geometry topology relationship, calculate the theoretical position of the fastener and generate a dynamic geometric soft attention mask. The dynamic geometric soft attention mask is dynamically generated based on the geometric parameters of the real-time rail edge curve, rather than a preset fixed coordinate, and can adapt to track geometry changes and fastener installation errors.
[0058] S3: Construct a geometry-guided deep neural network, explicitly embed the dynamic geometric soft attention mask into multiple scales of the feature extraction layer to form a geometry-guided attention module, inject physical geometric priors into deep features through additive fusion, and output single-frame defect detection results;
[0059] S4: Establish a sliding window timing verification mechanism, use Kalman filtering to track the motion trajectory of fasteners in consecutive frames, filter instantaneous false detections through multi-frame confidence accumulation function, and output the final defect judgment result.
[0060] S5: Construct a fastener defect evolution map based on historical inspection data, extract the time series of defect quantification parameters, use a time series prediction model to fit the defect development trajectory, and execute graded early warning based on the correlation between defect development rate and preset safety threshold;
[0061] S6: Through the end-to-cloud collaboration mechanism, the vehicle terminal automatically selects fuzzy samples with confidence levels in the uncertain range and uploads them to the cloud. After manual review and annotation, the cloud uses a federated learning algorithm to update the global model parameters and sends the differential weight package to the vehicle terminal to achieve hot model updates.
[0062] In this embodiment, the adaptive radiometric correction based on motion blur kernel estimation in step S1 specifically includes: performing gradient domain analysis on the original image to estimate the motion blur direction θ and blur scale k; constructing a Wiener filter for deblurring, wherein the ratio of noise to signal power spectrum is dynamically adjusted according to the tunnel / open-air scene; and performing radiometric correction in conjunction with a local illumination estimation model, wherein the correction parameters α and β are adaptively set according to the ambient light intensity.
[0063] In this embodiment, the fastener type parameter library stores fastener laying parameters corresponding to ballast track and ballastless track, wherein: the Gaussian standard deviation σ corresponding to ballast track is set to 812 pixels, and the Gaussian standard deviation σ corresponding to ballastless track is set to 58 pixels; the local tilt angle of the track is obtained by estimating the pose change between adjacent frame images, and is used to correct the longitudinal coordinate of the theoretical position of the fastener.
[0064] In this embodiment, the calculation process of the geometrically guided attention module in step S3 includes: upsampling the dynamic geometric soft attention mask to the same size as the feature map of the current layer of the backbone network; fusing the feature map and the mask through 1×1 convolution to generate geometrically guided weights; calculating the attention response matrix through the Sigmoid activation function; multiplying the attention response matrix element-wise with the input feature map and then adding it to the original feature map to achieve feature weighted fusion; wherein, the calculation of the geometrically guided weights explicitly includes physical location information, so that the network is guided by orbital geometric constraints during the feature extraction stage.
[0065] In this embodiment, the sliding window timing verification mechanism in step S4 specifically includes: initializing the state vector of the Kalman filter, including the fastener center coordinates and movement velocity; predicting the fastener position in the current frame based on the state transition model; updating the filter state by fusing single-frame detection results; and calculating the timing cumulative confidence. ,in The length of the sliding window. For the first Frame detection confidence, To determine the overlap between the detection box and the predicted box, The distance of the trajectory deviation. The attenuation coefficient is used when... When the number of frames that exceed the preset total threshold and continuously meet the single-frame threshold reaches the minimum frame count requirement, it is determined to be a genuine defect.
[0066] In this embodiment, the graded early warning in step S5 includes three levels: immediate stop level: detection of missing fasteners, completely broken elastic clips, or loose bolts, with a confidence level higher than the first threshold; speed-limited operation level: detection of crack length exceeding the first length threshold or loosening offset exceeding the first offset threshold; planned maintenance level: based on the defect evolution map, it is predicted that the defect parameters will develop to the speed-limited operation level threshold within a preset time window, and a preventive maintenance work order is generated; wherein, the threshold is set according to the "Rules for Maintenance of Ballastless Track Lines of High-Speed Railways" or the "Rules for Repair of Railway Lines".
[0067] In this embodiment, the defect quantification parameters in step S5 include: the length, width, and propagation angle of crack-type defects; the offset and rotation angle of loosening-type defects; the confidence decay curve of missing-type defects; the time-series prediction model adopts a Long Short-Term Memory (LSTM) network, with the input being the defect parameter sequence of historical T days and the output being the predicted value for the next T days.
[0068] In this embodiment, the vehicle terminal sets the confidence uncertainty interval to [0.3, 0.7] and automatically filters the detection samples within this interval; the samples are uploaded to the cloud annotation platform through an encrypted communication channel; the cloud uses a federated learning framework to aggregate the local gradients of multiple vehicle terminals and update the global model parameters; a differential weight package is generated and downloaded to the vehicle terminal via over-the-air (OTA) technology; the vehicle terminal performs hot updates, and the update process does not affect the real-time detection service.
[0069] In this embodiment, the end-to-cloud collaboration mechanism in step S6 includes: the vehicle terminal sets the confidence uncertainty interval to [0.3, 0.7] and automatically filters the detection samples within this interval; the samples are uploaded to the cloud annotation platform through an encrypted communication channel; the cloud uses a federated learning framework to aggregate the local gradients of multiple vehicle terminals and update the global model parameters; a differential weight package is generated and distributed to the vehicle terminal via over-the-air (OTA) download technology; the vehicle terminal performs hot updates, and the update process does not affect the real-time detection service.
[0070] A track fastener defect detection system includes: an image acquisition unit: a linear array camera and a synchronous triggering device, used to acquire continuous grayscale sequence images of the track; an edge computing unit: an embedded computing device, deploying a geometrically guided deep neural network and a geometrically guided attention module; a timing verification unit: running a Kalman filter algorithm and a confidence accumulation function; an evolution analysis unit: storing historical detection data, constructing a defect evolution map and executing graded early warnings; a communication unit: a module supporting 5G communication to realize edge-cloud data interaction; and an early warning output unit: generating structured early warning reports and pushing them to a railway operation and maintenance management platform.
[0071] In this embodiment, the edge computing unit adopts the NVIDIA Jetson AGX Orin platform, and after TensorRT optimization, the inference speed is no less than 40 FPS, which meets the real-time detection requirements of speeds above 250 km / h.
[0072] In this embodiment, the system supports both ballasted and ballastless track scenarios and is compatible with defect detection of WJ-7, WJ-8, FC type, DTVI2 type, and Nabla type fasteners. Example 2:
[0073] include:
[0074] Geometric mask generation and single-frame detection (basic process verification):
[0075] Experimental setup:
[0076] Data source: A section of the Beijing-Shanghai High-Speed Railway (mileage K1285+300~K1290+500), speed 250km / h;
[0077] Acquisition equipment: Linear scan camera (Basler raL4096-120km, 4096×1024@10kHz), synchronous IMU;
[0078] Comparison methods: YOLOv5s+CBAM (Wang et al., Sensors 2023), Faster R-CNN (Liu et al., MSSP 2022);
[0079] Evaluation metrics: Precision, Recall, F1-score, false alarm rate (number of false alarms per kilometer).
[0080] Image preprocessing:
[0081] The original image has motion blur (blur scale k≈3.2 pixels) and overexposure at the tunnel exit;
[0082] Gradient domain analysis was used to estimate the fuzzy kernel direction θ=15° and the scale k=3.5;
[0083] Wiener filter parameters: Illumination compensation (Inside the tunnel) (open air);
[0084] The output corrected image contrast is improved by 37.6%, and the edge sharpness PSNR is improved by 8.2dB.
[0085] Dynamic geometry mask generation:
[0086] Subpixel Canny edge detection: Gaussian kernel σ=1.2, high-low threshold ratio 3:1;
[0087] RANSAC fitting: 1000 iterations, 2-pixel inlier threshold, fitted straight line equation. ;
[0088] Fastener parameters: WJ-8 type, (Converted to image coordinates of 18.3 pixels). (261 pixels);
[0089] Generate a Gaussian mask: For pixels (with ballast track), the mask weight reaches 0.98 at the theoretical position, and <0.05 in the background area;
[0090] Geometric-guided single-frame detection:
[0091] Network architecture: Based on YOLOv5s, GG-Attention modules are embedded in layers P3, P4, and P5;
[0092] Training details: Input size 640×640, batch size=16, Adam optimizer, initial learning rate 0.01, Cosine decay;
[0093] Loss function: ,in This is due to mask alignment loss;
[0094] Single-frame detection results: Precision = 89.7%, Recall = 86.3%, F1 = 88.0%;
[0095] Key findings: Visualized feature maps show that after introducing GG-Attention, the activation intensity of the fastener region increased by 3.8 times, and the activation value of the ballast region decreased by 62.3%, proving that geometric priors effectively guide feature learning.
[0096] Timing verification and false detection filtering (anti-interference capability verification):
[0097] Interference scenario design:
[0098] Scene A: The instant the tunnel exits (illuminance suddenly increases from 50 lux to 10,000 lux);
[0099] Scenario B: Ballast splashing and obstruction (obstruction area ≈ 30%);
[0100] Scene C: Oil stains reflect light and cause interference (the bright area is similar in shape to the fastener).
[0101] Timing verification process:
[0102] Kalman filter initialization:
[0103] State transition matrix , (Frame interval);
[0104] Process noise covariance Observation noise .
[0105] Sliding window settings: Frame (corresponding track length ≈ 1.35m), , , .
[0106] Interference filtering effect:
[0107] Scenario A: Single-frame detection generates 3 false alarms in a sudden frame. After time-series verification, all of them are filtered out, and the real defects are retained.
[0108] Scenario B: Ballast occlusion causes one missed detection in a single frame, but the confidence scores of consecutive frames accumulate. It is still judged as a defect;
[0109] Scene C: The oil stain reflection achieved a confidence level of 0.75 in a single frame, but the trajectory deviated from the distance. Pixels , is filtered.
[0110] Overall performance: In the 100-kilometer test section, the false positive rate of this invention was 0.08 times / km, while that of YOLOv5+CBAM was 1.2 times / km, a reduction of 93.3%; the recall rate remained at 91.5% (a decrease of only 0.8 percentage points), proving that timing verification did not significantly increase false positives while suppressing false positives.
[0111] Defect evolution prediction and graded early warning (predictive maintenance verification):
[0112] Data accumulation:
[0113] Thirty known defect points (including cracks and loosening) were selected and monitored continuously for 30 days.
[0114] Collect data daily and extract defect parameters (crack length) Loosening and offset ).
[0115] Evolutionary modeling:
[0116] LSTM network structure: 2 hidden layers (128 units), Dropout=0.2, training epochs 50;
[0117] Crack propagation prediction:
[0118] Input sequence: Crack length in the first 7 days ;
[0119] Forecast of trends for the next 7 days: (Actual measurement) The error is 4.2%.
[0120] System display: The blue curve represents historical measurement values, the red curve represents LSTM prediction values, and the green dashed line represents the warning threshold (15mm). The system triggered a "planned maintenance level" warning on the 23rd day, and the speed limit threshold was actually reached on the 28th day, with the warning issued 5 days in advance.
[0121] Tiered early warning implementation:
[0122] Instantaneous parking level: If a complete break of the spring clip is detected (confidence level 99.2%), the system will generate an alarm within 0.8 seconds and push it to the dispatch center;
[0123] Speed-limited operation level: Identifies 3 cracks with lengths of 10.2~13.7mm, and generates a work order with a speed limit of 160km / h;
[0124] Planned maintenance level: Generate a 7-day maintenance plan for 8 slowly developing defects (daily average expansion <0.1mm).
[0125] Early warning accuracy: The overall accuracy of the three-level early warning system reached 89.3%, with a false alarm rate of only 2.1%.
[0126] Iterative development of the edge-cloud collaboration model (continuous optimization capability verification):
[0127] Iteration cycle: 3 months for process execution (S6):
[0128] Vehicle-mounted terminal screening: Approximately 120 fuzzy samples with confidence levels ∈ [0.3, 0.7] are uploaded daily;
[0129] Cloud processing:
[0130] Experts have noted the newly added defect types (such as aging marks on composite fasteners).
[0131] Federated learning aggregates the gradients from 10 vehicle terminals and updates the global model;
[0132] Model delivery: Differential weight packet size ≈ 8.7MB, 5G transmission time < 15 seconds;
[0133] Terminal update: Hot update took 23 seconds, and the service was uninterrupted.
[0134] Effectiveness evaluation:
[0135] Recognition rate for novel aging marks: Initial 68.2% → 89.5% after iteration;
[0136] Overall F1 score improved by 4.7 percentage points;
[0137] Enhanced model generalization ability: On the Guangzhou-Shenzhen-Hong Kong Express Rail Link lines that were not used in the training, the F1-score reached 86.9% (initially 82.1%).
[0138] Comprehensive comparative experiments and data analysis:
[0139] Interference conditions: Covering sunny / rainy / foggy conditions, tunnels / bridges / roadbeds, day / night conditions.
[0140] Performance comparison (Table 1):
[0141]
[0142] In-depth analysis of key indicators:
[0143] Minor defect detection capability (Table 2):
[0144] Robustness in extreme scenarios (Table 3):
[0145] Engineering practicality verification:
[0146] Real-time performance: On the Jetson AGX Orin platform, the end-to-end processing latency is <24ms (meets the detection requirements of 250km / h).
[0147] Resource consumption: Model size 28.7MB, peak memory usage 1.8GB, suitable for vehicle deployment;
[0148] Compatibility: Supports 8 mainstream fastener types including WJ-7 / 8, FC, DTⅥ2, and Nabla, and is compatible with ballast / ballastless tracks;
[0149] Field application: During a 3-month pilot test on the Shanghai-Kunming High-Speed Railway, a total of 217 defects were detected, with an accuracy rate of 96.8% after manual review, preventing 12 potential safety accidents.
[0150] Table 2:
[0151]
[0152] Table 3:
[0153]
[0154] While embodiments of the present invention have been described in detail above, it will be apparent to those skilled in the art that various modifications and variations can be made to these embodiments. However, it should be understood that such modifications and variations fall within the scope and spirit of the invention as set forth in the claims. Furthermore, the invention described herein may have other embodiments and can be implemented or carried out in various ways.
Claims
1. A method for detecting defects in track fasteners, characterized in that, Includes the following steps: S1: Acquire continuous grayscale sequence images of the orbit and perform adaptive radiometric correction based on motion blur kernel estimation; S2: Based on the rail edge extraction results and the track geometry topology relationship, calculate the theoretical position of the fastener and generate a dynamic geometric soft attention mask. The dynamic geometric soft attention mask is dynamically generated based on the geometric parameters of the real-time rail edge curve, rather than a preset fixed coordinate, and can adapt to track geometry changes and fastener installation errors. S3: Construct a geometry-guided deep neural network, explicitly embed the dynamic geometric soft attention mask into multiple scales of the feature extraction layer to form a geometry-guided attention module, inject physical geometric priors into deep features through additive fusion, and output single-frame defect detection results; S4: Establish a sliding window time-series verification mechanism, use Kalman filtering to track the motion trajectory of the fastener in consecutive frames, filter instantaneous false detections through a multi-frame confidence accumulation function, and output the final defect judgment result; S5: Construct a fastener defect evolution map based on historical detection data, extract the time series of defect quantification parameters, use a time-series prediction model to fit the defect development trajectory, and execute graded early warning based on the correlation between the defect development rate and the preset safety threshold; S6: Through the end-to-cloud collaboration mechanism, the vehicle terminal automatically selects fuzzy samples with confidence levels in the uncertain range and uploads them to the cloud. After manual review and annotation, the cloud uses a federated learning algorithm to update the global model parameters and sends the differential weight package to the vehicle terminal to achieve hot model updates.
2. The method for detecting defects in track fasteners according to claim 1, characterized in that, The adaptive radiometric correction based on motion blur kernel estimation in step S1 specifically includes: performing gradient domain analysis on the original image to estimate the motion blur direction θ and blur scale k; constructing a Wiener filter for deblurring, wherein the ratio of noise to signal power spectrum is dynamically adjusted according to the tunnel / open-air scene; and performing radiometric correction by combining a local illumination estimation model, wherein the correction parameters α and β are adaptively set according to the ambient light intensity.
3. The method for detecting defects in track fasteners according to claim 1, characterized in that, The method for generating the dynamic geometric soft attention mask in step S2 is as follows: A sub-pixel-level edge detection algorithm is used to obtain the inner edge curve of the rail, and the edge straight line equation is fitted using the Random Sample Consensus (RANSAC) algorithm. Based on the standard track gauge parameters and the fastener type parameter library, the lateral offset and longitudinal spacing of the fastener center relative to the inner side of the rail are obtained by looking up a table. Based on the fitted edge straight line equation and the local track inclination angle, the theoretical center coordinates of each fastener in each frame are calculated. A two-dimensional Gaussian distribution function is constructed to generate a weight matrix, with the theoretical center as the mean and the allowable installation error corresponding to the track type as the standard deviation. The weight matrix has a weight close to 1 at the theoretical position and a weight close to 0 in the background region.
4. The method for detecting defects in track fasteners according to claim 3, characterized in that, The fastener type parameter library stores fastener laying parameters corresponding to ballastless tracks and ballasted tracks, wherein: the Gaussian standard deviation σ corresponding to ballasted tracks is set to 812 pixels, and the Gaussian standard deviation σ corresponding to ballasted tracks is set to 58 pixels; the local tilt angle of the track is obtained by estimating the pose change between adjacent frame images and is used to correct the longitudinal coordinate of the theoretical position of the fastener.
5. The method for detecting defects in track fasteners according to claim 1, characterized in that, The calculation process of the geometrically guided attention module in step S3 includes: upsampling the dynamic geometric soft attention mask to the same size as the feature map of the current layer of the backbone network; fusing the feature map and the mask through 1×1 convolution to generate geometrically guided weights; calculating the attention response matrix through the Sigmoid activation function; multiplying the attention response matrix element-wise with the input feature map and then adding it to the original feature map to achieve feature weighted fusion; wherein, the calculation of the geometrically guided weights explicitly includes physical location information, so that the network is guided by orbital geometric constraints during the feature extraction stage.
6. The method for detecting defects in track fasteners according to claim 1, characterized in that, The sliding window timing verification mechanism described in step S4 specifically includes: initializing the state vector of the Kalman filter, including the fastener center coordinates and movement velocity; predicting the fastener position in the current frame based on the state transition model; updating the filter state by fusing single-frame detection results; and calculating the timing cumulative confidence. ,in The length of the sliding window. For the first Frame detection confidence, To determine the overlap between the detection box and the predicted box, The distance of the trajectory deviation. The attenuation coefficient is used when... When the number of frames that exceed the preset total threshold and continuously meet the single-frame threshold reaches the minimum frame count requirement, it is determined to be a genuine defect.
7. The method for detecting defects in track fasteners according to claim 1, characterized in that, The graded early warning in step S5 includes three levels: immediate stop level: detection of missing fasteners, completely broken elastic clips, or loose bolts, with a confidence level higher than the first threshold; speed-limited operation level: detection of crack length exceeding the first length threshold or loosening offset exceeding the first offset threshold; planned maintenance level: based on the defect evolution map, it is predicted that the defect parameters will develop to the speed-limited operation level threshold within a preset time window, and a preventive maintenance work order is generated; wherein, the threshold is set according to the "Rules for Maintenance of Ballastless Track Lines of High-Speed Railways" or the "Rules for Railway Line Repair".
8. The method for detecting defects in track fasteners according to claim 1, characterized in that, The defect quantification parameters mentioned in step S5 include: the length, width, and propagation angle of crack-type defects; the offset and rotation angle of loosening-type defects; and the confidence decay curve of missing-type defects. The time-series prediction model uses a Long Short-Term Memory (LSTM) network, with the input being the defect parameter sequence of historical days T and the output being the predicted value for the next T days.
9. The method for detecting defects in track fasteners according to claim 1, characterized in that, The edge-cloud collaboration mechanism described in step S6 includes: setting the confidence uncertainty interval to [0.3, 0.7] for the vehicle terminal and automatically filtering the detection samples within this interval; uploading the samples to the cloud annotation platform through an encrypted communication channel; the cloud using a federated learning framework to aggregate the local gradients of multiple vehicle terminals and update the global model parameters; generating a differential weight package and distributing it to the vehicle terminal via over-the-air (OTA) download technology; and the vehicle terminal performing a hot update, which does not affect the real-time detection service.
10. A track fastener defect detection system implementing the method of any one of claims 1-9, characterized in that, include: Image acquisition unit: Linear scan camera and synchronous triggering device, used to acquire continuous grayscale sequence images of the track; Edge computing unit: an embedded computing device that deploys geometry-guided deep neural networks and geometry-guided attention modules; Timing verification unit: runs the Kalman filter algorithm and confidence accumulation function; Evolution Analysis Unit: Stores historical detection data, constructs defect evolution maps, and executes graded early warnings; Communication unit: A module supporting 5G communication to achieve data interaction between the end and the cloud; Early warning output unit: Generates structured early warning reports and pushes them to the railway operation and maintenance management platform; The edge computing unit adopts the NVIDIA Jetson AGX Orin platform, and after TensorRT optimization, the inference speed is no less than 40 FPS, which meets the real-time detection requirements of speeds above 250 km / h. The system supports both ballasted and ballastless track scenarios and is compatible with defect detection of WJ-7, WJ-8, FC, DTVI2, and Nabla fasteners.