Railway fastener damage detection method and system

By constructing a railway fastener injury detection model based on comparison learning and measurement learning, the problem of low reliability and accuracy of railway fastener injury detection in the existing technology is solved, and efficient and reliable railway fastener status detection is achieved.

CN120013901APending Publication Date: 2025-05-16GUANGXI TRANSPORTATION VOCATIONAL & TECH COLLEGE +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510092506.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-21
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

The existing railway fastener damage detection solutions are not reliable, inefficient, and lack diversified and high-quality negative samples for various environmental conditions, resulting in low reliability and accuracy of machine learning and deep learning solutions.

Method used

By obtaining the three-dimensional point cloud data of railway fasteners, preprocessing and feature extraction, a railway fastener damage detection model based on comparison learning and measurement learning is constructed to realize automated detection of the actual railway fastener status.

Benefits of technology

It improves the reliability and accuracy of railway fastener damage detection, can realize effective damage detection on an unbalanced data set, and enhances the stability and efficiency of the detection system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120013901A_ABST
    Figure CN120013901A_ABST
Patent Text Reader

Abstract

The invention discloses a railway fastener damage detection method, and the method comprises the steps: obtaining the three-dimensional point cloud data of an existing railway fastener, and carrying out the preprocessing of the three-dimensional point cloud data, so as to construct a training data set; constructing a railway fastener damage detection initial model based on comparative learning and metric learning, and training to obtain a railway fastener damage detection model; and acquiring actual three-dimensional point cloud data of the railway fastener, and performing actual railway fastener damage detection by adopting the obtained railway fastener damage detection model. The invention also discloses a system for realizing the railway fastener damage detection method. According to the method, the railway fastener damage detection can be realized based on the unbalanced iron notch fastener data set, the reliability is higher, and the accuracy is better.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of image processing, and in particular relates to a railway fastener damage detection method and system. Background Art

[0002] With the development of economy and technology and the improvement of people's living standards, the demand for the operation of high-speed railways and heavy-load railways is growing, so the safety of railway infrastructure is becoming more and more important.

[0003] Railway fasteners are important components for maintaining track stability and reducing the impact between trains and tracks. Failure of railway fasteners can lead to serious consequences such as track displacement or even derailment. Therefore, regular inspection and maintenance of railway fasteners is of great significance to the safe and stable operation of the railway system.

[0004] At present, the traditional railway fastener damage detection scheme all adopts manual inspection. However, this manual inspection scheme is not reliable, has low efficiency, and is easily affected by subjective judgment and environmental factors. At present, some researchers have adopted machine learning and deep learning schemes to automatically detect railway fastener anomalies. However, such schemes require a large number of training samples, while in practical applications, there is a lack of diversified, high-quality negative samples (i.e., fastener damage samples) for various environmental conditions; therefore, this situation makes the existing machine learning and deep learning schemes have low reliability and accuracy. Summary of the invention

[0005] One of the purposes of the present invention is to provide a railway fastener damage detection method with high reliability and good accuracy.

[0006] A second object of the present invention is to provide a system for implementing the railway fastener damage detection method.

[0007] The railway fastener damage detection method provided by the present invention comprises the following steps:

[0008] S1. Acquire the existing three-dimensional point cloud data of railway fasteners and obtain a data set containing only normal or non-abnormal data;

[0009] S2. Preprocessing the three-dimensional point cloud data obtained in step S1 to construct a training data set;

[0010] S3. Based on contrastive learning and metric learning, an initial model for railway fastener damage detection is constructed;

[0011] S4. Using the training data set obtained in step S2, the initial model for railway fastener damage detection constructed in step S3 is trained to obtain a railway fastener damage detection model;

[0012] S5. Acquire the actual three-dimensional point cloud data of the railway fastener, and use the railway fastener damage detection model obtained in step S4 to perform actual railway fastener damage detection.

[0013] The construction of the initial model for railway fastener damage detection based on contrastive learning and metric learning described in step S3 specifically includes the following steps:

[0014] The constructed initial model for railway fastener damage detection includes a point cloud conversion module, a self-supervised contrastive learning module, and a metric learning module;

[0015] The point cloud conversion module, the self-supervised contrastive learning module and the metric learning module are connected in series;

[0016] The point cloud conversion module is used to standardize the input 3D point cloud data;

