Learning Based Experimental Approach For Condition Monitoring Using Laser Cameras In Railway Tracks

Detecting the rail surface faults is one of the most important components of railway inspection process which should be performed periodically. Today, the railway inspection process is commonly performed using computer vision. Performing railway inspection based on image processing can lead to false-positive results. The fact that the oil and dust residues occurring on railway surfaces can be detected as an error by the image processing software can lead to loss of time and additional costs in the railway maintenance process. In this study, a hardware and software architecture are presented to perform railway surface inspection using 3D laser cameras. The use of 3D laser cameras in railway inspection process provides high accuracy rates in real time. The reading rate of laser cameras to read up to 25.000 profiles per second is another important advantage provided in real time railway inspection. Consequently, a computer vision-based approach in which 3D laser cameras that could allow for contactless and fast detection of the railway surface and lateral defects such as fracture, scouring and wear with high accuracy are used in the railway inspection process was proposed in the study.


Introduction
In industrial applications, it is necessary to conduct activities such as maintenance, condition monitoring and fault detection as well as production.In recent years, these operations are commonly conducted using computer vision [1].Computer vision ensures that these operations are conducted fast with high accuracy and without human dependence.Due to all these advantages offered by it, the maintenance, monitoring and fault detection conducted using computer vision are also commonly used in railway rail inspection as in other fields of the industry [2].Rail transportation systems are widely used all around the world.The anomalies that could occur or are present on railway can lead to both troubles and financial losses and accidents in the transportation system.Therefore, the rail line should be checked periodically [3].Today, the rail inspection operation is basically divided into two groups as contact and contactless methods.The simplest method of inspecting is that an expert visually inspects the rail line with mechanical measuring instruments.This method is limited by very slow, low accuracy specialized knowledge inspecting the rail line [4].Another one of the contact methods is performing the rail inspection with ultrasonic devices.Fault detection is conducted by analyzing the data and graphics obtained by the friction of the mechanical device which is moved along the rail line to the railway rail line [4].These inspection process is slow and provides low accuracy.Its most important disadvantage is that the mechanical device can increase the existing fault on the rail line or new faults may occur because of the device's necessity of friction to the rail line during inspection.Another one of the contact methods is performing the rail inspection with ultrasonic devices.Fault detection is conducted by analyzing the data and graphics obtained by the friction of the mechanical device which is moved along the rail line to the railway rail line [4].Its most important disadvantage is that the mechanical device can increase the existing fault on the rail line or new faults may occur because of the device's necessity of friction to the rail line during inspection.Although contact methods are low-cost, they have significant disadvantages because they do not have high accuracy ratios and the inspection process is long.Today, rail inspection operation can be performed rapidly as contactless and with high accuracy using computer vision.The long rail lines can be inspected real-timely in the contactless rail inspection operation that uses the computer vision.The inspection operation consists of the steps of determining the components of the rail line and the deficiency (such as missing traverse and bolt) or anomaly conditions in these components [7][8][9][10][11][12][13]. The rail inspection applications in which light source and high resolution cameras are used may lead to the generation of false  positive results by detecting the stains formed by oil and dust particles on the rail line as anomaly in addition to high accuracy ratios and real-time operating speeds [8].When three-dimensional laser cameras are compared with normal cameras, they involve both rgb data and precise distance information on the two-dimensional plane.Because of these features, they are widely used with the aim of finding faults in industrial products including rail inspection [9][10][11][12].Although the cost rail inspection with 3-d cameras is higher, it is the most advantageous method in terms of accuracy rate and operating speed.The general components of a 3D computer vision-based rail inspection operation are seen in Fig. 1.The rail inspection methods are comparatively presented with their specific advantages and disadvantages in Table I [4].A typical rail inspection application running based on computer vision includes the following steps respectively [7].
Preprocessing: It includes the steps of preprocessing the camera data that constitute the input of the system for noise removal and similar purposes.

3D Laser Cameras And Getting 3D Data
The standard cameras operating with sensors such as Ccd and Cmos give two-dimensional image on x-y plane.This image is called as three-dimensional if it includes the depth information on the z plane.The methods of stereovision, time of flight and laser triangulation are used in obtaining three-dimensional image [14].Stereo vision technique is the same as the principle of human vision.It is based on the principle of finding the pixel distance by measuring the projections of each pixel on two separate cameras by geometric methods because the distance and angle between cameras are known in imaging which is performed using two separate calibrated cameras.Although it is low cost, the accuracy performances depend on calibration and the sensitivity of camera parameters [15].Time of flight cameras containing both rgb camera and an infrared sensor get depth information as well as rgb information by measuring the flight time of the infrared waves.They are particularly used in applications such as game consoles, virtual reality and three-dimensional modeling.They have cost effective and low accuracy solutions [14,15].Another method used in obtaining three-dimensional image is the use of laser cameras [16].Laser cameras consist of a calibrated camera and laser line source as shown in Fig. 2.These components are usually integrated products.The system builds up the three-dimensional profile of the object by benefiting from the profile change in the laser line via constantly taking pictures.The object needs to move in a controlled manner while performing the profiling process in moving objects with laser cameras.How much the object has moved is determined by means of an encoder.

