Abstract
Railway transportation is the main means of transportation for people and the main way of logistics transportation, playing an important role in daily life. Therefore, the safety inspection of railway track has been widely valued. The abnormal intelligent detection of rail fasteners is the key content of rail safety detection. The traditional rail fastener detection method is based on machine learning for image recognition, such as SVM, to detect abnormal rail fasteners. But the traditional method has two defects. The first point is that the detection time is long, and the second point is that the detection accuracy is low. To solve this problem, a rail fastener anomaly detection model based on SVM optimized by IFOA algorithm is proposed. Firstly, the image of rail fastener is collected and filtered; Then, edge detection and image segmentation are performed to obtain the image of the target area; Finally, the HOG feature and LBP feature of the image are extracted, and the improved IFOA-SVM is used to recognize and classify the features, so as to achieve intelligent rail fastener anomaly detection. The experimental results show that when the IACO-SVM model is iterated to 254 times, the fitness value tends to be stable, which is 0.24. The detection accuracy of the model reaches 99.82%, which is higher than the traditional models, and can meet the work requirements of rail fastener anomaly detection. The rail fastener anomaly detection model based on SVM can improve the efficiency of rail fastener anomaly detection, and has a positive effect on the normal operation of railway transportation. However, the number of experimental samples used in the study is limited, which may lead to some errors in the experimental results. Therefore, it is necessary to increase the number of samples in subsequent studies.
Introduction
The abnormal detection of rail fastenings is an important part of the railway safety transportation detection work, which is related to the normal work of the rail, and also affects the safety of passengers’ lives and property. It is the most important part of the railway safety detection work [1]. In the safety detection of rail fastenings, the traditional method is manual detection, which is time-consuming and laborious, and has low efficiency and accuracy [2]. In addition, due to the vehicle operation, there are certain safety risks in the process of testing. In addition, in the traditional rail fastener detection, the detection results of rail safety fasteners cannot be guaranteed due to climate, weather, light, staff experience, staff working status and other factors. In general, the traditional manual detection has high cost, low efficiency, unsatisfactory detection accuracy and certain safety risks. Therefore, after the development and gradual maturity of computer vision technology, it has been introduced into the rail fastener detection to improve the detection efficiency and accuracy [3]. Support Vector Machine (SVM) is a kind of linear classifier, which is widely used in image recognition technology. It can recognize image features after training, so as to detect and classify the input image data [4]. The research combines SVM and image recognition technology to build a model and apply it to the anomaly detection of rail fastenings. However, the classification accuracy and efficiency of SVM largely depend on the values of penalty factors and kernel parameters. If the parameters are set improperly, the performance of the model will be greatly affected. In this regard, an improved fruit fly optimization algorithm (FOA) is used to find the best parameters of SVM, so as to improve the rail fastener anomaly detection model, improve the accuracy and efficiency of the model for detecting abnormal rail fasteners, and strengthen the safety of railway transportation.
Related works
In people’s daily travel and business activities, railway transportation plays a significant role. Therefore, the safety inspection of railway transportation has been highly valued. The effectiveness of railway track safety inspection is not only related to the normal operation of commercial activities and logistics, but also related to the safety of people’s lives and property. For this reason, many scholars have put forward their opinions and strategies on the safety inspection of railway tracks from different perspectives and methods. Taking London Metro as the research object, Buckley and Harrison [5] proposed a phased array rail weld inspection plan to inspect and evaluate the safety of London Metro track. Based on Fourier transform and half cycle power demodulation method, Miao et al. [6] proposed a method to detect orbital anomaly. Experiments show that the time resolution of this method can reach twice that of traditional methods. Guo et al. [7] established a system based on a mask convolutional neural networks (CNN) to identify and detect rail surface defects in order to avoid rail surface defects affecting passengers’ comfort and safety. Ramanathan et al. [8] discussed the advantages and disadvantages of several wheel crack detection methods in view of the frequent occurrence of safety accidents in Indian railways, hoping to find the most appropriate method to avoid rail safety accidents. Wang et al. [9] designed a coil based electromagnetic induction system to monitor the abnormal conditions in the rail, which improved the safety of rail operation. In order to improve the safety and efficiency of coal mine work, Tang et al. [10] proposed a rail fault detection model for the coal mine transport track, and applied the model to the rail fault detection robot, improving the detection efficiency and accuracy of rail faults. Seo et al. [11] proposed a multi-channel ultrasonic testing method to detect defects of high-speed railway, aiming at the problem that high-speed railway is frequently used and prone to defects, which improved the operation safety of high-speed railway. Based on the integer linear programming (ILP) model, Wang et al. [12] proposed a synchronous optimization method for service scheduling and train parking in the maintenance process of high-speed railway, considering long trains and short trains, thereby reducing the track pressure.
SVM is a kind of generalized linear classifier, which has a good application effect in binary classification of data. SVM is widely used in face recognition, text classification, character recognition and bioinformatics. Babu et al. [13] optimized the traditional SVM, input the histological image into the SVM, and use the optimized SVM to identify and predict colon cancer. Ahmad et al. [14] discussed the application effect of CNN and SVM in defect identification and detection of photovoltaic cell modules, and found that the accuracy of the model combining the two algorithms in defect identification of photovoltaic cell modules exceeded 90%. Chang and Fang [15] used SVM and mixed fuzzy logic methods to build a prediction model to predict the innovation performance of 3C industry, thus encouraging innovation. Sun [16] used SVM algorithm and mathematical fuzzy set to propose a new method for quantitative analysis of enterprise chain risk. The experimental results show that the accuracy and efficiency of this method are significantly better than traditional methods. Tang et al. [17] used multi-channel PPG signals to input into the SVM model, and trained the SVM to obtain a heart rate measurement model, which can measure and predict the heart rate of athletes through the recognition and classification of signal features. Yao et al. [18] used an improved particle swarm optimization (PSO) algorithm to find the optimal parameter solution of SVM to achieve the optimization of SVM, and then used the optimized SVM to carry out fault diagnosis for five phase permanent magnet synchronous generators (FP-PMSGs) with third harmonic winding. Dong [19] built a prediction system based on SVM combined with heterogeneous multi-modal target recognition technology, which can predict and analyze English teaching. Zhen and Liu [20] combined Whale Optimization Algorithm (WOA) and Least Squares Support Vector Machines (LSSVM) to build WOA LLSVM algorithm, and built a model based on this algorithm to predict and analyze the gas emissions of power station boilers. Gola et al. [21] used SVM algorithm to build a model to identify the morphological parameters and structural characteristics of low carbon steel, thus realizing the objective microstructure classification of low carbon steel.
As can be seen from the above discussion, at present, there are many detection technologies for railway tracks, but the research on the detection of rail fasteners in railway tracks is almost blank. The application range of SVM is extremely wide, and it has good results in various image recognition, fault detection and classification. For this reason, SVM is used to realize the abnormal detection of rail fasteners, which can make up for the blanks in rail detection and provide guarantee for the safe operation of rails.
Anomaly detection technology of rail fasteners based on SVM
Image preprocessing and image segmentation based on mean filtering algorithm
SVM has a wide range of applications, and has a good effect in various image recognition, fault detection and classification. Therefore, it is studied to use SVM to realize the anomaly detection of rail fastenings. The detection principle of SVM for abnormal rail fasteners is: after training with a large amount of image data, the features of abnormal rail fasteners are extracted, identified and classified, and the recognition and detection results are output. However, the original rail fastener image has many problems, such as noise, uneven image size, etc., so it is necessary to preprocess the image input into the SVM. Firstly, the digital image histogram is used to process the gray value of the image to increase the contrast of the image, thereby improving the subsequent detection and recognition accuracy. The number of pixels in an image is recorded as
In Eq. (1), it
After processing the grayscale histogram of the image, it is also necessary to filter the image to avoid noise pollution in the image from affecting subsequent detection results. The median filter algorithm is a nonlinear filtering method, which has strong robustness and can meet the filtering requirements in most scenarios. However, median filtering requires that all images are templates of fixed size, which may cause the loss of image edge information. In order to preserve the edge information of the image, an adaptive median filtering algorithm is proposed, which can dynamically adjust the size of the filter during the filtering process, so as to adjust the output value and preserve the edge information of the image. The basic flow of the adaptive median filtering algorithm is shown in Fig. 1.
Basic flow of adaptive median filter algorithm.
In Fig. 1, the grayscale values of the
The adaptive median filtering algorithm judges whether the
Image segmentation of the original image of the rail fastener can extract features in the image faster, improve the processing speed of the image, and effectively improve the recognition accuracy and efficiency of abnormal rail fasteners. The research uses edge detection and region segmentation to achieve image segmentation. Edge detection refers to the detection of the edge information of the image, so as to remove irrelevant information in the image. accumulation operation. Edge detection is generally performed based on edge detection operators, among which the Sobel operator is more commonly used. The Sobel operator is to perform horizontal and vertical plane convolution of the image to obtain the brightness difference value in the two directions. Taking
The direction of the gradient value is solved using Eq. (5).
However, the Sobel operator lacks the grayscale operation of the image, and the obtained contour information may have a certain deviation. Therefore, the Canny operator is used for image edge detection, which can describe the edge of the fastener more clearly. After acquiring the edge detection image, use the grayscale change of the image to determine the position of the pillow and shoulder area, so as to segment the image and acquire the image of the rail fastener. Based on the above content, the preprocessing of the original image of the rail fastener is completed.
Image feature extraction is an important step in image recognition, and it is also the main reference standard for image recognition. The Histogram of Oriented Gradient (HOG) feature is to divide the image into several cells of the same size, and accumulate the histograms of all cells in all directions to obtain the feature description operator. The advantages of HOG feature extraction are that the data processing volume is small, the efficiency is high, and the detection accuracy can be effectively improved. In HOG feature extraction, the image gradient and cell unit gradient are shown in Fig. 2.
Image gradient and cell unit gradient.
The extraction process of the HOG feature of the rail fastener is: normalize the original image, calculate the image gradient, then normalize the gradient direction histogram, and finally connect the histogram in series to obtain the description operator of the entire fastener image, as shown in the Fig. 3.
Extraction process of hog feature of rail fastener.
In Fig. 3, the Gamma space is first normalized to reduce illumination interference. When Gamma
In Eq. (6), it Gamma represents the compression coefficient;
The vertical gradient value of this point is shown in Eq. (8).
Obtaining
In Eq. (9),
By solving the optimal hyperplane, the linear problem can be solved. In the solution of nonlinear problems, SVM can increase the dimension of the original space through the kernel function, so as to convert a nonlinear problem into a linear problem in a high-dimensional space, and then solve the optimal hyperplane. The process of mapping a nonlinear problem to a high-dimensional space and converting it to a linear problem is shown in Fig. 4.
Mapping nonlinear problems to high dimensional space.
In the identification of rail fasteners, fasteners are divided into two types, namely normal fasteners and fasteners with abnormal conditions. When training the SVM, first extract its HOG features, input the HOG features into the SVM for training, take the normal fastener image features as the positive class, and the abnormal fastener image features as the negative class, and perform detection according to the output results of the SVM.
The classification accuracy and efficiency of SVM largely depend on the value of penalty factor and kernel parameter. When the value of the penalty factor
In Eq. (11),
In Eq. (12),
At the beginning of the IFOA algorithm iteration, the moving step size is
After the first iteration, the Drosophila individuals in the IFOA algorithm are grouped according to the above method, and then searched according to their respective iteration steps, and the operation is repeated until the number of iterations reaches the set value. The basic flow of the IFOA algorithm is shown in Fig. 5.
Basic flow of IFOA algorithm.
In IFOA, with the increase of the number of iterations, the individual search step size of the excellent subgroup gradually decreases, and the individual search step size of the poor subgroup gradually increases, so that the local optimization ability of the excellent subgroup is enhanced, and the global optimization of the poor subgroup is enhanced. The search ability is enhanced, making the algorithm local and global optimization at the same time. IFOA is used to optimize the parameters of SVM, and the IFOA-SVM algorithm is constructed to optimize the classification performance of SVM.
During the experiment, it was found that a single HOG feature ignored the influence of illumination on the image, and there were some useless features with high dimensions, which had a certain impact on the classification performance of SVM. Therefore, the research first uses Principal Component Analysis (PCA) to screen the main features, so as to reduce the dimension of HOG features. Secondly, the local binary pattern (LBP) feature extraction is combined with HOG to make up for the defect that HOG is not sensitive to illumination. Through the simple cascade fusion method, the HOG feature and the LBP feature are serially combined to form a new feature, as shown in Fig. 6.
Serial combination path of hog feature and LBP feature.
Based on Fig. 6, the feature extraction of rail fasteners is optimized. Finally, combined with the above content, a detection model of abnormal rail fasteners is constructed to realize the monitoring of abnormal rail fasteners and ensure the safety of railway transportation.
In order to verify the performance of the rail fastener anomaly detection model, experiments are designed and carried out. The image dataset used in the experiment comes from the network download, a total of 5074 images. After normalizing the image size, 4074 images are used as the training sample set, and the remaining 1000 images are used as the test sample set. Image preprocessing can effectively improve the model’s classification accuracy and efficiency, and image filtering and noise reduction is an important part of image preprocessing. In order to ensure the filtering effect, an adaptive median filtering method is proposed. In order to verify the filtering effect of the adaptive median filtering algorithm, Peak Signal Noise Ratio (PSNR) and Mean Absolute Error (MAE) were used as evaluation criteria to verify the mean filtering algorithm (Algorithm 1), the median filtering algorithm (Algorithm 2) and the filtering effect of the adaptive median filtering algorithm (Algorithm 3) respectively. Using three filtering algorithms to process the same sample image data, the PSNR and MAE of the three algorithms are shown in Fig. 7.
As can be seen in Fig. 7, in the process of algorithm iteration, the PSNR of the three algorithms is increasing, and the MAE is decreasing. When the iteration reaches 200 times, the PSNR value of Algorithm 1 is 15.76 and the MAE value is 8.52; the PSNR value of Algorithm 2 is 15.05 and the MAE value is 9.75; the PSNR value of Algorithm 3 is 14.15 and the MAE value is 10.92. It can be seen that the PSNR value and MAE value of Algorithm 1 are significantly better than the other two algorithms, indicating that the filtering effect of Algorithm 1 is better. In order to further improve the classification accuracy of the model for rail fastener images, the image feature extraction method was improved, and a PCA-HOG-LBP feature extraction method was proposed. In order to verify the effectiveness of the method, the feature dimensions extracted from an image by PCA-HOG-LBP, PCA-HOG, HOG-LBP, and HOG, as well as the classification speed and classification accuracy of these features on SVM, are compared, as shown in the Table 1.
Feature extraction effect of four methods
Feature extraction effect of four methods
PSNR and Mae of three algorithms.
As can be seen in Table 1, after feature dimensionality reduction by PCA, the feature dimensionality extracted by PCA-HOG and PCA-HOG-LBP is significantly reduced compared with HOG, and the feature extraction time is greatly reduced. Among the 4 methods, PCA-HOG has the fastest image recognition speed, but the accuracy is not ideal. The PCA-HOG-LBP method has the highest accuracy and ideal recognition speed. It shows that the proposed feature extraction method has high practicability and can improve the classification accuracy and efficiency. In view of the shortcomings of the SVM model, the study proposes to use the ACO algorithm to optimize it. In order to improve the optimization effect, a strategy is proposed to optimize ACO and an IACO algorithm is constructed. In order to verify the optimization effect of IACO algorithm on SVM, IACO-SVM model and ACO-SVM model are respectively constructed for testing. The changes of fitness values of test functions of the two models during iteration are shown in Fig. 8.
Change of fitness value of test function.
Detection accuracy of three models.
As can be seen in Fig. 8, in the process of iterative update, the fitness values of both algorithms are reduced first, and then tend to be stable when they are reduced to a certain range. Among them, when the IACO-SVM model is iterated to 254 times, the fitness value tends to be stable, which is 0.24; When the ACO-SVM model is iterated to 433 times, the fitness value tends to be stable, which is 1.18. It can be seen that the fitness value of the IACO-SVM model is significantly lower than that of the ACO-SVM model, and the number of iterations used to reach the optimal fitness value is also less, which indicates that the performance of the IACO-SVM model is better than that of the ACO-SVM model. In order to verify the detection effect of the rail fastener anomaly detection model proposed in the research, the IACO-SVM model is constructed, and the IACO-SVM model is compared with two more common abnormal rail fastener detection models – HOG-CNN model and Canny-K-means model. Use the same test sample set and the same feature extraction method to extract features and input them into the model. The detection accuracy of the three models is shown in Fig. 9.
In Fig. 9, it can be seen that the accuracy of the rail fastener anomaly detection model based on the IACO-SVM model is significantly higher than that of the HOG-CNN model and the Canny-K-means model. Among them, the accuracy of IACO-SVM model in detecting abnormal rail fasteners has reached 99.52%, and the accuracy of HOG-CNN model in detecting abnormal rail fasteners is 98.55%, which is 0.97% lower than that of IACO-SVM model; The detection accuracy of Canny-K-means model for abnormal rail fasteners is 98.04%, 1.48% lower than that of IACO-SVM model. It can be concluded from the above description that the research on the rail fastener anomaly detection model based on optimized SVM has high accuracy and efficiency, has excellent performance in rail anomaly detection, and can effectively ensure the normal operation of rail transport.
Anomaly detection of rail fasteners is an important work link to ensure the normal operation of railway transportation and logistics safety. To this end, the study proposes to use computer vision technology to complete the detection of abnormal rail fasteners. Aiming at the problem that the traditional SVM classification performance is greatly affected by parameter settings, an IACO algorithm is proposed to optimize it and obtain the best parameters. Aiming at the defect that single HOG feature extraction is not sensitive to illumination and the feature dimension is high, a PCA-HOG-LBP feature extraction method is proposed, which reduces the image feature dimension and improves the subsequent classification accuracy. Based on the above content, an anomaly detection model for rail fasteners is constructed. The proposed model is trained and tested using the image sample set of rail fasteners collected by the network. The test results show that the feature dimension extracted by PCA-HOG-LBP is significantly lower than that of HOG, the feature extraction time is greatly reduced, and the classification accuracy is also greatly improved, indicating that the feature extraction method proposed in the study is effective. The detection accuracy of the rail fastener anomaly detection model based on IACO-SVM is 99.52%. Compared with the HOG-CNN model and the Canny-K-means model, the accuracy is increased by 0.97% and 1.48%, respectively. This shows that the proposed model, compared with the traditional rail fastener anomaly detection method, has higher detection accuracy and can better ensure the safe operation of the railway. To sum up, the proposed model of rail fastener anomaly detection has high accuracy and efficiency, and has excellent performance in rail anomaly detection, which can effectively ensure the normal operation of rail transportation. The number of experimental samples used in this study is limited, and the accuracy of the model will be further improved after a large number of samples are obtained subsequently. Therefore, in the subsequent research, it is necessary to increase the number of experimental data samples to further improve the performance of the model.
Footnotes
Funding
The research is supported by: China Railway Shanghai Design Institute Group Corporation Limited for its “Research on Key Technologies of railway related monitoring and development of comprehensive application platform” (No. Group-20-19).
