Train auxiliary driving-oriented derailment detection and dynamic ranging and speed measurement method

By improving the preprocessing and attention mechanisms of lightweight networks and combining them with a binocular stereo matching algorithm, the accuracy and real-time performance issues of long-distance detection of train stoppers were resolved, achieving high-precision, low-latency stopper detection and ranging, thus ensuring the safe operation of trains.

CN120411924BActive Publication Date: 2026-07-03NANJING RICHISLAND INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANJING RICHISLAND INFORMATION TECH CO LTD
Filing Date
2025-03-28
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing AI detection models have low accuracy in detecting train stops at a distance of 90 meters, and real-time performance and accuracy are difficult to reconcile. Lightweight models have low recall rates for detecting small targets, leading to potential safety hazards in train operations.

Method used

By cropping images in the preprocessing stage, improving the lightweight network with Gaussian attention and cross-scale attention modules, generating a Gaussian weight map and fixing the preselected box, and combining the binocular stereo matching algorithm to calculate the distance to the vehicle stop, high-precision and low-latency detection is achieved.

Benefits of technology

It achieves high-precision, low-error, and low-latency detection of the vehicle stop device from 90 meters away, ensuring the safe operation of the train and providing millisecond-level early warning within a dynamic range of 90 meters to 5 meters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120411924B_ABST
    Figure CN120411924B_ABST
Patent Text Reader

Abstract

This invention discloses a method for detecting vehicle stops and performing dynamic ranging and speed measurement for train assisted driving. In the preprocessing stage, images are cropped, and the central portion is selected. A lightweight network is improved by combining Gaussian attention enhancement, a cross-scale attention module, and a pre-selection box generation technique with fixed center and shape constraints. This achieves high-precision, low-error, and low-latency detection of small targets such as vehicle stops at a distance of 90 meters. By fusing binocular imaging and target detection, this method achieves millisecond-level early warning within a dynamic range of 90 meters to 5 meters, ensuring the safe operation of trains.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of train operation safety monitoring, specifically a method for quickly and accurately identifying train stop devices and then measuring distance and speed. Background Technology

[0002] Train stop devices are a physical barrier for rail transit safety, and their accurate monitoring directly affects operational safety. Taking the subway as an example, when the train is running, the driver needs to identify the stop devices from at least 90 meters away, calculate the train's real-time speed, and brake accurately to avoid accidents caused by improper braking.

[0003] Traditional methods relying on manual visual inspection pose safety risks, as accidental collisions with brake barriers due to driver negligence are difficult to avoid, and speed estimation depends on experience. In recent years, the use of artificial intelligence and image recognition technologies such as binocular imaging has become an important means of improving train operation safety, assisting drivers in precise braking and ensuring safety. However, existing AI detection models have low accuracy in detecting small objects at a distance of 90 meters. This is because as the detection network deepens and the receptive field expands, the features of small objects like brake barriers are diluted in the deeper network. Furthermore, the real-time performance and accuracy of detection models are difficult to reconcile; while the lightweight model MobileNetV2 can achieve inference speeds of 200ms, its recall rate for detecting small objects is very low.

[0004] In summary, improving existing artificial intelligence detection technology based on binocular vision to assist drivers in quickly and accurately identifying safety devices such as train stoppers has significant application value for ensuring the safe operation of trains. Summary of the Invention

[0005] This invention addresses the problems existing in the background technology by proposing a method for detecting wheel stops and dynamically measuring distance and speed for train assisted driving. In the preprocessing stage, the image is cropped, the central portion is selected, and an attention mechanism is combined with a pre-selection box generation technique with fixed center and shape constraints to improve the lightweight network, thereby enhancing detection accuracy and real-time performance. Specifically, the method includes the following steps:

[0006] Step 1: After inputting the binocular images, crop the center area of ​​the left and right views respectively, retaining 50% to 75% of the center area of ​​the image.

[0007] Step 2: Based on prior attention, improve the lightweight network MobileNetV2 to generate a Gaussian weight map of the same size as the input feature map. The weights in the central region are 1, and the weights decay to 0 with a Gaussian distribution towards the edges. The generated Gaussian weight map W(x,y) is:

[0008]

[0009] Where (x, y) are the coordinates of any point in the image, (x, y) c ,y c ) represents the coordinates of the image center point, σ is the standard deviation of the Gaussian distribution, which controls the decay rate of the weights from the center to the edge, and the weight map is multiplied with the feature map channel by channel.

[0010] Step 3: Extract multi-scale feature maps from the output layer of MobileNetV2, and extract features of small objects through a cross-scale attention module. The cross-scale attention module adopts a two-branch structure: one branch adjusts the size and channel dimension of different feature maps through upsampling and 1×1 convolution; the other branch obtains the attention weights of feature maps at different scales through 1×1 convolution, global pooling, and softmax function, multiplies the processed feature maps with their respective weights, and then concatenates the channels.

