Train railway obstacle detection and distance measurement method based on laser point cloud

By using a laser point cloud-based method for detecting and measuring railway obstacles, railway obstacles can be detected in real time and the distance between the train car and the obstacle can be calculated. This solves the problem of inaccurate information transmission in existing technologies, improves detection speed and accuracy, and ensures the safety of shunting operations.

CN121500331APending Publication Date: 2026-02-10HUAIBEI MINING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511452606.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-12
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing technologies lack stable and accurate methods to transmit environmental and distance information to train drivers, resulting in limited locomotive driving assistance and making it difficult to ensure efficient shunting operations and the safety of personnel.

Method used

A train obstacle detection method based on laser point cloud is adopted. By collecting point cloud datasets, training obstacle detection models, and detecting railway obstacles in real time on edge devices, the distance between the train car and the obstacle is calculated using Euclidean distance.

Benefits of technology

It enables real-time and accurate obstacle detection and distance calculation, improving detection efficiency and accuracy, and providing a faster and safer method for train shunting operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121500331A_ABST
    Figure CN121500331A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of railway obstacle detection, and discloses a laser-point-cloud-based train and railway obstacle detection and distance measurement method, which comprises laser-point-cloud-based train and railway obstacle detection and distance measurement and calculation between a railway wagon and an obstacle. The train and railway obstacle detection based on the laser point cloud comprises the steps of collecting a train and railway site point cloud data set, training a railway obstacle detection model, detecting railway obstacles in the train advancing direction, and warning a train cab in time. The step of measuring and calculating the distance between the wagon and the obstacle comprises the steps of determining the center of the target obstacle and measuring and calculating the distance between the wagon and the target obstacle, and reliable information is provided for accurate alarming of a cab and adjustment of the train traveling speed. The distance between the railway wagon and the target obstacle is measured and calculated, the railway obstacle detection efficiency is improved, the railway obstacle detection accuracy is improved, the real-time train railway obstacle distance measurement function is achieved, and a faster and safer method is provided for train shunting operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of railway obstacle detection technology, specifically a method for detecting and measuring railway obstacles based on laser point clouds. Background Technology

[0002] my country is a major coal producer and consumer, and possesses relatively abundant coal resources. For a considerable period in the future, coal will remain China's primary energy source. As for coal transportation, railway transportation holds a dominant position among various modes of transport due to its lower cost and higher efficiency. However, the crucial shunting operation in railway transportation is often carried out manually due to the complex terrain of railways in mining areas. The locomotive's operating environment is observed visually and reported to the locomotive driver via wireless communication. This method is not only inaccurate and lacks real-time performance, but also poses safety hazards such as personnel injury or death.

[0003] With the development of technologies such as artificial intelligence, the Internet of Things, and big data, the popularization of intelligent equipment, and the application of information management, some mining areas use camera image processing for environmental perception and target detection of railcars. Although this has improved the accuracy to some extent, it is not possible to obtain the distance information of target objects to moving railcars in real time, accurately and quickly, which is of great significance for driving assistance, by using cameras to acquire two-dimensional images. Furthermore, there is a lack of stable and accurate methods to transmit environmental and distance information to the driver, which greatly limits the assistance to locomotive driving. This not only makes it difficult to ensure the efficient operation of shunting operations, but also fails to guarantee the safety of the workers. Summary of the Invention

[0004] This invention provides a method for detecting and measuring railway obstacles based on laser point clouds, in order to solve the problem mentioned in the background art that existing equipment lacks a stable and accurate method to transmit environmental and distance information to the driver, thus providing very limited assistance to locomotive driving.

[0005] This invention provides a method for detecting and measuring railway obstacles based on laser point clouds. The method includes detecting railway obstacles based on laser point clouds and calculating the distance between the train car and the obstacle.

