# Skeleton-Based Dynamic Hand Gesture Recognition Using an Enhanced Network with One-Shot Learning
## 4 Experiments
### Experimental Setup
#### Implementation  
The whole process of dynamic hand gesture recognition based on one-shot learning is shown in Figure 5.  
Figure 5: Flowchart of the implementation.  
Firstly, the M different classes are randomly selected from the N classes already contained in the dataset, which prevents the network from simply mapping class labels to the output. From the episode to the next episode, those classes presented in the current episode with the associated labels and specific samples will be shuffled. Later, the sample sequences are equally singled out from each of the M classes, which are supposed to be of the same size. Each group from the randomly re-labeled M classes extracts 10 sets of sequences as the training data at random. Of course, it is not enough to take merely 10 sets of the sequence for each training. Additionally, the corresponding batch size is taken by random sampling as the input of training. Then, the model will be validated by the validation set every \(k\) epochs, and output the prediction accuracy with corresponding loss. Finally, the above processes are repeated until the model converges.  
For the converged network model, the test set will be randomly selected to evaluate its generalization ability. After the test, the model's ability to recognize those new unrecognized sequences will be the criterion of model selection.  
According to the public DHGD hand gesture dataset, the time scale is set to 60 so that the size of the gesture sequences will be at least 100 sets in each class. After the data preprocessing, the shape of \(\hat{G}_{k}\) is split into \(60\times 20\times 22\). For \"one-shot learning\", 60%, 20%, and 20% of the data are used for the training set, the validation set, and the test set, respectively.  
The DHGD dataset contains two different ways of 14-classes gestures: one finger and the whole hand. N is set to 14 as the number of the unique class; M is set to 3 as the number of sample classes; \(k\) is set to 100 as the epoch-size in each training. For the 28-classes gestures encompassing the above two ways, N is set to 28 as the number of the unique class, while sizes of M and \(k\) remain unchanged in each training. A grid search [45] is performed over a number of hyper-parameters: controller size (200 hidden units for an LSTM), the learning rate (\(4\text{e}-5\)), the number of read-write heads from memory (4), and training times (80,000). For the 14-classes, the batch size is taken as 8, while it is set to 16 in the case of 28-classes. The model presents the best results over those hyper-parameters configurations.  
In this study, another comparison experiment has been conducted based on the MSRA dataset. The time scale is also set to 12. After the data preprocessing, the shape of \(\hat{G}_{k}\) is segmented into \(60\times 5\times 21\). Moreover, 50% of the data is used for the training set; 25% of the data utilized for the validation set; 25% of the data applied to the test set. For the MSRA dataset containing hand gestures of 17 classes, N is set to 17 as the number of the unique classes, and sizes of M and \(k\) remain unchanged in each training. Compared with the 14-classes and 28-classes, hyper-parameters for the 17-classes are shown: controller size (200 hidden units for an LSTM), the learning rate (\(4\text{e}-5\)), the number of read-write heads from memory (4), batch size (16), and training times (70,000).