# Research on Improved Bridge Surface Disease Detection Algorithm Based on YOLOv7-Tiny-DBB
## 4 Experimental Analysis and Validation  
### Dataset and Experimental Environment  
Due to the current limitations of existing open-source datasets for bridge surface defect images, the photographic survey of bridges in Taiyuan, Xi'an, Tianjin, and Hebei Province is conducted. This effort results in a total of 1271 images, and the images of certain bridge defects are illustrated in Figure 7.  
During the process of collecting data on bridge defects, it is essential to conduct the collection based on the type of defect and detection requirements. For subtle defects in bridges, such as cracks and fine fissures, it is necessary to maintain a photographing distance within 1 to 3 m, with a resolution reaching between 0.15 and 0.20 mm per pixel to ensure that the defects are clearly visible. In contrast, for assessing the overall condition of the bridge or larger defects, the photographing distance can be extended beyond 10 m while maintaining a resolution of at least 1 mm per pixel. Furthermore, to avoid an overly  
Figure 6: YOLOv7-Tiny-DBB network architecture.  
Figure 7: Examples of structural deficiencies in bridges. (**a**) Cracks. (**b**) Exposed rebar. (**c**) Micro-cracks. (**d**) Peeling. (**e**) Multiple diseases co-exist.  
homogeneous dataset, this study also selects 583 images from the publicly available CODE-BRIM (Concrete Defect Bridge Image dataset) [36], along with an additional 1006 crack images. In total, we collect 2860 bridge surface defect images. Considering that the sample size is still insufficiently rich, data augmentation techniques are employed to expand the dataset and enhance the model's generalization capability. Firstly, to improve the model's adaptability to variations in target positioning, random horizontal or vertical translations of objects within images are applied as a form of data augmentation. Secondly, to assist the model in better recognizing targets from different angles, images are rotated within a specified angular range. Additionally, to simulate target detection scenarios under varying lighting conditions, adjustments are made to image brightness. Finally, in order to replicate potential disturbances encountered in real-world settings, random noise is added to the images. Through these data augmentation techniques--translation, rotation, noise addition, and brightness adjustment--a dataset comprising 8043 images of bridge surface defects is established. The types of defects include honeycomb, pitting, holes, wear-related damages, as well as cracks and exposed reinforcement. The sample distribution is relatively balanced to meet the experimental requirements.  
In addition, to enhance the comparability of the experimental results, the dataset is randomly divided into training and testing sets in an 80:20 ratio. In terms of hardware, the experiments are conducted on a 64-bit Windows 10 operating system, utilizing an AMD EPYC 7352 CPU and an NVIDIA GeForce RTX 3090 GPU, along with an AMD Ryzen 9 3950X 16-Core Processor running at 3.49 GHz and equipped with 64 GB of RAM. The deep learning framework employed for this study is PyTorch 2.0.1, with programming carried out using Python 3.7 software. Furthermore, the hyperparameter settings used in the experiments are presented in Table 1.  
During the experimental process, it is essential to ensure that the testing environment remains constant. The YOLOv7-Tiny algorithm and the improved YOLOv7-Tiny-DBB algorithm are trained using the same dataset. Based on the training results, an analysis of the evaluation metrics is conducted. Subsequently, the effectiveness of the proposed method is validated through testing on a dataset. A comparative analysis of the test results is conducted to evaluate the performance of the improved algorithm.