[0006] The train obstacle detection based on laser point cloud includes collecting point cloud datasets of the train and railway, training the railway obstacle detection model, and detecting railway obstacles in the direction of train travel. Its main function is to detect obstacles in the train and railway in real time and issue timely warnings to the train cab.

[0007] The distance measurement between the railcar and the obstacle includes determining the center of the target obstacle and measuring the distance between the railcar and the target obstacle. Its main function is to quickly measure the distance between the railcar and the obstacle.

[0008] Preferably, the steps for collecting point cloud datasets of railway tracks are as follows:

[0009] Step 1: Use LiDAR to scan the real-world train and railway scene. The scanned train and railway point cloud data should include point cloud data of the scene with obstacles, as well as point cloud data of the normal scene.

[0010] Step 2: Use a point cloud annotation tool to perform 3D bounding box annotation on the scanned scene point cloud dataset containing obstacles, and obtain the label file corresponding to the obstacle point cloud dataset, where each line in the label file represents an obstacle;

[0011] Step 3: The obstacle point cloud dataset and its label file are divided into an obstacle point cloud data training set, an obstacle point cloud data validation set, and an obstacle point cloud data test set in a ratio of 8:1:1.

[0012] Preferably, each obstacle should have eight columns of data, including obstacle category, center coordinates of the 3D bounding box, length, width and height of the 3D bounding box, and the angle between the colored face and axis of the 3D bounding box.

[0013] Preferably, the construction steps of the railway obstacle detection model are as follows:

[0014] S1. Select the appropriate model according to the requirements, such as the YOLO series, Faster R-CNN or Transformer-based models, and adjust the model structure to adapt to the specific task.

[0015] S2. Set the initial training parameters for the railway obstacle detection model, and input the obstacle point cloud data training set and the obstacle point cloud data validation set;

[0016] S3. Evaluate the trained model using the obstacle point cloud data test set. Input all point cloud data from the obstacle point cloud data test set into the trained model in sequence, record the label information after each frame of point cloud data detection, and compare it with the labeled obstacle point cloud data test set label file. Determine whether the accuracy of the trained model on the obstacle point cloud data test set meets the requirements based on whether there is a large deviation between the center coordinates of the model detection box and the 3D annotation box. If it meets the requirements, save the trained model. If it does not meet the requirements, jump to S2, modify the initial training parameters of the railway obstacle detection model, and retrain.

[0017] Preferably, the railway obstacle detection model includes a point cloud feature learning module, a voting module, a voting clustering module, and a proposal loss module, and its training process is as follows:

[0018] S1-1. Point cloud samples from the railway obstacle point cloud data training set and the railway obstacle point cloud data validation set are input into the point cloud feature learning module of the railway obstacle detection model. The point cloud feature learning module includes a sampling layer, a local feature extraction layer, and two feature propagation layers. Finally, it outputs M points as initial seed points, and each seed point outputs spatial coordinates. and features Format;

[0019] S1-2. Input the initial seed points into the voting module. Each initial seed point is passed through a multi-layer fully connected network to predict a three-dimensional offset. and offset in feature space The voting module implements voting from the seed point to the object center. Through voting, it learns to distinguish between background and target points, predicting different offsets to align the predicted offset of the target point towards the target center. To ensure the moved point is closer to the target center, a [further details are needed]. To monitor the distance between the moved point and the target center:

[0020]

[0021] in Represents seed point Whether it is located on the surface of an object, It is a count of the total number of seeds on the surface of the object. From seed position The actual offset to the center of the enclosure of the object to which it belongs;

[0022] S1-3. The voting results will be sent to the voting clustering module. For the seed point after displacement, K centers will be sampled from the votes by sampling the farthest point. Each center will gather the surrounding votes by radius, and points belonging to different parts of the same target will be grouped together to form a cluster.