[0011] Step 4: The center point of the preselection box is set only in the center area of ​​the cropped image. The aspect ratio is fixed at 2:1 according to the typical ratio of the barrier. The size is preset to 12×6, 24×12, 36×18, and 48×24 according to the distance prior.

[0012] Step 5: Combine the stereo matching algorithm with the multi-scale feature map from Step 3 to generate a stereo depth map, where the depth value of each pixel represents the three-dimensional distance from the corresponding point to the camera.

[0013] Step 6: For the detected barrier target, extract the x-coordinate of the center of the matching box in the left view. l And the x-coordinate of the center of the right view matching box r And by combining the depth values ​​of the corresponding areas in the depth map from step 5, the distance Z between the train and the stop can be calculated:

[0014] Z = α·Z1 + (1-α)·Z2

[0015]

[0016] Where Z1 is the disparity distance, B is the binocular distance, and f is the camera pixel count. Z2 is the depth map distance, which is the average depth of all pixels in the detection box region in the left view. α is a weighting coefficient, α∈(0,1), adjusted according to the confidence level. Continuous distance values ​​Z are obtained within the time window [t,t+Δt]. t Z t+Δt Calculate the average velocity v:

[0017]

[0018] Among them, Z t Let Z be the distance between the train and the stop at time t. t+Δt Let t be the distance between the train and the stop at time t+Δt, where Δt is the time interval between the images.

[0019] Beneficial effects:

[0020] This invention discloses a method for detecting vehicle stops and performing dynamic ranging and speed measurement for train assisted driving. In the preprocessing stage, images are cropped, and the central portion is selected. Combined with Gaussian attention enhancement, a cross-scale attention module, and a pre-selection box generation technique with fixed center and shape constraints, the lightweight network is improved to achieve high-precision, low-error, and low-latency detection of vehicle stops at a distance of 90 meters. This method achieves millisecond-level early warning within a dynamic range of 90 meters to 5 meters through the fusion of binocular imaging and target detection, ensuring the safe operation of trains. Attached Figure Description

[0021] Figure 1 This is a flowchart of a method for detecting and dynamically measuring distance and speed of a vehicle stop for assisted train driving, based on the present invention.

[0022] Figure 2 This is the Gaussian attention weight distribution diagram of the present invention.

[0023] Figure 3 This is a schematic diagram of the cross-scale attention module structure of the present invention.

[0024] Figure 4 The recognition effect diagram for the implementation case. Detailed Implementation

[0025] The embodiments of the present invention are described in detail below. These embodiments are implemented based on the technical solution of the present invention, and provide detailed implementation methods and specific operation processes. However, the scope of protection of the present invention is not limited to the following embodiments.

[0026] The implementation process of this method is as follows: Figure 1 As shown, taking a city train as an example, previously only manual visual inspection was used, which posed a safety hazard. Now, by adopting the method of this invention, the inspection accuracy and real-time performance are improved, thereby increasing the emergency braking response time and ensuring the safe operation of the train.

[0027] The specific steps are as follows:

[0028] 1) After inputting the binocular image, crop the center area of ​​the left and right views respectively, retaining 50% of the center area of ​​the image.

[0029] 2) Based on prior attention, the lightweight network MobileNetV2 is improved to generate a Gaussian weight map of the same size as the input feature map. The weights in the central region are 1, and the weights decay to 0 towards the edges according to a Gaussian distribution. The standard deviation of the σGaussian distribution is set to 150. The generated Gaussian weight map is shown below. Figure 2 As shown.

[0030] 3) Extract multi-scale feature maps from multiple output layers of MobileNetV2, and extract features of small objects through a cross-scale attention module. The cross-scale attention module adopts a dual-branch structure, such as... Figure 3 As shown, one approach adjusts the size and channel dimension of different feature maps through upsampling and 1×1 convolution; the other approach obtains the attention weights of feature maps at different scales through 1×1 convolution, global pooling, and the softmax function, multiplies the processed feature maps with their respective weights, and then concatenates the channels.

[0031] 4) The center point of the preselection box is set only in the center area of ​​the cropped image. The aspect ratio is fixed at 2:1 according to the typical ratio of the barrier. The size is preset to 12×6, 24×12, 36×18, and 48×24 according to the prior distance.

[0032] 5) Combine the stereo matching algorithm with the multi-scale feature map in 3) to generate a stereo depth map, where the depth value of each pixel represents the three-dimensional distance from the corresponding point to the camera.

[0033] 6) For the detected barrier target, extract the x-coordinate of the center of the matching box in the left view. l And the x-coordinate of the center of the right view matching box r And by combining the depth values ​​of the corresponding region in the depth map in 5), the distance Z between the train and the stop can be calculated:

[0034] Z = α·Z1 + (1-α)·Z2

