The efficient and safe operation of railway crossing plays a key role in ensuring the safety of traffic and pedestrians,the capacity of roads and railways,and promotes economic development.At present,there are a large number of railway crossings in China,and the number of casualties at railway level crossings reaches thousands every year.In order to solve the problems such as the high cost of personnel and equipment,high work intensity and cumbersome process of the existing early warning system,this paper aims to ensure the accuracy,real-time and reduce resource occupation of the algorithm,and on the basis of the famous real-time yolov3,a real-time train detection model yolov3-mp is constructed.It is applied to train detection of crossing early warning system to realize the real-time and accuracy of train detection,so as to ensure the safe and reliable operation of railway level crossing,reduce the loss of life and property,and support the social and economic development.The specific research is as follows:(1)Improve the target detection algorithm.In order to ensure the accuracy of the train detection,four scale fusion is designed to achieve the accurate detection of the different sizes of the train from entering to leaving the camera shooting range.Aiming at the problem of different anchor values in different databases,and taking the accuracy of target positioning as the starting point,the K-Means + + algorithm is used to design the anchor clustering values of the exclusive PASAL VOC-DKtrain train database.(2)Build a train database.In order to solve the problem of serious lack of train database that meets the application scenario,a variety of train data samples of weather scenes and lighting scenes were collected in Beijing station and Beijing south station,including 10000 picture samples and 112 video samples.And using the PASAL VOC data format,the PASAL VOC-DKtrain train database is constructed to support the train detection algorithm training and testing.(3)Compress and prune the model.In order to deploy the train detection algorithm to the embedded terminal successfully and make full use of the performance advantages of the algorithm,the algorithm is cut and compressed.After sparse training,the unimportant and redundant channels and layers are screened out according to the value of the γ scaling factor in the batch normalization BN layer.They have little contribution to the train detection task and can be cut.This can reduce the number of parameters,calculations,and memory space of the model,increase the inference speedof the algorithm,and then reduce the performance requirements of the application platform.(4)Test verification is carried out on the train test set collected on site.Compared with the original version of YOLOv3,the map of the algorithm in this paper is increased by 2.81 points,the Region Avg IOU increased by 7.73 points,and the FPS is increased to 51,which proves the real-time and accuracy of the algorithm.what’s more,the number of parameters is reduced by 58044422,the capacity reduced by 88.19%,and the BFlops is reduced by 78.32%,which effectively reduces the requirements for platform performance and application cost,and is convenient for maintenance and promotion.There are 42 pictures,13 tables as well as 49 references attached to this paper. |