Facial acupoint detection method based on lightweight transformer and bidirectional gate

CN122715218APending Publication Date: 2026-09-08XIAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610799571.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-04
Publication Date
2026-09-08

AI Technical Summary

Technical Problem

[0005]本发明的目的是提供基于轻量级Transformer与双向门控的面部穴位检测方法,通过引入轻量级自注意力机制与双向门控融合模块,解决了现有网络在面部穴位检测中局部精度与全局上下文难以兼顾,以及模型过于臃肿的问题

Benefits of technology

(1)本发明基于轻量级Transformer与双向门控的面部穴位检测方法,设计了一种轻量级Transformer模块,通过大步长卷积对空间维度进行极限压缩,大幅降低了计算开销,使得模型能够在中低算力设备上实时、流畅地完成面部穴位追踪;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122715218A_ABST
    Figure CN122715218A_ABST
Patent Text Reader

Abstract

This invention discloses a facial acupoint detection method based on a lightweight Transformer and bidirectional gating: 1. Utilizing a backbone network containing a convolutional activation module and a residual bottleneck layer, multi-scale features of the facial image are extracted to obtain initial features; 2. The initial features are input into the convolutional branch and the downsampling global branch respectively to extract global facial anatomical structure features; 3. Using a bidirectional gating fusion module, combined with spatial and channel attention, local and global features are fused bidirectionally to obtain enhanced features; 4. The features are refined through a residual layer, and after interpolation and alignment, channel stitching is performed to output a multi-scale facial feature map; 5. The facial feature map is input into an acupoint prediction module to decode and generate the coordinates of each facial acupoint. This invention, based on a lightweight Transformer and bidirectional gating, solves the problem of existing networks struggling to balance local accuracy and global context in facial acupoint detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer vision and smart healthcare technology, specifically relating to a facial acupoint detection method based on lightweight Transformer and bidirectional gating. Background Technology

[0002] Facial acupoint detection is a key technology in the modernization of traditional Chinese medicine, intelligent health monitoring, and human-computer interaction. Unlike general facial landmark detection, facial acupoints (such as Yingxiang, Zanzhu, and Taiyang) usually lack obvious local visual texture features, and their accurate location is highly dependent on the global topological relationship between the overall facial anatomical structure and the relative positions of the facial features.

[0003] Existing methods for facial acupoint / keypoint detection mostly rely on traditional convolutional neural networks (CNNs). While CNNs are sensitive to local edges and textures, they are limited by the local receptive field of the convolutional kernels, making it difficult to fully capture global structural information of the face. This leads to acupoint localization drift when faced with exaggerated user expressions, partial occlusion, or large pose changes. In recent years, the visual Transformer has demonstrated powerful global modeling capabilities through its self-attention mechanism. However, facial acupoint detection often requires high-resolution images to ensure pixel-level localization accuracy. The increased computational complexity of the Transformer results in significant memory overhead, making real-time detection difficult on edge devices with limited computing power, such as mobile apps and smart beauty devices.

[0004] Therefore, how to design a lightweight network that takes into account both local high-precision texture and global anatomical structure to achieve accurate and real-time facial acupoint detection is a technical problem that urgently needs to be solved. Summary of the Invention

[0005] The purpose of this invention is to provide a facial acupoint detection method based on lightweight Transformer and bidirectional gating. By introducing a lightweight self-attention mechanism and a bidirectional gating fusion module, this invention solves the problems of existing networks in facial acupoint detection, such as difficulty in balancing local accuracy and global context, and excessive model bloat.

[0006] The technical solution adopted in this invention is a facial acupoint detection method based on lightweight Transformer and bidirectional gating, the specific method of which is as follows: Step 1: Using a backbone network containing convolutional activation modules and residual bottleneck layers, perform multi-scale feature extraction on facial images to obtain initial feature maps; Step 2: Input the initial features into the convolution branch and the downsampling global branch respectively to extract the global anatomical structure features of the face; Step 3: Using a bidirectional gating fusion module, combined with spatial and channel attention, local and global features are fused bidirectionally to obtain enhanced features; Step 4: Refine the features through the residual layer, and after interpolation and alignment, perform channel stitching to output a multi-scale facial feature map; Step 5: Input the facial feature map into the acupoint prediction module and decode to generate the coordinates of each facial acupoint.

