## 2 Materials and Methods
### Bidirectional Feature Pyramid Network  
A particularly significant technical challenge in the field of safety helmet and reflective clothing detection lies in the extreme inconsistency of feature scales. This necessitates not only tackling the detection challenges posed by small targets such as safety helmets, but also accurately identifying large-scale targets like reflective clothing. In complex real-world scenarios, a single image can contain dense crowds, leading to mutual occlusion among individuals. Moreover, the diversity of environmental factors further complicates the detection task. Consequently, achieving effective feature fusion across multiple scales is crucial for enhancing detection accuracy. Traditional single-layer feature fusion methods are often constrained by their limited field of view, overlooking the complementarity between features at different levels, which inevitably compromises detection accuracy to some degree. While blindly increasing the number of fusion layers might potentially improve performance, it also leads to a significant rise in computational complexity, imposing stricter requirements on computing resources, which is particularly undesirable in resource-constrained deployment environments.  
In light of these issues, this article introduces an innovative solution: replacing the original PAN (Path Aggregation Network) structure with the more efficient BiFPN (Bidirectional Feature Pyramid Network) structure. The BiFPN, leveraging its unique bidirectional cross-scale connections and weighted feature fusion mechanism, not only bolsters the network's capacity to capture multi-scale features but also facilitates a more comprehensive and balanced dissemination of feature information. This advancement not only elevates the detection accuracy of safety helmets and reflective clothing across various scales but also effectively mitigates computational costs by optimizing the computational path. As a result, the model remains highly performant while being more adaptable to the computational resource constraints encountered in actual deployment scenarios.  
The BiFPN (Bidirectional Feature Pyramid Network) employed in this algorithm [22] supersedes the conventional PAN (Path Aggregation Network) structure, addressing several issues. The key enhancements are outlined below:  
Firstly, nodes with a single input edge are eliminated, a strategic move aimed at minimizing unnecessary computations and optimizing the algorithm's computational efficiency. Secondly, when the initial input and output nodes reside on the same layer, the number of connecting edges is augmented by one, enhancing information flow. Thirdly,in the presence of a bidirectional path, this path is reiterated multiple times as a feature network layer, further enriching feature representation.  
A structural comparison is presented in Figure 4. The traditional FPN (Feature Pyramid Network), as depicted in Figure 4, relies solely on top-down fusion, which can be restrictive due to its unidirectional information flow. In contrast, the YOLOv8 structure, as illustrated in Figure 4, incorporates a PAN, adding a bottom-up operation to the FPN layer. However, when fusing features across different levels, it adopts a relatively straightforward approach, primarily through summarization, treating features of varying sizes uniformly. This approach may not be optimal for the diverse processing needs of different layer features, particularly for safety helmets and reflective clothing detection.  
The BiFPN structure in SDCB-YOLO, as showcased in Figure 3, excels in providing nuanced attention and processing at multiple scales and levels. It achieves weighted influence for the fused feature maps, dynamically adjusting based on feature maps of different resolutions. This enables the model to better capture and represent the intricate characteristics of safety helmets and reflective clothing, enhancing overall detection performance.