| The presence of foreign objects such as pedestrians,vehicles and animals in the railway will cause great safety hazards to the train operation.Therefore,how to accurately and quickly detect the foreign objects that invade the railway safety limit is of great significance for the safe operation of the train.The traditional foreign object detection method has a faster operation speed,but the scene around the railway is complex and changeable,and the existing algorithms based on threshold segmentation or background difference are difficult to meet the demand,which makes the degree of automation of railway foreign object detection not high,and there is a large part of the work.It still needs to be done manually.Compared with traditional methods,the foreign object detection algorithm based on deep learning can extract higher-level and more expressive features,and can also complete the feature extraction,bounding box regression and classification of the target in one model,which has a better detection effect.In this thesis,two foreign object detection algorithms based on the inter-channel attention model are proposed according to the two usage scenarios of single-frame detection and video detection.The inter-channel attention model is used to further enhance the feature extraction ability of the backbone network of the deep learning model.The particularity of the detection task is used to improve the model accordingly.The main work of this thesis is as follows:(1)A Faster R-CNN railway foreign object detection algorithm combined with inter-channel attention is proposed.By integrating the inter-channel attention model into the backbone network,the SE-Faster R-CNN model is proposed to score the importance of feature channels and improve the accuracy of The weight value of the channel is more effective for the current task,and the feature extraction ability of the model is improved.The loss function of the original model is replaced by the Balance L1 Loss loss function,which balances the contribution of simple samples and complex samples to the model training gradient and improves the learning effect of the deep learning model.Finally,since the railway foreign object detection task contains a large number of small target detections,and the original model has a poor detection effect on small targets,the RPN network is optimized for this situation,and a set of smaller-scale anchor boxes are added.The number of anchor boxes of the model is increased from 9 to 12,which is optimized for the small target detection ability of the model.(2)A DFF railway foreign object video detection method combining inter-channel attention and inter-frame small displacement is proposed.By analyzing the difference between target detection in video and static image target detection,deep feature flow network is used to introduce railway foreign object video detection task,and The model is analyzed,and corresponding improvements are made to the model’s backbone network and optical flow network.Since the deep feature flow network model only extracts features through Res Net101 on a small number of key frames,the quality of the input features directly affects the performance of the entire model,so an attention mechanism model is introduced into the backbone network to highlight the role of key channels,and the features of key frames are analyzed.More detailed adjustments to improve the model’s feature extraction ability for key frames.In view of the fact that there are many small targets in the railway foreign object detection task,the Flow Net-S of the original model is replaced with Flow Net-cs-ft-SD,and Flow Net-SD is used to predict the optical flow of the displacement of the small target,and then the result is predicted with Flow Net-cs.The optical flow is fused to improve the accuracy of optical flow prediction and improve the feature extraction effect of non-key frames.(3)A railway foreign body detection system is designed,which is developed and implemented based on the front-end UI framework Layui and SSM framework.The system implements a variety of foreign body detection algorithm solutions,and has good performance in detection accuracy and speed. |