a) AT C5 laser camera b) 3D measurement of rail
The simple mathematical provision of the process of obtaining three-dimensional profile matrix by reading the rail profile can be given as in (1,2) from calibrated compact sensor as shown in Fig. 3.The typical features of 3D laser cameras by taking the AT C5-1600CS19-500 presented in the study as a reference are presented in Table II [17].

Proposed Method
The test device and the block diagram of the proposed method conducted for the system are given in Fig. 4. The proposed approach works in two stages.
In the learning stage, rail profiles that taken from laser camera are used with "healty" and "faulty" tags.First two attributes from every method of dimension reduction (Principal Component Analysis) are used in learning algorithms [18][19].The data of these two classes are educated in compliance with the Random Forest (RF) machine learning algorithm and a decision forest is RF method works fast and with high accuracy on big data and that is the main reason this method was selected.Thus, the learned model build in the training stage.In test stage, a rail which contains faulty and healthy profiles not used in the training stage.In test stage, attributes from read profiles from this railway is acquired again and the results are compared in the decision forest, the closest class is detected and a decision was made on whether there is a fault on the frame.

Experimental Results
In rail inspection operations conducted using three-dimensional laser cameras, the experimental results include the steps of calibrating the laser cameras and obtaining rail profiles by preprocessing the three-dimensional data obtained from the calibrated cameras.The obtained three-dimensional rail profiles will constitute the input data of the machine learning-based fault diagnosis algorithm.In the next step, the eigenvalue was obtained on the rail profiles by feature extraction methods, and it was labeled as faulty and healthy to be used in training algorithm.The system was trained by using Random Forest (RF) which is a classification method using multiple decision trees [20].It is one of the most suitable classification algorithms to be used in fault diagnosis since it functions rapidly even in large data sets, provides good results on lost data and generates high accuracy results.The trained system was tested by measuring the operating speed and accuracy performance on a rail line for a short time in the test phase.A total of 400 rail profiles were collected on a short rail line by the proposed system, and these profiles were trained by labeling as healthy and faulty.75% of the dataset was used in training.The remaining 25% was used for testing purposes.% 98 accuracy rate was achieved in the test phase.The receiver operating characteristic (ROC) analysis was used to obtain the accuracy performance values shown in detecting the "faulty" frames containing system anomalies and the "healthy" frames having no anomalies [18].

Conclusion
Rail transportation systems are widely used around the world.
The rail lines should be inspected periodically and their maintenance should also be performed to ensure the railway transportation safety.Today, this inspection process is commonly carried out using CVS.In this study, the software architecture is presented for a rail inspection conducted using 3D laser cameras.
In general, there are three criteria expected from a rail inspection application.These are the high accuracy results, high operating speed and the cost of the system.3D laser cameras allow for obtaining higher accuracy rate in rail inspection because they include both Rgb data and precise distance information that two-dimensional cameras have.When they are compared with normal cameras, their another advantage is that they are more susceptible to false positive result situations in oil and dust stains caused by image processing algorithms because they use distance information.
The second criterion expected in rail inspection applications is the high operating speed.Today, laser cameras are suitable for real-time operation on a real transportation device by their profile generation speed of 25.000 per second.
The third success criterion expected in rail inspection applications is the cost of the system.High speed and accuracy rates can be obtained in applications using 3D laser cameras, but their costs are higher.It is thought that this disadvantage is eliminated by their other advantages.

Figure 1 .
Figure 1.Rail inspection with 3D laser camera Dimension Reduction: It includes the processes of obtaining eigenvalue from large-scale camera data by feature extraction methods to operate real-timely.Learning: It includes the step of training the data obtained in the previous step by machine learning algorithms.Test: It includes the step of classifying the new data according to values learned by the system during training and generating diagnostic results during test or real-time inspection.Other: It includes the operations such as the evaluation of other sensor data such as accelerometer, gyroscop and encoder to be used in the system, and recording all data for system confusion matrix extraction.A study that includes the steps of calibrating the cameras, extracting three-dimensional rail profiles by taking data from cameras, obtaining eigenvalue on these profiles by feature extraction methods, and training and testing of the system by machine learning for a rail inspection application in which 2 3D laser cameras are used for the left and right surfaces of the rail line is presented in this paper.

Figure 2 .
Figure 2. Getting 3D data from AT C5-1600CS laser camera a) Block diagram of the proposed method b) Experimental tool a) Rail line which is used in experimental studies b) 3d rail profiles of rail lines

Figure 4 .
Figure 4. Experimental tool and proposed method

Table 1 :
Rail inspection methods

Table 2 .
AT