A gesture recognition method and apparatus

By constructing a multi-channel gesture recognition model and converting it into a single-channel model, the problems of not being able to customize gesture categories and real-time performance in existing technologies are solved, and efficient gesture recognition on edge devices is achieved.

CN118430067BActive Publication Date: 2026-11-27NANCHANG VIRTUAL REALITY RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410604675.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2023-12-29
Filing Date
2024-05-15
Publication Date
2026-11-27
Estimated Expiration
2044-05-15

AI Technical Summary

Technical Problem

Existing gesture recognition algorithms cannot customize gesture categories according to user needs and cannot meet real-time requirements on edge devices, affecting user experience.

Method used

A multi-channel gesture recognition model and loss function are constructed. Through data augmentation and loss function optimization training, the final multi-channel gesture recognition model is obtained and equivalently converted into a single-channel gesture recognition model. Gesture features are extracted using the single-channel model and compared with the database for similarity.

Benefits of technology

It enables the customization of gesture categories according to user needs and meets real-time requirements on edge devices, thereby improving the accuracy of gesture recognition and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118430067B_ABST
    Figure CN118430067B_ABST
Patent Text Reader

Abstract

The application provides a gesture recognition method and device, gesture features of each gesture type are extracted through a single-path gesture recognition network model, and then gesture features of a to-be-recognized gesture type are compared with gesture features of each gesture type in a gesture database in terms of similarity, if the similarity is within a preset threshold range, it is determined that the gesture type in the to-be-recognized gesture grayscale image and the gesture type in the gesture database are the same gesture type, through the embodiment of the application, the gesture type in the grayscale image can be accurately recognized, and then the gesture category can be customized according to the user demand, and the real-time requirement on the edge device can be met, and the experience of the user is not affected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of gesture processing technology, and in particular to a gesture recognition method and apparatus. Background Technology

[0002] In practical applications, gesture recognition models need to be customized with new gesture categories based on user needs. On edge devices, the algorithm model needs to achieve high recognition accuracy while also meeting real-time requirements for a better user experience (i.e., fast inference speed). However, most existing gesture recognition algorithms can only recognize specific, trained gesture categories and employ deep and wide network models to ensure accuracy. These methods cannot customize gesture categories based on user needs, nor can they meet the real-time requirements on edge devices, directly impacting the user experience. Summary of the Invention

[0003] In order to solve or alleviate the problems in existing technologies.

[0004] In a first aspect, embodiments of this application provide a gesture recognition method, including:

[0005] Construct a multi-channel gesture recognition model and loss function;

[0006] Obtain a grayscale image of the gesture and annotate the grayscale image of the gesture;

[0007] The labeled grayscale image of the gesture is processed to obtain the grayscale image of the gesture to be trained.

[0008] The multi-way gesture recognition model is trained by inputting the grayscale image of the gesture to be trained into the multi-way gesture recognition model, and the multi-way gesture recognition model is optimized by the loss function until convergence, thus obtaining the final multi-way gesture recognition model.

[0009] The final multi-channel gesture recognition model is equivalently converted into a single-channel gesture recognition model;

[0010] The grayscale image of the gesture to be recognized is input into the single-channel gesture recognition model in order to extract the gesture features of each gesture type;

[0011] The gesture features of each gesture type are extracted and compared with the gesture features of each gesture type in the gesture database. If the similarity is within a preset threshold range, the gesture type in the grayscale image of the gesture to be identified is determined to be the same type of gesture as the gesture type in the gesture database.

[0012] Compared with existing technologies, this application provides a gesture recognition method. It extracts gesture features for each gesture type through a single-channel gesture recognition network model. Then, it compares the similarity of the extracted gesture features of the gesture type to be recognized with the gesture features of each gesture type in the gesture database. If the similarity is within a preset threshold range, it is determined that the gesture type in the grayscale image to be recognized and the gesture type in the gesture database are the same type of gesture. This application can more accurately identify the gesture type in the grayscale image, and thus customize the gesture category according to user needs, meet the real-time requirements on edge devices, and will not affect the user experience.

[0013] Secondly, embodiments of this application provide a gesture recognition method, including:

[0014] The construction module is used to construct the multi-channel gesture recognition model and loss function;

[0015] The annotation module is used to acquire a grayscale image of a gesture and to annotate the grayscale image of the gesture.

[0016] The processing module is used to process the labeled gesture grayscale image to obtain the gesture grayscale image to be trained;

[0017] The training module is used to train the multi-way gesture recognition model by inputting the grayscale image of the gesture to be trained into the model, and to optimize the training of the multi-way gesture recognition model through the loss function until convergence, so as to obtain the final multi-way gesture recognition model.