[0035]

[0036] Where Z1 is the disparity distance, B is the binocular distance, and f is the number of camera pixels. Z2 is the depth map distance, which is the average depth of all pixels in the detection box region in the left view. α is a weighting coefficient, α∈(0,1), adjusted according to the confidence level.

[0037] Obtain continuous distance values ​​Z within the time window [t, t+Δt]. t Z t+Δt Calculate the average velocity v:

[0038]

[0039] Among them, Z t Let Z be the distance between the train and the stop at time t. t+Δt Let t be the distance between the train and the stop at time t+Δt, where Δt is the time interval between the images.

[0040] The above method was used to test the effectiveness of a train barrier in a subway buffer station. Figure 4The image shows the recognition effect. In multiple tests of this embodiment, the barrier can be quickly identified within 20 milliseconds, with a recall rate of 98.5%, meeting the target requirements for practical applications.

Claims

1. A method for detecting wheel stops and dynamically measuring distance and speed for train assisted driving, characterized in that... In the preprocessing stage, images are cropped, and the central portion is selected. Gaussian attention enhancement, a cross-scale attention module, and a pre-selection box generation technique with fixed center and shape constraints are used to improve the lightweight network, thereby enhancing detection accuracy and real-time performance. Specifically, the steps include: 1) After inputting the stereo images, crop the left and right views respectively to retain the central region of the image. The central region of the image occupies a proportion of T% of the original stereo image. 2) Based on prior attention, the lightweight network MobileNetV2 is improved to generate a Gaussian weight map of the same size as the input feature map. The weights in the central region are 1, and the weights decay to 0 with a Gaussian distribution towards the edges. The weight map is then multiplied with the feature map channel by channel. The improvement method of the lightweight network MobileNetV2 is to cascade a Gaussian weight generation submodule after the inverse residual module of the network. The generated Gaussian weight map... for: in, Let be the coordinates of any point in the image. The coordinates of the image center point, The standard deviation of the Gaussian distribution; 3) Extract multi-scale feature maps from the output layer of MobileNetV2, and extract the features of the barrier through a cross-scale attention module; 4) The center point of the preselection box is set only in the central area of ​​the cropped image, the aspect ratio is fixed to the typical proportion of the barrier, and the size is preset based on the distance. 5) Combine the stereo matching algorithm with the multi-scale feature map in 3) to generate a stereo depth map, where the depth value of each pixel represents the three-dimensional distance from the corresponding point to the camera; 6) For the detected barrier target, extract the x-coordinate of the center of the matching box in the left view. And the horizontal coordinate of the center of the right view matching box. By combining the depth values ​​of the corresponding areas in the depth map of 5), the distance between the train and the barrier can be calculated. and in the time window Get continuous distance values , Calculate the average speed , This refers to the time interval between shots.

2. The method for detecting and dynamically measuring distance and speed of a vehicle stop for train assisted driving according to claim 1, characterized in that... The cross-scale attention module employs a two-branch structure: one branch connects to the upsampling and... Convolution adjusts the size and channel dimension of different feature maps; a single pass through Convolution, global pooling, and softmax functions are used to obtain attention weights for feature maps at different scales. The processed feature maps are then multiplied by their respective weights, and finally, channels are concatenated.

3. The method for detecting and dynamically measuring distance and speed of a vehicle stop for train assisted driving according to claim 1, characterized in that... The aspect ratio of the preselection box is The dimensions are set to , , , .

4. The method for detecting and dynamically measuring distance and speed of a vehicle stop for train assisted driving according to claim 1, characterized in that... Distance between train and stop The calculation is as follows: These are weighting coefficients. Adjust according to confidence level; Indicates parallax distance. This indicates the distance in the depth map.

5. The method for detecting and dynamically measuring distance and speed of a vehicle stop for train assisted driving according to claim 4, characterized in that... Parallax distance The calculation is as follows: in, The distance between the two eyes. For camera pixels, The horizontal coordinate of the center of the matching box in the left view. The x-coordinate of the center of the matching box in the right view.

6. The method for detecting and dynamically measuring distance and speed of a vehicle stop for train assisted driving according to claim 4, characterized in that... Depth map distance This represents the average depth of all pixels in the detection box region in the left view.

7. The method for detecting and dynamically measuring distance and speed of a vehicle stop for train assisted driving according to claim 1, characterized in that... average speed The calculation is as follows: in, for The distance between the train and the stop device at any given time. for The distance between the train and the stop device at any given time. This refers to the time interval between shots.

8. The method for detecting and dynamically measuring distance and speed of a vehicle stop for train assisted driving according to claim 1, characterized in that... Retention ratio .

Citation Information

Patent Citations

  • Intelligent machine vision detection method and system based on image processing and storage medium

    CN119205719A

  • Wheel stopper fixing mechanism and wheel stopper

    JP3239148U