# An Improved High-Resolution Network-Based Method for Yoga-Pose Estimation
## 3 Structure of the SEPAM_HRNet Model
### SEPAM Module  
Existing attention modules have limitations in capturing global information, establishing long-term information dependencies, and effectively utilizing information at different scales in feature space. To overcome these limitations, this paper proposes a lightweight squeeze-and-excitation and pixel-attention-mask (SEPAM) module, which can capture precise location information and areas of interest in the spatial direction, while obtaining  
Figure 1: Structure of SEPAM_HRNet model. SEPAM_HRNe starts with a high-resolution branch and gradually adds high-resolution streams to low-resolution streams as the main body. The main body has a series of stages, each containing parallel multi-resolution streams and repeated multi-resolution fusion. feature information between channels. The SEPAM module sequentially implements three functions of feature extraction at different scales, the channel attention module and the pixel-attention-mask module. This has important implications for the network's feature representation and task-performance improvement. The specific structure of the SEPAM module is shown in Figure 2.  
The steps for the SEPAM module are as follows. 1. Feature map split. The input feature map X is averaged in the channel dimension to obtain four parts of the feature map, X\({}_{1}\), X\({}_{2}\), X\({}_{3}\), and X\({}_{4}\). Each part of the feature map X\({}_{1}\) maintains the same resolution, and the number of channels becomes one-fourth of the original number of channels. 2. Multi-scale feature map acquisition. Features of various scales are retrieved for the feature maps X\({}_{i}\) (i = 1, 2, 3, and 4) of the divided four branches using various convolutional kernel sizes K\({}_{i}\) (i = 1, 2, 3, and 4), resulting in four feature maps of the same size and with the same number of channels, C/4. To deal with the input tensor at various kernel scales without increasing the computational cost, a group convolution operation is used for the feature maps of the four divided branches. The group size is computed as Group\({}_{i}\) = 2 exp((K\({}_{i}-1)/2\)), according to the size of the convolution kernel K\({}_{i}\) for each branch, and these feature maps can be directly spliced in the convolution kernels of the other branches. 3. Generating attention weights. The feature maps generated from each branch in Step 2 are passed through the SE channel attention module and the pixel-attention-mask (PAM) module to obtain the attention weights in the channel and spatial pixel directions, respectively. According to the idea of CBAM [6], this paper also adopts the parallel connection of two attention modules. 4. Concatenating attention weights. The channel attention vectors and the pixel-attention-mask maps obtained in Step 3 are concatenated separately to realize the interaction of the attention information and the fusion of the cross-dimensional information, and then a softmax operation is performed to complete the recalibration of the channel-attention vectors and the pixel-attention-mask maps. 5. Output module results. The four feature maps obtained in Step 2 are spliced in the channel dimension to form a multi-scale feature map, X'. Then, the corrected attention vector and pixel-attention-mask map are applied to the feature map X', respectively. Next, the two feature maps with attention weights are summed, and the result obtained is used as the final output of the SEPAM module. Figure 2: SEPAM module structure. Blue indicates the channel attention (SE) branch, and orange indicates the pixel-attention-mask (PAM) branch. According to the SE [5], the SE channel attention first performs a global average pooling operation (AvgPool) on the input feature map (W \(\times\) H \(\times\) C) to obtain a 1 \(\times\) 1 \(\times\) C feature vector. Then, it passes through two fully connected layers.