## 3 Materials and Methods
### Hand Gesture Classification  
The data collected using Mediapipe was split randomly between a training set, used to train the machine learning algorithm, and a test set, for performance evaluation, with a standard 80:20 division of the images between the two sets. In particular, a Random Forest classifier was used to identify the corresponding hand sign from the coordinates of the Mediapipe landmarks. A Random Forest is a machine learning algorithm used for classification and regression tasks. It operates by creating multiple decision trees during training and then combines their outputs to make a final prediction. Each tree is built using a random subset of the data and features, which helps to reduce overfitting and increase the model's accuracy. By averaging the predictions (in regression) or taking a majority vote (in classification), the Random Forest provides more robust and accurate predictions compared to individual decision trees. Specifically, a Random Forest with 100 trees and default parameters was involved for the current investigation. The Random Forest technique was chosen above other machine learning algorithms for its excellent performance in multi-class classification tasks [38], and its distinct advantages in terms of interpretability, training efficiency, and robustness [39]. According to their structure, Random Forest classifiers enable us to clearly distinguish which hand positions most influence specific gestures, allowing us to fine-tune and increase detection accuracy [32; 40]. Other algorithms, such as Artificial Neural Networks (ANNs), particularly those with multiple layers, are more difficult to interpret due to their black-box nature [41]. Random Forests are also more computationally efficient than deep learning models, which, while powerful, need significant computational resources and specific hardware to train and deploy [42]. This efficiency enables Random Forests to conduct real-time gesture recognition on limited hardware, which is critical for accessible responsive applications. Compared to alternative tree-based models, such as XGBoost [43], Random Forests have the advantage of easier hyperparameter adjustment and lower computing overhead, making them a more practical choice [31; 44]. Furthermore, Random Forests' ensemble structure provides robustness against overfitting, a common problem with short gesture datasets, can handle large datasets, and naturally manages the noise that is frequently present in gesture data [42]. As a result, Random Forests provide a balanced approach that ensures accuracy, speed, and  
Figure 3: Hand landmarks.  
interpretability, making them ideal for recognizing sign language gestures, particularly on mobile devices [45].  
Depending on whether the input data were an RGB or RGB-D image, the database structure to be provided as input to the classifier is slightly different. In particular, a set of 21 coordinates is provided in both the cases. When using a 2D image, each coordinate consists of a doublet referring to the value of x and y. In the case of an RGB-D image, the z coordinate referring to depth is also added. Therefore, each coordinate will be characterized by a triplet of x, y, and z. Consequently, 21 \(\times\) 3 coordinates and 21 \(\times\) 2 were, respectively, obtained for each 3D or 2D frame. As a result, two different classifier models were trained to operate with the corresponding data sources.