# Feature Augmentation Based on Pixel-Wise Attention for Rail Defect Detection
## 4 Results
### Detection Results  
We first analyze the detection results on our collected rail defect dataset. We compare the accuracy of our approach to YOLO [5], Faster R-CNN [4], AL-MDN [37], and DyHead [38] on both 8-class and 4-class detection tasks. In Tables 2 and 3, we summarize the results of the experiments performed on eight classes. In the table, numbers in bold are models with the minimum performance indices, 'R' in the backbone column is short for ResNet,'s/s6' refer to the small version of YOLOv5 without/with 4 output layers, and 'F R50/R101' refer to Faster R-CNN with ResNet 50 or ResNet 101. As shown, our proposed method performs better according to mAP@.5 and mAP@.5.95 on both the validation set and test set. The best performance is highlighted as a bold text. The mAP@.5 of our model (i.e., YOLOv56 with FA) on validation set is 11.32% better than YOLOv56 and 4.27% better than Faster R-CNN R101. Although feature augmentation calculation heavily reduces the detection speed, our proposed model can still achieve real-time detection with more than 30 fps. As a comparison, AL-MDN and DyHead also outperform traditional one-stage and two-stage baselines, and are competitive with our proposed method. Several defect detection results are shown in Figure 6. In the first row, Faster R-CNN detected an extra unknown object (a false alarm) while YOLOv5 treat the extra object to be a dirt. In the second row, the ground truth is a scratch but it can also be regarded as a dent (i.e., an ambiguous defect). Faster R-CNN identified a dent and a scratch with large position deviation. YOLOv5 failed to detect any object but with the help of feature augmentation it can identify the scratch very close to the ground truth, and also detected an extra dent. In the third row, the ground truth contained a labeled dent, a labeled dirt, and an unlabeled gap. Faster R-CNN and our model can identify the unlabeled gap, while Faster R-CNN mistakenly identified an extra dirt. The precision-recall curves are illustrated in Figure 7. \begin{table}
\begin{tabular}{l l l l} \hline \hline
**Model** & **Backbone** & **mAP@.5** & **mAP@.5.95** \\ \hline \hline _8 defect classes_ & & & \\ \hline YOLOv5 + FA (ours) & s & 0.8462 & 0.3724 \\ YOLOv5 + FA (ours) & s6 & 0.8643 & **0.4232** \\ YOLOv6 + FA (ours) & s & **0.8714** & 0.3911 \\ \hline YOLOv5 [42] & s & 0.8371 & 0.3206 \\ YOLOv5 [42] & s6 & 0.8316 & 0.3476 \\ YOLOv6 [43] & s & 0.8417 & 0.3595 \\ Faster R-CNN [4] & R50 & 0.8351 & 0.3447 \\ Faster R-CNN [4] & R101 & 0.8402 & 0.3366 \\ AL-MDN [37] & VGG16 & 0.8545 & 0.3772 \\ DyHead [38] & RetinaNet & 0.8513 & 0.3817 \\ DyHead [38] & F R50 & 0.8527 & 0.3833 \\ DyHead [38] & F R101 & 0.8535 & 0.3851 \\ \hline \hline _4 defect classes_ & & & \\ \hline YOLOv5 + FA (ours) & s & 0.8856 & 0.4557 \\ YOLOv5 + FA (ours) & s6 & **0.8992** & 0.4979 \\ YOLOv6 + FA (ours) & s & 0.8878 & **0.5011** \\ \hline YOLOv5 [42] & s & 0.8989 & 0.4622 \\ YOLOv5 [42] & s6 & 0.8966 & 0.4659 \\ YOLOv6 [43] & s & 0.8981 & 0.4730 \\ Faster R-CNN [4] & R50 & 0.8779 & 0.4642 \\ Faster R-CNN [4] & R101 & 0.8916 & 0.4760 \\ AL-MDN [37] & VGG16 & 0.8947 & 0.4861 \\ DyHead [38] & RetinaNet R50 & 0.8941 & 0.4903 \\ DyHead [38] & F R50 & 0.8965 & 0.4967 \\ DyHead [38] & F R101 & 0.8932 & 0.4839 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Detection results of different methods over the rail defect validation dataset. Figure 6: Detection result concerning 8 classes. The four columns corresponds to (**a**) ground truth, (**b**) Faster R-CNN-R101, (**c**) YOLOv5s6, and (**d**) YOLOv5s6 with the proposed FA. Three rows are three different test images.