## 4 Results and Discussion
### Ablation Experiment  
The detection result of the belt edge line depends heavily on the detection result of the belt edge region. In order to ensure that the diagonal vertices of the prediction box always fall on the belt edge, we explored the effect of the attention mechanism in improving the detection accuracy. As mentioned earlier, we introduced three different types of attention mechanisms (SENet, ECA, and CBAM) at three locations in the backbone, as shown in Figure 4. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Model** & **Parameters** & **Calculations/(GFLOPs)** & **Inference Speed/(FPS)** \\ \hline Yolov5-s & 7,066,239 & 16.4 & 67.7 \\ Yolov5-m & 21,060,447 & 50.4 & 56 \\ Yolov5-l & 46,636,735 & 114.3 & 41.52 \\ Yolov5-x & 87,251,103 & 217.3 & 33.11 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Comparison of parameters, calculations, and speed of networks with different complexity. Figure 7: Loss and accuracy changes during network training: (**a**) loss change on the training set, (**b**) loss change on the validation set, (**c**) change in mAP0.5, (**d**) change in mAP0.5:0.95. A \"Y\" in Table 4 indicates that the appropriate attention mechanism has been added after the CSP block at that location, while an \"N\" indicates that the attention mechanism has not been added. Since there are three candidate positions (B1-B3) and three attention mechanisms (SENet, ECA, and CBAM), there are a total of 18 possibilities, as shown in Table 4.  
Comparing the data in Tables 3 and 4, it can be seen that all Yolov5-s networks with the addition of the attention mechanism have a small increase in the number of parameters, among which the CBAM attention mechanism has the most significant increase, followed  
Figure 8: Visualization of the effect of the attention mechanism on network feature extraction. by SENet and, finally, ECA. At the same time, in the comparison of the other performance parameters, CBAM has a more significant increase in the number of parameters, which also leads to a decrease in the inference speed, with the fastest prediction speed of only around 51 FPS. However, the prediction accuracy does not change significantly, and the amount of computation and the processing speed of the SENet and ECA attention mechanisms do not change significantly because the number of parameters does not change significantly. Comparing the influence of the attention mechanisms at different numbers and locations, it can be seen that introducing three attention mechanisms into the backbone feature extraction network produces the largest processing speed loss compared to introducing one or two attention mechanisms; at the same time, separately introducing the attention mechanism at position 2 or position 3 has relatively little impact on the inference speed. The results presented in Figure 8 visualize the effect of the attention mechanism using the Grad-CAM technique, with the red part of the figure indicating where the network's attention lies, i.e., where the network prefers to use the image features at that location for target detection. In the image, \"YYY\" indicates that the attention mechanism was added to B1, B2, and B3, while \"NNN\" indicates that no attention mechanism was added to backbone B1, B2, or B3. The feature distribution that the network tends to use without adding the attention mechanism is shown in the image of \"NNN\". In this case, to detect the left belt edge, the feature information that the network tends to use is mostly concentrated at the top and bottom of the annotation box but seldom distributed in the interior of the annotation box. To detect the right belt edge, the feature information used is mainly distributed in the upper right corner of the annotation box.