## 2 Materials and Methods
### CBAM Hybrid Attention Mechanism  
In terms of low-quality facial images, the dataset contains low-resolution or noisy images; that is, images where the boundaries between the facial features and the background are blurred. Hence, this is helpful for cases where it is difficult to interpose features in the same image with multiple types of facial features, even leading to large-magnitude variations at different in the same cases of image types. To address these problems, in this paper, the CBAM Hybrid Attention Mechanism is embedded into the detection framework. Figure 3: **Programmable gradient information architecture diagram**. This structure optimizes gradient flow and adjusts gradient utilization, improving training efficiency, stability, and object detection accuracy, especially in complex input environments. This mined and integrated feature information, which are crucial for facial detection, allows the model to concentrate more on these key features, enabling feature fusion. A deep learning attention mechanism CBAM [24] is based on the idea of inferring attention maps in channel and spatial dimensions independently from the input feature map. Attention maps are then applied on the input feature map to refine the features based on the attention. Figure 4: **General efficient layer aggregation network structure diagram. This structure improves the model’s computational efficiency and detection accuracy by optimizing feature extraction, reducing computational resource consumption, and enhancing multi-scale detection capabilities, especially demonstrating stronger adaptability in complex and dynamic environments. **  
The CBAM embodies two main components: the Channel Attention Module and the Spatial Attention Module (as shown in Figure 5a. The channel attention is followed by a spatial attention. This sequence enables the model to effectively capture and utilize feature information from multiple dimensions, enhancing its capacity to recognize relevant characteristics within images. The entire process of the attention mechanism can be represented by the following equation:  
\[F^{\prime}=M_{c}(F)\otimes F \tag{1}\]  
\[F^{\prime\prime}=M_{s}(F^{\prime})\otimes F^{\prime} \tag{2}\]  
In the above expression, \(\otimes\) denotes the element-wise multiplication operation. \(F\) indicates the input feature representation at the beginning of the process, \(F^{\prime}\) refers to the feature map generated after passing through the channel attention mechanism, and \(F^{\prime\prime}\) denotes the resulting feature map obtained following passing through the attention across spatial dimensions module. \(M_{c}(F)\) indicates the output \(F^{\prime}\) produced by the attention  
Figure 5: **CBAM attention mechanism architecture diagram. ** (**a**) The CBAM (Convolutional Block Attention Module) combines channel and spatial attention mechanisms to enhance model performance by highlighting important features and suppressing irrelevant ones. It consists of two modules: (**b**) the Channel Attention Module, which models channel dependencies and generates the channel attention map; (**c**) and the Spatial Attention Module, which models spatial dependencies and generates the spatial attention map. The input features are element-wise multiplied by the two attention maps to produce enhanced output features. mechanism for channel-wise features after processing the visual feature matrix \(F\), while \(M_{\text{s}}(F^{\prime})\) represents the output \(F^{\prime\prime}\) generated through the spatial attention mechanism after processing the visual feature matrix \(F^{\prime}\). As shown in Figure 5b, this part is the channel attention module. Initially, the input visual feature matrix \(F\), characterized by dimensions of \(H\times W\times C\) (where \(C\) represents the channel count, while \(\text{H}\) and \(\text{W}\) denote the image's height and width, respectively), is processed.