The state of angle cocks determines the air connectivity of freight trains, and detecting their state is helpful to improve the safety of the running trains. Although the current research for fault detection of angle cocks has achieved high accuracy, it only focuses on the detection of the closed state and non-closed state and treats them as normal and abnormal states, respectively. Since the non-closed state includes the fully open state and the misalignment state, while the latter may lead to brake abnormally, it is very necessary to further detect the misalignment state from the non-closed state. In this paper, we propose a coarse-to-fine localization method to achieve this goal. Firstly, the localization result of an angle cock is obtained by using the YOLOv4 model. Following that, the SVM model combined with the HOG feature of the localization result of an angle cock is used to further obtain its handle localization result. After that, the HOG feature of the sub-image only containing the handle localization result continues to be used in the SVM model to detect whether the angle cock is in the non-closed state or not. When the angle cock is in the non-closed state, its handle curve is fitted by binarization and window search, and the tilt angle of the handle is calculated by the minimum bounding rectangle. Finally, the misalignment state is detected when the tilt angle of the handle is less than the threshold. The effectiveness and robustness of the proposed method are verified by extensive experiments, and the accuracy of misalignment state detection for angle cocks reaches 96.49%.
Read full abstract