[0017] Based on the contrastive learning scheme, a self-supervised contrastive learning module is constructed; the self-supervised contrastive learning module is used to realize representation learning and denoise the input 3D point cloud data;

[0018] The metric learning module is used to obtain a distance metric so that the distance between similar samples is as small as possible and the distance between different samples is as large as possible, and the distance metric is used to realize the damage detection of railway fasteners.

[0019] The point cloud conversion module specifically includes the following steps:

[0020] The input 3D point cloud data is used as the input of the point cloud conversion module;

[0021] The input of the point cloud conversion module is convolved through the point cloud encoding model to obtain the basic feature representation; then the hybrid function is used in turn to perform feature fusion, and the global maximum pooling layer is used for dimensionality reduction to obtain the first fine feature; the first fine feature is batch normalized through a fully connected layer including 256 units, and then processed through an activation function layer, and then the data is reorganized through a reshaping layer, and finally processed through a dense layer to generate an orthogonal transformation matrix; finally, the orthogonal transformation matrix is ​​multiplied by the input of the point cloud conversion module to generate point cloud data.

[0022] The point cloud coding model specifically includes the following steps:

[0023] The input of the point cloud encoding model is divided into four paths:

[0024] The first input data is processed in sequence through a standard one-dimensional convolution, a normalization layer, an activation function layer, an average pooling layer, a standard one-dimensional convolution, a normalization layer, an activation function layer, and an average pooling layer to obtain the first path of features;

[0025] The second input data is processed by the grouped one-dimensional convolution layer, normalization layer, activation function layer and average pooling layer in sequence to obtain the second sub-features; the grouped one-dimensional convolution layer is used to reduce the computational complexity and allow the model to learn different types of features from different regions of the point cloud, ensuring that the extracted features are diverse and representative of the input data;

[0026] The third input data is processed in sequence through a separable one-dimensional convolutional layer, a normalization layer, an activation function layer, and an average pooling layer to obtain the third feature path; the separable one-dimensional convolutional layer is used to reduce the number of parameters in the model while still capturing the complex spatial relationships in the data;

[0027] The fourth input data is processed in sequence through a one-dimensional convolutional layer in the depth direction, a normalization layer, an activation function layer, and an average pooling layer to obtain the fourth sub-features; the one-dimensional convolutional layer in the depth direction is used to combine different feature sets into a unified point cloud representation, effectively capturing a wide range of patterns and details from the input data;

[0028] The normalization layer is used to improve the stability and efficiency of the model; the activation function layer uses the ReLU activation function to introduce nonlinear features to improve the model's ability to process complex data; the average pooling layer is used to downsample the data to improve the model's efficiency;

[0029] After the first to fourth path features are connected in series, they are processed in sequence through the standard one-dimensional convolution, normalization layer, activation function layer and average pooling layer to obtain a single comprehensive point cloud feature;

[0030] Based on the channel attention mechanism, the single comprehensive point cloud feature is processed by global average pooling and maximum pooling to generate a summary feature map, which is then processed by dense layers to generate attention weights to highlight the most critical features in the data. The weights are then applied to the feature map, effectively adjusting the focus of the model to the most important aspects of the point cloud while suppressing less important information. Finally, the attention-enhanced features are flattened into a single vector to represent the point cloud in a compact form.

[0031] The self-supervised contrastive learning module specifically includes the following steps:

[0032] The output of the point cloud conversion module is used as the input of the self-supervised contrastive learning module;

[0033] The input of the self-supervised contrastive learning module is enhanced by data enhancement to obtain enhanced data A and enhanced data B, wherein the data enhancement includes rotation, jitter and expansion; then the corresponding positive sample pairs and negative sample pairs are generated, wherein the positive sample pairs are as close as possible in the feature space, and the negative sample pairs are as far away as possible in the feature space; the enhanced data A is imported into the feature extraction network to obtain feature output A, and the enhanced data B is imported into the feature extraction network to obtain feature output B, thereby mapping the input sample to the feature space and mapping the input data to a low-dimensional feature vector;

[0034] During training, the contrastive loss function is used to optimize the self-supervised contrastive learning module so that the positive sample pairs are as close as possible in the feature space and the negative sample pairs are as far away as possible in the feature space;

