# Research on Improved Bridge Surface Disease Detection Algorithm Based on YOLOv7-Tiny-DBB
## 2 Principles of the YOLOv7-Tiny Algorithm  
The YOLO algorithm is widely utilized in object recognition and localization due to its advantages of high detection accuracy and fast processing speed. With the continuous advancement of object detection technology, the network architecture of the YOLO algorithm has also undergone ongoing improvements and optimizations. For instance, the YOLOv7 model introduces reparameterization into its network structure, proposing a novel ELAN efficient network architecture that enhances both the accuracy and efficiency of object detection. The YOLOv7 [23, 24] network architecture identifies targets by first performing feature extraction to capture key information from the input image. Subsequently, it conducts feature fusion at different levels to enhance the expressive capability of the features. Finally, based on these fused features, it predicts the characteristics of objects corresponding to prior boxes, including object categories, locations, and confidence scores. This process effectively realizes the entire workflow from image input to object detection output. Furthermore, YOLOv7 employs BCE With Logits Loss for calculating both class confidence loss and object confidence loss, while the CIoU loss function is utilized for coordinate regression loss. Although the YOLOv7 algorithm achieves a further improvement in accuracy, its network structure is overly complex, resulting in a substantial number of parameters and high-performance requirements for the hardware. Consequently, it is not suitable for deployment on edge terminal devices.  
The YOLOv7-Tiny network is a simplified version of the YOLOv7 architecture, which reduces the number of model parameters [25]. It is designed as a compact model for the edge GPU computing devices, effectively balancing detection accuracy and real-time performance. The network structure is illustrated in Figure 1.  
In the backbone network section, YOLOv7-Tiny replaces the activation function in the YOLOv7 CBS module with Leaky ReLU. This modification not only mitigates issues related to gradient vanishing caused by excessively large or small data values but also alleviates problems associated with insufficient activation values that hinder the updating of neuron parameters [26; 27]. On the other hand, it employs a more streamlined ELAN (Efficient Long-Distance Attention Network)-Tiny module, eliminating the convolution operations present in MPConv and solely performing MaxPooling for downsampling. In the feature fusion network, the SPPCSP spatial pyramid pooling module is still utilized to enlarge the receptive field, thereby providing richer feature maps as input to the Neck layer. It also retains the PAFPN (Pyramid Aggregation Feature Pyramid Network) structure to achieve feature fusion. At the prediction end, the CBL (Conv-BN-Leaky ReLU) module is employed in place of REPConv (Re-parameterized Convolution) to adjust the number of channels and output the prediction results.  
Compared to the YOLOv7 algorithm, YOLOv7-Tiny employs a significant amount of ELAN-Tiny in its backbone feature extraction network. This results in fewer network layers, which is not conducive to the extraction of multiple features related to bridge diseases. Consequently, there is a noticeable reduction in both parameter count and computational load, leading to a decline in detection accuracy. Therefore, to achieve rapid and accurate detection of surface diseases on bridges, it is necessary to improve the YOLOv7-Tiny algorithm.