| Railway is one of the important transportation infrastructure in China’s economic development.Among them,foreign body invasion is one of the main causes of train accidents.The detection methods based on deep learning are limited by training methods and cannot detect some scenarios with few railway invasion samples.In order to solve the above problems,this paper proposes a railway foreign body intrusion detection algorithm based on small sample learning,aiming to solve the problem that deep learning requires a large number of training samples and detect the intrusion scenarios that are extremely scarce on railway samples,so as to improve the safety level of train operation.Considering that the existing images of railway foreign body invasion in the public data set do not meet the detection environment of the actual railway scene,a small sample data set based on railway was constructed by combining the images collected in the railway scene with the synthetic images,including five kinds of railway foreign body invasion,such as rockfall invasion,debris flow invasion and pedestrian invasion.According to the characteristic analysis of constructing railway data set,the benchmark data set based on railway data set is established in small sample learning.Aiming at the characteristics of railway data set and the shortcomings of current relevant algorithms,the final algorithm research scheme is designed.In order to quickly detect foreign objects with few training samples,a small sample learning network based on metric element learning was designed and constructed.A Channel Attention Module(CAM)was designed to solve the interference problem of clutter in railway detection,and a feature mapping network was constructed based on residual network and CAM.In order to solve the problem that the distribution of foreign objects is far away from the same kind of features in the feature space when the foreign objects are small or occluding,a fine-tuning algorithm of class center is designed to initialize the class center through autonomous learning.Aiming at the problem of uncertain feature distribution of railway data set,the final distance measurement function of railway data set is established by means of experimental verification.Ablation experiments on miniImageNet and railway data sets show that CAM can improve the detection accuracy of network and is universal.The class center fine-tuning algorithm can further improve the detection performance of the network in the case of increasing training samples in the railway data set,meet the application needs of railway foreign body intrusion detection,and provide a possibility for the further implementation of the algorithm.According to the comparison and analysis of the experimental results of the metric element learning network and the classical network,the training strategy of the network is further improved.The specific improvement contents are as follows.Considering that the meta-training method is not enough to make the feature mapping network obtain better feature expression ability,this paper designs a network model pre-training method based on the meta-training to obtain rich prior knowledge for the feature mapping network.Samples for the same category in the feature space between the scattered distribution problems,based on Center loss at the Center of the related loss function,help the network fast convergence at the same time make the similar samples in the feature space is more compact.The experimental results on miniImageNet and railway data sets show that the model pretraining method based on meta-training can effectively improve the accuracy of network detection,and the correlation ablation experiment shows that the designed center correlation loss function can effectively solve the relevant problems and has good universality.Experimental results on miniImageNet show that the network with the optimized training strategy can effectively improve the accuracy of network detection.The designed network is migrated to the railway data set.Under the setting of 5-way 5-shot,the detection accuracy reaches 85.44%,showing good detection accuracy and real-time performance,which can meet the actual use requirements of railway field. |