[0035] After training, the feature representation learned by the encoder can capture the structural information of the data without labels.

[0036] The feature extraction network specifically includes the following steps:

[0037] The input data is divided into four paths:

[0038] The first input data is processed in sequence through the first standard one-dimensional convolution, the first normalization layer, the first activation function layer, the first average pooling layer, the second standard one-dimensional convolution, the second normalization layer, the second activation function layer and the second average pooling layer to obtain the first path feature; the second input data is processed in sequence through the grouped one-dimensional convolution layer, the normalization layer, the activation function layer and the first average pooling layer to obtain the second path feature; the third input data is processed in sequence through the separable one-dimensional convolution layer, the normalization layer, the activation function layer and the first average pooling layer to obtain the third path feature; the fourth input data is processed in sequence through the depth-direction one-dimensional convolution layer, the normalization layer, the activation function layer and the first average pooling layer , and obtain the fourth path of features; among them, the grouped one-dimensional convolution layer is used to reduce the computational complexity, while allowing the model to learn different types of features from various regions of the point cloud, ensuring that the extracted features are both diverse and representative of the input data; the separable one-dimensional convolution layer is used to reduce the number of parameters in the model while still capturing the complex spatial relationships in the data; the depth-wise one-dimensional convolution layer is used to combine different feature sets into a unified point cloud representation, effectively capturing a wide range of patterns and details from the input data; the normalization layer is used to improve the stability and efficiency of the model; the activation function layer is used to introduce nonlinear features to improve the model's ability to handle complex data; the average pooling layer is used to downsample the data to improve the efficiency of the model;

[0039] After the first to fourth path features are connected in series, they are processed in sequence through the standard one-dimensional convolution, normalization layer, activation function layer and average pooling layer to obtain a single comprehensive point cloud feature;

[0040] Based on the channel attention mechanism, the single comprehensive point cloud feature is processed by global average pooling and maximum pooling to generate a summary feature map, which is then processed by a dense layer to obtain the attention weight to highlight the most critical features in the data; the obtained attention weight is applied to the feature map, and the attention-enhanced features are flattened into a single vector, and the vector is passed through a dense layer to reduce the dimension, thereby obtaining the feature output.

[0041] The metric learning module specifically includes the following steps:

[0042] The output of the self-supervised contrastive learning module is used as the input of the metric learning module;

[0043] For the input of the metric learning module, the similarity between the input data and the data points in the feature space is calculated as a distance metric; and damage detection of the input data is completed based on the calculated similarity;

[0044] The similarity includes Euclidean distance, Manhattan distance or cosine similarity;

[0045] During training, a loss function is designed to optimize the model's representation so that similar samples have a smaller distance and different samples have a larger distance. The model is then trained using the loss function. During training, the model adjusts its parameters to learn a suitable distance metric so that the distance between similar samples is as small as possible and the distance between different samples is as large as possible. Finally, after training, the learned distance metric is used as the boundary between normal samples and abnormal samples. When the distance between the feature representation of a new sample and the normal feature space exceeds this threshold, the model will identify the sample as an abnormality.

[0046] The present invention also provides a system for implementing the railway fastener damage detection method, comprising a data acquisition module, a data processing module, a model construction module, a model training module and a damage detection module; the data acquisition module, the data processing module, the model construction module, the model training module and the damage detection module are connected in series in sequence; the data acquisition module is used to acquire the three-dimensional point cloud data of the existing railway fasteners, and obtain a data set containing only normal or non-abnormal data, and upload the data information to the data processing module; the data processing module is used to pre-process the acquired three-dimensional point cloud data according to the received data information to construct a training data set, and upload the data information to the data processing module. Upload the model construction module; the model construction module is used to construct an initial model for railway fastener damage detection based on contrast learning and metric learning according to the received data information, and upload the data information to the model training module; the model training module is used to use the obtained training data set to construct the initial model for railway fastener damage detection according to the received data information, obtain the railway fastener damage detection model, and upload the data information to the damage detection module; the damage detection module is used to obtain the three-dimensional point cloud data of the actual railway fasteners according to the received data information, and use the obtained railway fastener damage detection model to perform actual railway fastener damage detection.