[0023] S1-4. Each cluster is input into the proposal loss module, which evaluates and classifies the aggregated features using regression. Each voting cluster generates an object proposal through feature aggregation and multi-task loss optimization, which includes object degree, bounding box parameters, and semantic classification score. The feature regression evaluation includes voting offset regression loss, object degree classification loss, bounding box prediction loss, and semantic classification loss, and the trained model is saved.

[0024] Preferably, the steps for detecting railway obstacles in the direction of train travel are as follows:

[0025] First, the trained model is used to detect the railway in the direction of train travel in real time. The trained model is deployed to an edge device and installed at a suitable position on the rear of the train car. The lidar scans the railway to be detected in the direction of train travel in real time, and the continuous point cloud data of each frame scanned is used as the point cloud dataset to be detected.

[0026] Secondly, the point cloud dataset to be detected is input into the trained model in real time for each frame. The feature information of obstacles in the point cloud data is analyzed, the feature information is extracted and classified, and the detected obstacles are distinguished by detection boxes. Their types are marked as output detection results and saved. The output detection results include the visualization of the detected railway obstacle point cloud and detection box information.

[0027] Preferably, the center of the target obstacle is determined based on the detection box information in the output detection result, and the steps are as follows:

[0028] Extract the detection box information from the output detection results. This detection box information includes the detected obstacle category, the length, width, and height of the detection box, and the x, y, and z center coordinates of the detection box.

[0029] By comparing the x, y, z center coordinates of the detection box with the X, Y, Z coordinates of the vehicle body, the Euclidean distance in three-dimensional space is used to calculate the distance between the center coordinates of the target obstacle point cloud and the vehicle body coordinates. The calculation expression is:

[0030] .

[0031] Preferably, the distance between the wagon and the target obstacle is calculated based on the wagon's coordinates, and the steps are as follows:

[0032] Using the X, Y, and Z coordinates of the vehicle body as the center of a sphere, calculate the Euclidean distance between the center coordinates of the target obstacle point cloud and the vehicle body coordinates. Draw a sphere with a radius, and combine it with the output detection box to filter out the point cloud set that exists inside the sphere and the detection box, so as to narrow down the range of finding the nearest point cloud between the car body and the target obstacle and reduce the amount of computation.

[0033] The coordinate information of the point cloud set selected within the detection box by the LiDAR is extracted to find the point cloud closest to the vehicle car among the target obstacles. A vector is formed by taking a point cloud from the point cloud set and the point cloud of the vehicle car. And randomly select two point clouds near a certain point cloud in the point cloud set to form two vectors with the point cloud of the wagon respectively. and The comparison is performed; if the ratio of the Euclidean distances of the two vectors is less than a set threshold... The expression is:

[0034]

[0035] Accept the inner vector of the point cloud The corresponding point cloud is the point cloud that is closest to the target obstacle. By iteratively searching for the point cloud closest to the target obstacle, the entire point cloud set that exists within the sphere and the detection box is traversed and filtered out. The coordinates of the point cloud closest to the target obstacle are determined, and the Euclidean distance between the coordinates of the closest point cloud and the coordinates of the vehicle is retained, thus obtaining the calculated distance between the vehicle and the target obstacle.

[0036] Compared with existing technologies, the beneficial effects of this invention are: This invention improves the speed and accuracy of detecting railway obstacles, achieving real-time detection of railway obstacles while simultaneously testing the distance between the train car and the obstacle. During the railway obstacle detection and distance measurement process, a point cloud dataset is created from the collected railway point cloud data. The railway obstacle detection model is trained and evaluated using the partitioned obstacle point cloud data training set, validation set, and test set. The trained model that meets the requirements is saved, and the trained model is deployed on an edge device in the railway field to detect obstacles along the train's direction of travel. Obstacles are detected in real time, and the detection results are obtained. Based on the detection box information in the detection results, the distance between the center coordinates of the target obstacle point cloud and the coordinates of the wagon is calculated to narrow down the range of the nearest point cloud between the wagon and the target obstacle. By continuously iterating and comparing the entire set of point clouds existing within the sphere and the detection box, the nearest point cloud between the target obstacle and the wagon is determined, realizing the distance measurement between the wagon and the target obstacle. This greatly speeds up the efficiency of railway obstacle detection, improves the accuracy of railway obstacle detection, realizes the real-time train railway obstacle distance measurement function, and provides a faster and safer method for train shunting operations. Attached Figure Description