[0007] The invention is further characterized by: The specific method for step 1 is as follows: Step 1.1: Receive the preprocessed facial image tensor. First, perform preliminary spatial downsampling using two consecutive convolutional activation modules with a stride of 2 and batch normalization. The spatial scale downsampling process is as follows: (1) In the formula, and These represent the first and second layers of convolution-batch normalization-activation function combination operations, respectively. Preliminary downsampling characteristics; Step 1.2: The pre-downsampled features are fed into a feature extraction stage consisting of multiple Bottlenecks. In this stage, a residual structure containing 1x1, 3x3, and 1x1 convolutions is used to extract basic local texture features of the face, ultimately outputting an initial facial feature map with 256 channels. The feature extraction process is as follows: (2) In the formula, This indicates the stage 1 feature extraction phase. This is the initial dense facial feature map for output.

[0008] The specific method for step 2 is as follows: Step 2.1: Multi-scale facial branch construction and global context encoding, performing split processing on the feature map output from Step 1; Step 2.2: The feature map is processed through a convolutional activation module with batch normalization that does not change the spatial size to generate high-resolution convolutional features with 32 channels. This is used to preserve subtle facial textures and boundaries to ensure the accuracy of acupoint localization. The high-resolution convolution steps are as follows: (3) In the formula, For a convolutional block with a stride of 1, For high-resolution local features, This represents the initial facial feature map; Step 2.3: The feature map is processed through a convolutional activation module with a stride of 2 and batch normalization to generate low-resolution convolutional features with 64 channels; the downsampling process is as follows: (4) In the formula, For downsampling module, These are low-resolution convolutional features. This represents the initial facial feature map; Step 2.4: The feature map is spatially compressed by a convolutional activation module with batch normalization and stride of 16, and then mapped using 1x1 convolution. The mapped sequence is input into a lightweight Transformer encoding layer. The Transformer performs global self-attention operation on the compressed features to capture the topological dependencies of the facial organs. Then, the feature map is transposed to restore the three-dimensional spatial structure and reprojected using 1x1 convolution to output global contextual features.

[0009] The process of calculating global context features in step 2.4 is as follows: (5) In the formula, This represents the encoding process consisting of a multi-head self-attention layer and a feedforward network. for Reprojection convolution operation This represents the reconstructed global context features, and the output size after extreme compression is... , Indicates step size Large stride convolution, This represents the initial facial feature map.

[0010] The specific method for step 3 is as follows: Step 3.1, Bidirectional Gated Feature Fusion: The high-resolution convolutional features from Step 2.2 and the global context features from Step 2.4 are fed into the bidirectional gated feature fusion module for interaction; Step 3.2: Upsample the global context features to the same spatial size as the high-resolution convolutional features using bilinear interpolation, and unify the channel dimensions using unbiased 1x1 convolutions. The calculation process is as follows: (6) In the formula, For bilinear interpolation, For very few parameters convolution, This represents the high-resolution features after upsampling. Represents the reconstructed global context features; Step 3.3: Apply 1x1 convolution and the Sigmoid activation function to the high-resolution convolutional features to generate a single-channel spatial attention map. Multiply this map element-wise with the aligned global context features to accurately filter out background noise regions irrelevant to the face from the global features. The calculation process is as follows: (7) (8) In the formula, for Spatial projection convolution, for Activation function For spatial gating mask, This represents element-wise matrix multiplication. This represents the high-resolution features after upsampling. This refers to the clean global facial features after removing background interference; Step 3.4, Local Enhancement Guided by Global Features: Apply two-dimensional adaptive average pooling to the modulated global context features to compress the spatial dimension. Generate channel attention weight vectors through unbiased one-dimensional convolution and sigmoid activation function. Multiply the weight vectors with the global features and add them as residuals to the original high-resolution convolution features for bidirectional enhancement and fusion, thereby endowing local details with deep facial anatomical semantics.

