## 3 Results and Discussion
### CBAM: Convolutional Block Attention Module  
CBAMs combine spatial attention mechanisms and channel attention mechanisms to overcome the limitations of traditional CNNs in processing information of different scales, shapes, and directions [24]. Compared with the traditional channel attention mechanism, the CBAM pays special attention to the sequential relationship between feature graph channels. At the spatial level, the CBAM enables the neural network to focus on the pixel regions in the image that play a decisive role in the classification result while focusing less on regions that contribute to the classification. At the channel level, the CBAM is used to process the weight distribution between the feature graph channels to ensure that the model can effectively use the information of different channels. The CBAM significantly improves model performance when applied simultaneously at both the spatial and channel levels. Compared with the SE (Squeeze-and-Excitation) attention mechanism, the CBAM  
Figure 7: ShuffleNet V2 basic unit.  
attention mechanism not only adopts average pooling but also adopts maximum pooling, which reduces the information loss caused by pooling to a certain extent, making the CBAM more advantageous when dealing with complex problems [25].  
As shown in Figure 8, the CBAM attention mechanism first conducts a global maximum pooled downsampling and a global average pooled downsampling for input feature \(\mathbf{F}\), and \(\mathbf{F}\) changes from the original \(H\times W\times C\) to two \(1\times 1\times C\) feature maps, and then these two feature maps are input into the fully connected multilayer perceptron, and finally, two \(1\times 1\times C\) feature maps are output. After obtaining these two feature maps, the sigmoid activation function is used to limit the maps' amplitude between 0 and 1, which is the same as that in channel attention, i.e., \(\mathbf{M_{c}}\) in the figure; the size is \(1\times 1\times C\), and the formula is as follows:  
\[\mathbf{M_{c}}(\mathbf{F})=\sigma(MLP(Avgpool(\mathbf{F})+MLP(Maxpool(\mathbf{F}))) \tag{1}\]  
After the feature graph \(\mathbf{M_{c}}\) is obtained, it is not directly input into the spatial attention mechanism, but the feature graph \(\mathbf{F_{c}}\) is obtained by multiplying \(\mathbf{F}\) and \(\mathbf{M_{c}}\). The size of \(\mathbf{F_{c}}\) is the same as \(\mathbf{F}\), both of which are \(H\times W\times C\). Then, the spatial attention mechanism obtains an \(H\times W\times 2\) feature graph through a global maximum pooling subsampling and a global average pooling subsampling and then obtains an \(H\times W\times 1\) feature graph through a convolution and finally limits its amplitude between 0 and 1 through a sigmoid activation function to obtain the final \(\mathbf{M_{s}}\). Its dimensions are \(H\times W\times 1\). Finally, the resulting \(\mathbf{F_{c}}\) is multiplied by \(\mathbf{M_{s}}\) to obtain the final output feature \(\mathbf{F_{cs}}\), the size of which is also \(H\times W\times C\).  
\[\mathbf{M_{s}}(\mathbf{F})=\sigma(f^{\gamma\times 7}(Avgpool(\mathbf{F})+MLP(Maxpool(\mathbf{F}))) \tag{2}\]  
where \(f^{\gamma\times 7}\) represents the convolution kernel of \(7\times 7\).