| With the continuous improvement of train operation speed,the harm caused by foreign objects intrusion into railway lines is also increasing.In recent years,a large number of cameras have been deployed in railway monitoring systems,which provides the possibility to use machine vision technology for intelligent detection of the track environment.In this paper,we process the video images captured by the track surveillance camera to intelligently detect and identify the track environment in order to remove foreign objects from the track.First,use Labelme labeling software to create a track line dataset and a track foreign material dataset;Then,use the Mask R-CNN instance segmentation model to detect the track line,and then divide the intrusion limit area.In order to reduce hardware pressure,accurately identify intruded foreign objects,and perform intrusion limit control for foreign objects,a foreign object recognition method of "pre-judgment" + "fine detection" is proposed.The object area is divided using the hole filling KNN background difference method,and the area of the object area is used as a pre-judgment indicator for the presence or absence of foreign objects.The Mask R-CNN neural network is improved to perform fine detection of foreign objects,and analyze the mask changes of consecutive frames,Track and control foreign object intrusion.Finally,based on the method proposed in this paper,a rail foreign object identification and intrusion control system is designed,and a GUI interface is built for actual line detection.The experimental results show that the track line detection method designed in this paper has excellent expressiveness and accurate intrusion zone division;The hole filling KNN background difference method makes the target area more complete and has a high accuracy rate for foreign object pre judgment.The improved Mask R-CNN neural network has improved the network detection accuracy and speed.By analyzing the movement direction of the foreign object mask,it achieves tracking control of the movement direction of the foreign object,and achieves good detection results. |