# An Axial Compression Transformer for Efficient Human Pose Estimation
## 1 Introduction  
Two-dimensional (2D) human pose estimation is a crucial task in computer vision, aiming to detect and localize the keypoints of the human body from a given image. With the advancement of deep learning methods, 2D human pose estimation has achieved significant improvements in both accuracy and real-time performance, enabling its wide application in various real-world scenarios, such as motion analysis [1, 2, 3, 4, 5] and human-computer interaction [6, 7, 8, 9, 10, 11]. In the field of motion analysis, human pose estimation technology provides technical support for athletes. By capturing an athlete's posture, their technique can be analyzed to adjust its standardization and accuracy, facilitating coaches in refining technical details and customizing training plans. In virtual reality and augmented reality fields, human pose estimation technology is a crucial component for human-computer interaction. By recognizing human postures and mapping them to the virtual world, real-time human-computer interaction is enabled, enhancing immersion and interactivity. Over the last decade, Convolutional Neural Networks (CNNs) have been widely adopted for human pose estimation due to their ability to capture local features through local receptive fields, allowing them to focus on keypoint information [12, 13, 14]. However, CNNs' strong reliance on local features limits their capacity to capture global contextual information, which is crucial for accurate pose estimation as it requires a comprehensive understanding of the image content. The introduction of Transformer architectures has brought about significant breakthroughs in this field. Compared to the traditional methods, Transformers leverage their self-attention mechanism to effectively capture the relationships between different parts of an input sequence, leading to a superior performance in keypoint detection tasks (asshown in [15; 16; 17; 18; 19; 20]). Furthermore, the multi-layer self-attention mechanism enhances the model's ability to recognize complex poses. To combine the advantages of CNNs and Transformers, other researchers have proposed various hybrid architectures [21]. For instance, TransPose [22] utilizes CNNs for feature extraction and Transformers to capture global dependencies, while TokenPose [23] introduces keypoint tokens to further improve performance. However, these methods often face a high computational cost, which hinders their deployment in real-time applications. Addressing this challenge, we propose an axial compression module designed to simplify the network structure within a Transformer, while preserving crucial information, enabling efficient global modeling. Our method integrates the axial compression module into the Transformer architecture. The input data undergo lightweight processing, followed by attention calculations. Specifically, we employ average pooling operations to compress the input along both the horizontal and vertical axes, generating two matrices. These are then processed through a multi-head attention mechanism to capture the relative positional information of the keypoints. Additionally, our unique design for splitting attention heads allows for each head to focus more intently on specific directional position information (horizontal or vertical), thereby enhancing the model's understanding of the global features associated with keypoints. To recover the potentially lost local visual features during the axial compression process, we introduce a Local Enhancement Module. Specifically, after obtaining the output from the axial compression module, we calculate the residual difference between the original input and the compressed output. This residual is then subjected to average pooling dimensionality reduction, followed by multi-head self-attention operations, effectively extracting local information missed by the axial compression module. By fusing this extracted local information with the output of the axial compression module, we achieve a synergistic combination of global features and local details.