| The rapid development of high-speed railway technology has brought about the continuous improvement of train speed,which makes the safe operation of trains more and more important.The problems caused by foreign objects intruding into the railway track have seriously affected the safe driving of the train.Therefore,it is necessary to protect the railway track to prevent the invasion of foreign matters.At the same time,real-time detection of surveillance videos of railway scenes is carried out to avoid risks.Based on the requirements of these two aspects,this thesis proposes and designs a real-time railway foreign object detection system.The research content of the design of the railway foreign obiects detection system based on video analysis is mainly divided into the following aspects:(1)Dividing and extracting the railway track intrusion area.According to the segmentation of the railway scene,the interference caused by the background target when identifying the foreground target can be effectively eliminated.The design of this part is to set the ROI area in the track area and make perspective transformation to change the monitoring perspective.Then,the edge detection algorithm is used to detect the rail area of the railway.Finally,combined with Hough line detection algorithm and least square fitting algorithm,the straight track on both sides of the track is accurately detected,and the safety factor is expanded and the safety distance is increased based on the straight line.(2)The foreign object detection algorithm is selected.After experiments on the data set selected in this paper,the performance level and lightweight performance of YOLO series and Retina Net Series in one stage algorithm are compared and analyzed in the same evaluation index..Finally,according to the speed and accuracy,the YOLOv3-Tiny algorithm is selected as the foreign object detection algorithm in this thesis.(3)Considering the optimization method,it is necessary not to increase the calculation amount of the model,but also to improve the recognition accuracy and accuracy.So the final choice is to optimize the YOLOv3-Tiny algorithm by adding the channel attention mechanism se module.The loss of the optimized algorithm is reduced by 0.1,the accuracy is improved by 13.6%,and the map value is improved by 19%.(4)The optimized algorithm is deployed to the edge device Raspberry Pi 4B for real-time target detection.At the same time,the recognition accuracy and accuracy of the Raspberry Pi hardware platform are compared with the accuracy and accuracy of the recognition of the PC-side software platform.The results show that the error of the algorithm in software and hardware platform is very small,which meets the requirements of real-time target detection,which meets the requirements of real-time target detection. |