# HandFormer: A Dynamic Hand Gesture Recognition Method Based on Attention Mechanism
## 4 Results
### Ablation Study  
To validate the generalization ability, robustness, and performance of the proposed method, ablation experiments were conducted on the Jester dataset. The comparative \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Method** & **Mode** & **Accuracy (\%)** & **F1-Score (\%)** & **Sensitivity (\%)** & **Only** \\  & & & & & **Specificity (\%)** \\ \hline R3 DCNN [6] & IR image & 63.5 & 73.35 & 75.62 & 73.22 \\ \hline R3 DCNN [6] & Optical flow & 77.8 & 78.42 & 79.53 & 80.63 \\ \hline R3 DCNN [6] & Depth video & 80.3 & 83.12 & 85.14 & 84.53 \\ PreRNN [34] & Depth video & 84.4 & 85.66 & 85.97 & 86.57 \\ MTUT [8] & Depth video & 84.9 & 85.48 & 88.52 & 89.91 \\ \hline PointNet++ [35] & Point clouds & 63.9 & 71.53 & 74.31 & 72.11 \\ FlickerNet [36] & Point clouds & 86.3 & 88.56 & 89.04 & 90.10 \\ PointLSTM [7] & Point clouds & 87.9 & 89.97 & 90.65 & 91.18 \\ \hline Human [6] & RGB video & 88.4 & 90.45 & 91.56 & 92.56 \\ \hline MMTM [9] & RGB video + optical flow & 84.85 & 88.61 & 88.09 & 90.28 \\ STNNN [31] & RGB video + optical flow & 85.13 & 91.23 & 92.61 & 93.61 \\ \hline Ours & RGB video + optical flow & 92.16 & 92.49 & 92.55 & 93.94 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Comparison of the proposed method on the NVGesture dataset. Figure 7: Confusion matrix of results on the self-built dataset. results of the ablation experiments are shown in Table 4, with the PoolFormer model selected as the baseline model. The results indicate that when the PoolFormer baseline model is selected, i.e., the simplest pooling layer without learning parameters is selected for the token mixer in each stage, and to ensure a fair comparison, the block layers of the four stages of PoolFormer are all 3-3-6-3. The average recognition accuracy of the final PoolFormer model used as the baseline model was 77.50%, which was 18.66 percentage points lower than that of the method proposed in this paper. When only the SAFB based on the spatial attention mechanism was used in the last three stages, the average recognition accuracy was 88.82%, which was 7.90 percentage points lower than that of the proposed method. When only the TAFB based on the temporal attention mechanism was used in the last three stages, the average recognition accuracy was 86.16%, which was 10.56 percentage points lower than that of the proposed method. The reason why these two methods have a higher average recognition accuracy than the proposed method is that they only consider one of the spatial or temporal features, lacking the ability to extract information from the other feature. In addition, a comparison was performed between the method that only uses the SAFB based on the spatial attention mechanism in the second stage and the method that only uses the TAFB based on the temporal attention mechanism in the last two stages. The average recognition accuracy of this method was 91.47%, which was 5.25 percentage points lower than that of the proposed method due to its inadequate extraction of spatial feature information. The experimental results confirm the effectiveness of the proposed method. To validate the influence of the proposed method's depth on the recognition accuracy, we conducted an ablation experiment on the Jester dataset. The experimental results are shown in Table 5. The results show that when all stages of the model were set to three layers, the average recognition accuracy was 89.82%, which was 6.96 percentage points lower than that of the proposed method. The reason for this is the insufficient extraction of spatial attention features in the third stage. When the number of layers in the last three stages was set to six, the average recognition accuracy of the model was 95.17%, which was 1.55 percentage points lower than that of the proposed method. When the second and third stages for extracting spatial features were considered, the model's average recognition accuracy was 95.56%. These two sets of experimental results indicate that when the model's depth increases, the average recognition accuracy of the model decreases.