## 3 Approach  
### Two-Level Attention Model  
B-CNN [31] obtained a second-order feature representation through a bilinear structure, which makes it advantageous in fine-grained image classification tasks. We embraced this observation and adopted a multi-block two-branch structure model in this study. Combined with the characteristics of fine-grained images, we built a convolutional neural network of the two-level attention model (TA-model). The first branch of each block captures pixel-level attention, and the other branch locks object-level attention. As B-CNN obtains second-order features by multiplying pair-wise feature matrixes, the computational complexity is extremely high. In this paper, the SORT [34] method is used for the two-level attention feature fusion. The TA-block structure is shown in Figure 1.  
The dotted box in Figure 1 represents a two-level attention block (TA-block). The TA-model is composed of multiple TA-blocks. The upper half of the dashed box shows pixel-level feature attention,  
Figure 1: The structure schematic of the two-level attention block (TA-block). \(X_{in}\) represents the input feature maps of TA-model, and \(X_{1}\) is obtained by \(X_{in}\) through a convolution operation, where the convolution kernel is \(K_{a}\) = [\(K_{a1}\), \(K_{a2}\),..., \(K_{a2}\)]:  
\[X_{1}=ConV(K_{a},X_{in})=\sum_{i=1}^{c2}K_{ai}\odot X_{in} \tag{1}\]  
where \(\odot\) indicates the convolution operation, and the number of feature channels is increased from \(c1\) to \(c2\). Next, U consists of three parts, which integrates the self-learning feature map of LIR-CNN [24] and the maximum and average channel pooling feature maps of CBAM [25]. They are implemented by Equations (2)-(5), respectively. \[U_{1}=ConV(K_{b},X_{1})=K_{b1}\odot X_{1} \tag{2}\]  
\[U_{2}=MaxPool(X_{1},axis=3) \tag{3}\]  
\[U_{3}=AvgPool(X_{1},axis=3) \tag{4}\]  
\[U=Relu(Concat(U_{1},U_{2},U_{3})) \tag{5}\]  
where \(K_{b}\) = [\(K_{b1}\)] shows that there is only one convolution kernel, and the convolution result is a feature map of a single channel. \"MaxPool(\(\ast\))\" and \"AvgPool(\(\ast\))\", respectively, represent the max-pooling and average-pooling operations along the feature channel direction (\"axis = 3\"). The Relu activation function guarantees the non-linearity and sparsity of the network. The \"Concat(\(\ast\))\" function means that \(U_{1}\), \(U_{2}\), and \(U_{3}\) are stacked along the feature channel direction. \[U^{{}^{\prime}}=Sigmoid(Conv(K_{c},U))=Sigmoid(K_{c1}\odot U) \tag{6}\]  
where \(K_{c}\) = [\(K_{c1}\)] is also a single convolution kernel. After the convolution operation, \(U\) is activated by the Sigmoid function to obtain a two-dimensional table \(U^{\prime}\) with a value range of [0-1]. This table records the importance of each pixel in the image. Then, we multiply this table by the position corresponding to \(X_{1}\), as in Equation (7). \[X_{1}^{{}^{\prime}}=Multiply(U^{{}^{\prime}},X_{1})=U^{{}^{\prime}}\otimes X_ {1} \tag{7}\]  
\[\widetilde{X}_{1}=Add(X_{1}^{{}^{\prime}},X_{1})=X_{1}^{{}^{\prime}}\oplus X_ {1} \tag{8}\]  
where \(\otimes\) indicates that the corresponding position of each feature channel is multiplied by \(U^{\prime}\), and \(X_{1}^{\prime}\) is the feature map after being processed by the pixel-level attention. As the ResNet structure is used in this paper, \(\widetilde{X}_{1}\) is obtained by adding the corresponding positions of \(X_{1}\) and \(X_{1}^{\prime}\), where \(\oplus\) indicates matrix addition. The lower half of the dashed box indicates the object-level features. First, we calculate the importance of each feature channel for the final classification result, and then assign these importance factors to the corresponding feature channels. Finally, according to the design of the ResNet structure, we sum the feature maps before and after the TA-model processing. Equations 9-16 illustrate the steps to achieve this process.