[0011] The process of generating the channel attention weight vector and fusing it with the bidirectional enhancement in step 3.4 is as follows: (9) (10) In the formula, For average pooling operation, for Activation function A one-dimensional dynamic convolution with a kernel size of 3 is used to capture inter-channel dependencies; For the generated channel attention weights, In the initial high-resolution features, Enhanced features for bidirectional fusion.

[0012] The specific method for step 4 is as follows: The fused features and the resulting low-resolution features are fed into the Bottleneck residual layer for deep semantic refinement. After upsampling and aligning the refined low-resolution features to spatial resolution using bilinear interpolation, the deep semantics and the refined low-resolution features are concatenated along the channel dimension to output a high-quality facial feature tensor rich in multi-scale information. The calculation process is as follows: (11) (12) (13) In the formula, , This is a residual operation, which ultimately maintains the channel at 32, while mapping the low-resolution branch channel to 64. This represents the deep semantic meaning of the fused features after residual processing. For bilinear interpolation, These are low-resolution convolutional features. This represents the low-resolution features after upsampling and aligning the spatial resolution. This indicates a splicing operation, where the splices are performed along the channel dimension. This indicates the output of the final multi-scale facial feature tensor.

[0013] The specific method for step 5 is as follows: Step 5.1, Outputting Facial Acupoint Coordinates: Input the multi-scale feature tensor obtained in Step 4 into the acupoint prediction head composed of 1x1 convolutions to generate two-dimensional spatial heatmaps corresponding to various facial acupoints. The calculation process is as follows: (14) In the formula, Represents a set of two-dimensional spatial heat maps. express Convolution, where each pixel value in a heatmap represents the probability that the location belongs to a specific acupoint; Step 5.2, regarding the first For each facial acupoint, the precise two-dimensional spatial pixel coordinates of the acupoint are obtained by directly decoding the pixel with the largest heatmap response value for that channel. The calculation process is as follows: (15) In the formula, Indicates the first Precise two-dimensional spatial pixel coordinates of each acupoint Indicates the first A heat map at location The response value at that location, Represents the two-dimensional pixel coordinates in a heatmap. This represents the position of the independent variable when the function reaches its maximum value. The coordinates are the locations of facial acupoints, thus completing the final high-precision positioning of facial acupoints.

[0014] The beneficial effects of this invention are: (1) The present invention is based on a lightweight Transformer and bidirectional gating facial acupoint detection method. A lightweight Transformer module is designed, which compresses the spatial dimension to the extreme through large stride convolution, greatly reducing the computational overhead, so that the model can complete facial acupoint tracking in real time and smoothly on low-to-medium computing power devices. (2) The present invention is based on a lightweight Transformer and bidirectional gating facial acupoint detection method. It proposes a bidirectional gating fusion module to address the problem of acupoint localization. During the fusion process, "global guidance of local" enables the network to use the overall facial proportions (such as the relative positions of the eyes, nose, and mouth) to anchor acupoint areas without obvious textures. "Local guidance of global" generates spatial masks through CNN features to suppress irrelevant interference such as hair and background, achieving efficient alignment of facial anatomy and local skin details with very few parameters. (3) The present invention is a facial acupoint detection method based on lightweight Transformer and bidirectional gating. It can still output stable and continuous acupoint coordinate prediction results even when there is partial occlusion or drastic facial expression changes, thus taking into account both detection efficiency and accuracy. Attached Figure Description

[0015] Figure 1 This is a flowchart of the facial acupoint detection method based on lightweight Transformer and bidirectional gating of the present invention. Figure 2 This is a structural diagram of the facial acupoint detection method based on lightweight Transformer and bidirectional gating of the present invention; Figure 3 This is a structural diagram of the bidirectional gating fusion module in step 3 of the facial acupoint detection method of the present invention. Detailed Implementation

