| Due to the continuous development of high-speed railway operating mileage,there is a critical issue for how to guarantee railway operations safety.As one of the important threats to railway traffic safety,the intrusion of foreign objects requires the detection system to have high real-time performance and reliability.At present,the railway foreign body intrusion detection system based on video image analysis is mainly deployed to the back-end server.Due to the bandwidth limitation,the system has loss and detection delay during data transmission.Multi-channel videos are processed by a single device to further increase the detection time.It is difficult to identify foreign objects efficiently in real time.Therefore,to meet the requirements of the railway foreign body detection task,this paper proposes a railway foreign body intrusion detection system based on the embedded GPU platform.This paper mainly completes the construction of railway dataset,the design of foreign body detection algorithm and the research of the optimization method of detection system under the embedded platform.In order to solve the problem of imbalance of sample categories,this paper uses the video collected by cameras along the high-speed railway and the images collected from the network to construct a railway foreign body intrusion dataset,which contains many scenes such as different weather,light changes and geographical areas to meet actual requirements.To improve the computational efficiency of neural network,this paper proposes the AF-SSD algorithm based on the SSD framework to realize the task of foreign body recognition.Firstly,the K-means algorithm is applied to obtain the candidate frame information suitable for the railway dataset for accelerating the speed of network convergence.Then use the lightweight network Mobile Net to replace VGG-16 as the new feature extraction network to reduce the amount of network calculations in the backbone network.By modifying the stride of the convolutional layer,the shallow prediction feature map contains more semantic information to improve the detection performance of small object.Finally,an adaptive feature fusion module is designed so that the network can automatically perform deep feature and shallow feature fusion with different weights according to the size of the target in the input image during the inference process.The detection accuracy of the AF-SSD algorithm in the PASCAL VOC public dataset reached 76.1%.The detection efficiency of small targets was doubled compared to SSD,and the detection accuracy on the railway dataset reached 89.66%.To solve the problem of data loss and detection delay during long-distance transmission,the detection algorithm AF-SSD is deployed to the embedded platform NVIDIAI Jetson TX2.However,due to the limitation of platform power consumption,optimization methods can be used to maximize platform performance to improve realtime detection.Specific optimization strategies include: using Tensor RT to optimize model calculation graphs to improve GPU utilization,and reducing the numerical accuracy of network inference to save memory and calculations;using Gstreamer components for video hard decoding to reduce CPU workload,and adopting multithreaded design to separate video reading and model inference for preventing video blocking;reconstructing the non-maximum suppression module(NMS)to use GPU resources for accelerating the post-processing process..In this paper,the railway foreign body detection system has been tested on the embedded GPU platform through data from different scenarios.It is shown that the overall average accuracy of the system has reached 96.68%,and the detection rate of small targets is 79.41%.In video,the rate per unit time is above 16 FPS,which has good detection efficiency and real-time performance,and meets the requirements of foreign object detection in actual railway scenes. |