[0047] The railway fastener damage detection method and system provided by the present invention constructs the railway fastener state space through the existing railway deducted three-dimensional point cloud data, extracts features from the actual three-dimensional point cloud data of the railway fastener, and adopts measurement technology to realize the measurement of the features of the actual railway fastener and the railway fastener state space; therefore, the present invention can not only realize railway fastener damage detection based on an unbalanced iron mouth fastener data set, but also has higher reliability and better accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 The figure is a schematic diagram of the method flow of the present invention.

[0049] Figure 2 Schematic diagram of the functional modules of the system of the present invention. DETAILED DESCRIPTION

[0050] like Figure 1 The method flow diagram of the method of the present invention is shown as follows: The railway fastener damage detection method disclosed in the present invention comprises the following steps:

[0051] S1. Obtain the existing 3D point cloud data of railway fasteners and obtain a data set containing only normal or non-abnormal data

[0052] S2. Preprocessing the three-dimensional point cloud data obtained in step S1 to construct a training data set;

[0053] S3. Based on contrastive learning and metric learning, an initial model for railway fastener damage detection is constructed; specifically, the following steps are included:

[0054] The constructed railway fastener state space establishes a primary model, including a point cloud conversion module, a self-supervised contrastive learning module, and a metric learning module;

[0055] The point cloud conversion module, the self-supervised contrastive learning module and the metric learning module are connected in series;

[0056] The point cloud conversion module is used to standardize the input 3D point cloud data;

[0057] Based on the contrastive learning scheme, a self-supervised contrastive learning module is constructed; the self-supervised contrastive learning module is used to realize representation learning and denoise the input 3D point cloud data;

[0058] The metric learning module is used to obtain a distance metric so that the distance between similar samples is as small as possible and the distance between different samples is as large as possible, and the distance metric is used to realize the damage detection of railway fasteners;

[0059] In specific implementation, the point cloud conversion module specifically includes the following steps:

[0060] The input 3D point cloud data is used as the input of the point cloud conversion module;

[0061] The input 3D point cloud data is used as the input of the point cloud conversion module;

[0062] The input of the point cloud conversion module is convolved through the point cloud encoding model to obtain the basic feature representation; then the hybrid function is used in turn to perform feature fusion, and the global maximum pooling layer is used for dimensionality reduction to obtain the first fine feature; the first fine feature is batch normalized through a fully connected layer including 256 units, and then processed through an activation function layer, and then the data is reorganized through a reshaping layer, and finally processed through a dense layer to generate an orthogonal transformation matrix; finally, the orthogonal transformation matrix is ​​multiplied by the input of the point cloud conversion module to generate point cloud data for generating robustness and improving downstream task performance;

[0063] The point cloud coding model specifically includes the following steps:

[0064] The input of the point cloud encoding model is divided into four paths:

[0065] The first input data is processed in sequence through a standard one-dimensional convolution, a normalization layer, an activation function layer, an average pooling layer, a standard one-dimensional convolution, a normalization layer, an activation function layer, and an average pooling layer to obtain the first path of features;

[0066] The second input data is processed by the grouped one-dimensional convolution layer, normalization layer, activation function layer and average pooling layer in sequence to obtain the second sub-features; the grouped one-dimensional convolution layer is used to reduce the computational complexity and allow the model to learn different types of features from different regions of the point cloud, ensuring that the extracted features are diverse and representative of the input data;

[0067] The third input data is processed in sequence through a separable one-dimensional convolutional layer, a normalization layer, an activation function layer, and an average pooling layer to obtain the third feature path; the separable one-dimensional convolutional layer is used to reduce the number of parameters in the model while still capturing the complex spatial relationships in the data;

[0068] The fourth input data is processed in sequence through a one-dimensional convolutional layer in the depth direction, a normalization layer, an activation function layer, and an average pooling layer to obtain the fourth sub-features; the one-dimensional convolutional layer in the depth direction is used to combine different feature sets into a unified point cloud representation, effectively capturing a wide range of patterns and details from the input data;

[0069] The normalization layer is used to improve the stability and efficiency of the model; the activation function layer uses the ReLU activation function to introduce nonlinear features to improve the model's ability to process complex data; the average pooling layer is used to downsample the data to improve the model's efficiency;

[0070] After the first to fourth path features are connected in series, they are processed in sequence through the standard one-dimensional convolution, normalization layer, activation function layer and average pooling layer to obtain a single comprehensive point cloud feature;

