**An Adaptive Track Segmentation Algorithm for a Railway Intrusion Detection System**

**Yang Wang 1,2, Liqiang Zhu 1,2,\*, Zujun Yu 1,2 and Baoqing Guo 1,2**


Received: 6 May 2019; Accepted: 3 June 2019; Published: 6 June 2019

**Abstract:** Video surveillance-based intrusion detection has been widely used in modern railway systems. Objects inside the alarm region, or the track area, can be detected by image processing algorithms. With the increasing number of surveillance cameras, manual labeling of alarm regions for each camera has become time-consuming and is sometimes not feasible at all, especially for pan-tilt-zoom (PTZ) cameras which may change their monitoring area at any time. To automatically label the track area for all cameras, video surveillance system requires an accurate track segmentation algorithm with small memory footprint and short inference delay. In this paper, we propose an adaptive segmentation algorithm to delineate the boundary of the track area with very light computation burden. The proposed algorithm includes three steps. Firstly, the image is segmented into fragmented regions. To reduce the redundant calculation in the evaluation of the boundary weight for generating the fragmented regions, an optimal set of Gaussian kernels with adaptive directions for each specific scene is calculated using Hough transformation. Secondly, the fragmented regions are combined into local areas by using a new clustering rule, based on the region's boundary weight and size. Finally, a classification network is used to recognize the track area among all local areas. To achieve a fast and accurate classification, a simplified CNN network is designed by using pre-trained convolution kernels and a loss function that can enhance the diversity of the feature maps. Experimental results show that the proposed method finds an e ffective balance between the segmentation precision, calculation time, and hardware cost of the system.

**Keywords:** railway intrusion detection; scene segmentation; scene recognition; adaptive feature extractor; convolutional neural networks