[0037] Figure 1 This is an overall block diagram of the method of the present invention;

[0038] Figure 2 This is a flowchart illustrating the method for collecting point cloud datasets from railway tracks in this invention.

[0039] Figure 3 This is a flowchart of the method for training a railway obstacle detection model according to the present invention;

[0040] Figure 4 This is a block diagram of the railway obstacle detection model of the method of the present invention;

[0041] Figure 5 This is a flowchart illustrating the method for detecting railway obstacles in the direction of train travel according to the present invention.

[0042] Figure 6 This is a flowchart illustrating the method for determining the center of a target obstacle in this invention.

[0043] Figure 7 This is a flowchart illustrating the method of the present invention for calculating the distance between a vehicle and a target obstacle. Detailed Implementation

[0044] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0045] This invention discloses a method for detecting and ranging train and railway obstacles based on laser point clouds, such as... Figure 1 As shown, the overall process of the train obstacle detection and ranging method based on laser point clouds is as follows:

[0046] I. The method of the present invention includes train and railway obstacle detection based on laser point clouds and distance calculation between the train car and the obstacle;

[0047] II. Train and railway obstacle detection based on laser point cloud: This mainly realizes the real-time detection of obstacles existing in the train and railway. First, the point cloud dataset of the train and railway is collected by laser radar. Then, the divided dataset is input into the railway obstacle detection model for training. Finally, the detection of continuous frame point cloud data of railway obstacles in the direction of train travel scanned by laser radar is completed.

[0048] 3. Distance Calculation Between Car Wagon and Obstacle: Its main function is to quickly measure the distance between the car wagon and the obstacle. By determining the center of the target obstacle, it narrows down the range of finding the nearest point cloud within the car wagon and the target obstacle. Then, through continuous iterative comparison, it determines the final coordinates of the nearest point cloud, thereby calculating the distance between the car wagon and the target obstacle.

[0049] like Figure 2 As shown in a specific embodiment, the process of collecting the train railway point cloud dataset using the method of the present invention is as follows:

[0050] The LiDAR scanner is used to scan the real-world train track scene. The scanned train track point cloud data includes point cloud data of the scene with obstacles and point cloud data of the normal scene.

[0051] A 3D bounding box point cloud annotation tool is used to annotate the scanned scene point cloud dataset containing obstacles, and the corresponding label file is obtained. The label file contains the obstacle category, the center coordinates of the 3D bounding box, the length, width and height of the 3D bounding box, and the angle between the colored face and axis of the 3D bounding box.

[0052] The obstacle point cloud dataset and its label file are divided into an obstacle point cloud data training set, an obstacle point cloud data validation set, and an obstacle point cloud data test set in a ratio of 8:1:1.

[0053] like Figure 3 As shown, in a specific embodiment, the steps for constructing the railway obstacle detection model of the present invention are as follows:

[0054] Choose the appropriate model based on your needs, such as the YOLO series, Faster R-CNN, or Transformer-based models, and adjust the model structure to suit the specific task.

[0055] Set the initial training parameters for the railway obstacle detection model;

[0056] Train the railway obstacle detection model by inputting the obstacle point cloud data training set and the obstacle point cloud data validation set;

[0057] Generate object protocols and feature regression evaluations, and save the trained model;

