## 2 Materials and Methods
### CBAM Hybrid Attention Mechanism
Then, global pooling is applied individually to each channel of the input visual feature matrix \(F\), including both max pooling across the entire spatial dimension and pooling by computing the mean over the entire spatial dimension, which results in two distinct feature maps. These include then passed into a fully connected layer (MLP), which learns the attention weights for each channel. After processing, the feature maps are integrated to produce a new activation map. At the final stage, the channel attention features \(M_{\text{c}}\) are computed by applying a sigmoid activation function. These features are then integrated with the input feature map \(F\) by applying multiplication on an element-by-element basis, generating the updated channel attention visual feature grid \(F^{\prime}\). The process of channel attention is expressed as shown below:  
\[M_{\text{c}}(F)=\sigma\Big{(}W_{1}\Big{(}W_{0}\Big{(}F_{\text{avg}}^{\text{c}} \Big{)}\Big{)}+W_{1}(W_{0}(F_{\text{max}}^{\text{c}}))\Big{)} \tag{3}\]  
In the equation above, \(\sigma\) stands for the sigmoid activation function, \(F_{\text{max}}^{\text{c}}\) denotes the global max pooling operation, and \(F_{\text{avg}}^{\text{c}}\) corresponds to global average pooling. The terms \(W_{0}\in R^{c/r\times c}\) and \(W_{1}\in R^{c\times c/r}\) refer to the learnable weights and variables of the network. As shown in Figure 5c, this section represents the spatial feature focusing module. After being processed via the channel attention mechanism module, the output feature representation \(F^{\prime}\) undergoes the global max pooling procedure followed by global average pooling, resulting in two sets of feature maps of measurements \(H\times W\times 1\). The concatenated results are then processed through a convolutional layer to produce the spatial attention weights \(M_{\text{s}}\in R^{H\times W\times 1}\). Subsequently, the attention weights are processed using the sigmoid function, after which they are applied to the feature map \(F^{\prime}\) for spatial attention weighting, ultimately producing the final the resulting feature map generated as the output \(F^{\prime\prime}\). The formula for the focus on spatial information within the feature map process can be expressed as shown below:  
\[M_{\text{s}}(F)=\sigma\Big{(}f^{\prime\times 7}\Big{(}\Big{[}F_{\text{avg}}^{ \text{s}};F_{\text{max}}^{\text{s}}\Big{]}\Big{)}\Big{)} \tag{4}\]  
\[F^{\prime\prime}=M_{\text{s}}\big{(}F^{\prime}\big{)}\otimes F^{\prime} \tag{5}\]  
In the expression, \(\sigma\) refers to the sigmoid function, \(f^{\prime\times 7}\) represents a convolutional filter with dimensions \(7\times 7\), \(F_{\text{max}}^{\text{s}}\) represents max pooling, \(F_{\text{avg}}^{\text{s}}\) refers to average pooling, \(F^{\prime}\) represents the extracted feature representation generated by the channel-based attention mechanism, \(M_{\text{s}}(F^{\prime})\) denotes the result produced by the spatial attention module, and \(F^{\prime\prime}\) refers to the final result produced by the CBAM attention mechanism. The authors of this paper have decided to integrate the CBAM hybrid attention mechanism to the backbone network of the baseline model. By amplifying important information through both channel and spatial attention, it suppresses the expression of irrelevant information. Additionally, since this attention mechanism is a lightweight module, it does not noticeably add to the system's computational complexity.