Train vehicle and running status detection method and device

Through video image processing and deep learning technology, the coordinate system of the train vehicle is established and the motion state of the train vehicle is detected, which solves the inaccuracy and stability problems of vehicle motion state detection in the existing technology and realizes high-precision vehicle position and motion information acquisition.

CN114332728BActive Publication Date: 2025-09-23JIANGSU JITRI INTELLIGENT OPTOELECTRONIC SYST RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111676768.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2025-09-23
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

Existing technologies make it difficult to accurately and stably obtain the vehicle's motion status during train vehicle detection, especially under low speed and bad weather conditions. The speed measurement accuracy is not high and the vehicle position cannot be detected.

Method used

Using video image processing technology, the video image of the train vehicle is acquired through a camera, a coordinate system is established, and a straight line fitting is performed in combination with position markers. The vehicle target frame is detected using a deep learning detection network, and the vehicle's motion state is calculated.

Benefits of technology

It enables accurate and stable acquisition of vehicle position, movement direction, speed and other information during train vehicle inspection, improves detection accuracy and stability, reduces hardware costs and simplifies installation and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114332728B_ABST
    Figure CN114332728B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for detecting a train vehicle and its running status, which can achieve accurate and stable vehicle motion status while detecting the train vehicle; a method for detecting a train vehicle and its running status comprises: acquiring a video image of a train vehicle passing through a track; detecting the track in the video image to establish a coordinate system for the motion of the train vehicle; performing the train vehicle detection on the video image to obtain the coordinate position of the train vehicle in the established coordinate system; and obtaining the motion status of the train vehicle based on the coordinate position of the train vehicle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of rail transit safety detection and monitoring equipment, and in particular relates to a method and device for detecting a train vehicle and its running status. Background Art

[0002] In the field of dynamic safety detection of rail transit, it is necessary to detect vehicles and their motion status. Currently, the most commonly used train vehicle detection methods are to use magnets to detect wheels to determine whether there is an oncoming vehicle; and calculate the vehicle speed based on the distance between two or more magnets and the time difference between the wheels detected between the magnets. However, this type of detection method has the following disadvantages: when passive magnets are used to detect wheels, that is, when the vehicle speed is low, especially when the locomotive enters the maintenance workshop, the vehicle speed is usually low, sometimes below 5km / h, which will cause the output signal to be unstable and the detection result to be unreliable; while active magnets are used to detect wheels, the vehicle speed is usually low, sometimes below 5km / h, which will cause the output signal to be unstable and the detection result to be unreliable. Steel is more susceptible to electromagnetic interference. When electric locomotives, EMUs and other trains pass by, the detection signal will become unstable. At the same time, this type of speed measurement method, which uses a fixed distance between magnetic steels divided by the time difference of the detection signal, calculates the average speed of the vehicle. However, when the vehicle changes speed, especially at low speeds, such as stopping and starting, the measured speed error will be relatively large. Then, if it is impossible to obtain the motion status information of the entire vehicle, when the vehicle stops and moves back and forth, such as when reversing, the detected magnetic steel signal may not be able to calculate the effective vehicle speed.

[0003] Another common method for measuring vehicle speed is using radar. This method generally measures vehicle speed more accurately, but is easily affected by weather conditions. In severe weather conditions such as rain, snow, and lightning, the speed measurement accuracy will decrease. At the same time, this method can only obtain vehicle speeds and cannot detect the location of each vehicle, making it inconvenient to perform relevant processing by vehicle, such as: cropping images by vehicle.

[0004] Therefore, under existing technical conditions, it is difficult to obtain accurate and stable vehicle motion status (running direction and speed, etc.) while detecting train vehicles. Summary of the Invention

[0005] In response to the above problems, the present invention provides a method and device for detecting a train vehicle and its running status, which can obtain an accurate and stable vehicle motion status while detecting the train vehicle.

[0006] The technical solution is as follows: a train vehicle and running status detection method, characterized by comprising:

[0007] Acquire video images of train vehicles passing through the track;

[0008] detecting the track in the video image to establish a coordinate system for the movement of the train vehicle;

[0009] Performing the train vehicle detection on the video image to obtain the coordinate position of the train vehicle in the established coordinate system;

[0010] The motion state of the train vehicle is obtained according to the coordinate position of the train vehicle.

[0011] Furthermore, a camera is mounted above the track via a bracket, and the camera collects video at a fixed frequency, and the video image acquired by the camera simultaneously includes the track, one side of the train vehicle when passing through, and the top of the train vehicle;