[0071] Based on the channel attention mechanism, the single comprehensive point cloud feature is processed by global average pooling and maximum pooling to generate a summary feature map, which is then processed by dense layers to generate attention weights to highlight the most critical features in the data. The weights are then applied to the feature map, effectively adjusting the focus of the model to the most important aspects of the point cloud while suppressing less important information. Finally, the attention-enhanced features are flattened into a single vector to represent the point cloud in a compact form;

[0072] The point cloud conversion module ensures that the model can withstand changes in orientation, scale, and slight deformations; this is done to ensure that no matter what form the point cloud appears in, the subsequent feature extraction process can remain consistent and reliable;

[0073] In specific implementation, the self-supervised contrastive learning module specifically includes the following steps:

[0074] The output of the point cloud conversion module is used as the input of the self-supervised contrastive learning module;

[0075] The input of the self-supervised contrastive learning module is enhanced by data enhancement to obtain enhanced data A and enhanced data B, wherein the data enhancement includes rotation, jitter and expansion; then the corresponding positive sample pairs and negative sample pairs are generated, wherein the positive sample pairs are as close as possible in the feature space, and the negative sample pairs are as far away as possible in the feature space; the enhanced data A is imported into the feature extraction network to obtain feature output A, and the enhanced data B is imported into the feature extraction network to obtain feature output B, thereby mapping the input sample to the feature space and mapping the input data to a low-dimensional feature vector;

[0076] During training, the contrastive loss function is used to optimize the self-supervised contrastive learning module so that the positive sample pairs are as close as possible in the feature space and the negative sample pairs are as far away as possible in the feature space;

[0077] After training, the feature representation learned by the encoder can capture the structural information of the data without labels;

[0078] Among them, the feature extraction network specifically includes the following steps:

[0079] The input data is divided into four paths:

[0080] The first input data is processed in sequence through the first standard one-dimensional convolution, the first normalization layer, the first activation function layer, the first average pooling layer, the second standard one-dimensional convolution, the second normalization layer, the second activation function layer and the second average pooling layer to obtain the first path feature; the second input data is processed in sequence through the grouped one-dimensional convolution layer, the normalization layer, the activation function layer and the first average pooling layer to obtain the second path feature; the third input data is processed in sequence through the separable one-dimensional convolution layer, the normalization layer, the activation function layer and the first average pooling layer to obtain the third path feature; the fourth input data is processed in sequence through the depth-direction one-dimensional convolution layer, the normalization layer, the activation function layer and the first average pooling layer , and obtain the fourth path of features; among them, the grouped one-dimensional convolution layer is used to reduce the computational complexity, while allowing the model to learn different types of features from various regions of the point cloud, ensuring that the extracted features are both diverse and representative of the input data; the separable one-dimensional convolution layer is used to reduce the number of parameters in the model while still capturing the complex spatial relationships in the data; the depth-wise one-dimensional convolution layer is used to combine different feature sets into a unified point cloud representation, effectively capturing a wide range of patterns and details from the input data; the normalization layer is used to improve the stability and efficiency of the model; the activation function layer is used to introduce nonlinear features to improve the model's ability to handle complex data; the average pooling layer is used to downsample the data to improve the efficiency of the model;

[0081] After the first to fourth path features are connected in series, they are processed in sequence through the standard one-dimensional convolution, normalization layer, activation function layer and average pooling layer to obtain a single comprehensive point cloud feature;

[0082] Based on the channel attention mechanism, the single comprehensive point cloud feature is processed by global average pooling and maximum pooling to generate a summary feature map, which is then processed by dense layers to obtain attention weights to highlight the most critical features in the data; the obtained attention weights are applied to the feature map, and the attention-enhanced features are flattened into a single vector, and the vector is passed through a dense layer to reduce the dimension, thereby obtaining the feature output;

[0083] In specific implementation, the metric learning module specifically includes the following steps:

[0084] The output of the self-supervised contrastive learning module is used as the input of the metric learning module;

[0085] For the input of the metric learning module, the similarity between the input data and the data points in the feature space is calculated as a distance metric; and damage detection of the input data is completed based on the calculated similarity;

[0086] The similarity includes Euclidean distance, Manhattan distance or cosine similarity;

