# Deep Learning (Fast R-CNN)-Based Evaluation of Rail Surface Defects
## 5 Rail Surface Damage Deep Learning Model
### Experimental Result  
This study obtained the _Precision_-_Recall_ curve by calculation, as shown in Figure 13. The ordinate and abscissa represent the _Precision_ and _Recall_, respectively. Furthermore, in the case of multiple object classes, the performance of the algorithm is evaluated by calculating the average precision (AP) for each class and then summing them all up, which is then divided by the number of object classes. This is referred to as the mean average precision (mAP). The suitability of the deep learning model is evaluated as shown in Figure 13. The model's precision is high, but if the recall is low, although the model may accurately classify objects as correct, it may only classify a subset of the correct predictions. Therefore, while it is accurate to classify it as rail surface damage, there is a high likelihood that it is not a crack but something else. The model exhibits high recall but low precision, meaning that it correctly classifies a majority of the true positives but also misclassifies many false positives. The configured dataset was analyzed for the ratio of mAP.  
In this study, test results between SVM and Fast R-CNN were compared, as shown in Table 6. The analysis results using the SVM model demonstrated that Headcheck_A and Headcheck_B exhibited analysis scores of 72% and 70.1%, respectively.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline  & \multicolumn{3}{c}{**Correct Answer**} \\  & **True** & **False** \\ \hline \multirow{2}{*}{Classification result} & True & True Positive & False Positive \\  & False & False Negative & True Negative \\ \hline \hline \end{tabular}
\end{table}
Table 5: Confusion matrix.  
Spalling_A and Spalling_B were analyzed and were observed to exhibit values of 58.4% and 68.2%, respectively. The deep learning model used in this study was employed to analyze the rail surface damage images for the entire class. The mean average precision (mAP) value was 67.2%. Therefore, the suitability of this model as a detector for rail surface cracks has been analyzed to be low.  
The analysis results using the Fast R-CNN model exhibited high accuracy for Headcheck_A and Headcheck_B, yielding values of 99.4% and 86.8%, respectively. However, in the case of Headcheck_B, the accuracy is 86.8%. During the implementation phase, acquiring additional training data is deemed necessary to achieve higher accuracy.  
Spalling_A and Spalling_B were observed to yield detection accuracies of 95.3% and 98.2%, respectively, indicating a high level of accuracy in detecting cracks. Furthermore, the image analysis of rail surface damage for the entire class using the deep learning model in this study revealed an mAP value of 94.9%. This indicates that the model's suitability has been ensured.  
A comparative analysis of SVM and Fast R-CNN reveals that the relative difference is approximately 41%, indicating that the Fast R-CNN model exhibits higher accuracy in terms of detecting rail surface defects compared to the SVM model. An analysis revealed that the Fast R-CNN model was more beneficial in terms of identifying rail surface defects.  
This study aimed to develop an application for rail surface damage that can be used in actual diagnostic tasks. To this end, the criteria for rail surface damage from the Detailed Guideline on the Performance Evaluation of Track Facilities were used to classify and integrate the training dataset. Furthermore, machine learning algorithms were used to train the evaluation criteria and convergence point for rail surface damage.  
\begin{table}
\begin{tabular}{c c c} \hline \hline  & \multicolumn{2}{c}{**Model (mAP ([EMAIL_ADDRESS]))**} \\
**Learning Data** & **Fast R-CNN** & **SVM** \\ \hline Headcheck\_A & 99.4 & 72.0 \\ Headcheck\_B & 86.8 & 70.1 \\ Spalling\_A & 95.3 & 58.4 \\ Spalling\_B & 98.2 & 68.2 \\ All classes & 94.9 & 67.2 \\ \hline \end{tabular}
\end{table}
Table 6: Comparison of test results between SVM and Fast R-CNN.  
Figure 13: Precision and recall result.