# A Robust Lightweight Network for Pedestrian Detection Based on YOLOv5-x
## 3 Method
### REP Structures Combining Structural Reparameterization Ideas  
The design of the REP (reparameterization) structure is inspired by RepVGG [28], a concept introduced by the Tsinghua University team, which proposes to use a complex structure in the training phase and a simple structure in the prediction phase to improve detection performance without increasing the complexity of the prediction network. Based on this concept, we propose the REP structure (Figure 9).  
The proposed method consists of three processes: (a) constructing the structure of the representation learning encoder in the training phase, (b) generating intermediate states during the process, and (c) designing the structure of the representation learning encoder for the prediction phase. As shown in Figure 9, the structure of the prediction network is very simple, consisting of only a 3 \(\times\) 3 convolutional block. The key to this process is to combine the convolution and BN operations into one operation and to unify all convolution operations with a 3 \(\times\) 3 convolution kernel.  
\[\mathrm{f}_{\mathrm{i,\ j}}^{\prime}=\mathrm{W}_{\mathrm{BN}}\big{(}\mathrm{ W}_{\mathrm{conv}}\mathrm{f}_{\mathrm{i,\ j}}+\mathrm{b}_{\mathrm{conv}}\big{)}+\mathrm{b}_{\mathrm{BN}} \tag{6}\]  
The first process achieves the fusion of the BN layer with the convolutional layer, as shown in Equation (6). The derivation of Equation (6) reveals that the computational form still follows the convolutional computational format, with the weights becoming \(W_{BN}\cdot W_{conv}\) and the bias term becoming \(W_{BN}\cdot b_{conv}+b_{BN}\). At the end of the training, one of these parameters can be obtained, so the constant transformation can be performed in the prediction phase to achieve the fusion of the BN layer with the convolutional layer. In the second process, all convolutions are replaced with 3 \(\times\) 3 convolutions. The idea of this operation is also relatively simple. For the 1 \(\times\) 1 convolution, 0-value padding can be performed around it without affecting the calculation results. For the places where  
Figure 9: REP module.  
no convolution is performed, the goal can be achieved by replacing them with 3 \(\times\) 3 convolutions with all weights of 1.  
Based on the above analysis, we can conclude that the REP module has a high time cost during the training phase, but only requires one 3 \(\times\) 3 convolution operation during the prediction phase, indicating that the REP module is an efficient module. As illustrated in Figure 2, the REP structure is applied between the YOLO detection head and the feature fusion network to enhance the network's complexity, enabling it to capture more complex features and improve the network's detection performance.  
Incorporating the REP module enhances network complexity during training, which, in turn, improves the network's ability to extract and recognize pedestrian features in challenging rainy weather conditions. Importantly, this enhancement in complexity does not significantly impact network inference speed during the prediction phase, thus maintaining a high-speed detection capability.