[0087] During training, a loss function is designed to optimize the model's representation so that similar samples have a smaller distance and different samples have a larger distance. The model is then trained using the loss function. During training, the model adjusts its parameters to learn a suitable distance metric so that the distance between similar samples is as small as possible and the distance between different samples is as large as possible. Finally, after training, the learned distance metric is used as the boundary between normal samples and abnormal samples. When the distance between the feature representation of a new sample and the normal feature space exceeds this threshold, the model identifies the sample as abnormal.

[0088] S4. Using the training data set obtained in step S2, the initial model for railway fastener damage detection constructed in step S3 is trained to obtain a railway fastener damage detection model;

[0089] S5. Acquire the actual three-dimensional point cloud data of the railway fastener, and use the railway fastener damage detection model obtained in step S4 to perform actual railway fastener damage detection.

[0090] In a typical scenario, the model is trained on a dataset that contains only normal or non-anomalous data. During the training phase, the goal of metric learning is to construct a metric that ensures that the distance between feature representations of similar data points is as small as possible, while the distance between dissimilar data points is as large as possible. After training, the model will be exposed to new data, which may contain both normal and abnormal samples. At this time, anomaly detection is particularly important. Because the model is trained only on normal data throughout the process, it already has a deep understanding of the "normal" feature space, that is, it has mastered the feature representation that normal data should have. When the feature extractor receives a new input, whether the input is normal or abnormal, it can generate the corresponding feature representation. Subsequently, the metric learning technique is used to compare and analyze this new feature representation with the "normal" feature space mastered during training. If the input data is within the normal range, then its feature representation should conform to the expected pattern of the normal feature space and be relatively close to other normal samples. Conversely, if the input data is abnormal, its feature representation may deviate significantly from the normal feature space, resulting in a larger distance calculated based on the learned metric.

[0091] This difference in distance is at the heart of anomaly detection; the learned metric effectively acts as a boundary or threshold: when the distance between the feature representation of a new sample and the normal feature space exceeds this threshold, the model will identify the sample as an anomaly; this process is particularly powerful because it does not require exposure to any anomalous data during training; instead, it is based on the assumption that anomalous data naturally deviates from the patterns formed by normal data; the process starts with a feature extractor, which converts the raw input data (such as a point cloud) into feature representations; these feature representations are then passed through a metric learning framework, where the distance between them is calculated; during the training phase, the model adjusts these metrics to ensure that similar samples are closely adjacent in the feature space, while dissimilar samples are kept at a certain distance; after training, the model enters the anomaly detection phase; at this time, new data is processed by the feature extractor, and the resulting feature representation is then compared with the learned normal feature space through a metric; if the distance is within an acceptable range, the data is judged to be normal; conversely, if the distance is too large, it is considered anomaly.

[0092] This approach is particularly good at detecting subtle anomalies that are difficult to detect with traditional methods; by focusing on the feature space and applying metric learning techniques to quantify deviations, the model is able to identify small changes that may indicate problems; this makes it an indispensable and powerful tool in situations where data integrity is critical, such as quality control, security, and any field where any subtle anomaly may indicate a major hidden danger.

[0093] like Figure 2The figure shows a schematic diagram of the functional modules of the system of the present invention: the system for realizing the railway fastener damage detection method disclosed in the present invention comprises a data acquisition module, a data processing module, a model construction module, a model training module and a damage detection module; the data acquisition module, the data processing module, the model construction module, the model training module and the damage detection module are connected in series in sequence; the data acquisition module is used to acquire the three-dimensional point cloud data of the existing railway fasteners, and obtain a data set containing only normal or non-abnormal data, and upload the data information to the data processing module; the data processing module is used to pre-process the acquired three-dimensional point cloud data according to the received data information to construct a training data set. The model building module is used to construct an initial model for railway fastener damage detection based on contrast learning and metric learning according to the received data information, and upload the data information to the model training module; the model training module is used to use the obtained training data set to construct the initial model for railway fastener damage detection according to the received data information, obtain the railway fastener damage detection model, and upload the data information to the damage detection module; the damage detection module is used to obtain the actual three-dimensional point cloud data of the railway fastener according to the received data information, and use the obtained railway fastener damage detection model to perform actual railway fastener damage detection.

Claims

