## 6 Discussion  
According to the experimental results, CBAM modules embedded in different positions of YOLOv4 have different effects. Yolov4-3 improves accuracy, robustness, and generalization ability compared to YOLOv4 (K-means ++). Through two experiments, the effect of CBAM on the model performance is discussed. It can be found that by increasing the weight of ROI and adding the CBAM attention mechanism, the performance of the model was effectively optimized, and the detection accuracy of the model was improved. By comparing the results of YOLOv4-3, YOLOv4-H1, and YOLOv4-H2, it can be found that the model proposed by the improved embedding method had a slight improvement in AP and mAP. The effective feature information extraction and multi-scale feature fusion enabled the model to detect pavement damage better. In general, the embedded position of the CBAM module in the YOLO-3 algorithm proposed in this paper effectively improved \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**MethodsTypes** & **P (\%)** & **R (\%)** & **F1-Score (\%)** & **mAP (\%)** & **FPS (f/s)** \\ \hline YOLOv4 (K-means++) & 95.81 & 50.48 & 65.5 & 80.92 & **15.38** \\ YOLOv4B1 & 4.17 & 0.09 & 0 & 3.18 & 7.16 \\ YOLOv4B2 & 95.05 & 50.38 & 64.75 & 75.84 & 6.44 \\ YOLOv4N1 & 94.72 & 36.23 & 48.5 & 74.77 & 5.08 \\ YOLOv4N2 & 95.84 & 53.23 & 68 & **82.51** & 6.52 \\ YOLOv4H1 & 95.00 & 54.39 & 64.5 & 81.16 & 9.52 \\ YOLOv4H2 & **96.07** & **57.30** & **70.25** & 82.45 & 14.85 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison of six models with different attention modules. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**MethodsTypes** & **P (\%)** & **R (\%)** & **F1-Score (\%)** & **mAP (\%)** & **FPS (f/s)** \\ \hline YOLOv4(K-means++) & 95.81 & 50.48 & 65.5 & 80.92 & 15.38 \\ YOLOv4-1 & 95.19 & 54.95 & 69 & 81.00 & 13.81 \\ YOLOv4-2 & 94.89 & 52.46 & 67 & 81.34 & **14.06** \\ YOLOv4-3 & **96.23** & **56.22** & **70.25** & **82.95** & 13.90 \\ YOLOv4-4 & 95.60 & 56.01 & 69.75 & 81.50 & 13.93 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Average P, R, F1-Score, and mAP of each model. the detection accuracy, met the actual detection requirements, and verified the feasibility of the model. To better explain the results of the above experiments, the Grad CAM method [42] was used in this study to visualize and analyze the feature maps of different models. This is a recently proposed visualization method that uses the gradient weights obtained from backpropagation calculations to compute the importance of spatial locations in the convolutional layers. Firstly, the Grad-CAM algorithm was used to calculate the backpropagation gradient weights of the three output feature layers in YOLOv4 to obtain the visualized feature maps with three different weights. Secondly, considering that the three output feature layers were equally important in the target detection stage, the corresponding three visualization feature maps were superimposed with 1:1:1 weight (as shown in Figure 11) to more clearly demonstrate the differences in the visualization feature maps of different models. As can be seen in Figure 11, the positions of interest of the feature layers were different at different scales. Therefore, the visual feature maps can be superimposed on all six models built in Section 5.2.3 of this paper to visually compare the effect of embedding the CBAM module in different locations of the network, and the results are shown in Figure 12.  
As can be seen from Figure 12, for longitudinal cracks, both YOLOv4 and the improved models can pinpoint the target region, but the YOLOv4 model focused on the target region less than the other four improved models, while the YOLOv4-3 model focused on the target region more. The other YOLOv4-3 model can focus on the target region in the image more accurately and with less background interference.