# Gaze Estimation via Strip Pooling and Multi-Criss-Cross Attention Networks
## 3 Proposed SPMCCA-Net Models
### Multi-Criss-Cross Attention  
The self-attention mechanism for 2D images involves autonomous learning among feature maps to assign weights. Using the self-attention module can create global dependencies and broaden the perceptual field of the image. For the gaze estimation work using the input of face images, this is precisely what is required. However, its excessive computational complexity represents a disadvantage. As a result, this paper develops the multi-criss-cross attention module based on the criss-cross attention (CCA) module, which involves less computational complexity and a more effective criss-cross attention module. The criss-cross attention module is a deep learning module for image segmentation tasks in computer vision. In contrast to other attention modules, the criss-cross attention module generates attention maps by considering features in both row and column directions. This approach allows the model to enhance its capacity to capture contextual information, achieve similar functionality as the streak pooling module, and enhance the accuracy and robustness of gaze estimation. Figure 6 illustrates the detailed structure of the criss-cross attention (CCA) module. Figure 5: Structure of the SPbottleneck. Figure 6: Criss-Cross Attention (CCA) module structure. The criss-cross attention module works as follows:  
First, a feature map \(X\in\mathbb{R}^{C\times W\times H}\) is given, and a \(1\times 1\) convolution operation is performed to obtain \(Q\in\mathbb{R}^{C^{\prime}\times W\times H}\) and \(K\in\mathbb{R}^{C^{\prime}\times W\times H}\). \(C^{\prime}\) is the number of channels, which is less than \(C\) to reduce computational effort. An affinity operation is performed on \(Q\) and \(K\) to obtain the attention map \(A\in\mathbb{R}^{(H+W-1)\times(W\times H)}\). A further \(1\times 1\) convolution operation is performed on \(X\) to get \(V\in\mathbb{R}^{C\times W\times H}\). Finally, an aggregation operation is performed on \(A\) and \(V\). To obtain the feature map \(Y\in\mathbb{R}^{C\times W\times H}\), the result of the aggregation operation is added to the original input \(X\) for the purpose of incorporating contextual information. The purpose of the affinity operation is to obtain a channel vector at every position \(u\) on \(Q\), where \(Q_{u}\in\mathbb{R}^{1\times 1\times C^{\prime}}\). At the same time, a feature vector \(\Omega_{u}\in\mathbb{R}^{(H+W-1)\times C^{\prime}}\) can be obtained from every position in the identical column or row of position \(u\) on \(K\). \(\Omega_{i,u}\in\mathbb{R}^{1\times 1\times C^{\prime}}\) is the \(i\)th element of \(\Omega_{u}\). Thus, the affinity operation is expressed as:  
\[d_{i,u}=Q_{u}\Omega_{i,u}^{T}, \tag{5}\]  
where \(d_{i,u}\) is the degree of relevance between features \(Q_{u}\) and \(\Omega_{i,u}\), and \(i=[1,\ldots,\text{H}+\text{W}-1]\). To obtain attention map \(A\), we applied a softmax layer after the affinity operation. Similarly, \(V\in\mathbb{R}^{1\times 1\times C}\) and \(\Phi_{u}\in\mathbb{R}^{(H+W-1)\times C}\) can be obtained from \(V\) after the aggregation operation to obtain contextual information. To obtain \(Y\), feature \(X\) from the original input is added last. The aggregation operation can be expressed as:  
\[Y_{u}=\sum_{i=0}^{H+W-1}A_{i,u}\Phi_{i,u}+X_{u}, \tag{6}\]  
where \(A_{i,u}\) is a scalar value at channel \(i\) and position \(u\) in \(A\), and \(Y_{u}\) is a feature vector \(Y\in\mathbb{R}^{C\times W\times H}\) at position \(u\). We designed the multi-criss-cross attention module based on the criss-cross attention mechanism. The incoming feature map must first go through one convolution for feature extraction and a subsequent dimensional transformation before being passed through the criss-cross attention module in order for each element to establish spatial position relationships with other elements on its cross-path. When compared with the non-local module, the criss-cross attention module significantly reduces computational complexity.