# A Robust Lightweight Network for Pedestrian Detection Based on YOLOv5-x
## 3 Method
### Proposed Simple-BiFPN Structure  
The BiFPN structure, proposed by the Google team in EfficientDet [26] and illustrated in Figure 6c, is an efficient weighted bidirectional feature pyramid network. When examining the PANet utilized in YOLOv5 (Figure 6a), it becomes apparent that node A and node B have limited impact on feature fusion due to their one-dimensional feature inputs. Consequently, BiFPN removes these nodes to minimize redundant parameters.  
Figure 5: CBP-G bottleneck layer.  
Furthermore, by introducing an extra skip connection within the same feature dimension, more features can be fused without additional computational overhead. Lastly, to optimize the one-path structure of NAS-FPN [27], BiFPN integrates both top-down and bottom-up paths into a single feature layer network.  
The solution proposed by BiFPN is to add additional weights to each input and let the network learn, evaluate the importance of each input, and assign the appropriate weight assignment. For weight fusion, BiFPN uses a fast normalized fusion strategy to ensure that the output feature representation is of high quality. It can be described in Formula (4).  
\[O=\sum_{i}\frac{\omega_{i}}{\varepsilon+\sum_{j}}\cdot I_{i} \tag{4}\]  
The training process of Simple-BiFPN involves the following steps: with an input image size of \((416,\ 416,3)\), \(P3\_in\) has dimensions of \((104,\ 104,24)\), \(P2\_in\) has dimensions of the dimensions of \((52,\ 52,40)\), and \(P3\_in\) has dimensions of \((26,\ 26,112)\). Since the YOLO detector only utilizes three scales of information, \(P4\_in(13,\ 13,160)\) is obtained through upsampling to further improve feature fusion, but is only involved in the feature fusion process and not in the final output. The Simple-BiFPN module assigns a weight \(\omega_{i}\) to each input layer and is used as an example.  
\[\begin{split} P3\_td=Conv(\frac{\omega_{1}\_P3\_in+\omega_{2} \_Resize(P4\_in)}{\omega_{1}+\omega_{2}+\varepsilon})\\ P3\_out=Conv(\frac{\omega^{\prime}_{1}\_P3\_in+\omega^{\prime} \_P3\_t}{\omega^{\prime}_{1}+\omega^{\prime}_{2}+\omega^{\prime}_{3}\_Resize( P2\_out)})\end{split} \tag{5}\]  
The operation of Resize in Equation (5) is generally done by upsampling or downsampling to achieve feature scale uniformity. \(P3\_td\) refers to the intermediate features of the layer \(P3\_in\); \(P3\_out\) refers to the output features of that layer. To further improve the feature fusion efficiency, depthwise separable convolution is also incorporated in this process. The other layers are constructed similarly to this process, utilizing depthwise separable convolution to enhance the feature fusion efficiency. The network architecture of Simple-BiFPN is illustrated in Figure 7.  
An efficient feature fusion network plays a crucial role in addressing the challenges of pedestrian detection in rainy conditions. The advantage of Simple-BiFPN lies in its seamless integration of multiscale features from different network layers, enhancing the model's ability to capture pedestrian details under adverse weather conditions. This feature fusion network optimally combines contextual information, such as object relationships and spatial dependencies, contributing to improved detection accuracy. Furthermore, it ensures that the network maintains computational efficiency, ensuring real-time or near real-time performance in rainy conditions. This efficiency allows the model to remain  
Figure 6: (**a**) PANet, (**b**) NAS-FPN, (**c**) BiFPN.  
effective while efficiently utilizing hardware resources, making it a powerful choice for rainy-day pedestrian detection.