[0058] The trained model is evaluated using an obstacle point cloud data test set. All point cloud data from the obstacle point cloud data test set are sequentially input into the trained model. The label information of each frame of point cloud data after detection is recorded and compared with the labeled obstacle point cloud data test set label file. The accuracy of the trained model on the obstacle point cloud data test set is determined based on whether there is a large deviation between the center coordinates of the model detection box and the 3D annotation box. If it meets the requirements, the trained model is saved. If it does not meet the requirements, the process jumps to the above steps, modifies the initial training parameters of the railway obstacle detection model, and retrains it.

[0059] like Figure 4 As shown, in a specific embodiment: the railway obstacle detection model of the present invention includes a point cloud feature learning module, a voting module, a voting clustering module, and a proposal loss module, and its training process is as follows:

[0060] The obstacle point cloud data training set and the obstacle point cloud data validation set are input into the point cloud feature learning module to extract and learn the features of the point cloud samples. Initial seed points are generated through the sampling layer, the local feature extraction layer and the feature propagation layer.

[0061] The initial seed point is input into the voting module, and the background point and target point are distinguished through voting. The offset in different three-dimensional space and feature space is predicted so that the offset predicted by the target point points to the target center.

[0062] The voting results are sent to the voting clustering module. For the seed point after displacement, multiple centers are sampled from the votes by sampling the farthest point. Each center gathers the surrounding votes by radius, and points belonging to different parts of the same target are grouped together to form a cluster.

[0063] Each cluster is input into the proposal loss module, which evaluates and classifies it using the aggregated features;

[0064] Each voting cluster generates an object proposal through feature aggregation and multi-task loss optimization, which includes object degree, bounding box parameters, and semantic classification score. Feature regression evaluation includes voting offset regression loss, object degree classification loss, bounding box prediction loss, and semantic classification loss, thereby realizing obstacle detection and saving the trained model.

[0065] like Figure 5 As shown, in a specific embodiment, the process of detecting railway obstacles in the direction of train travel using the method of the present invention is as follows:

[0066] The trained model is used to detect the railway in the direction of train travel in real time. The trained model is deployed to an edge device. The LiDAR scans the railway to be detected in the direction of train travel in real time. Each consecutive frame of point cloud data scanned is used as the point cloud dataset to be detected.

[0067] The point cloud dataset to be detected is input into the trained model in real time for each frame. The feature information of obstacles in the point cloud data is analyzed, the features are extracted and classified, and the detected obstacles are distinguished by detection boxes. The type is marked as the output detection result and saved. The output detection result includes the visualization of the detected railway obstacle point cloud and the detection box information, and the detection result is saved.

[0068] like Figure 6 As shown, in a specific embodiment, the process of determining the center of the target obstacle using the method of the present invention is as follows:

[0069] Extract the detection box information from the output detection results. The detection box information includes the detected obstacle category, the length, width, and height of the detection box, and the x, y, and z center coordinates of the detection box.

[0070] By using the x, y, z center coordinates of the detection box and the X, Y, Z coordinates of the vehicle body, the distance between the center coordinates of the target obstacle point cloud and the vehicle body coordinates is calculated and saved using the Euclidean distance calculation method in three-dimensional space.

[0071] like Figure 7 As shown, in a specific embodiment, the process of calculating the distance between the vehicle and the target obstacle using the method of the present invention is as follows:

[0072] Using the X, Y, and Z coordinates of the vehicle body as the center, and the Euclidean distance between the center coordinates of the target obstacle point cloud and the vehicle body coordinates as the radius, draw a sphere. Combine this with the position of the detection box to filter out the point cloud sets that exist inside the sphere and the detection box.

[0073] A vector is formed by taking a point cloud from a point cloud set and the point cloud of the train car. Two point clouds near the selected point cloud in the point cloud set are randomly selected and compared with the two vectors formed by the point cloud of the train car. If the ratio of the Euclidean distance between these two vectors is less than a set threshold, the point cloud corresponding to the smaller vector in the point cloud set is accepted. By iteratively comparing the two vectors, the entire point cloud set that exists within the sphere and the detection box is traversed. The coordinates of the point cloud closest to the train car in the final target obstacle are determined. The Euclidean distance between the coordinates of the closest point cloud and the coordinates of the train car is retained, thus obtaining the calculated distance between the train car and the target obstacle.

