Mediape and random forest algorithm-based gesture recognition method
By combining Mediapipe with the random forest algorithm, key points of the hand are detected and the knuckle vector angle and interfinite vector angle are extracted, which solves the problems of poor feature selection and high resource consumption in existing gesture recognition technologies, and achieves efficient and accurate gesture recognition.
Patent Information
- Application Number
- CN202510891195.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-10-31
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing gesture recognition technologies suffer from poor feature selection, cumbersome training, high resource consumption, and difficulty in rapid and stable deployment on resource-constrained devices. Traditional methods are severely affected by environmental interference, while deep learning methods consume high resources but suffer from decreased accuracy.
The Mediapipe algorithm is used to detect key points of the hand, and the random forest algorithm is used to extract the knuckle vector angle and the interfinite vector angle as features. Through feature importance analysis and dimensionality reduction, multiple decision trees are constructed to optimize the gesture recognition model.
It improves the stability and accuracy of gesture recognition, reduces the dependence on computing resources, and enables rapid and stable deployment on resource-constrained devices.
Smart Images

Figure CN120877326A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision and pattern recognition technology, specifically a gesture recognition method based on Mediapipe and random forest algorithms. Background Technology
[0002] Gesture recognition technology is a human-computer interaction technology that captures hand movements using sensors or cameras and converts them into digital commands. It is widely used in virtual reality, smart homes, and healthcare. Currently, there are two main types of gesture recognition technologies. One type is based on traditional computer vision methods, which extract features such as hand color and shape and use algorithms like template matching and feature point tracking for gesture recognition. For example, skin color segmentation technology can be used to determine the hand region, and then contour analysis can be used to recognize simple gestures. The other type is based on deep learning methods, such as convolutional neural networks (CNNs). These are trained on large amounts of gesture image data to learn complex feature representations of gestures, thereby achieving high-precision gesture recognition.
[0003] Traditional computer vision methods suffer from insufficient precision in feature extraction, limited ability to recognize complex gestures, and significant susceptibility to environmental factors such as lighting and background. While deep learning methods offer higher accuracy, they require substantial training data and computational resources, resulting in lengthy training times and high model deployment costs. Furthermore, most existing technologies fail to fully utilize representative features such as knuckle and interfinite vector angles, and lack feature importance analysis and dimensionality reduction processing, leading to inefficient training processes.
[0004] The inaccuracy of traditional feature extraction methods stems from the fact that features such as color and shape are easily affected by external environmental interference, and there is a lack of in-depth exploration of the structural features of the human hand. Deep learning methods, on the other hand, are resource-intensive due to their complex network structures requiring a large number of parameters for training and storage. To address these issues, traditional methods require more complex feature extraction and matching algorithms to improve recognition accuracy, but this increases computational complexity with limited performance improvement. Conversely, deep learning methods, while attempting to reduce resource consumption through techniques like model compression, often suffer from decreased accuracy, making it difficult to find a balance between resource consumption and accuracy. Summary of the Invention
[0005] Therefore, this invention solves the technical problems of poor feature selection, cumbersome training, and high resource consumption in existing gesture recognition technologies. This invention provides a gesture recognition technology based on Mediapipe and Random Forest algorithms. This technology selects knuckle vector angles and interfinite finger vector angles as features, performs importance analysis and dimensionality reduction before training the model, aiming to achieve a more convenient and efficient training process, improve the stability and accuracy of gesture recognition, and significantly reduce the dependence on computing resources. This ensures that the model can be quickly and stably deployed on various resource-constrained devices, laying the foundation for the application of gesture recognition technology. This technology selects knuckle vector angles and interfinite finger vector angles as features, constructs multiple decision trees through the feature importance evaluation function built into the Random Forest algorithm, calculates the split contribution of each feature in the decision trees, obtains the importance score of each feature, deletes the five features with the highest scores, and performs dimensionality reduction on the features, ultimately improving the stability and accuracy of gesture recognition while ensuring the model can be quickly and stably deployed on various resource-constrained devices, laying the foundation for the application of gesture recognition technology. Using knuckle vector angles and interfinite vector angles as core features, the system first detects key points on the hand, then optimizes the hand data through feature importance analysis and feature dimensionality reduction. The random forest algorithm is used for model training and evaluation, and finally, after testing, it is packaged into a UI interface to achieve efficient and accurate gesture recognition, laying the foundation for the application of gesture recognition.
[0006] This invention provides a gesture recognition technology based on Mediapipe and Random Forest algorithms, comprising the following steps:
[0007] S1: Detects key points on the palm and hand; uses Mediapipe's hand detection module to process input images or video frames in real time, based on a lightweight neural network architecture, to quickly and accurately detect the coordinates of 21 key points on the hand;
[0008] S2: Perform geometric feature extraction and data preprocessing; calculate the joint vector angle and interphalangeal vector angle based on the coordinates of 21 key points of the hand. For each finger joint, calculate the angle between adjacent phalangeal vectors; for different fingers, calculate the angle between the corresponding fingertip vectors; data preprocessing involves checking the extracted feature data, deleting samples with missing values, and ensuring data integrity.
[0009] S3: Use the random forest algorithm to train the extracted features, obtain a classification model, and perform feature importance analysis, model evaluation and optimization;
[0010] S4: Recognize gestures in complex environments through a recognition model.
[0011] Furthermore, the detection of the palm and key points of the hand in step S1 specifically includes the following steps:
[0012] S10: Palm detection stage, using the Blzae Palm Detector palm detection algorithm;
[0013] S11: Hand detection stage, using the Hand Landmark hand key point detection algorithm.
[0014] Furthermore, the geometric feature extraction in step S2 specifically includes the knuckle vector angle and the interphalangeal vector angle; calculating the knuckle vector angle and the interphalangeal vector angle based on the coordinates of key points on the hand; calculating the angle between adjacent phalangeal vectors for each finger knuckle; and calculating the angle between the corresponding fingertip vectors for different fingers.
[0015] Furthermore, the data preprocessing in step S2 specifically includes loading the original data, grouping by category, deleting duplicate samples, processing missing values, handling outliers, and saving the processing results.
[0016] Further, the random forest algorithm training process in step S3 mainly includes gesture feature data processing, dataset partitioning, model construction and training, model evaluation, feature dimensionality reduction, and parameter tuning. Utilizing the built-in feature importance evaluation function of the random forest algorithm, multiple decision trees are constructed, and the split contribution of each feature in the decision trees is statistically analyzed during training to obtain the importance score of each feature. Feature dimensionality reduction involves removing the five features with the lowest scores based on their importance scores. Model training and evaluation use the dimensionality-reduced feature data and corresponding gesture labels to train the random forest classifier. The random forest constructs multiple decision trees through multiple samplings of the training data and feature subset selection, and determines the final classification result through a voting mechanism. The trained model is evaluated using multiple evaluation methods, including confusion matrix, accuracy, precision, and F1 score. The confusion matrix visually displays the model's classification performance across different categories; accuracy measures the proportion of correctly predicted samples out of the total samples; precision reflects the proportion of samples predicted as positive that are actually positive; and the F1 score comprehensively considers precision and recall.
[0017] Furthermore, the gesture feature data processing includes processing outliers and duplicate values in the dataset.
[0018] Furthermore, the model building and training refers to building a random forest classifier model using Random ForestClassifier from the sklearn.ensemble library and setting several key hyperparameters.
[0019] Furthermore, step S4 specifically includes creating a graphical user interface using Python's tkinter library; adding a start recognition button, a text box or label displaying the recognition result, and an area component displaying the camera image to the interface; encapsulating the gesture recognition function implemented in the previous steps into the corresponding function and binding it to the events of the interface components, so that the gesture recognition function is called when the start recognition button is clicked.
[0020] The present invention has the following advantages over the prior art:
[0021] 1. This invention provides a gesture recognition technology based on Mediapipe and random forest algorithms. The Mediapipe algorithm is used in palm detection and hand key point detection. It can accurately detect the hand and the coordinates of hand key points in complex backgrounds, and calculate the relevant knuckle vector angles and interfinite vector angles as features.
[0022] 2. This invention provides a gesture recognition technology based on Mediapipe and Random Forest algorithms. During the training and recognition phases, a Random Forest model is used. Multiple decision trees are constructed using the built-in feature importance evaluation function of the Random Forest algorithm. The split contribution of each feature in the decision trees is statistically analyzed, and the importance score of each feature is obtained. The five features with the highest scores are deleted, and the features are subjected to dimensionality reduction processing, ultimately improving the stability and accuracy of gesture recognition. The combination of Mediapipe and Random Forest algorithms can accurately detect the hand and key point coordinates in complex backgrounds, and also improve the efficiency and robustness of gesture recognition, further promoting the application of gesture recognition technology.
[0023] 3. This invention provides a gesture recognition technology based on Mediapipe and Random Forest algorithms. Key hand point detection: Knuckle vector angles and interfinite vector angles are used as core features for gesture recognition. These features are stable and representative, unaffected by lighting and background changes, and accurately reflect the essential characteristics of the gesture. Default and unreasonable values are removed to improve data quality and provide a better data foundation for model training. Model training and recognition: For the first time, the Random Forest algorithm is introduced into the field of gesture recognition. The Random Forest algorithm is used to perform importance analysis on the extracted gesture features, and the five least important features are removed for dimensionality reduction. This effectively filters key features, removes redundant information, and significantly improves the efficiency and performance of the model. Attached Figure Description
[0024] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0025] Figure 1 This is a flowchart of the gesture recognition method described in this invention;
[0026] Figure 2 This is a flowchart of the detection process for key points of the palm and hand as described in this invention.
[0027] Figure 3 This is a flowchart of the Hand Landmark hand key point detection algorithm described in this invention;
[0028] Figure 4 This is a schematic diagram showing the key point numbers, thumb bending, and the opening and closing of the little finger and ring finger as described in this invention.
[0029] Figure 5 This is the feature sample data preprocessing method described in this invention;
[0030] Figure 6 This is a flowchart of the training process for the random forest algorithm described in this invention.
[0031] Figure 7 This is a graph showing the variation of the out-of-bag error (OOB) before dimensionality reduction as a function of the number of trees, as described in this invention.
[0032] Figure 8 This refers to the confusion matrix before dimensionality reduction as described in this invention;
[0033] Figure 9 This is a graph showing the variation of the out-of-bag error (OOB) after dimensionality reduction as a function of the number of trees, as described in this invention.
[0034] Figure 10 This refers to the dimensionality-reduced confusion matrix described in this invention.
[0035] Figure 11 This is the importance analysis diagram based on Gini impurity after dimensionality reduction as described in this invention;
[0036] Figure 12 This is a graph showing the variation of the out-of-bag error (OOB) as described in this invention with the maximum tree depth.
[0037] Figure 13 This is a graph showing the variation of the out-of-bag error (OOB) as described in this invention with the minimum number of samples required for splitting;
[0038] Figure 14This is a graph showing the variation of the out-of-bag error (OOB) of the present invention with the number of features considered for each tree;
[0039] Figure 15 This is a flowchart of the classification and recognition process in step S3 of the present invention;
[0040] Figure 16 This is the visual GUI interface and key hand marker diagram constructed according to the present invention. Detailed Implementation
[0041] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0042] Example 1
[0043] like Figure 1 The image shows a gesture recognition technology based on Mediapipe and Random Forest algorithms, including the following steps: S1: palm detection and hand key point detection; S2: geometric feature extraction and data preprocessing; S3: using the random forest algorithm to train the extracted features, obtain a classification model, and perform feature importance analysis, model evaluation and optimization; S4: recognizing gestures in complex environments through the recognition model.
[0044] like Figure 2 The flowchart shown is the detection flowchart of the palm and key points of the hand (i.e. step S1). Step S1 specifically includes the following steps: the S1 stage mainly includes S10 and S11, where S10 is palm detection and S11 is key point detection of the hand.
[0045] In the palm detection stage S10, the Blzae Palm Detector algorithm is used. This algorithm employs a lightweight FPN (Feature Pyramid Network) feature extractor. Compared with traditional FPN features, the lightweight FPN feature extractor adopts a bidirectional pyramid structure and skip connections, fusing low-level details and high-level semantic features, and combines depthwise separable convolutions, which can effectively reduce the number of parameters by 90% and improve computational efficiency by 97.1%. This stage first performs region cropping on the input image, then performs standardization processing, and uses dynamic cropping region expansion and adaptive bounding box adjustment to expand the captured palm bounding box outward by 1.5-2 times from the center of the palm to cover the complete area from the wrist to the fingertips.
[0046] In the hand detection stage S11, this step includes palm detection and finger keypoint detection, using the Hand Landmark hand keypoint detection algorithm, such as... Figure 3 The flowchart shown is of the Hand Landmark hand keypoint detection algorithm described in this invention. The algorithm first normalizes the acquired image, then separates the channels (BGR→RGB), and performs dynamic rotation correction based on the center position of the palm. Through feature extraction and keypoint regression processing, 21 3D keypoints, hand presence confidence, and left / right hand classification are obtained.
[0047] The feature extraction includes depthwise separable convolution and BiFPN image multi-scale fusion; the depthwise separable convolution can reduce the amount of computation, effectively extract gesture image features, and balance efficiency and performance; the BiFPN image multi-scale fusion can integrate low-level detailed features (such as local finger shape and texture) and high-level semantic features (such as overall hand structure and posture) of gesture images, making the feature expression richer and more accurate.
[0048] The keypoint regression process includes the following steps: The fused features are input into a fully connected layer, and the coordinates of 21 3D keypoints are directly regressed. A confidence score for hand presence is output. If the confidence score is higher than a threshold, the hand is considered present, and gesture annotation is performed. If the confidence score is lower than the threshold, the hand is considered absent, and the process returns to the frame processing scheduler to re-track the hand. After hand detection, the left and right hands are distinguished based on the symmetry of the 21 3D keypoints and the patterns learned during model training.
[0049] Step S2 involves geometric feature extraction and data preprocessing, specifically including knuckle vector angles and interphalangeal vector angles. Based on the coordinates of 21 key points on the hand, the knuckle vector angles and interphalangeal vector angles are calculated. For each finger knuckle, the angle between adjacent phalangeal vectors is calculated; for different fingers, the angle between the corresponding fingertip vectors is calculated. Figure 4 The diagram shows the key points of this invention, including the thumb bending and the opening and closing of the little finger and ring finger.
[0050] The specific calculation methods for the degree of thumb bending (i.e., joint vector angle) and the opening and closing of the little finger and ring finger (i.e., interfinal vector angle) are as follows:
[0051] Let the coordinates of wrist point 0 be (x0, y0), the coordinates of thumb base point 2 be (x2, y2), the coordinates of thumb tip point 4 be (x4, y4), the coordinates of ring finger tip point 16 be (x16, y16), the coordinates of little finger base point 17 be (x17, y17), and the coordinates of little finger tip point 20 be (x20, y20). Figure 4In the diagram, the base of the thumb (point 2) and the wrist point (point 0) are vectors C(2,0), and the base of the thumb (point 2) and the tip of the thumb (point 4) are vectors D(2,4). The angle θ between these two vectors reflects the degree of thumb bending, and the angle θ can be calculated using equation (1):
[0052]
[0053] The vector E(17,16) represents the base of the little finger (point 17) and the tip of the ring finger (point 16), while the vector F(17,20) represents the base of the little finger (point 17) and the tip of the little finger (point 20). The angle α between these two vectors reflects the opening and closing of the ring and middle fingers. The angle α can be calculated using the following expression:
[0054]
[0055] Before proceeding to step S3, the acquired geometric feature data needs to be preprocessed. Figure 5 The feature sample data preprocessing method of the present invention specifically includes loading raw data, grouping by category, deleting duplicate samples, handling missing values, handling outliers, and saving the processing results. Loading raw data refers to loading the raw data of finger bending degree and finger opening / closing calculated by equations (1) and (2); grouping by category means classifying the loaded data according to each angle of each gesture; deleting duplicate samples means deleting identical data; handling missing values means handling missing values; handling outliers means using the interquartile range method to handle outliers; and finally, saving the processing results.
[0056] Step S3 involves using the random forest algorithm to train the extracted features, obtain a classification model, and perform feature importance analysis, model evaluation, and optimization.
[0057] Figure 6 The diagram shown is a flowchart of the training process of the random forest algorithm described in this invention. This invention is the first to apply the random forest algorithm to gesture recognition, specifically including gesture feature data processing, dataset partitioning, model construction and training, model evaluation, feature dimensionality reduction, and parameter adjustment.
[0058] The gesture feature data processing includes processing outliers and duplicate values in the dataset, i.e. Figure 5 The preprocessing process is shown below.
[0059] The dataset partitioning refers to dividing the preprocessed and saved data into a training set and a test set in an 8:2 ratio, while ensuring that the proportion of each category in the training set and the test set is the same as that in the original dataset.
[0060] The model building and training refers to constructing a random forest classifier model using the Random ForestClassifier library from sklearn.ensemble and setting several key hyperparameters. `n_estimators=200` represents the number of decision trees in the model; appropriately increasing the number of trees usually improves the model's stability and accuracy. `max_depth=10` limits the depth of the trees to prevent overfitting. `min_samples_split=5` and `min_samples_leaf=2` specify the minimum number of samples required for node splits and the minimum number of samples required for leaf nodes, respectively; these parameters control the model's complexity. `max_features='sqrt'` means that each tree considers the square root of the total number of features during construction, reducing the impact of feature correlations on the model. `oob_score=True` enables out-of-bag error estimation, allowing model performance evaluation without an additional validation set. `random_state=42` ensures the model training process is repeatable. `n_jobs=-1` indicates that all available CPU cores are used for parallel computation, accelerating model training. After completing the model initialization, call the model.fit(X_train, y_train) method to train the model using the pre-defined training set, thus completing the training of the random forest model.
[0061] This invention employs a comprehensive evaluation model that combines three evaluation indicators: OOB error assessment, classification index assessment, and confusion matrix assessment.
[0062] The formula for calculating OOB error is as follows:
[0063]
[0064] In the formula, n is the number of decision trees; e i Errors based on out-of-bag data;
[0065] Figure 7 The image shows the confusion matrix before dimensionality reduction as described in this invention.
[0066] The classification metric evaluation involves using the trained model to predict the test set X_test, obtaining the prediction result y_pred. Then, the classification_report function in the sklearn.metrics library is used to calculate multiple classification metrics, including precision, recall, F1 score, and accuracy.
[0067] The confusion matrix evaluation uses the confusion_matrix function in the sklearn.metrics library to generate a confusion matrix for the test set, and then uses the heatma function in the seaborn library for visualization, adding annotations and labels, making the results more intuitive and clear; Figure 8 This is a graph showing the change of out-of-bag error (OOB) before dimensionality reduction as a function of the number of trees, as described in this invention.
[0068] The feature dimensionality reduction refers to analyzing the importance of model features based on model evaluation results and performing feature dimensionality reduction processing on the data.
[0069] The present invention employs eigenvalue importance analysis based on the decrease in Gini impurity, and the specific calculation method is as follows:
[0070] First, the formula for calculating the impurity of Gini(D) is:
[0071]
[0072] In the formula: C is the number of categories in dataset D, and p is the number of features;
[0073] The formula for calculating the Gini impurity after splitting based on characteristic X is:
[0074]
[0075] Among them, |D j | represents subset D j The number of samples, |D| represents the number of samples in the parent node dataset D;
[0076] The decrease in Gini impurity ΔGini(X) caused by feature X splitting at this node is:
[0077]
[0078] Finally, the importance score I of the feature can be obtained through equation (7). Gini (X k ):
[0079]
[0080] Figure 9 This is a graph showing the variation of the out-of-bag error (OOB) after dimensionality reduction as a function of the number of trees, as described in this invention. Figure 10 This refers to the dimensionality-reduced confusion matrix described in this invention. Figure 11 This is the importance analysis diagram based on Gini impurity after dimensionality reduction as described in this invention.
[0081] The parameter adjustment mentioned refers to optimizing multiple parameters using a graph showing the change of out-of-bag error (OOB) with different parameters, in order to achieve the best recognition performance. Figure 12 This is a graph showing the variation of the out-of-bag error (OOB) as described in this invention with the maximum tree depth. Figure 13 This is a graph showing the variation of the out-of-bag error (OOB) as described in this invention with the minimum number of samples required for splitting. Figure 14 This is a graph showing the variation of the out-of-bag error (OOB) of the present invention with the number of features considered for each tree.
[0082] Figure 15 This is a flowchart of the classification and recognition process in step S3 of the present invention. Step S3 mainly includes: dataset classification, hand localization, hand key point detection, feature extraction and processing, random forest classifier training, and random forest classifier recognition;
[0083] The aforementioned dataset classification refers to dividing the collected data into training and testing sets;
[0084] The hand localization mentioned above uses the Blzae Palm Detector algorithm to detect the palm and locate the hand position;
[0085] The aforementioned hand key point detection refers to the detection of 21 key coordinates of the hand using the Mediapipe algorithm;
[0086] The feature extraction and processing mentioned refers to using the Mediapipe algorithm to calculate the knuckle vector angle and the interphalangeal vector angle.
[0087] The training of the random forest classifier refers to using the formed classification features and corresponding labels as the input of the training set, feeding them into the random forest classifier for training, and obtaining a trained random forest classification model.
[0088] The random forest classifier recognition refers to inputting the image of the test sample into a trained random forest classifier through three steps: hand localization, hand key point detection, and feature extraction and processing, and finally outputting the category label corresponding to the test sample.
[0089] Figure 16 The above refers to the visual GUI interface and hand key point marking map constructed according to the present invention; step S4 is gesture recognition and user interface encapsulation, specifically referring to using Python's tkinter library to create a graphical user interface; adding components such as a start recognition button, a text box or label displaying the recognition result, and an area displaying the camera image to the interface; encapsulating the gesture recognition function implemented in the previous steps into the corresponding function and binding it with the events of the interface components, such as calling the gesture recognition function when the start recognition button is clicked.
[0090] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. A gesture recognition method based on Mediapipe and Random Forest algorithms, comprising the following steps: S1: Detects the palm and key points of the hand; S2: Perform geometric feature extraction and data preprocessing; S3: Use the random forest algorithm to train the extracted features, obtain a classification model, and perform feature importance analysis, model evaluation and optimization; S4: Recognize gestures in complex environments through a recognition model.
2. The gesture recognition method based on Mediapipe and Random Forest algorithm according to claim 1, characterized in that, The detection of the palm and key points of the hand in step S1 specifically includes the following steps: S10: Palm detection stage, using the Blzae Palm Detector palm detection algorithm; S11: Hand detection stage, using the Hand Landmark hand key point detection algorithm.
3. The gesture recognition method based on Mediapipe and Random Forest algorithm according to claim 2, characterized in that, The geometric feature extraction in step S2 specifically includes the angle of the knuckle vector and the angle of the interphalangeal vector; the angle of the knuckle vector and the angle of the interphalangeal vector are calculated based on the coordinates of the key points of the hand; for each finger knuckle, the angle between adjacent phalangeal vectors is calculated; for different fingers, the angle between the corresponding fingertip vectors is calculated.
4. The gesture recognition method based on Mediapipe and Random Forest algorithm according to claim 3, characterized in that, The data preprocessing in step S2 specifically includes loading the original data, grouping by category, deleting duplicate samples, handling missing values, handling outliers, and saving the processing results.
5. The gesture recognition method based on Mediapipe and Random Forest algorithm according to claim 4, characterized in that, The random forest algorithm training process in step S3 mainly includes gesture feature data processing, dataset partitioning, model construction and training, model evaluation, feature dimensionality reduction, and parameter adjustment.
6. The gesture recognition method based on Mediapipe and Random Forest algorithm according to claim 5, characterized in that, The gesture feature data processing includes processing outliers and duplicate values in the dataset.
7. The gesture recognition method based on Mediapipe and Random Forest algorithm according to claim 6, characterized in that, The model building and training process involves using the Random Forest Classifier from the sklearn.ensemble library to construct a random forest classifier model and setting several key hyperparameters.
8. The gesture recognition method based on Mediapipe and Random Forest algorithm according to claim 7, characterized in that, Step S4 specifically includes creating a graphical user interface using Python's tkinter library; adding a start recognition button, a text box or label to display the recognition results, and an area component to display the camera image to the interface; The gesture recognition function implemented in the previous steps is encapsulated into the corresponding function and bound to the event of the interface component. The gesture recognition function is called when the start recognition button is clicked.