[0016] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.

[0017] Example 1 This embodiment uses a lightweight Transformer and bidirectional gating for facial acupoint detection. The specific method is as follows: Step 1: Using a backbone network containing convolutional activation modules and residual bottleneck layers, perform multi-scale feature extraction on the facial image to obtain an initial facial feature map. Step 2: Distribute the initial facial feature map to the high-resolution convolution branch, the low-resolution convolution branch, and the downsampling global branch. The downsampling global branch uses a lightweight Transformer module to extract the global anatomical structure features of the face. Step 3: Using a bidirectional gated fusion module, the local features and global anatomical features of the high-resolution convolutional branch are bidirectionally gated and fused through spatial attention and channel attention mechanisms to obtain fused and enhanced features; Step 4: Use residual layers to refine the fused enhancement features and low-resolution convolutional branch features. After aligning the spatial resolution using interpolation operations, stitch them together along the channel dimension to output a multi-scale facial feature map. Step 5: Input the multi-scale facial feature map into the acupoint prediction module, and decode to generate the topological spatial coordinates of each facial acupoint.

[0018] Example 2 This embodiment is based on a lightweight Transformer and bidirectional gating facial acupoint detection method. Building upon Embodiment 1, the specific method for step 1 is as follows: Step 1.1, Facial acupoint application procedure as follows: Figure 1 As shown, firstly, the basic features of the detected facial image are extracted. The preprocessed facial image tensor is received, and the spatial dimension is initially downsampled by two consecutive convolutional activation modules with a stride of 2 and batch normalization. Equation (1) is the spatial scale downsampling process: (1) In the formula, and These represent the first and second layers of convolution-batch normalization-activation function combination operations, respectively. Preliminary downsampling characteristics; Step 1.2: The pre-downsampled features are fed into a feature extraction stage consisting of multiple Bottlenecks. In this stage, a residual structure containing 1x1, 3x3, and 1x1 convolutions is used to extract basic local texture features of the face, ultimately outputting an initial facial feature map with 256 channels. The feature extraction process is as follows: (2) In the formula, This indicates the stage 1 feature extraction phase. This is the initial dense facial feature map for output.