[0074] The contents not described in detail in this description are existing technologies known to those skilled in the art. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for detecting and ranging railway obstacles based on laser point clouds, characterized in that, The methods for detecting and measuring railway obstacles include railway obstacle detection based on laser point clouds and distance calculation between train cars and obstacles; The laser point cloud-based train obstacle detection includes collecting a point cloud dataset of the train railway, training a railway obstacle detection model, and detecting railway obstacles in the direction of train travel. Its main function is to detect obstacles in the train railway in real time and issue timely warnings to the train cab. The distance measurement between the railcar and the obstacle includes determining the center of the target obstacle and measuring the distance between the railcar and the target obstacle. Its main function is to quickly measure the distance between the railcar and the obstacle.

2. The method for detecting and ranging train and railway obstacles based on laser point clouds according to claim 1, characterized in that: The steps for collecting the point cloud dataset of the train railway site are as follows: Step 1: Use LiDAR to scan the real-world train and railway scene. The scanned train and railway point cloud data should include point cloud data of the scene with obstacles, as well as point cloud data of the normal scene. Step 2: Using a point cloud annotation tool, perform 3D bounding box annotation on the scanned scene point cloud dataset containing obstacles to obtain the label file corresponding to the obstacle point cloud dataset, where each line in the label file represents an obstacle; Step 3: The obstacle point cloud dataset and its label file are divided into an obstacle point cloud data training set, an obstacle point cloud data validation set, and an obstacle point cloud data test set in a ratio of 8:1:

1.

3. The method for detecting and ranging train and railway obstacles based on laser point clouds according to claim 2, characterized in that: Each obstacle should have eight columns of data, including obstacle category, center coordinates of the 3D bounding box, length, width and height of the 3D bounding box, and the angle between the colored face and axis of the 3D bounding box.

4. The method for detecting and ranging train and railway obstacles based on laser point clouds according to claim 1, characterized in that: The steps for constructing the railway obstacle detection model are as follows: S1. Select the appropriate model according to the requirements, such as the YOLO series, Faster R-CNN or Transformer-based models, and adjust the model structure to adapt to the specific task. S2. Set the initial training parameters for the railway obstacle detection model, and input the obstacle point cloud data training set and the obstacle point cloud data validation set; S3. Evaluate the trained model using the obstacle point cloud data test set. Input all point cloud data from the obstacle point cloud data test set into the trained model in sequence, record the label information after detection of each frame of point cloud data, and compare it with the labeled obstacle point cloud data test set label file. Determine whether the accuracy of the trained model on the obstacle point cloud data test set meets the requirements based on whether there is a large deviation between the center coordinates of the model detection box and the 3D annotation box. If it meets the requirements, save the trained model. If it does not meet the requirements, jump to S2, modify the initial training parameters of the railway obstacle detection model, and retrain.