[0012] Furthermore, in the established coordinate system for the movement of the train vehicle, the track direction is used as the coordinate axis; a plurality of position markers are set on one side of the track, and a straight line fitting is performed on the position markers, and the coordinate axis scale in the coordinate system is obtained through the fitted straight line;

[0013] Furthermore, the position marker is in a straight line shape, and there are at least two position markers;

[0014] Furthermore, obtaining the coordinate position of the train vehicle in the established coordinate system comprises the following steps:

[0015] S1. Perform train vehicle detection on the video image to obtain a target frame for each section of the train vehicle; the target frame is formed by nesting two rectangular frames, the two rectangular frames share a nesting point, one rectangular frame includes the entire train vehicle range of the current train vehicle, and the other rectangular frame only includes the side range of the current train vehicle in the video image;

[0016] S2. For each target frame, select the lower right corner vertex of the rectangular frame that only contains the side of the current train vehicle, and determine whether there are fitted straight lines before and after the lower right corner vertex along the track direction. If so, interpolate the position of the lower right corner vertex between the two fitted straight lines before and after it to obtain the position of the lower right corner vertex on the track, i.e., the coordinate value of the current train vehicle in the coordinate system;

[0017] S3, repeating steps S1 and S2 for each frame of the video to obtain the position of each target frame at different times, and then obtaining the running direction, speed, and acceleration of the train vehicle according to the coordinate value of the train vehicle target frame at each time;

[0018] Furthermore, in step S1, train vehicle detection is implemented using a deep learning detection network based on anchor boxes, specifically including the following steps:

[0019] S1.1. Set the target frame in the video image to be defined as: {(x, y, (w b , h b ), (w s , h s )}, where x, y, w b , h b , w s , h s They are the position parameters describing the target frame, that is, (x, y) is the coordinate value of the common nesting point of the two rectangular frames, w b , h b are the width and height of the large box in the two rectangular boxes, w s , h s The width and height of the small box in the two rectangular boxes respectively;

[0020] S1.2. Let the ground truth box (gt box) be defined as Among them, (g x , g y ) is the nested point coordinate shared by the two boxes in the real box, They are the width and height of the large frame in the real frame respectively. are the width and height of the small box in the real box respectively;

[0021] Let the prediction box (predict box, pr box) be defined as Among them, (p x , p y ) is the coordinate of the nested point shared by the two boxes in the prediction box, They are the width and height of the large box in the prediction box respectively, are the width and height of the small box in the prediction box respectively;

[0022] Set the anchor box (ac box) and define it as Among them, (a x , a y ) is the coordinate of the nested point shared by the two frames in the anchor frame, is the width and height of the large frame in the anchor frame, The width and height of the small box in the anchor box;

[0023] S1.3. The relationship between the predicted box and the anchor box, and the true box and the anchor box is determined by the following calculation formula:

[0024]

[0025]

[0026] Among them, pl is the predicted value of the prediction box;

[0027]

[0028] gl is the predicted value of the real box;

[0029] S1.4. Obtain the loss function using the following calculation formula:

[0030]

[0031]

[0032] Among them, L cls is the classification loss function; L reg is the target box position regression loss function;

[0033] gc∈{0,1} is the category of the real box, that is, whether it is a train vehicle. When gc=1, it means that the real box is a train vehicle, and when gc=0, it means that the real box is not a train vehicle;

[0034] pc is the probability value of the predicted box being a train vehicle; N is the number of train vehicle target boxes; α is the weight coefficient; M is the number of real boxes; θ k is the weight coefficient of the target frame position parameter; smooth L1 is a smooth function;

[0035] S1.5. The predicted value pl of the prediction box is reversely calculated according to formula (3) to obtain the position and size of the predicted target box in the video image, thereby realizing detection of the train vehicle;

[0036] A train vehicle and running status detection device is characterized in that: it includes a video acquisition module for acquiring video images of a train vehicle passing through a track on a monitoring site;

[0037] A video processing module is used to receive the video images captured by the video acquisition module and perform video processing to obtain the motion status information of the passing train vehicle;

[0038] The position marking module is used to assist the video processing module in performing video processing to determine the position of the train vehicle on the track.

[0039] Furthermore, the video processing module establishes a coordinate system for the movement of the train vehicle based on the collected video image and the position marking module, wherein the coordinate system uses the track direction as a coordinate axis; the video processing module performs straight line fitting on the position marking module, and obtains the coordinate axis scale in the coordinate system through the fitted straight line;

[0040] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the steps of the train vehicle and running status detection method are implemented when the processor executes the program.

[0041] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the train vehicle and running status detection method.

[0042] The beneficial effect of the present invention is that after obtaining the video image of the train vehicle passing through the track, the image detection technology can accurately detect in real time the train vehicle passing through the track and the motion status information of the train vehicle running on the track, including position, movement direction, speed and other information, which effectively improves the detection accuracy of the train vehicle and the accuracy and stability of the train vehicle motion status detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a structural block diagram of the present invention;

[0044] Figure 2 It is a schematic diagram of the assembly structure on the track of the present invention;

[0045] Figure 3 It is a schematic structural diagram of a train vehicle on a track in the present invention;

[0046] Figure 4 It is a schematic flow diagram of the present invention. DETAILED DESCRIPTION

[0047] like Figures 1 to 4 As shown, the present invention provides a train vehicle and running status detection method, including:

[0048] Acquire a video image of a train vehicle 1 passing through a track 2;

[0049] Detecting the track 2 in the video image, and by detecting the specific position of the track 2 in the video image, facilitating subsequent detection of position markers, thereby establishing a coordinate system for the movement of the train vehicle 1; in the established coordinate system for the movement of the train vehicle 1, the direction of the track 2 is used as the coordinate axis; setting a plurality of position markers 3 on one side of the track 2, determining the actual distance between each position marker, performing linear fitting on the position markers 3, and obtaining the coordinate axis scales in the coordinate system from the fitted straight line;

[0050] Detecting the train vehicle 1 in the video image to obtain the coordinate position of the train vehicle 1 in the established coordinate system;

[0051] According to the coordinate position of the train vehicle 1 , the motion state of the train vehicle 1 is obtained.

[0052] Specifically, the detection method includes the following steps:

[0053] S1. A camera 5 is mounted above the track 2 via a bracket 4. The camera 5 captures video at a fixed frequency. The camera 5 is mounted outside the track 2 limit (limit is a railway term that refers to a certain space above, below, left, and right of the track within which equipment or infrastructure cannot be installed to prevent impacts on train operation safety). The field of view is primarily focused on the sides and top of the train vehicle 1. Preferably, the camera 5 is mounted at a position such that the track 2 within its field of view is nearly straight. That is, the video image captured by the camera 5 simultaneously includes the track 2, one side of the train vehicle 1 as it passes, and the top of the train vehicle 1.

[0054] S2. Detect track 2 in the video image. If there are multiple tracks 2, the track 2 to be monitored can be set as valid and the others as invalid.

[0055] S3, detecting the position markers 3 next to the track 2 in the video image, and selecting several position markers 3 as candidates. To ensure the accuracy of the detection, the positions of the selected position markers 3 are as close as possible to the direction of the camera 5;

[0056] The position markers 3 are in the shape of a straight line, and there are at least two position markers 3. The position markers 3 can be implemented as straight reflective strips to improve the accuracy and stability of detection. Preferably, the position markers 3 are laid at equal intervals to facilitate calculation. If the rail sleepers 2 are evenly spaced and relatively clear in the image, the sleepers can also be directly used as position markers 3 for processing.

[0057] S4, perform straight line fitting on the candidate position marker 3 in the video image, and extend the fitted straight line according to the position relationship of the effective track 2 set in step S2 so that it crosses the track 2 to obtain the virtual track distance interval line 7, as shown in FIG. Figure 3 The dotted part shown in , the coordinate axis is established in the direction of track 2, and the coordinate axis scale is set according to the virtual track distance interval line 7;

[0058] S5. Detect the train vehicle 1 in the video image to obtain a target frame 6 for each section of the train vehicle 1. The target frame 6 is formed by nesting two rectangular frames, which share a nesting point. One of the rectangular frames includes the entire train vehicle 1, and the other rectangular frame only includes the side range of the current train vehicle 1 in the video image.

[0059] After the train vehicle 1 is detected, a tracking algorithm may be used to obtain a target frame 6 of the vehicle in subsequent frames, such as a KCF algorithm, DeepSORT, MDNet, or a VOT target tracking network.

[0060] In step S5 of the embodiment of the present invention, in order to improve vehicle detection accuracy and achieve vehicle positioning, combined with the specific structure of the train vehicle 1 in the image, step S5 designs a target frame 6 with a double frame structure, and uses a deep learning detection network based on anchor boxes to achieve train vehicle detection. The definition of the target frame and the training loss function includes the following steps:

[0061] S5.1. Set the target frame 6 in the video image as: {(x, y, (w b , h b ), (w s , h s )}, where x, y, w b , h b , w s , h s They are the position parameters describing the target frame, that is, (x, y) is the coordinate value of the common nesting point of the two rectangular frames, w b , h b are the width and height of the large box in the two rectangular boxes, w s , h s The width and height of the small box in the two rectangular boxes respectively;

[0062] After the camera 5 is installed as described above, it collects as many images of train vehicles 1 as possible under different scenes, weather conditions, and time conditions as training images, and annotates each train vehicle in the image with a target frame 6 according to the above definition;

[0063] S5.2. The detection network structure adopts the existing classic detection network framework based on anchor boxes, such as the Yolo series network, SSD, etc. The difference of the present invention is the processing of target box 6 regression, that is, based on the definition of the above target box 6, regression processing is performed on two boxes at the same time. The embodiments of the present invention are as follows:

[0064] Let the ground truth box (gt box) be defined as Among them, (g x, g y ) is the nested point coordinate shared by the two boxes in the real box, They are the width and height of the large frame in the real frame respectively. are the width and height of the small box in the real box respectively;

[0065] Let the prediction box (predict box, pr box) be defined as Among them, (p x , p y ) is the coordinate of the nested point shared by the two boxes in the prediction box, They are the width and height of the large box in the prediction box respectively, are the width and height of the small box in the prediction box respectively;

[0066] Set the anchor box (ac box) and define it as Among them, (a x , a y ) is the coordinate of the nested point shared by the two frames in the anchor frame, is the width and height of the large frame in the anchor frame, The width and height of the small box in the anchor box;

[0067] S5.3. The relationship between the predicted box and the anchor box, and the true box and the anchor box is determined by the following calculation formula:

[0068]

[0069]

[0070] Among them, pl is the predicted value of the prediction box;

[0071]

[0072] gl is the predicted value of the real box;

[0073] S5.4. The loss function is obtained by the following calculation formula:

[0074]

[0075]

[0076] Among them, L cls It is a classification loss function, which can be defined as two categories: positive samples and negative samples. Positive samples are trains and vehicles, and all others are negative samples. Common classification loss functions can be used, such as the softmax loss function.

[0077] L regis the target frame 6 position regression loss function;

[0078] gc∈{0,1} is the category of the real box, that is, whether it is the identification of train vehicle 1. When gc=1, it means that the real box is train vehicle 1, and when gc=0, it means that the real box is not train vehicle 1;

[0079] pc is the probability value of the prediction box being train vehicle 1; N is the number of target boxes 6 for train vehicle 1; α is the weight coefficient; M is the number of real boxes; θ k Indicates the target box position parameters x, y, w b , h b , w s , h s The weight coefficient of w can be appropriately reduced according to the actual effect b , h b The weight of makes the network more accurate in positioning the side of the vehicle to ensure the positioning accuracy of the vehicle; smooth L1 is a smooth function;

[0080] S5.5, when the detection network is inferred, the predicted value pl of the prediction box is calculated inversely according to formula (3), that is, the trained network will calculate the predicted value pl. According to the 6 sub-formulas in (3), the 6 position parameters x, y, w of the target box can be calculated. b , h b , w s , h s , that is, the predicted position and size of the target frame 6 in the video image are obtained, thereby realizing the detection of the train vehicle 1;

[0081] S6. For each target frame 6, select the vertex below the front edge 8 of the vehicle side, that is, select the lower right corner vertex P of the rectangular frame that only contains the side of the current train vehicle 1 (that is, the position point of the front part of the train vehicle on the track), and determine whether there are fitted straight lines (virtual track distance interval lines 7) before and after the lower right corner vertex P along the direction of track 2. If so, then according to the position of the lower right corner vertex P between the two fitted straight lines (virtual track distance interval lines 7) before and after, interpolate and calculate the position of the lower right corner vertex P on track 2, that is, the coordinate value of the current train vehicle 1 in the coordinate system;

[0082] The interpolation algorithm is an existing linear interpolation algorithm. Specifically, the actual position of the lower right corner vertex P on the coordinate axis can be calculated based on the proportional relationship between the lower right corner vertex P and its two adjacent coordinate scales in the video image and the actual distance between the two coordinate scales.

[0083] S7. Repeat steps S5 and S6 for each frame image in the video to obtain the position of each target frame 6 at different times, that is, the coordinate value of the track 2. The time interval is the inverse of the acquisition frequency. Based on the coordinate value of the target frame 6 of the train vehicle 1 at each moment, the motion state information such as the motion direction, speed, and acceleration of the train vehicle 1 is obtained.

[0084] In the above steps S2 to S4, the track 2 and the position marker 3 are detected, and the coordinate axis of the track 2 is established. It is not necessary to perform calculations for each frame. Usually, when the camera 5 is installed relatively tightly, the position of the track 2 and the position marker 3 in the image will not change within a short period of time. Preferably, the processing can be performed at a fixed period, and the results can be saved for subsequent real-time calculation of the vehicle position. If the computing performance is sufficient, the period can be shortened, or even processed every few frames, and the accuracy and stability can be improved through dynamic adjustment.

[0085] In steps S2 and S3, the detection of track 2 and position marker 3 is implemented using a deep learning target segmentation network, such as classic networks such as SegNet, U-Net, MaskRCNN, and DeeperLab.

[0086] In step S7, when multiple train vehicle 1 target frames 6 and the lower right corner vertex are detected, if the calculated vehicle speed is not ultra-low speed, for example, the speed is greater than 5 km / h, it is preferred that the motion state of each vehicle in the entire train is the same, and its speed and acceleration can be calculated according to the average speed and acceleration of each vehicle to improve accuracy.

[0087] A train vehicle and running status detection device includes a video acquisition module for acquiring video images of a train vehicle 1 passing through a track 2 at a fixed frequency;

[0088] The video processing module is used to receive the video images captured by the video acquisition module and perform video processing to obtain the motion status information of the passing train vehicle 1; the video processing module is mainly used to implement relevant calculations of the train vehicle 1 and the operation status detection method. The video stream input by the video acquisition module is calculated to obtain the motion status information of the passing train vehicle 1. During the video processing process of the video processing module, the video processing module establishes a coordinate system for the motion of the train vehicle 1 based on the captured video images and the position marking module, and the coordinate system uses the direction of the track 2 as the coordinate axis; the video processing module performs straight line fitting on the position marking module, and obtains the coordinate axis scale in the coordinate system through the fitted straight line;

[0089] The position marking module is used to assist the video processing module in performing video processing to determine the position of the train vehicle 1 on the track 2; the position marking module is the above-mentioned position marker 3.

[0090] An electronic device comprises a memory, a processor and a computer program stored in the memory and operable on the processor. When the processor executes the program, the steps of a method for detecting a train vehicle and its running status are implemented.

[0091] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a method for detecting a train vehicle and its running status.

[0092] The present invention adopts a camera 5 to capture video, sets a position marker 3 on one side of the track 2, and uses image detection technology to detect the motion status information of the passing vehicles and the vehicles running on the track 2 in real time, including position, motion direction, speed, acceleration and other information. Its hardware is simple, low cost, and easy to install and maintain; and the present invention adopts deep learning technology to perform train vehicle 1 target detection in the video image, and designs a detection network by defining a target frame 6, which can effectively improve the detection accuracy of the train vehicle 1; in addition, through the video image detection of the track 2, i.e., the position marker 3, the position reference of the train vehicle 1 can be dynamically adjusted, thereby improving the accuracy and stability of the motion status detection of the train vehicle 1, without the need for manual identification or calibration.

[0093] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the invention can be embodied in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims, not the foregoing description, and all variations within the meaning and range of equivalents of the claims are intended to be included therein. Any reference sign in a claim should not be construed as limiting the claim to which it relates.

[0094] In addition, it should be understood that although this specification is described in terms of implementation methods, not every implementation method contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.

Claims

1. A train vehicle and running status detection method, characterized in that: include: Acquire video images of train vehicles passing through the track; detecting the track in the video image to establish a coordinate system for the movement of the train vehicle; Performing the train vehicle detection on the video image to obtain the coordinate position of the train vehicle in the established coordinate system; Obtaining a motion state of the train vehicle according to the coordinate position of the train vehicle; A camera is mounted above the track via a bracket, the camera collects video at a fixed frequency, and the video image acquired by the camera simultaneously includes the track, one side of the train vehicle when passing through, and the top of the train vehicle; Obtaining the coordinate position of the train vehicle in the established coordinate system comprises the following steps: S1. Perform train vehicle detection on the video image to obtain a target frame for each section of the train vehicle; the target frame is formed by nesting two rectangular frames, the two rectangular frames share a nesting point, one rectangular frame includes the entire train vehicle range of the current train vehicle, and the other rectangular frame only includes the side range of the current train vehicle in the video image; S2. For each target frame, select the lower right corner vertex of the rectangular frame that only contains the side of the current train vehicle, and determine whether there are fitted straight lines before and after the lower right corner vertex along the track direction. If so, interpolate the position of the lower right corner vertex between the two fitted straight lines before and after it to obtain the position of the lower right corner vertex on the track, i.e., the coordinate value of the current train vehicle in the coordinate system; S3, repeating steps S1 and S2 for each frame of the video to obtain the position of each target frame at different times, and then obtaining the running direction, speed, and acceleration of the train vehicle according to the coordinate value of the train vehicle target frame at each time; In step S1, train vehicle detection is implemented using a deep learning detection network based on anchor boxes, specifically including the following steps: S1.

1. Set the target frame in the video image to be defined as: {(x, y), (w b ,h b ),(w s ,h s )}, where x, y, w b , h b , w s , h s They are the position parameters describing the target frame, that is, (x, y) is the coordinate value of the common nesting point of the two rectangular frames, w b ,h b are the width and height of the large box in the two rectangular boxes, w s ,h s The width and height of the small box in the two rectangular boxes respectively; S1.

2. Let the ground truth box (gt box) be defined as Among them, (g x ,g y ) is the nested point coordinate shared by the two boxes in the real box, They are the width and height of the large frame in the real frame respectively. are the width and height of the small box in the real box respectively; Let the prediction box (predict box, pr box) be defined as Among them, (p x ,p y ) is the coordinate of the nested point shared by the two boxes in the prediction box, They are the width and height of the large box in the prediction box respectively, are the width and height of the small box in the prediction box respectively; Set the anchor box (ac box) and define it as Among them, (a x ,a y ) is the coordinate of the nested point shared by the two frames in the anchor frame, is the width and height of the large frame in the anchor frame, is the width and height of the small box in the anchor box; S1.

3. The relationship between the predicted box and the anchor box, and the true box and the anchor box is determined by the following calculation formula: Among them, pl is the predicted value of the prediction box; gl is the predicted value of the real box; S1.

4. Obtain the loss function using the following calculation formula: Among them, L cls is the classification loss function; L reg is the target box position regression loss function; gc∈{0,1} is the category of the real box, that is, whether it is a train vehicle. When gc=1, it means that the real box is a train vehicle, and when gc=0, it means that the real box is not a train vehicle; pc is the probability value of the predicted box being a train vehicle; N is the number of train vehicle target boxes; α is the weight coefficient; M is the number of real boxes; θ k is the weight coefficient of the target frame position parameter; smooth L1 is a smooth function; S1.

5. The predicted value pl of the prediction box is reversely calculated according to formula (3) to obtain the position and size of the predicted target box in the video image, thereby realizing the detection of the train vehicle.

2. A train vehicle and running status detection method according to claim 1, characterized in that: In the established coordinate system for train vehicle movement, the track direction is used as the coordinate axis; a number of position markers are set on one side of the track, and straight line fitting is performed on the position markers, and the coordinate axis scale in the coordinate system is obtained through the fitted straight line.

3. A train vehicle and running status detection method according to claim 2, characterized in that: The position marker is in a straight line shape, and there are at least two position markers.

4. A detection device using the train vehicle and running status detection method according to claim 1, characterized in that: It includes a video acquisition module for acquiring video images of train vehicles passing through the track during monitoring; A video processing module is used to receive the video images captured by the video acquisition module and perform video processing to obtain the motion status information of the passing train vehicle; The position marking module is used to assist the video processing module in performing video processing to determine the position of the train vehicle on the track.

5. A train vehicle and running status detection device according to claim 4, characterized in that: The video processing module establishes a coordinate system for the movement of the train vehicle based on the collected video image and the position marking module, and the coordinate system uses the track direction as the coordinate axis; the video processing module performs straight line fitting on the position marking module, and obtains the coordinate axis scale in the coordinate system through the fitted straight line.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the train vehicle and running status detection method according to any one of claims 1 to 3 are implemented.

7. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the train vehicle and running status detection method according to any one of claims 1 to 3 are implemented.

Citation Information

Patent Citations

  • Urban rail train positioning and speed measurement method based on machine vision

    CN112380902A

  • Image analysis system and device suitable for track detection

    CN213482904U