1. A railway fastener damage detection method comprising the following steps: S1. Acquire the existing three-dimensional point cloud data of railway fasteners and obtain a data set containing only normal or non-abnormal data; S2. Preprocessing the three-dimensional point cloud data obtained in step S1 to construct a training data set; S3. Based on contrastive learning and metric learning, an initial model for railway fastener damage detection is constructed; S4. Using the training data set obtained in step S2, the initial model for railway fastener damage detection constructed in step S3 is trained to obtain a railway fastener damage detection model; S5. Acquire the actual three-dimensional point cloud data of the railway fastener, and use the railway fastener damage detection model obtained in step S4 to perform actual railway fastener damage detection.

2. The railway fastener damage detection method according to claim 1, characterized in that The construction of the initial model for railway fastener damage detection based on contrastive learning and metric learning described in step S3 specifically includes the following steps: The constructed initial model for railway fastener damage detection includes a point cloud conversion module, a self-supervised contrastive learning module, and a metric learning module; The point cloud conversion module, the self-supervised contrastive learning module and the metric learning module are connected in series; The point cloud conversion module is used to standardize the input 3D point cloud data; Based on the contrastive learning scheme, a self-supervised contrastive learning module is constructed; the self-supervised contrastive learning module is used to realize representation learning and denoise the input 3D point cloud data; The metric learning module is used to obtain a distance metric so that the distance between similar samples is as small as possible and the distance between different samples is as large as possible, and the distance metric is used to realize the damage detection of railway fasteners.

3. The railway fastener damage detection method according to claim 2, characterized in that The point cloud conversion module specifically includes the following steps: The input 3D point cloud data is used as the input of the point cloud conversion module; The input of the point cloud conversion module is convolved through the point cloud encoding model to obtain the basic feature representation; then the hybrid function is used in turn to perform feature fusion, and the global maximum pooling layer is used for dimensionality reduction to obtain the first fine feature; the first fine feature is batch normalized through a fully connected layer including 256 units, and then processed through an activation function layer, and then the data is reorganized through a reshaping layer, and finally processed through a dense layer to generate an orthogonal transformation matrix; finally, the orthogonal transformation matrix is ​​multiplied by the input of the point cloud conversion module to generate point cloud data.

4. The railway fastener damage detection method according to claim 3, characterized in that The point cloud coding model specifically includes the following steps: The input of the point cloud encoding model is divided into four paths: The first input data is processed in sequence through a standard one-dimensional convolution, a normalization layer, an activation function layer, an average pooling layer, a standard one-dimensional convolution, a normalization layer, an activation function layer, and an average pooling layer to obtain the first path of features; The second input data is processed by a grouped one-dimensional convolution layer, a normalization layer, an activation function layer, and an average pooling layer in sequence to obtain the second sub-features; the grouped one-dimensional convolution layer is used to reduce the computational complexity while allowing the model to learn different types of features from different regions of the point cloud; The third input data is processed in sequence through a separable one-dimensional convolution layer, a normalization layer, an activation function layer, and an average pooling layer to obtain the third feature; the separable one-dimensional convolution layer is used to reduce the number of parameters in the model; The fourth input data is processed in turn through a one-dimensional convolutional layer in the depth direction, a normalization layer, an activation function layer, and an average pooling layer to obtain the fourth sub-features; the one-dimensional convolutional layer in the depth direction is used to combine different feature sets into a unified point cloud representation; The normalization layer is used to improve the stability and efficiency of the model; the activation function layer uses the ReLU activation function to introduce nonlinear features to improve the model's ability to process complex data; the average pooling layer is used to downsample the data to improve the model's efficiency; After the first to fourth path features are connected in series, they are processed in sequence through the standard one-dimensional convolution, normalization layer, activation function layer and average pooling layer to obtain a single comprehensive point cloud feature; Based on the channel attention mechanism, the single comprehensive point cloud feature is processed by global average pooling and maximum pooling to generate a summary feature map, and then the attention weights are generated by dense layer processing; the weights are applied to the feature map to adjust the focus of the model to the most important aspects of the point cloud; finally, the attention-enhanced features are flattened into a single vector to obtain the output point cloud.