5. The method for detecting and ranging train and railway obstacles based on laser point clouds according to claim 4, characterized in that: The railway obstacle detection model includes a point cloud feature learning module, a voting module, a voting clustering module, and a proposal loss module. Its training process is as follows: S1-1. Point cloud samples from the railway obstacle point cloud data training set and the railway obstacle point cloud data validation set are input into the point cloud feature learning module of the railway obstacle detection model. The point cloud feature learning module includes a sampling layer, a local feature extraction layer, and two feature propagation layers. Finally, it outputs M points as initial seed points, and each seed point outputs spatial coordinates. and features Format; S1-2. The initial seed points are input into the voting module. Each initial seed point is passed through a multi-layer fully connected network to predict a three-dimensional spatial offset. and offset in feature space The voting module implements voting from the seed point to the object center. Through voting, it learns to distinguish between background and target points, predicting different offsets to align the predicted offset of the target point towards the target center. To ensure the moved point is closer to the target center, a [further details are needed]. To monitor the distance between the moved point and the target center: in Represents seed point Whether it is located on the surface of an object, It is a count of the total number of seeds on the surface of the object. From seed position The actual offset to the center of the enclosure of the object to which it belongs; S1-3. The voting results will be sent to the voting clustering module. For the seed point after displacement, K centers will be sampled from the votes by sampling the farthest point. Each center will gather the surrounding votes by radius, and points belonging to different parts of the same target will be grouped together to form a cluster. S1-4. Each cluster is input into the proposal loss module, which evaluates and classifies the aggregated features using regression. Each voting cluster generates an object proposal through feature aggregation and multi-task loss optimization, which includes object degree, bounding box parameters, and semantic classification score. The feature regression evaluation includes voting offset regression loss, object degree classification loss, bounding box prediction loss, and semantic classification loss, and the trained model is saved.

6. The method for detecting and ranging train and railway obstacles based on laser point clouds according to claim 1, characterized in that: The steps for detecting railway obstacles in the direction of train travel are as follows: First, the trained model is used to detect the railway in the direction of train travel in real time. The trained model is deployed to an edge device and installed at a suitable position on the rear of the train car. The lidar scans the railway to be detected in the direction of train travel in real time, and the continuous point cloud data of each frame scanned is used as the point cloud dataset to be detected. Secondly, the point cloud dataset to be detected is input into the trained model in real time for each frame. The feature information of obstacles in the point cloud data is analyzed, the feature information is extracted and classified, and the detected obstacles are distinguished by detection boxes. The type is marked as the output detection result and saved. The output detection result includes the visualization of the detected railway obstacle point cloud and the detection box information.

7. The method for detecting and ranging railway obstacles based on laser point clouds according to claim 6, characterized in that: The center of the target obstacle is determined based on the detection box information in the output detection results. The steps are as follows: Extract the detection box information from the output detection results. This detection box information includes the detected obstacle category, the length, width, and height of the detection box, and the x, y, and z center coordinates of the detection box. By comparing the x, y, z center coordinates of the detection box with the X, Y, Z coordinates of the vehicle body, the Euclidean distance in three-dimensional space is used to calculate the distance between the center coordinates of the target obstacle point cloud and the vehicle body coordinates. The calculation expression is: 。 8. The method for detecting and ranging train and railway obstacles based on laser point clouds according to claim 7, characterized in that: The steps for calculating the distance between the wagon and the target obstacle based on the wagon's coordinates are as follows: Using the X, Y, and Z coordinates of the vehicle body as the center of a sphere, calculate the Euclidean distance between the center coordinates of the target obstacle point cloud and the vehicle body coordinates. Draw a sphere with a radius, and combine it with the output detection box to filter out the point cloud set that exists inside the sphere and the detection box, so as to narrow down the range of finding the nearest point cloud between the car body and the target obstacle and reduce the amount of computation. The coordinate information of the point cloud set selected within the detection box by the LiDAR is extracted to find the point cloud closest to the vehicle car among the target obstacles. A vector is formed by taking a point cloud from the point cloud set and the point cloud of the vehicle car. And randomly select two point clouds near a certain point cloud in the point cloud set, and form two vectors with the point cloud of the wagon respectively. and The comparison is performed; if the ratio of the Euclidean distances of the two vectors is less than a set threshold... The expression is: Accept the inner vector of the point cloud The corresponding point cloud is the point cloud that is closest to the target obstacle. By iteratively finding the point cloud closest to the target obstacle, the entire set of point clouds that exist in the sphere and the detection box is traversed and filtered out. The coordinates of the point cloud closest to the target obstacle are determined. The Euclidean distance between the coordinates of the closest point cloud and the coordinates of the vehicle is retained, thereby obtaining the measured distance between the vehicle and the target obstacle.