# Research on Improved Bridge Surface Disease Detection Algorithm Based on YOLOv7-Tiny-DBB
## 4 Experimental Analysis and Validation
### Experimental Results and Analysis  
#### 4.3.1 Analysis of the Training Results of the Improved Algorithm  
The two models before and after the improvement are trained separately for 300 epochs. The training results are analyzed and compared based on precision, recall, and mean Average Precision (mAP) metrics, as illustrated in Figures 8-10.  
Figure 8: Comparison of precision curves.  
Based on Figures 8 and 9, it can be observed that as the number of iterations increase, both models exhibit an upward trend in the precision and recall rates. However, from the precision comparison curve in Figure 8, it is evident that the improved YOLOv7-Tiny-DBB algorithm demonstrate a significant increase during the first 100 iterations. After reaching 100 iterations, this upward trend begins to plateau and gradually stabilize. Throughout the entire training iteration process, the YOLOv7-Tiny-DBB algorithm consistently outperform the YOLOv7-Tiny algorithm. Furthermore, as illustrated by the recall comparison curve in Figure 9, it is clear that the recall rate of the YOLOv7-Tiny-DBB algorithm remains consistently higher than that of the YOLOv7-Tiny algorithm.  
Considering the trends in the precision and recall, it can be observed from Figure 10 that throughout the entire iteration process, the mAP curve of the YOLOv7-Tiny-DBB algorithm is significantly higher than that of the YOLOv7-Tiny algorithm. This difference is particularly pronounced during the first 150 iterations. Subsequently, both algorithms exhibit a slowdown in their upward trend and gradually stabilize. The comparison indicates that by replacing the ELAN-Tiny module in YOLOv7-Tiny with the DBB module, the improved algorithm enhances multi-scale extraction of bridge damage information, thereby facilitating better learning of bridge damage features and demonstrating superior learning capability.  
The loss function is a mathematical construct used to quantify the degree of discrepancy between an algorithm's predicted values and the actual values. Generally, a smaller value of the loss function indicates better performance of the algorithm in terms of detection capabilities. The loss functions before and after the algorithm improvement are illustrated in Figure 11.  
Figure 10: The mAP curve of the training process for YOLOv7-Tiny and YOLOv7-Tiny-DBB algorithms.  
Figure 9: Comparison of recall curves.  
From Figure 11, it can be observed that as the number of iterations increased, both algorithms exhibit an overall decreasing trend in their loss functions. Throughout the training phase, the loss regression performance of the improved YOLOv7-Tiny-DBB algorithm consistently outperform that of the YOLOv7-Tiny algorithm. Notably, during the first ten iterations, the loss functions of both algorithms are nearly overlapping; however, after twenty-five iterations, the advantages of the improved algorithm gradually become apparent. This indicates that by replacing the original loss function with MPDIoU, the algorithm demonstrates effective boundary box regression predictions and enhances prediction accuracy.