[0018] The conversion module is used to convert the final multi-channel gesture recognition model into an equivalent single-channel gesture recognition model.

[0019] The extraction module is used to input the grayscale image of the gesture to be recognized into the single-channel gesture recognition model in order to extract the gesture features of each gesture type;

[0020] The comparison module is used to compare the similarity of the extracted gesture features of each gesture type with the gesture features of each category in the gesture database. If the similarity is within a preset threshold range, it is determined that the gesture type in the grayscale image of the gesture to be identified is the same as the gesture type in the gesture database.

[0021] Compared with the prior art, the beneficial effects of the gesture recognition device provided in this application are the same as those in the first aspect, and will not be repeated here. Attached Figure Description

[0022] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. Some specific embodiments of this application will be described in detail below with reference to the accompanying drawings in an exemplary and non-limiting manner. The same reference numerals in the drawings designate the same or similar parts or components. Those skilled in the art should understand that these drawings are not necessarily drawn to scale. In the drawings:

[0023] Figure 1 This is a flowchart illustrating a gesture recognition method provided in an embodiment of this application;

[0024] Figure 2 This is a schematic diagram of the structure of a gesture recognition method device provided in an embodiment of this application. Detailed Implementation

[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some, not all, of the embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative effort should fall within the scope of protection of the present application.

[0026] Firstly, such as Figure 1 As shown, this application provides a gesture recognition method, including:

[0027] Step S01: Construct a multi-channel gesture recognition model and loss function;

[0028] It should be noted that the backbone network structure of the multi-path gesture recognition model includes multiple multi-branch convolutional modules, which perform convolution processing on the input gesture grayscale image to obtain the gesture feature vector.

[0029] Step S02: Obtain a grayscale image of the gesture and annotate the grayscale image of the gesture;

[0030] It should be noted that specific gestures are detected from the grayscale image of the gesture and labeled for subsequent processing.

[0031] Step S03: Process the labeled gesture grayscale image to obtain the gesture grayscale image to be trained;

[0032] Step S03 specifically includes:

[0033] Mark gesture bounding boxes on the grayscale image of the gesture;

[0034] Divide the grayscale images of gestures with labeled gesture boxes into training and testing sets;

[0035] Geometric and color transformations are performed on the grayscale images of gestures in the training set, and the grayscale images of gestures in the training set are fused with different backgrounds.

[0036] The geometric transformations include: flipping, rotating, cropping, deforming, and scaling; the color transformations include: noise, blurring, color changing, erasing, and filling.

[0037] Specifically, grayscale images of various gesture types are captured using a grayscale camera, and then these grayscale images are classified into training and testing sets.

[0038] Based on the training set obtained above, gesture images are obtained through the gesture detection algorithm model.

[0039] Data augmentation is performed on the gesture images obtained in the steps described above. Data augmentation methods include: geometric transformations (flipping, rotating, cropping, deforming, and scaling) and color transformations (noise, blurring, color shifting, erasing, and filling). Noise in color transformations refers to randomly adding noise to the original image; the most common approach is to add Gaussian noise. Color shifting in color transformations refers to adding or subtracting certain color components or changing the order of color channels in a specific color space.

[0040] Subsequently, based on the data-augmented training set, a multi-way gesture recognition model is trained to obtain the trained multi-way gesture recognition model.

[0041] Step S04: The multi-way gesture recognition model is trained by inputting the grayscale image of the gesture to be trained into the model, and the multi-way gesture recognition model is optimized by the loss function until convergence, thus obtaining the final multi-way gesture recognition model.

[0042] The backbone network structure of the multi-channel gesture recognition model includes a multi-branch convolutional module. Step S04, which involves training the multi-channel gesture recognition model by inputting the grayscale image of the gesture to be trained into the model, specifically includes:

[0043] The gesture grayscale images are processed by a multi-branch convolution module to obtain a set of feature vectors for each gesture grayscale image;

[0044] The multi-path gesture recognition model is trained using the feature vector set of each gesture grayscale image.

[0045] Specifically, the gesture grayscale image, with dimensions of 1 (number of grayscale image channels) × 112 (height) × 112 (width), first passes through a multi-branch 5×5 convolutional module (composed of two parallel 5×5 convolutional kernels, one parallel 3×3 convolutional kernel, and one parallel 1×1 convolutional kernel) in the backbone network structure of the multi-path gesture recognition model to obtain a gesture feature map with a size of 128×56×56. Then, it passes through a multi-branch 1×1 convolutional module (composed of two parallel 1×1 convolutional kernels and one parallel direct-connect module) to obtain a gesture feature map with a size of 128×56×56. Then, it passes through a similar combination structure (composed of multi-branch 5×5 convolutional modules and multi-branch 1×1 convolutional modules) in sequence. The backbone network structure of the multi-path gesture recognition model finally outputs a 512-dimensional (vector with 512 numbers) gesture feature vector. (Note: If the gesture feature map size remains unchanged after passing through a multi-branch convolutional module, then the multi-branch convolutional module contains directly connected modules; otherwise, it does not contain directly connected modules.)

[0046] This application trains the multi-way gesture recognition model using the ArcFace Loss loss function. The ArcFace Loss loss function can make the same gesture type "intra-class cohesive" and different gesture types "inter-class open". Moreover, the ArcFace Loss loss function has low complexity and high training efficiency. The ArcFace Loss loss function does not need to be jointly supervised with other loss functions and can converge easily.

[0047] The specific expression is:

[0048]

[0049] Where S is the feature scale. For the normalized feature vector of each gesture grayscale image and normalized weight matrix The angle between them, m is θy i The additional angle threshold, yi is the i-th type of gesture, N is the number of gesture categories, θ j For and θy i Different gesture types, θ j For the normalized feature vector of each gesture grayscale image and normalized weight matrix The angle between them.

[0050] Step S05: Convert the final multi-channel gesture recognition model into a single-channel gesture recognition model.

[0051] In this embodiment of the application, step S05 specifically uses reparameterization technology to first construct a series of structures (generally used for training) and then convert their parameters into another set of parameters (generally used for inference), thereby converting this series of structures into another series of structures.

[0052] Step S05 specifically includes:

[0053] The multi-branch convolutional module and the BN layer connected to the multi-branch convolutional module in the final multi-way gesture recognition model are equivalently converted into a convolutional module with bias.

[0054] The multi-branch convolutional module in the final multi-way gesture recognition model is converted into multiple parallel convolutional kernels with the same kernel size;

[0055] Multiple parallel convolutional kernels with the same kernel size and biases are added together and the average value of the multiple parallel convolutional kernels with biases is calculated. Then, a single-path gesture recognition model is obtained based on the average value.

[0056] The conversion of the multi-branch convolutional module and the BN layer connected to the multi-branch convolutional module in the final multi-way gesture recognition model into an offset convolutional module is achieved by the following formula:

[0057]

[0058] Where W' is the weight of the biased convolutional module, b' is the bias of the biased convolutional module, W is the weight of the unbiased convolutional module before transformation, σ is the standard deviation of the training set, μ is the mean of the training set, γ is the scaling factor of the BN layer, and β is the translation amount of the BN layer.

[0059] Specifically, the trained convolutional layers and their subsequent BN layers can be equivalently transformed into biased convolutional layers, i.e., the BN layer operations are absorbed.

[0060] Taking a 3×3 convolution kernel as an example, the directly connected module is converted into a 1×1 convolution kernel, and a 1×1 convolution kernel with the identity matrix as the convolution kernel is constructed. The 1×1 convolution kernel is equivalently converted into a 3×3 convolution kernel by padding with zeros. In this way, a multi-branch convolution module (a parallel directly connected module, a parallel 1×1 convolution kernel and a parallel 3×3 convolution kernel) can be converted into three parallel 3×3 convolution kernel multi-branch modules.

[0061] Based on the linear property of convolution (specifically, additivity), we have conv(x,W1)+conv(x,W2)+conv(x,W3)=conv(x,W1+W2+W3). During inference, after performing the absorption BN layer operation, multiple parallel convolution kernels and bias convolution modules with the same kernel size are added together and the average value is calculated. Thus, the output of each multi-branch convolution module before and after the transformation is exactly the same. In this way, the multi-branch convolution module can be converted into a single-path module, and the trained multi-path gesture recognition model can be equivalently converted into a single-path gesture recognition model.

[0062] Step S06: Input the grayscale image of the gesture to be recognized into the single-channel gesture recognition model in order to extract the gesture features of each category of gesture;

[0063] Step S06 can improve the efficiency of extracting gesture features for each gesture type.

[0064] Step S07: The gesture features of each gesture type are extracted and compared with the gesture features of each gesture type in the gesture database. If the similarity between the two is within the preset threshold range, it is determined that the gesture type in the grayscale image of the gesture to be identified is the same type of gesture as the gesture type in the gesture database.

[0065] It should be noted that this embodiment deploys the single-channel gesture recognition network model from this application embodiment on an edge device, such as a VR device. The single-channel gesture recognition network model extracts gesture features for each gesture type. Then, the extracted gesture features for the gesture type to be recognized are compared with the gesture features for each gesture type in the gesture database. If the similarity is within a preset threshold range, the gesture type in the grayscale image to be recognized is determined to be the same type of gesture as the gesture type in the gesture database.

[0066] Specifically, in this embodiment, after the backbone network structure of the single-path gesture recognition model extracts gesture features, it determines whether they belong to the same category by calculating the similarity of gesture features of different gesture types. In this way, it is only necessary to collect several grayscale images of the same gesture type from different angles. After the gesture features are extracted, they are compared with the gesture types in the gesture database. If the similarity is high, it is determined that the gesture type in the grayscale image of the gesture to be recognized is the same type of gesture as the gesture type in the gesture database. Then, the gesture type is added to the gesture database to update the gesture database. In this way, the gesture type required by the user can be customized. Combined with the novel structural reparameterization technology, structural reparameterization decouples the network architecture during training and inference. That is, it can simultaneously utilize the advantages of multi-path model training (e.g., high performance) and the advantages of single-path model in actual application (e.g., fast speed, low memory). When the single-path gesture recognition model is deployed in edge devices, it meets the user's gesture type customization needs.

[0067] In another embodiment of this application, if the difference in similarity between the extracted gesture features of each gesture type and the gesture features of each gesture type in the gesture database is not within a preset threshold range, the method further includes:

[0068] Determine whether the gesture type corresponding to the extracted gesture features is a gesture type that is not stored in the gesture database;

[0069] If not, add the gesture type corresponding to the extracted gesture features to the gesture database to update the gesture database;

[0070] If so, delete the gesture type corresponding to the extracted gesture features.

[0071] In the above embodiments of this application, if the difference in similarity between the gesture features of each extracted gesture type and the gesture features of each gesture type in the gesture database is not within a preset threshold range, it is also necessary to determine whether the gesture type corresponding to the extracted gesture features is a gesture type that is not stored in the gesture database. If it is determined to be a gesture type that can be stored in the gesture database, then this gesture type will be stored. This can prevent some infrequently used gesture types from being added to the gesture database.

[0072] Secondly, such as Figure 2 As shown in the embodiments of this application, a gesture recognition method is also provided, including:

[0073] Module 21 is used to construct a multi-channel gesture recognition model and a loss function;

[0074] The annotation module 22 is used to acquire a grayscale image of a gesture and to annotate the grayscale image of the gesture.

[0075] Processing module 23 is used to process the labeled gesture grayscale image to obtain the gesture grayscale image to be trained;

[0076] Training module 24 is used to train the multi-way gesture recognition model by inputting the grayscale image of the gesture to be trained into the model, and to optimize the training of the multi-way gesture recognition model through the loss function until convergence, so as to obtain the final multi-way gesture recognition model.

[0077] The conversion module 25 is used to convert the final multi-channel gesture recognition model into a single-channel gesture recognition model.

[0078] Extraction module 26 is used to input the grayscale image of the gesture to be recognized into the single-channel gesture recognition model in order to extract the gesture features of each gesture type;

[0079] The comparison module 27 is used to compare the similarity of the extracted gesture features of each gesture type with the gesture features of each gesture type in the gesture database. If the similarity between the two is within a preset threshold range, it is determined that the gesture type in the grayscale image of the gesture to be identified is the same type of gesture as the gesture type in the gesture database.

[0080] Compared with the prior art, the beneficial effects of the gesture recognition device provided in this application are the same as those in the first aspect, and will not be repeated here.

[0081] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A gesture recognition method, characterized in that, include: Construct a multi-channel gesture recognition model and loss function; Acquire a grayscale image of the gesture and annotate the grayscale image of the gesture; The labeled grayscale image of the gesture is processed to obtain the grayscale image of the gesture to be trained. The multi-way gesture recognition model is trained by inputting the grayscale image of the gesture to be trained into the multi-way gesture recognition model, and the multi-way gesture recognition model is optimized by the loss function until convergence, thus obtaining the final multi-way gesture recognition model. The final multi-channel gesture recognition model is equivalently converted into a single-channel gesture recognition model; The grayscale image of the gesture to be recognized is input into the single-channel gesture recognition model in order to extract the gesture features of each gesture type; The gesture features of each gesture type are extracted and compared with the gesture features of each gesture type in the gesture database. If the similarity between the two is within the preset threshold range, the gesture type in the grayscale image of the gesture to be identified is determined to be the same type of gesture as the gesture type in the gesture database. The process of converting the final multi-channel gesture recognition model into a single-channel gesture recognition model includes: The multi-branch convolutional module and the BN layer connected to the multi-branch convolutional module in the final multi-way gesture recognition model are equivalently converted into a convolutional module with bias. The multi-branch convolutional module in the final multi-way gesture recognition model is converted into a convolutional kernel with the same kernel size; Convolutional kernels with the same kernel size and biases are added together and the average value of multiple parallel convolutional kernels with biases is calculated. Then, a single-channel gesture recognition model is obtained based on the average value.

2. The gesture recognition method as described in claim 1, characterized in that, The process of processing the labeled grayscale image of the gesture to obtain the gesture image to be trained includes: Mark gesture bounding boxes on the grayscale image of the gesture; The grayscale images of gestures with labeled gesture boxes are divided into training and testing sets; Geometric and color transformations are performed on the grayscale images of gestures in the training set, and the grayscale images of gestures in the training set are fused with different backgrounds. The geometric transformations include: flipping, rotating, cropping, deforming, and scaling; the color transformations include: noise, blurring, color changing, erasing, and filling.

3. The gesture recognition method as described in claim 1, characterized in that, The backbone network structure of the multi-channel gesture recognition model includes a multi-branch convolutional module. The training process involves inputting the grayscale image of the gesture to be trained into the multi-channel gesture recognition model, including: The gesture grayscale images are processed by a multi-branch convolution module to obtain a set of feature vectors for each gesture grayscale image; The multi-path gesture recognition model is trained using the feature vector set of each gesture grayscale image.

4. The gesture recognition method as described in claim 1, characterized in that, The loss function is L3, and its specific expression is as follows: Where S is the feature scale. For the normalized feature vector of each gesture grayscale image and normalized weight matrix The angle between them, m is θy i The additional angle threshold, yi is the i-th type of gesture, N is the number of gesture categories, θ j For and θy i Different gesture types, θ j For the normalized feature vector of each gesture grayscale image and normalized weight matrix The angle between them.

5. The gesture recognition method as described in claim 4, characterized in that, The conversion of the multi-branch convolutional module and the BN layer connected to the multi-branch convolutional module in the final multi-path gesture recognition model into an offset convolutional module is achieved using the following formula: , Where W' is the weight of the biased convolutional module, b' is the bias of the biased convolutional module, and W is the weight of the unbiased convolutional module before transformation. The standard deviation of the training set. The mean of the training set. This is the scaling factor for the BN layer. This represents the translation amount of the BN layer.

6. The gesture recognition method as described in claim 1, characterized in that, If the difference in similarity between the extracted gesture features of each gesture type and the gesture features of each gesture type in the gesture database is not within a preset threshold range, the method further includes: Determine whether the gesture type corresponding to the extracted gesture features is a gesture type that is not stored in the gesture database; If not, add the gesture type corresponding to the extracted gesture features to the gesture database to update the gesture database; If so, delete the gesture type corresponding to the extracted gesture features.

7. A gesture recognition method, characterized in that, include: The construction module is used to construct the multi-channel gesture recognition model and loss function; The annotation module is used to acquire a grayscale image of a gesture and to annotate the grayscale image of the gesture. The processing module is used to process the labeled gesture grayscale image to obtain the gesture grayscale image to be trained; The training module is used to train the multi-way gesture recognition model by inputting the grayscale image of the gesture to be trained into the model, and to optimize the training of the multi-way gesture recognition model through the loss function until convergence, so as to obtain the final multi-way gesture recognition model. The conversion module is used to convert the final multi-channel gesture recognition model into an equivalent single-channel gesture recognition model. The extraction module is used to input the grayscale image of the gesture to be recognized into the single-channel gesture recognition model in order to extract the gesture features of each gesture type; The comparison module is used to compare the similarity of the extracted gesture features of each gesture type with the gesture features of each gesture type in the gesture database. If the similarity is within a preset threshold range, it is determined that the gesture type in the grayscale image of the gesture to be identified is the same type of gesture as the gesture type in the gesture database. The process of converting the final multi-channel gesture recognition model into a single-channel gesture recognition model includes: The multi-branch convolutional module and the BN layer connected to the multi-branch convolutional module in the final multi-way gesture recognition model are equivalently converted into a convolutional module with bias. The multi-branch convolutional module in the final multi-way gesture recognition model is converted into a convolutional kernel with the same kernel size; Convolutional kernels with the same kernel size and biases are added together and the average value of multiple parallel convolutional kernels with biases is calculated. Then, a single-channel gesture recognition model is obtained based on the average value.

Citation Information

Patent Citations

  • Somatosensory dynamic gesture recognition method fusing image and physiological signal double channels

    CN111476161A

  • Real-time sign language recognition and translation system and method based on edge device

    CN117218725A