## 3 Method
### Improved MEAG-YOLO Model Structure
#### 3.2.2 EC2f Structure Design  
Inspired by the ELAN structure, the C2f module first extracts input image features through the CBS module. Then, the split operation differentiates various feature levels, enabling the independent extraction of multi-scale features. Next, the bottleneck module combines coarse and fine processing stages, ensuring efficient information transmission and a lower computational burden. Finally, the CBS module is used for feature fusion. The structure of the C2f module is shown in Figure 4.  
Figure 3: MSCA structure diagram. The detection of PPE encounters numerous challenges, including variable target scales, complex scenes, and vulnerability to environmental interference. While the C2f module can integrate features across different levels, it underutilizes the output features. First, the C2f module may not adequately distinguish between the quality and information content of features at coarse and fine granularities, which can impact the model's performance. Second, it struggles to completely capture the original data's features during the weighting and merging of multi-scale features. Furthermore, the C2f module demands increased computational resources for processing high-resolution feature maps, contributing to greater model complexity. To solve these problems, this study proposes a novel EC2f structure. The EC2f structure combines C2f's layer-by-layer processing with ECA's channel weight adjustment, aiming to enhance key features. This design controls model complexity and enhances feature fusion capabilities. This mechanism optimizes feature expression and fusion by dynamically adjusting channel weights. Initially, the ECA module is tailored to identify and enhance crucial feature channels, thus enhancing the model's adaptability and accuracy with complex data. Secondly, the ECA module adaptively adjusts weights based on detailed channel information. This reduces parameters and computational demand, thereby enhancing efficiency. Additionally, the integration of the ECA module boosts the capability of the EC2f structure to overcome the feature fusion limitations observed in the C2f structure. This enhancement improves key feature detection, greatly increases accuracy and robustness, and maintains a relatively balanced computational load. The EC2f structure's design significantly enhances the model's performance, particularly in complex PPE detection tasks. The EC2f structure is illustrated in Figure 5.  
Figure 4: C2f structure. Figure 5: EC2f structure diagram. However, the C2f module is insufficient for the information fusion of input features. To enhance this structure, the ECA module has been incorporated into this study. The ECA module replaces SENet's fully connected layers with \(1\times 1\) convolution layers, preventing the reduction of feature dimensions. The ECA module begins by performing global average pooling. This step involves extracting feature maps from the backbone network and calculating the average value of each channel, thereby capturing global spatial information. The structure of Global Average Pooling (GAP) is shown in Figure 6.  
The GAP structure, depicted in Figure 6, aggregates the averages of pixel points to create a compressed feature map of dimensions \(1\times 1\times C\). This map is then processed with a one-dimensional convolution kernel of size 5, as detailed in Equation (3):  
\[k=\psi(C)=\left|\frac{log_{2}(C)}{\gamma}+\frac{b}{\gamma}\right|_{dd} \tag{3}\]  
The kernel size in Equation (3) is adaptively determined based on the channel dimension by selecting the closest odd number to \(C\). \(\gamma\) and \(b\) are set to two and one, respectively. This approach allows the model to directly learn inter-channel local relationships without requiring additional parameters. The output from the one-dimensional convolution is then transformed into channel weights through an activation function. These weights are used to recalibrate the original feature map, effectively highlighting important channels and reducing the impact of less relevant ones.