## 2 Methods
### Feature Extraction Networks of the BE-YOLOv5S Model  
Compared with the general neural network or traditional image processing technology, the target detection algorithm based on the deep learning network theory has a deeper network layer, and the feature extraction ability is gradually strengthened. However, with the continuous deepening of the number of convolutional neural network layers, the image feature information about bridge damage continues to be lost during transmission [54]. To enable the BE-YOLOv5S network model to obtain sufficient bridge damage characteristic information and improve the robustness of the model, and aiming at the characteristics of bridge damage with inconspicuous features, diverse shapes and complex backgrounds, we use the BiFPN network structure to enhance the feature extraction part of the YOLOv5S network. Figure 1: The flow chart of BE-YOLOv5S network structure. (The data transmission process goes through Image Input, Backbone, Feature extraction Network’s and Detection Network from left to right respectively). In the YOLOv5S network, the PANet network structure is used as the feature extraction network of the image. The network structure is shown in Figure 3a. PANet first proposed a top-down and bottom-up bidirectional backbone fusion network and built a \"short-cut\" between the bottom layer and the top layer to reduce the information transmission path at the top and bottom ends. Although PANet has a certain efficiency in the transmission of information when it transmits feature information, it adopts the same transmission priority for information of different scales. Deep features often contain richer semantic information, while shallow extracted features contain relatively more detailed information (local features and positions), but PANet treats features of different depths equally to process information. For example, both the feature information passed from \(P^{3}_{out}\) through upsampling and the feature information from \(P^{5}_{in}\) are found in the \(P^{5}_{out}\) node. The feature information extracted by different feature layers is different. However, PANet processes both types of information with the same weight, ignoring the importance of deep feature information to some extent. Compared with the PANet structure of the YOLOv5S feature extraction network, in Figure 3b, the BE-YOLOv5S enhanced feature extraction network proposed in this paper adds residual connections, aiming to strengthen the feature representation ability of bridge damage through simple residual operations. As shown in Figure 3a, the nodes at the midpoints of both ends do not perform feature fusion, so the included bridge damage image feature information is less, and the final feature fusion effect is small. Therefore, it is pruned to further increase the speed of the BE-YOLOv5S model in bridge damage detection; different feature information is weighted. As mentioned above, different feature scales contain information of different importance. Through the fast normalized fusion method, the bridge damage images extracted from different scales are weighted and fused, which is defined as Equation (1) below. In Definition 1, the learning weight wi uses the ReLU activation function and takes the value \(\varepsilon\) = 0.0001 to enhance the numerical stability. Through the above operations, the characteristic information about the bridge damage is further fully integrated, and the performance of the BE-YOLOv5S bridge damage detection model is improved. Figure 2: The detailed composition of each module in the BE-YOLOv5S network structure. (**a**) CONV module, (**b**) Bottleneck module (**c**) C3 \(\times\) N module (**d**) Focus module, and (**e**) SPP module.