As visual surveillance systems become more and more common in human lives, approaches based on these systems to solve security problems in practice are boosted, especially in railway applications. In this paper, we first propose a robust snag detection algorithm and then present a railway security system by using a combination of multiple sensors and the vision based snag detection algorithm. The system aims safety at several repeatedly occurred situations including slope protection, inspection of the falling-object from bridges, and the detection of snags and foreign objects on the rail. Experiments demonstrate that the snag detection is relatively robust and the system could guarantee the security of the railway through these real-time protections and detections.
With the development of railway techniques and the construction of infrastructures, the upcoming modernization of cities make the rails become one of the most commonly used means to transport cargos and passengers. Compared with other forms of transport such as highway and airplanes, railway transport is capable of high levels of passenger and cargo utilization, better customer comfort, high energy efficiency, limited use of space and less noise pollution
, etc. Especially, when compared with the highway, the railway does not have the problem of traffic congestion. While as the railway transport is closely correlated to people’s lives and property, the safety of railways is the most significant issue that people care. Accidents in railway lines can be mainly categorized into collision with snags and derailment
. One reason that may cause derailment is the rail facility itself, which requires consistent and frequent inspections and maintenances. For example, rail defects lead to rail breaks and further to derailment, and they are generally inspected manually, but manual inspection is slow, laborious, and potentially hazardous
, so recently they can be detected through vision based techniques
. Another cause that results in derailment is erroneous estimates or mistaken operations by engine drivers. It can only be avoided by the caution of engine drivers. Collision with snags, such as sudden appearances of objects, animals or human beings on the railways, obstacles on the railways, etc., is very dangerous to railway transport. Unfortunately, due to the fact that a number of rail lines constructed in mountainous or desert regions, these situations are fully possible to happen. Thus, it becomes very important to have a system that examines the safety of these lines.
With the development of electronics, sensors are widely employed in practical systems
. Many efforts have been done to establish a detection and protection system for rail lines and most of them were based on wireless sensor network
, Kalpana Sharma et al. established a wireless acoustic sensors to detect rail defects such as cracks and breakages in the railway tracks. Zeinab Sam Daliri et al.
employed electromagnetic and ultrasonic sensors to recognize flaws in the railway. S. Ramesh
presents a system for detecting the railway cracks based on Infrared Rays (IR) sensors. In
, a wireless sensor network was constructed to monitor the rail lines. Emad Aboelela et al.
developed a wireless sensor network in order to reduce the occurrence rate of accidents and improving the efficiency of railroad maintenance activities. Kalaimathi et al.
presented a railway surveying system combined by a Global positioning System (GPS) module and Micro Electro Mechanical Switch (MEMS) based track detector (ultrasonic sensors utilized) to detect cracks in the railway tracks. For the recognition of snags and foreign objects on the rail, vigorous solutions were proposed. In general, they can be categorized into two classes, sensor based approaches
and vision based techniques
. Sensors that are widely employed in the snag detection on the rail include a barrier of emitters and receivers
, combination of video cameras and radars (LIDAR)
, infrared systems
, and so on. Vision based approaches were widely employed in many areas
and basic tasks in railways have been studied by many researches. For instance, F. Kaleli et al.
extracted rail track by using dynamic programming. In
, small parallel segments were evaluated to extract rails, and Bogdan Tomoyuki Nassu and Masato Ukai
employed matching edge features to choose rail patterns. Qi Z et al.
used HOG feature and a region-growing algorithm to extract railways. Algorithms using the ground plane and height information were described in
to detect obstacles in railways. Pankaj Jain et al.
proposes a visual obstacle detection algorithm based on image segmentation. M. Ruder et al. developed a system capable of monitoring the track and detecting objects in front of a train
. To sum up, a variety of threatens can induce a collision of a train and various sensors and vision based algorithms are employed to protect the train from these potential threatens.
In this paper we focus on three repeatedly occurred situations including slope protection, inspection of the falling-object from bridges, and the detection of snags and foreign objects on the rail. We propose a hierarchical system of wireless sensor network to communicate between sensor nodes and the servers, and develop a vision based algorithm to check the safety of railways. In the proposed system, switching sensors and slope protection nets are employed to detect landslide, displacement sensors and fall prevention nets are utilized in the inspection of falling-object from bridges, and a camera is installed to detect snags on the rail. The contributions of this paper include: 1) proposal of a vision based algorithm to detect snags on the railway; 2) mixed use of the wireless sensor network composed by multiple sensors and the vision based algorithm to enhance the safety of rail lines.
The rest of the paper is arranged as follows. Section 2 gives a description of the overall multi-sensor system and we present the snag detection algorithm in Section 3. The setup of the system and experiments are delineated and executed in Section 4 and we come to conclusion in Section 5.
2. Multi-sensor System for Railway Security
In this section, we propose a multi-sensor system for railway security. Three situations are taken into consideration, including slope protection, inspection of the falling-object from bridges, and the detection of snags. The construction of the network is presented in Section 2.1 and the action of sensors is described in Section 2.2.
- 2.1 Wireless sensor network
A wireless sensor network is established to communicate between the sensor nodes and the data collecting terminal. A sensor node consists of a microcontroller, a RAM, a short-range radio transmitter, and a small power source. Sensor nodes are used to perceive the environment and collect data
shows a typical wireless sensor network of our system. Multiple sensor nodes are connected with a sink node through Zigbee network and the sink node is in charge of sending data to the data collecting terminal.
A typical wireless sensor network
The proposed multi-sensor system is composed by a number of wireless sensor nodes that are deployed along the rail lines. Multi-layer routing is also required since the railway security should not only be examined on site, but also be checked in a remote control center which is continuously monitored by the authority and the authority can request for the location of an abnormity. In our system, sensors are placed at fixed locations such as bridges, tunnels and some special points, and cameras are installed at places where there is a possibility of landslide covering rails with stones.
presents the wireless sensor network for our railway security system. The sensors gather the information from the environment and a router (included in the sink node in
) reorganizes the data collected by the sensors except cameras at the lowest layer (layer 0) and forwards these data packages to the next higher layer (layer 1). The video information captured by the cameras at layer 0 is transmitted via 2.4G wireless network. By using the wireless modules (Zigbee, 2.4G wireless network) the information is passed to the data collecting terminal. The data collecting terminal might need to be placed on site. However, the railway security should also be able to be examined at a control center where authority can get the information of an abnormity and command. This makes a web server necessary and is deployed at layer 2 in
. The data collecting terminal transmits data packages to the web server through the Ethernet network.
Multi-sensor system for railway security
- 2.2 Action of sensors
Three situations are considered in the proposed railway system. For slope protection, it deals with the situation when landslide occurs. The slope protection net first conducts to block soil and stones from tumbling down. Then the switching sensor functions and sends information up to the web server. Authority can see an online scene acquired by the installed cameras and alarm trains along this abnormal rail line. Slope protection is usually set in the mountainous sections of railways. The inspection of the falling-object from bridges is implemented by the displacement sensor. A protection net is equipped on the bridge when there are rail lines under the bridge. When object falling from the bridge, the displacement sensor set on the protection net will act and alert the system about the falling object. The last function of the railway security system is snag detection on the railway. The cameras mounted along the rail lines transfer real-time video information to the web server and a vision based snag detection algorithm is executed to decide whether there is a snag on the railway, and if there is an obstacle, it should be localized.
3. Snag Detection
The distinguishing of moving trains from moving snags is one of core issues to verify the performance of snag detection. The snag in this paper is defined as any objects that are hindering or might potentially hinder the running of trains. Therefore, trains should not be detected as snags and we employ a superpixel based detection algorithm to identify trains and exclude them from snag candidates. This is described in Section 3.1. As the snag detection algorithm is based on background subtraction algorithm, which requires a stable background model, and the background model is delineated in Section 3.2. We present the description of snag detection algorithm in Section 3.3.
- 3.1 Superpixel based train detector
Since the rails are not always horizontal lines or vertical lines, it is difficult to annotate a running train in an image by a bounding box (as shown in the left image of
, there are numerous noises within the bounding box); otherwise we need to annotate the train manually pixel by pixel. In order to reduce the load of tedious hand-labelling and at the same time balance the precision of labelling, in this paper we employ superpixels as the basic element to process the training of trains. For a training image, superpixels are first extracted by SLIC algorithm
(as shown in the top right of
). Then the image can be represented by a number of superpixels (about 300, a parameter that inputs to SLIC) and trains are a part of these superpixels (as shown in the bottom right of
Annotations of trains based on superpixels
In the learning process of the prior train detector, we employed Histograms of Oriented Gradients (HOG)
as the extracted feature and Support Vector Machine (SVM)
as the learning algorithm. Features extracted from superpixels that are annotated as trains are positive features and otherwise they are used as negative features.
In the detection process, a blob is considered as a superpixel
. For a current frame, several operations are performed (such as the calculation of difference frame, see Section 3.3 for more details) to obtain abnormal pixels, and these pixels agglomerate into blobs. The decision on one blob is based on the decisions of features involving in the blob. If the number of positive features beats the number of negative features, the blob is determined as a train blob; otherwise it is decided as a non-train blob.
- 3.2 Background model
As the background subtraction algorithm is a pre-processing step in our snag detection algorithm, a stable background model exerts a tremendous influence to the performance of snag detection. A robust background subtraction algorithm should be able to deal with illumination changes due to light or weather, reflections on screens (indoor), etc. The main task focuses on the update of the background model. We employed a running average with selectivity model to update the background model
, which is described in Eq. (1) where
represents the previous frame.
We denote the current and previous background model by
suggests a learning rate and a typical value is 0.05. This equation connects the current background model with the classification (background or foreground) of the previous frame, which prevents the background model from being contaminated by non-background pixels.
- 3.3 Snag detection algorithm
Snag detection is the most important part of the proposed railway security system. In this work we employ a combination of image processing and machine learning techniques to achieve a high performance of rail snag detection.
shows the flowchart of snag detection. The video sequence is first processed by difference analysis, which is done on two adjacent frames for each pixel. Define
as the intensity values of two adjacent frames, and as cameras are fixed, the reference frame (represented by
) can be obtained. The difference frame is defined as the average of two adjacent different frames compared with the reference frame as shown in Eq. (2). The update of the reference frame is described in Section 3.2 (Eq. (1)).
Flowchart of snag detection
Blobs are formulated by identifying and analyzing strongly connected components for the difference frame calculated in the previous step. A binary image is first generated from the difference frame and the threshold is set to 15 in our experiments, and then 8-connected component is labeled to extract blobs. In order to adapt the proposed algorithm to the illumination change of frames, two blob conditions are regulated. One is that the total number of pixels in a blob should be larger than a threshold
(set to 50 in our experiments) and the other condition is that the average difference intensity of a blob (normalized by 255) should be larger than a threshold
(set as 0.1 in our experiments). The two conditions are represented by Eq. (3) where
is the binary mask of the
is the total number of blobs) and
is the total number of pixels in the blob mask.
suggests the intensity value of the position corresponding to index
in the current difference frame
. This processing can filter out noises and only blobs that satisfy these two conditions are considered as foreign objects and passed to the next step.
The foreign objects detected by the blob algorithm could be a moving train along the rail line and this situation should be excluded from the abnormities. An object is believed to be a running train based on that the detection of the object is a train and the moving path is along the rail track. A prior train detector that is delineated in Section 3.1 is learnt to decide whether the object is a train. Since the camera is fixed, the rail track template can be obtained beforehand.
The moving path restriction on a blob is examined by the coverage pixels of the template (
in Eq. (4) is the template value for index
) and the blob mask (as shown in Eq. (4),
is set to 50). Snags are identified as the detected blobs barring from the ones that are recognized as trains and satisfy the moving path restriction. We summarize the snag detection algorithm in Algorithm 1.
In this section, we will evaluate the performance of the snag detection algorithm and the railway security system. Experiments related to the snag detection algorithm are shown in Section 4.1. The setup and actions of the railway security system are reported in Section 4.2.
- 4.1 Experimental results for snag detection
Three parameters (
) are involved in the snag detection algorithm, and are tuned on a validation dataset which includes more than 500 frames and is different from both the training dataset and the test dataset. The results are shown in
. It is clear that the accuracy performance is similar for different values of parameters
. The performance obtained under the value of 50 (both
) achieves slightly better than the others and this value is used in the test experiments. For
, 0.1 performs the best, which is employed in the test experiments.
Results for parameter tuning
Results for parameter tuning
We demonstrate the proposed snag detection algorithm in two aspects. First, the effectiveness of the constraints is investigated. The calculation of the difference frame is influenced by the illumination as we only do a subtraction operator between the online frames and the reference frame. The illumination impact can be filtered out by the two constrains we described in Section 3 (Eq. (3)).
shows experimental results of difference frames. In the left figure of
, four blobs are constructed. However, in fact only one blob is a snag, and others are products of illumination changes in difference frames (original images can be found in the third row of
) and are removed by the constrains. In the right figure of
, only one blob is formed, but this blob is a running train and we should not recognize it as a snag. When the blob inputs to the prior train detector, the detector determines the blob as train. At the same time, the rail template is also matched. Therefore, this blob is confirmed as non-snag (see
for the detection results).
Difference frames. Left: The 66th difference frame from Sequence 1 and four blobs are constructed. Right: The 56th difference frame from Sequence 2 and one blob is constructed.
Snag detection in Sequence 1. The first row and third row: original frames (the snag is labelled by a red ellipse); the second and last row: detection results
Snag detection results in Sequence 2
The overall snag detection is tested on several video sequences and parts of the results are shown in
. In Sequence 1 there is a stone rolling down from the mountains (abnormity situation), while in Sequence 2 (normal situation) a train is moving on the rail line, which should not be detected as a snag. We report a series of original frames and corresponding detection results in
reports the comparative experiments for snag detection on seven video sequences between the proposed snag detection and the obstacle detection based on image segmentation
. The accuracy is calculated by the percentage of the number of correctly detected frames (two situations: the frame is background and detected as a non-snag frame; the frame is a snag frame and detected as a snag frame) and the total number of frames. From these results, we can see that the proposed system is able to output both the appearance of the snag (annotated by a word “obstacle!” in
) and the location of the snag (filled with blue on the original image). Compared with the segment method in
, the proposed method achieves a much better and more robust performance, as our performance is slightly worse than that of
(video 5: ours: 95.1%;
: 95.9%) in only one sequence and is superior or identical to that of segment method
in other sequences.
Results of snag detection on seven video sequences
Results of snag detection on seven video sequences
- 4.2 Tests on the railway security system
We simulate the railway security system on a railway platform. The platform displays a complex rail line with cluttered backgrounds. There are mountains along the railways and also bridges over the rail lines.
reveals a top view of the platform and the deployment of sensors in the proposed wireless sensor network.
Deployment of sensors for the railway security system (An abnormal state of the railway security system (a snag appears))
Three kinds of sensors including switching sensor, displacement sensor, and camera for snag detection are installed on the platform. Any of these sensors or the snag detection algorithm discovers an abnormity, it will send a signal to the system, and a signal light is lightened to indicate the state at the location of each sensor mounted.
also discloses a state of the system. The red light denotes for an abnormity and the green light suggests a normal state.
signifies that a snag is detected and other locations where sensors are mounted are in a normal state. The abnormity of the railway line can be reflected through the combination of the sensors and the visual algorithm based on the surveillance system.
5. Conclusions and Future Works
In this paper, we present a railway security system via a mixed use of wireless sensor network and vision based techniques. A vision based snag detection algorithm is proposed and we employ multiple sensors to implement slope protection and falling-object protection from bridges. These multiple sensors and cameras compose a wireless sensor network. If an abnormity occurs, the information can be transferred to a long-distance control center. The system guarantees the security of the railway through these real-time protections and detections. In the future, we will extend the system with more types of sensors to observe more potential dangers for trains and exploit more video based algorithms such as train tracking to apply in the system.
This work is supported by China Postdoctoral Science Foundation with Grant No. 2014M560881 and partly supported by the National Research Foundation of Korea (NRF) (No. 2011-0017228 and 2013R1A1A2060427).
Zhu Teng She received her B.S. degree and Ph.D. degree in Automation from Central South University, China, 2006, and in Mechanical Engineering of Pusan National University, South Korea, 2013, respectively. She is now a post-doctoral researcher in the school of Computer and Information Technology, Beijing Jiaotong University. Her current research interests are image processing, machine learning, and pattern recognition.
Feng Liu He received his B.S. degree and M.E. degree in Computer Software from Beijing Jiaotong University, China, in 1983 and 1988. He also received his Ph.D. degree in Economics at Renmin University of China in 1997. He is now the director of Network Management Research Center in the school of Computer and Information Technology, Beijing Jiaotong University. His current research interests are big data analysis and cloud computing.
Baopeng Zhang He received his Ph.D. degree from Tsinghua University, Beijing, China, in 2008. He is currently working as a teacher in the School of Computer and Information Technology, Beijing Jiaotong University. His main research interests include big data analysis, distributed machine learning, distributed system and cloud computing.
Dong-Joong Kang He received a Ph.D. degree in Automation and Design Engineering at KAIST (Korea Advanced Institute of Science and Technology), in 1999. He is now a professor in School of mechanical engineering in Pusan National University. His current research interests include: pattern recognition, mobile robot, visual inspection of factory products. He is a member of the IEEE and ICROS.
Modern Railway Track
Chan A. H C
“Risk analysis of derailment induced by rail breaks-a probabilistic approach,”
Reliability and Maintainability Symposium(RAMS)
23-26 Jan. 2006
486, 491 -
De Ruvo P.
De Ruvo G.
“A Visual Inspection System for Rail Detection & Tracking in Real Time Railway Maintenance,”
The Open Cybernetics and Systemics Journal
DOI : 10.2174/1874110X00802010057
“Autonomous Rail Track Inspection using Vision Based System,”
IEEE International Conference on Computational Intelligence for Homeland Security and Personal Safety Alexandria
Jee Sung Chul
Lee Ho Jae
Kim Do Wan
“H-/H∞ Sensor Fault Detection and Isolation of Uncertain Time-Delay Systems,”
J Electr Eng Technol
DOI : 10.5370/JEET.2014.9.1.313
“Development of novel 3-D cube antennas for compact wireless sensor nodes,”
Antennas and Propagation, IEEE Transactions on
“Electric Field Energy Harvesting Powered Wireless Sensors for Smart Grid,”
J Electr Eng Technol
DOI : 10.5370/JEET.2012.7.1.75
“Railway Security System based on Wireless Sensor Networks: State of the Art,”
International Journal of Computer Applications
Sam Daliri1 Z.
Besheli M. A.
“Railway security through the use of wireless sensor networks based on fuzzy logic,”
International Journal of the Physical Sciences
“Railway faults tolerance techniques using wireless sensor networks,”
Lorestani A. Z
Mousavi S. A
“Monitoring Rail Traffic Using Wireless Sensor Network(WSN),”
“Wireless sensor network based model for secure railway operations,”
25th IEEE International Performance, Computing, and Communications Conference (IPCCC)
10-12 April 2006
“Innovative railway track surveying with sensors and controlled by wireless communication,”
International Journal of Advanced Electrical and Electronics Engineering (IJAEEE)
De Marziani Carlos
“Dedicated Smart IR Barrier for Obstacle Detection in Railways,”
IEEE Industrial Electronics Society
Prasetyo Aditya P. P.
“Design Concept of Train Obstacle Detection System In Indonesia,”
Schuster P. F.
“Multisensor obstacle detection on railway tracks,”
Proc. IEEE Int. Intelligent Vehicles Symp.
“An obstacle detection method by fusion of radar and motion stereo,”
IEEE Trans. Intell. Transport. Syst.
DOI : 10.1109/TITS.2002.802932
“Vision based rail track and switch recognition for self-localization of trains in a rail network,”
IEEE Intelligent Vehicles Symposium (IV)
Hanson Allen R.
“Qualitative Obstacle Detection,” Tech. Report COMPSI
“Efficient railway tracks detection and turnouts recognition method using HOG features,”
Neural Comput Appl
DOI : 10.1007/s00521-012-0846-0
Akgul Y. S.
“Vision-Based Railroad Track Extraction Using Dynamic Programming,”
Proceedings of the 12th Int. IEEE Conference on Intelligent Transportation Systems
“An Obstacle Detection System for Automated Trains,”
Proceedings of the Intelligent Vehicles Symposium
“Saliency detection by multitask sparsity pursuit”
IEEE Trans. Image Process
DOI : 10.1109/TIP.2011.2169274
“Learning a Hybrid Similarity Measure for Image Retrieval,”
DOI : 10.1016/j.patcog.2013.04.008
“A distance measure between labeled combinatorial maps,”
Computer Vision and Image Understanding
DOI : 10.1016/j.cviu.2012.08.002
“On Identity Disclosure Control for Hypergraph-based Data Publishing,”
IEEE Transactions on Information Forensics & Security
DOI : 10.1109/TIFS.2013.2271425
“3D Vision-based Local Path Planning System of a Humanoid Robot for Obstacle Avoidance,”
J Electr Eng Technol
DOI : 10.5370/JEET.2013.8.4.879
“Obstacle-free range determination for rail track maintenance vehicles,”
11th International conference on Control Automation Robotics Vision (ICARCV)
Nassu Bogdan Tomoyuki
“Rail Extraction for Driver Support in Railways,”
IEEE Intelligent Vehicles Symposium (IV)
Wireless Sensor Networks: An Information Processing Approach
“Histograms of Oriented Gradients for Human Detection,”
IEEE Conf. on Computer Vision and Pattern Recognition (CVPR)
“LIBSVM: a library for support vector machines,”
ACM Transactions on Intelligent Systems and Technology
Software available at
“Background subtraction techniques: a review,”
The ARC Centre of Excellence for Autonomous Systems (CAS) Faculty of Engineering
April 15, 2004
“Automatic Obstacle Detection using Image Segmentation,”
International Journal of Emerging Technology and Advanced Engineering