5. The railway fastener damage detection method according to claim 6, characterized in that The self-supervised contrastive learning module specifically includes the following steps: The output of the point cloud conversion module is used as the input of the self-supervised contrastive learning module; The input of the self-supervised contrastive learning module is enhanced by data enhancement to obtain enhanced data A and enhanced data B, wherein the data enhancement includes rotation, jitter and expansion; then the corresponding positive sample pairs and negative sample pairs are generated, wherein the positive sample pairs are as close as possible in the feature space, and the negative sample pairs are as far away as possible in the feature space; the enhanced data A is imported into the feature extraction network to obtain feature output A, and the enhanced data B is imported into the feature extraction network to obtain feature output B, thereby mapping the input sample to the feature space and mapping the input data to a low-dimensional feature vector; During training, the contrastive loss function is used to optimize the self-supervised contrastive learning module so that the positive sample pairs are as close as possible in the feature space and the negative sample pairs are as far away as possible in the feature space; After training, the feature representation learned by the encoder can capture the structural information of the data without labels.

6. The railway fastener damage detection method according to claim 5, characterized in that The feature extraction network specifically includes the following steps: The input data is divided into four paths: The first input data is processed in sequence through the first standard one-dimensional convolution, the first normalization layer, the first activation function layer, the first average pooling layer, the second standard one-dimensional convolution, the second normalization layer, the second activation function layer and the second average pooling layer to obtain the first path feature; The second input data is processed in sequence by a grouped one-dimensional convolution layer, a normalization layer, an activation function layer, and a first average pooling layer to obtain the second path of features; the third input data is processed in sequence by a separable one-dimensional convolution layer, a normalization layer, an activation function layer, and a first average pooling layer to obtain the third path of features; the fourth input data is processed in sequence by a depth-wise one-dimensional convolution layer, a normalization layer, an activation function layer, and a first average pooling layer to obtain the fourth path of features; wherein, the grouped one-dimensional convolution layer is used to reduce the computational complexity while allowing the model to learn different types of features from various regions of the point cloud; the separable one-dimensional convolution layer is used to reduce the number of parameters in the model; the depth-wise one-dimensional convolution layer is used to combine different feature sets into a unified point cloud representation; the normalization layer is used to improve the stability and efficiency of the model; the activation function layer is used to introduce nonlinear features to improve the model's ability to process complex data; the average pooling layer is used to downsample the data to improve the model's efficiency; After the first to fourth path features are connected in series, they are processed in sequence through the standard one-dimensional convolution, normalization layer, activation function layer and average pooling layer to obtain a single comprehensive point cloud feature; Based on the channel attention mechanism, the single comprehensive point cloud feature is processed by global average pooling and maximum pooling to generate a summary feature map, which is then processed by a dense layer to obtain the attention weight to highlight the most critical features in the data; the obtained attention weight is applied to the feature map, and the attention-enhanced features are flattened into a single vector, and the vector is passed through a dense layer to reduce the dimension, thereby obtaining the feature output.

7. The railway fastener damage detection method according to claim 6, characterized in that The metric learning module specifically includes the following steps: The output of the self-supervised contrastive learning module is used as the input of the metric learning module; For the input of the metric learning module, the similarity between the input data and the data points in the feature space is calculated as the distance metric; And based on the calculated similarity, damage detection of input data is completed; The similarity includes Euclidean distance, Manhattan distance or cosine similarity.

8. A system for implementing the railway fastener damage detection method according to any one of claims 1 to 7, characterized in that It includes a data acquisition module, a data processing module, a model building module, a model training module and a damage detection module; the data acquisition module, the data processing module, the model building module, the model training module and the damage detection module are connected in series in sequence; the data acquisition module is used to acquire the three-dimensional point cloud data of the existing railway fasteners, and obtain a data set containing only normal or non-abnormal data, and upload the data information to the data processing module; The data processing module is used to pre-process the acquired three-dimensional point cloud data according to the received data information to construct a training data set, and upload the data information to the model construction module; The model building module is used to build an initial model for railway fastener damage detection based on the received data information, contrast learning and metric learning, and upload the data information to the model training module; The model training module is used to obtain a railway fastener damage detection model by using the obtained training data set according to the received data information, and upload the data information to the damage detection module; The damage detection module is used to obtain the three-dimensional point cloud data of the actual railway fasteners according to the received data information, and use the obtained railway fastener damage detection model to perform actual railway fastener damage detection.