[0019] Example 3 This embodiment is based on a lightweight Transformer and bidirectional gating facial acupoint detection method. Building upon Embodiment 1, step 2 is described below: Step 2.1, as follows Figure 2 As shown, a multi-scale facial branch and global context encoding are constructed to split the feature map output in step 1. Step 2.2: The feature map is processed through a convolutional activation module with batch normalization that does not change the spatial size to generate high-resolution convolutional features with 32 channels. This is used to preserve subtle facial textures and boundaries (such as the corners of the eyes and the cupid's bow) to ensure the accuracy of acupoint location. The high-resolution convolution steps are as follows: (3) In the formula, For a convolutional block with a stride of 1, For high-resolution local features, This represents the initial facial feature map; Step 2.3: The feature map is processed through a convolutional activation module with a stride of 2 and batch normalization to generate low-resolution convolutional features with 64 channels; the downsampling process is as follows: (4) In the formula, For downsampling module, These are low-resolution convolutional features. This represents the initial facial feature map; Step 2.4: The feature map is spatially compressed by a convolutional activation module with batch normalization and stride of 16, and then mapped using 1x1 convolution. The mapped sequence is input into a lightweight Transformer encoding layer. The Transformer performs global self-attention operation on the compressed features to capture the topological dependencies of the facial organs. Then, the feature map is transposed to restore the three-dimensional spatial structure and reprojected using 1x1 convolution to output global contextual features.

[0020] The process of calculating global context features is as follows: (5) In the formula, This represents the encoding process consisting of a multi-head self-attention layer and a feedforward network. for Reprojection convolution operation This represents the reconstructed global context features, and the output size after extreme compression is... , Indicates step size Large stride convolution, This represents the initial facial feature map.

[0021] Example 4 This embodiment is based on a lightweight Transformer and bidirectional gating facial acupoint detection method. Building upon Embodiment 1, the specific method for step 3 is as follows: Step 3.1, Bidirectional Gated Feature Fusion: The high-resolution features from Step 2.2 and the global context features from Step 2.4 are fed into the bidirectional gated feature fusion module for interaction. The structure diagram of the bidirectional gated feature fusion module is shown below. Figure 3 As shown; Step 3.2: Upsample the global context features to the same spatial size as the high-resolution convolutional features using bilinear interpolation, and unify the channel dimensions using unbiased 1x1 convolutions. The calculation process is as follows: (6) In the formula, For bilinear interpolation, For very few parameters convolution, This represents the high-resolution features after upsampling. Represents the reconstructed global context features; Step 3.3: Apply 1x1 convolution and the Sigmoid activation function to the high-resolution convolutional features to generate a single-channel spatial attention map. Multiply this map element-wise with the aligned global context features to accurately filter out background noise regions irrelevant to the face from the global features. The calculation process is as follows: (7) (8) In the formula, for Spatial projection convolution, for Activation function For spatial gating mask, This represents element-wise matrix multiplication. This represents the high-resolution features after upsampling. This refers to the clean global facial features after removing background interference; Step 3.4, Local Enhancement Guided by Global Features: Apply two-dimensional adaptive average pooling to the modulated global context features to compress the spatial dimension. Generate channel attention weight vectors through unbiased one-dimensional convolution and sigmoid activation function. Multiply the weight vectors with the global features and add them as residuals to the original high-resolution convolution features for bidirectional enhancement and fusion, thereby endowing local details with deep facial anatomical semantics.

[0022] Equation (9) represents the channel attention weight generation process, and Equation (10) represents the bidirectional enhanced fusion feature process: (9) (10) In the formula, For average pooling operation, for Activation function A one-dimensional dynamic convolution with a kernel size of 3 is used to capture inter-channel dependencies; For the generated channel attention weights, In the initial high-resolution features, Enhanced features for bidirectional fusion.

[0023] Example 5 This embodiment is based on a lightweight Transformer and bidirectional gating facial acupoint detection method. Building upon Embodiment 1, the specific method for step 4 is as follows: The fusion features output in step 3 and the low-resolution features obtained in step 2.2 are respectively fed into the Bottleneck residual layer for deep semantic refinement. After upsampling the refined low-resolution features to align with the spatial resolution using bilinear interpolation, the deep semantics and the refined low-resolution features are concatenated in the channel dimension to output a high-quality facial feature tensor rich in multi-scale information. Equations (11), (12), and (13) are the calculation process of Example 5. (11) (12) (13) In the formula, , This is a residual operation, which ultimately maintains the channel at 32, while mapping the low-resolution branch channel to 64. This represents the deep semantic meaning of the fused features after residual processing. For bilinear interpolation, These are low-resolution convolutional features. This represents the low-resolution features after upsampling and aligning the spatial resolution. This indicates a splicing operation, where the splices are performed along the channel dimension. This indicates the output of the final multi-scale facial feature tensor.

[0024] Example 6 This embodiment is based on a lightweight Transformer and bidirectional gating facial acupoint detection method. Building upon Embodiment 1, the specific method for step 5 is as follows: Step 5.1, Outputting Facial Acupoint Coordinates: Input the multi-scale feature tensor obtained in Step 4 into the acupoint prediction head composed of 1x1 convolutions to generate two-dimensional spatial heatmaps for various facial acupoints (such as Sibai, Taiyang, and Dicang acupoints). The calculation process is as follows: (14) In the formula, Represents a set of two-dimensional spatial heat maps. express Convolution, where each pixel value in a heatmap represents the probability that the location belongs to a specific acupoint; Step 5.2, regarding the first For each facial acupoint, the precise two-dimensional spatial pixel coordinates of the acupoint are obtained by directly decoding the pixel with the largest heatmap response value for that channel. The calculation process is as follows: (15) In the formula, Indicates the first Precise two-dimensional spatial pixel coordinates of each acupoint Indicates the first A heat map at location The response value at that location, Represents the two-dimensional pixel coordinates in a heatmap. This represents the position of the independent variable when the function reaches its maximum value. The coordinates are the locations of facial acupoints, thus completing the final high-precision positioning of facial acupoints.

Claims

1. A facial acupoint detection method based on lightweight Transformer and bidirectional gating, characterized in that, The specific method is as follows: Step 1: Using a backbone network containing convolutional activation modules and residual bottleneck layers, perform multi-scale feature extraction on facial images to obtain initial feature maps; Step 2: Input the initial features into the convolution branch and the downsampling global branch respectively to extract the global anatomical structure features of the face; Step 3: Using a bidirectional gating fusion module, combined with spatial and channel attention, local and global features are fused bidirectionally to obtain enhanced features; Step 4: Refine the features through the residual layer, and after interpolation and alignment, perform channel stitching to output a multi-scale facial feature map; Step 5: Input the facial feature map into the acupoint prediction module and decode to generate the coordinates of each facial acupoint.

2. The facial acupoint detection method based on lightweight Transformer and bidirectional gating according to claim 1, characterized in that, The specific method for step 1 is as follows: Step 1.1: Receive the preprocessed facial image tensor. First, perform preliminary spatial downsampling using two consecutive convolutional activation modules with a stride of 2 and batch normalization. The spatial scale downsampling process is as follows: (1) In the formula, and These represent the first and second layers of convolution-batch normalization-activation function combination operations, respectively. Preliminary downsampling characteristics; Step 1.2: The pre-downsampled features are fed into a feature extraction stage consisting of multiple Bottlenecks. In this stage, a residual structure containing 1x1, 3x3, and 1x1 convolutions is used to extract basic local texture features of the face, ultimately outputting an initial facial feature map with 256 channels. The feature extraction process is as follows: (2) In the formula, This indicates the stage 1 feature extraction phase. This is the initial dense facial feature map for output.

3. The facial acupoint detection method based on lightweight Transformer and bidirectional gating according to claim 1, characterized in that, The specific method for step 2 is as follows: Step 2.1: Multi-scale facial branch construction and global context encoding, performing split processing on the feature map output from Step 1; Step 2.2: The feature map is processed through a convolutional activation module with batch normalization that does not change the spatial size to generate high-resolution convolutional features with 32 channels. This is used to preserve subtle facial textures and boundaries to ensure the accuracy of acupoint localization. The high-resolution convolution steps are as follows: (3) In the formula, For a convolutional block with a stride of 1, For high-resolution local features, This represents the initial facial feature map; Step 2.3: The feature map is processed through a convolutional activation module with a stride of 2 and batch normalization to generate low-resolution convolutional features with 64 channels; the downsampling process is as follows: (4) In the formula, For downsampling module, These are low-resolution convolutional features. This represents the initial facial feature map; Step 2.4: The feature map is spatially compressed by a convolutional activation module with batch normalization and stride of 16, and then mapped using 1x1 convolution. The mapped sequence is input into a lightweight Transformer encoding layer. The Transformer performs global self-attention operation on the compressed features to capture the topological dependencies of the facial organs. Then, it is transposed to restore the three-dimensional spatial structure and reprojected using 1x1 convolution to output global contextual features.

4. The facial acupoint detection method based on lightweight Transformer and bidirectional gating according to claim 3, characterized in that, The process of calculating global context features in step 2.4 is as follows: (5) In the formula, This represents the encoding process consisting of a multi-head self-attention layer and a feedforward network. for Reprojection convolution operation This represents the reconstructed global context features, and the output size after extreme compression is... , Indicates step size Large stride convolution, This represents the initial facial feature map.

5. The facial acupoint detection method based on lightweight Transformer and bidirectional gating according to claim 1, characterized in that, The specific method for step 3 is as follows: Step 3.1, Bidirectional Gated Feature Fusion: The high-resolution convolutional features from Step 2.2 and the global context features from Step 2.4 are fed into the bidirectional gated feature fusion module for interaction; Step 3.2: Upsample the global context features to the same spatial size as the high-resolution convolutional features using bilinear interpolation, and unify the channel dimensions using unbiased 1x1 convolutions. The calculation process is as follows: (6) In the formula, For bilinear interpolation, For very few parameters convolution, This represents the high-resolution features after upsampling. Represents the reconstructed global context features; Step 3.3: Apply 1x1 convolution and the Sigmoid activation function to the high-resolution convolutional features to generate a single-channel spatial attention map. Multiply this map element-wise with the aligned global context features to accurately filter out background noise regions irrelevant to the face from the global features. The calculation process is as follows: (7) (8) In the formula, for Spatial projection convolution, for Activation function For spatial gating mask, This represents element-wise matrix multiplication. This represents the high-resolution features after upsampling. This refers to the clean global facial features after removing background interference; Step 3.4, Local Enhancement Guided by Global Features: Apply two-dimensional adaptive average pooling to the modulated global context features to compress the spatial dimension. Generate channel attention weight vectors through unbiased one-dimensional convolution and sigmoid activation function. Multiply the weight vectors with the global features and add them as residuals to the original high-resolution convolutional features for bidirectional enhancement and fusion, thereby endowing local details with deep facial anatomical semantics.

6. The facial acupoint detection method based on lightweight Transformer and bidirectional gating according to claim 5, characterized in that, The process of generating the channel attention weight vector and fusing it with the bidirectional enhancement in step 3.4 is as follows: (9) (10) In the formula, For average pooling operation, for Activation function A one-dimensional dynamic convolution with a kernel size of 3 is used to capture inter-channel dependencies; For the generated channel attention weights, In the initial high-resolution features, Enhanced features for bidirectional fusion.

7. The facial acupoint detection method based on lightweight Transformer and bidirectional gating according to claim 1, characterized in that, The specific method for step 4 is as follows: The fused features and the resulting low-resolution features are fed into the Bottleneck residual layer for deep semantic refinement. After upsampling and aligning the refined low-resolution features to spatial resolution using bilinear interpolation, the deep semantics and the refined low-resolution features are concatenated along the channel dimension to output a high-quality facial feature tensor rich in multi-scale information. The calculation process is as follows: (11) (12) (13) In the formula, , This is a residual operation, which ultimately maintains the channel at 32, while mapping the low-resolution branch channel to 64. This represents the deep semantic meaning of the fused features after residual processing. For bilinear interpolation, These are low-resolution convolutional features. This represents the low-resolution features after upsampling and aligning the spatial resolution. This indicates a splicing operation, where the splices are performed along the channel dimension. This indicates the output of the final multi-scale facial feature tensor.

8. The facial acupoint detection method based on lightweight Transformer and bidirectional gating according to claim 1, characterized in that, The specific method for step 5 is as follows: Step 5.1, Outputting Facial Acupoint Coordinates: Input the multi-scale feature tensor obtained in Step 4 into the acupoint prediction head composed of 1x1 convolutions to generate two-dimensional spatial heatmaps corresponding to various facial acupoints. The calculation process is as follows: (14) In the formula, Represents a set of two-dimensional spatial heat maps. express Convolution, where each pixel value in a heatmap represents the probability that the location belongs to a specific acupoint; Step 5.2, regarding the first For each facial acupoint, the precise two-dimensional spatial pixel coordinates of the acupoint are obtained by directly decoding the pixel with the largest heatmap response value for that channel. The calculation process is as follows: (15) In the formula, Indicates the first Precise two-dimensional spatial pixel coordinates of each acupoint Indicates the first A heat map at location The response value at that location, Represents the two-dimensional pixel coordinates in a heatmap. This represents the position of the independent variable when the function reaches its maximum value. The coordinates are the locations of facial acupoints, thus completing the final high-precision positioning of facial acupoints.