A method, device, electronic device and storage medium for gesture recognition

Through the combination of the first neural network and the classification neural network, the representation vector of the gesture in the embedding space is calculated and interaction status information is generated, which solves the problem of low accuracy of ambiguity and unknown gesture recognition in the existing gesture recognition technology, and improves the accuracy of gesture interaction. accuracy and robustness.

CN112446296BActive Publication Date: 2024-10-22HANGZHOU YIXIAN XIANJIN TECH CO LTD
8 Cites 0 Cited by

Patent Information

Application Number
CN202011195452.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-30
Publication Date
2024-10-22
Estimated Expiration
2040-10-30

AI Technical Summary

Technical Problem

Existing gesture recognition technology has low accuracy when dealing with ambiguous gestures and unknown gestures, resulting in frequent false triggers and misoperations, and a lack of effective solutions.

Method used

The first neural network detector is used to obtain the bounding box of the hand in the image to be recognized, and the representation vector of the gesture in the embedding space is calculated through preprocessing and classification neural network, and the final interaction state information is generated by combining the category results and robustness results to solve Recognition difficulties with ambiguous and unknown gestures.

Benefits of technology

The accuracy and robustness of gesture recognition are improved, false triggers and misoperations are reduced, and more accurate gesture interaction is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112446296B_ABST
    Figure CN112446296B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device, electronic device and storage medium for gesture recognition, wherein the method obtains an image to be recognized; uses a first neural network detector to detect a first bounding box of all hands in the image to be recognized, preprocesses the first bounding box to obtain a first preprocessed image, uses a classification neural network to calculate a representation vector of the gesture in the first preprocessed image in an embedding space, and obtains a category result and a robustness result of the gesture based on the representation vector; and generates final interaction state information based on the category result and the robustness result according to actual applications. The present application solves the problem of low accuracy of gesture recognition methods in the case of ambiguous gestures and unknown gestures, and realizes more accurate gesture interaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device, and storage medium for gesture recognition. Background Art

[0002] With the rapid development of the internet and computer technology, gesture recognition technology is also developing rapidly. Gesture recognition is a natural and convenient way for human-computer interaction. By recognizing gestures and binding functions, users can quickly access related application interfaces across multiple levels, providing a fast and convenient way of interaction.

[0003] Related technologies typically use neural networks and other methods for gesture recognition. However, the definition of static gestures cannot accurately determine the degree of bending of each joint or the degree of pinching between fingers. The gesture collection process is even more uncontrollable. The above uncertainties will cause great trouble to the gesture recognition task. For example, is a half-pinched hand considered pinched or not pinched? How wide is the hand open to be considered open? What category should some undefined gestures that are not collected and covered be classified into? Therefore, the classification neural networks of related technologies have difficulty dealing with these things that cannot be controlled from the data source. In the normal process of gesture interaction, there will inevitably be ambiguous gestures, unknown gestures, blurred images, etc. Related technologies usually classify these non-robust gestures into a certain category, resulting in false triggers and misoperations during the interaction process, resulting in low accuracy of gesture recognition methods.

[0004] Currently, no effective solution has been proposed for the problem of low accuracy of gesture recognition methods in related technologies when ambiguous gestures and unknown gestures occur. Summary of the Invention

[0005] The embodiments of the present application provide a method, apparatus, electronic device, and storage medium for gesture recognition, to at least solve the problem of low accuracy of gesture recognition methods in related arts.

[0006] In a first aspect, an embodiment of the present application provides a method for gesture recognition, including: obtaining an image to be recognized; using a first neural network detector to detect a first bounding box of all hands in the image to be recognized; preprocessing the first bounding box to obtain a preprocessed image; using a classification neural network to calculate a representation vector of the gesture in the preprocessed image in an embedding space, and obtaining a category result and a robustness result of the gesture based on the representation vector; and according to actual applications, using the category result and the robustness result to generate final interaction state information.

[0007] In some embodiments, the preprocessing of the first bounding box to obtain a first preprocessed image includes: expanding the first bounding box into a square while keeping the center of the first bounding box unchanged; intercepting the image within the first bounding box from the image to be identified, and if the image within the first bounding box exceeds the boundary of the image to be identified, filling the portion of the image to be identified that exceeds the boundary with preset parameters; and scaling the filled image to be identified to the size required by the classification neural network to obtain the preprocessed image.

[0008] In some embodiments, before using the classification neural network to calculate the representation vector of the gesture in the pre-processed image in the embedding space, the method further includes: training the classification neural network offline.

[0009] In some embodiments, training images are collected; category labels of the training images and second bounding boxes of all gestures of the training images are annotated, wherein the training images include a training set and a test set; the training images are preprocessed based on the second bounding box; in the training set, the classification neural network and the category representation vector are trained in conjunction with the category labels; after the training is completed, the test representation vector of the test set in the embedding space is calculated, and each type of test representation vector is fitted with the category representation vector of each type as the center to obtain the maximum distance allowed by robustness between the test representation vector of each type and the corresponding category representation vector.

[0010] In some embodiments, obtaining the category result and robustness result of the gesture based on the representation vector includes: calculating the distance between the representation vector and the category representation vector, and obtaining the category result based on the category represented by the closest vector in the category representation vector; if the landing point of the closest vector is within the maximum distance range of the category representation vector, the gesture is judged to be robust.

[0011] In some embodiments, the method of generating the final interaction state information using the category results and the robustness results according to actual applications includes: using the category results and the robustness results in the current frame, or comprehensively using the category results and the robustness results in multiple consecutive frames in time sequence to generate the final required interaction information.

[0012] In some embodiments, after generating final interaction state information using the category result and the robustness result according to actual applications, the method further includes:

[0013] The interaction status information is sent to an upper layer application, and corresponding interaction feedback is obtained according to the interaction status information.

[0014] In second aspect, an embodiment of the present application provides a device for gesture recognition, including: an acquisition module, a first detection module, a classification neural network module and an interaction module; the acquisition module is used to acquire an image to be identified; the first detection module is used to use a first neural network detector to detect and obtain a first bounding box of all hands in the image to be identified, and obtain a preprocessed image; the classification neural network module is used to use a classification neural network to calculate a representation vector of the gesture in the preprocessed image in the embedding space, and obtain a category result and a robustness result of the gesture based on the representation vector; the interaction module is used to generate final interaction state information using the category result and the robustness result according to actual applications.

[0015] In a third aspect, an embodiment of the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, a gesture recognition method as described in the first aspect above is implemented.

[0016] In a fourth aspect, an embodiment of the present application provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements a gesture recognition method as described in the first aspect above.

[0017] Compared with the related art, the embodiments of the present application provide a method, device, electronic device and storage medium for gesture recognition, which obtains an image to be recognized; uses a first neural network detector to detect the first bounding box of all hands in the image to be recognized, and preprocesses the first bounding box to obtain a first preprocessed image; uses a classification neural network to calculate the representation vector of the gesture in the first preprocessed image in the embedding space, and obtains the category result and robustness result of the gesture based on the representation vector; according to actual applications, uses the category result and the robustness result to generate final interaction state information, which solves the problem of low accuracy of gesture recognition methods in the presence of ambiguous gestures and unknown gestures, and realizes more accurate gesture interaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0019] Figure 1 A hardware structure block diagram of a terminal according to a gesture recognition method according to an embodiment of the present application;

[0020] Figure 2 is a flowchart of a method for gesture recognition according to an embodiment of the present application;

[0021] Figure 3 is a flow chart of a method for training a classification neural network according to an embodiment of the present application;

[0022] Figure 4 Schematic diagram of the representation of test set data in an embedding space of a gesture recognition method according to an embodiment of the present application;

[0023] Figure 5 is a structural block diagram of a gesture recognition device according to an embodiment of the present application;

[0024] Figure 6 This is a structural block diagram of a computer-readable storage medium according to an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application. In addition, it can also be understood that although the efforts made in this development process may be complex and lengthy, for ordinary technicians in the field related to the contents disclosed in the present application, some changes such as design, manufacturing or production based on the technical contents disclosed in the present application are only conventional technical means and should not be understood as the contents disclosed in the present application being insufficient.

[0026] References to "embodiments" in this application mean that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it refer to independent or alternative embodiments that are mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described in this application may be combined with other embodiments unless there is a conflict.

[0027] Unless otherwise defined, the technical or scientific terms used in this application should have the ordinary meaning understood by a person of ordinary skill in the technical field to which this application belongs. The words "one", "a", "the" and the like used in this application do not indicate a limit on quantity and may indicate the singular or plural. The terms "include", "comprise", "have" and any variations thereof used in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units that are inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The word "multiple" used in this application means greater than or equal to two. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. The terms "first", "second", "third" and the like involved in this application are merely used to distinguish similar objects and do not represent a specific ordering of the objects.

[0028] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. Taking running on a terminal as an example, Figure 1 The hardware structure block diagram of a terminal according to a gesture recognition method of an embodiment of the present application. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 104 for storing data. Optionally, the terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0029] Memory 104 can be used to store computer programs, such as software programs and modules for application software, such as a computer program corresponding to a gesture recognition method in an embodiment of the present invention. Processor 102 executes the computer programs stored in memory 104 to execute various functional applications and data processing, thereby implementing the aforementioned method. Memory 104 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 104 may further include memory remotely located relative to processor 102, and such remote memory may be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0030] The transmission device 106 is used to receive or send data via a network. A specific example of the aforementioned network may include a wireless network provided by the terminal's communications provider. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0031] This embodiment provides a method for gesture recognition. Figure 2 is a flow chart of a gesture recognition method according to an embodiment of the present application. Figure 2 As shown, the process includes the following steps:

[0032] Step S201: Acquire an image to be recognized.

[0033] The image to be identified can be captured by a camera. For example, the camera captures a sequence of images at a certain frequency, thereby obtaining a current frame of the image to be identified in the sequence. The image to be identified can be other types of images, such as depth images, infrared images, etc., and the image categories are mainly divided into color images and grayscale images.

[0034] Step S202: Utilize a first neural network detector to detect first bounding boxes of all hands in the image to be identified, and preprocess the first bounding boxes to obtain a first preprocessed image.

[0035] The first bounding box is preprocessed to obtain an image of a size required by the classification neural network, and this image is the first preprocessed image.

[0036] Step S203: Using a classification neural network, a representation vector of the gesture in the first preprocessed image in the embedding space is calculated, and a category result and a robustness result of the gesture are obtained according to the representation vector.

[0037] Among them, the classification neural network is a complete neural network trained offline.

[0038] It should be noted that the classification neural network from step S202 to step S203 can be combined with the detection network to form a single-stage recognition task, which can also improve the robustness of gesture recognition. For example, in the single-stage YOLO detection framework, the classification part can be replaced with the embedding space described in this paper.

[0039] Step S204: generating final interaction state information using the category result and the robustness result according to actual application.

[0040] Through the above steps, by obtaining an image to be recognized, preprocessing the image to be recognized to obtain a preprocessed image, and using a classification neural network to detect the representation vector of the gesture in the embedding space in the preprocessed image, and then determining the category result of the gesture based on the representation vector, and then using the above-mentioned method of mapping to the embedding space to judge the robustness of the gesture. When the gesture meets the robustness requirements, the category of the gesture will be output, and the final interaction state information will be generated based on the category to make interactive feedback. Therefore, by optimizing the gesture recognition results, the gesture recognition method in the embodiment of the present application can cope with and detect unknown gestures or ambiguous gestures, enhance the robustness of gesture recognition, thereby solving the problem of low accuracy of the gesture recognition method and achieving more accurate gesture interaction.

[0041] In some embodiments, preprocessing the first bounding box to obtain a first preprocessed image includes:

[0042] While keeping the center of the first bounding box unchanged, the first bounding box is expanded into a square; wherein the length and width of the expanded first bounding box become the larger side of the original first bounding box; the image within the first bounding box is captured from the image to be identified, and if the image within the first bounding box exceeds the boundary of the image to be identified, the portion of the image to be identified that exceeds the boundary is filled with preset parameters; the filled image to be identified is scaled to the size required by the classification neural network to obtain the preprocessed image, so that the image input to the classification neural network is valid information.

[0043] This embodiment also provides a method for training a classification neural network. Figure 3 is a flow chart of a method for training a classification neural network according to an embodiment of the present application, such as Figure 3 As shown, the process includes the following steps:

[0044] Step S301 : collecting a training image; marking a category label of the training image and a second bounding box of all gestures in the training image, wherein the training image includes a training set and a test set.

[0045] It should be noted that the training images may be acquired by: acquiring images containing hand areas of different people, different postures, and different backgrounds by category; wherein the acquired training images are divided into a training set and a test set in proportion.

[0046] The second bounding box for the gesture in the training image can be annotated by labeling the bounding box (bbox) of the hand on the training set image. The bbox-annotated image data can be used to train a gesture detection network, which can be based on common detection frameworks such as YOLO or Fully Convolutional One-Stage Object Detection (FCOS). Assume that there are N pre-defined gesture categories, the number of each category is relatively balanced during acquisition, and the bboxes are all correct and unbiased; where N is a natural number greater than or equal to 1.

[0047] Step S302: pre-process the training set based on the second bounding box.

[0048] The image processing of the second bounding box is to expand and enhance the image of the second bounding box. Specifically, the expansion and enhancement of the image of the second bounding box includes intercepting a square area image based on the label bbox from the original image, and the center of the square area image remains unchanged. The length and width of the interception are w = max{bbox.w, bbox.h} * thre1, where bbox.w represents the width of the second bounding box, bbox.h represents the length of the second bounding box, and thre1 is the expansion multiple, which is generally 2; when exceeding the image boundary, it is padded with a fixed value thre2, where thre2 is the padded pixel value, which is generally 0 or 128. The cropped image is scaled to thre3*thre3 size, and randomly rotated thre6 times within the angle range (thre4, thre5). From the thre6 images after rotation enhancement, the central image with a resolution of thre7*thre7 is intercepted as training data. thre7 is the resolution of the network input, commonly 64, 128, or 256. thre3 is related to thre7 and can be 1.4 times thre7 to ensure that the cropped image contains as little padding as possible. thre4 and thre5 are related to the scenario of the landing project. If you need to recognize gestures with full degrees of freedom, the values ​​are 0° or 360°. If the gesture is sensitive to degrees of freedom, you can choose -30° to 30°. thre6 is the enhancement factor, which is generally 20. So far, a batch of rotation-enhanced data with known labels that is slightly larger than the original image has been obtained and fully mixed for training. During training, samples are augmented online. This includes random scaling, translation, and left-right flipping. Since the samples are slightly larger than the original images, the scaling factor is randomly selected within (thre8, 1), and the vertical and horizontal translations are kept within thre9. Typically, thre8 is set to 0.5, and thre9 is set to 30%. Common enhancement methods such as contrast, brightness, and blur enhancement can also be randomly applied.

[0049] Step S303: In the training set, the classification neural network and the category representation vector are trained in conjunction with the category label.

[0050] The above-mentioned category representation vectors are used to represent the corresponding gesture categories; all parameters of the category representation vectors are trained together with the parameters of the classification neural network. Specifically, the network input is a thre7*thre7 image, and features are extracted through the backbone. Since only classification is required, the network does not need to be large to achieve good convergence. The backbone design can be based on mainstream backbones, with a reduced number of convolution kernels and blocks. A certain degree of dropout can be added to the backbone to improve generalization.

[0051] The final embedding is obtained by using some methods on the feature map output by the backbone. The dimension of M is M. The dimension of M can be determined through experiments and has little effect on the final computational complexity. It can generally be 2 to 256.

[0052] There are many different approaches to this. If the feature map is 1*1, a 1*1 convolution or fully connected layer (FC) can be directly applied to the final M-dimensional vector. Otherwise, the final M-dimensional vector can be reshaped directly into a vector and then applied to the FC. Alternatively, pooling and convolution of the same size can be used to obtain a 1*1 feature map, which can then be applied to a 1*1 convolution or FC. These methods are computationally inefficient and performant, primarily aiming to obtain an M-dimensional representation vector. Each category of gesture is represented using k*N M-dimensional category representation vectors, with k randomly initialized values. These k*N vectors are trained repeatedly and reliably as the neural network trains. k can be 1 or 2 to 10, and should not be too large.

[0053] Among them, backbone refers to the main network, which is the main part of the designed network and is used to extract features. Backbone is not limited here and can be a simplified ResNet, Pelee or Mobilenetv3, etc.; block refers to the stacking of some basic modules of neural networks; dropout refers to a training technique that randomly discards some parameters in the neural network; embedding refers to a low-dimensional representation vector; Pooling here refers to pooling used to reduce dimensionality, and commonly used methods are maximum pooling and average pooling; reshape refers to the method of changing the size, which can be understood as stretching.

[0054] During the training process, gestures of each category will be aggregated near the vector of their own category gesture, while at the same time, the distance from gestures of other categories will be maximized. To achieve this goal, it is necessary to design loss guidance. In the embedding space, the distance within the class is smaller and aggregated to the base, while the distance between classes is larger. The calculation method of the preset loss function is shown in Formula 1:

[0055]

[0056] Here, loss refers to the optimization objective of the neural network, aiming to minimize the loss. f(x) is the output of the neural network, Base is the continuously trained class representation vector, γ is a hyperparameter that controls the degree to which distances are mapped to probabilities and can be set to 1, 0.5, or 2, depending on the time performance. λ controls the degree of regularization and can be set to 0.1, 0.01, or 0.001. This default loss function is essentially equivalent to the negative of the distance calculated using the Softmax cross entropy (as shown in the first term of Equation 1), maximizing clustering within a class and widening the distance between classes. Combined with regularization (as shown in the second term of Equation 1), the second term compresses the closest representation vectors as much as possible, resulting in better clustering within a class. It should be noted that there are many alternatives to the first term of Equation 1, primarily aimed at narrowing intra-class distances and widening inter-class distances. For example, it can be expressed as ||correct nearest distance - incorrect nearest distance normalization + error tolerance||. This intuitive approach of narrowing and widening inter-class distances can also be employed, as well as various variations and modifications.

[0057] Step S304, after the training is completed, calculate the test representation vector of the test set in the embedding space, fit the test representation vector of each type with the category representation vector of each type as the center, and obtain the maximum distance allowed by the robustness between the test representation vector of each type and the corresponding category representation vector.

[0058] Specifically, the training set and test set obtained by dividing the above training images are used in conjunction with the online enhancement method in the first step to obtain enhanced samples for network training. The optimizer can choose SGD / RADAM, etc., without limitation. After the network converges, the characterization vector Base of each category (k*N M-dimensional vectors in step S303) is stored. When the network converges well, the recognition rate of the test set can reach 96% to 99%, which is related to the scale and difficulty of the task and data set. Calculate the representation of all data in the test set in the embedding space, take Base as the center, and find the minimum distance d that can contain thre10 for each category. The points in the circle / sphere are considered to be robust (if K>1, there are multiple circles, balls or high-dimensional spheres). thre10 is related to the recognition rate of the final test set, generally taking 95% to 99%. For example Figure 4 As shown, for the case of M = 2 and K = 1, the origin graph shows the distribution of all test sets in the embedding space. The middle and right graphs show the cases where thre10 is taken at 98% and 99%, respectively. Points within the circle are considered robust, while all points outside the circle are considered non-robust. These points are likely not covered by the dataset or have ambiguous poses. The allowed distance Di for each class is recorded; where i is the class label, used to determine robustness.

[0059] Through the above steps, each type of gesture is represented by one or more, and the above representation vectors will adaptively learn as the neural network is trained to enhance the fitting effect; at the same time, the embodiment of the present application designs a classification neural network and a preset loss function. The intra-class aggregation result output by the preset loss function can make the class more aggregated and the inter-class distance larger, so the classification effect is better, and the actual recognition rate does not decrease compared with the softmax class method, and may even be improved, thereby effectively optimizing the classification neural network, improving the robustness of the neural network in the gesture recognition task, and further improving the accuracy of the gesture recognition method.

[0060] In some embodiments, obtaining a category result and a robustness result of the gesture according to the representation vector includes the following steps:

[0061] Calculate the distance between the representation vector and the category representation vector, and obtain the category result based on the category represented by the closest vector in the category representation vector; if the landing point of the closest vector is within the maximum distance range of the category representation vector, the gesture is judged to be robust.

[0062] The distance between the representation vector and the multidimensional vector is calculated. The category represented by the closest vector is the gesture recognition category. Let's assume this "closest vector" is d. If d is less than the aforementioned "minimum distance" Dr, the gesture is considered robust; otherwise, it's considered non-robust. Specifically, this step is where the classification neural network is actually used. r refers to the category number of the gesture, and Dr refers to the maximum distance range of the category representation vector obtained through data fitting in step S304 above. Gestures within this "distance parameter" are considered robust.

[0063] In some embodiments, generating final interaction state information using the category result and the robustness result according to actual applications includes:

[0064] The final required interaction information is generated by utilizing the category result and the robustness result in the current frame, or comprehensively utilizing the category result and the robustness result in multiple consecutive frames in time sequence.

[0065] Among them, the interactive state information includes static gestures, superimposed gestures and dynamic gestures. Among them, in the actual application of static gesture triggering, only robust gestures will trigger the corresponding effect. False triggering caused by motion blur or ambiguous gestures can basically be avoided to achieve a stable triggering effect. For example, by playing a piece of music with a rock gesture, based on some other classification neural networks, it is very likely that some frames of images in the waving process will be recognized as rock and then mistakenly trigger the music. The method of the present application can avoid this problem to improve the accuracy of gesture recognition.

[0066] Alternatively, in actual applications of static gesture overlays, only the robust gestures determined by the above step S203 in the embodiment of the present application will be recognized as gestures that trigger overlays, and at the same time, non-robust gestures that are continuous in time sequence will maintain the results of the previous static gestures, thereby avoiding the occurrence of misclassifications due to image blur during movement. In addition, some strategies can also be added, such as no longer maintaining the previous static gestures if thre12 consecutive frames are determined to be unknown gestures, in order to ensure the robustness of the overlay. Take a typical application as an example: spread out your palm and overlay a lucky bag on it. The lucky bag will follow as the hand moves. If the movement is too fast, causing image blur, the traditional classification neural network may misjudge it as a non-palm, resulting in the loss of the lucky bag overlay. The embodiment of the present application can achieve stable following through the detection of robust results.

[0067] Alternatively, in actual applications of dynamic gesture triggering, taking the typical application scenario of augmented reality (AR) glasses as an example, in AR glasses applications, the selection and release of objects can be completed through actions such as grabbing, pinching, and releasing. Dynamic gesture recognition is a time-series task. When it is broken down into static gestures, it is the change process from a non-grabbing gesture to a grabbing gesture, and from a non-pinch gesture to a pinching gesture. The release process is the opposite. Therefore, there are many ambiguous intermediate states in dynamic gesture recognition. For the classification neural network, it is very likely to jump between the two gestures. If a pinching action is mapped to a click, it may be repeatedly recognized as a pinching and non-pinching recognition result in the intermediate states of the middle few frames. Then, the user's pinching action is triggered by multiple clicks, which has a great impact on the user's interactive experience. The dynamic gesture recognition strategy based on the embodiment of the present application can avoid this problem. A dynamic gesture needs to switch from a robust static gesture to another corresponding static gesture. Multiple frames or a period of non-robust arbitrary gestures are allowed between the two static gestures. The number of frames for the non-robust arbitrary gesture should not be too large, for example, it can be 1 to 5 frames. Based on this strategy, there is basically no "connected point" phenomenon, and the entire dynamic gesture interaction process is very smooth and triggered without error. In addition, it is also possible to further utilize multiple consecutive frames, such as 1 to 5 frames of robust static gesture maintenance to further strengthen the guarantee of the robustness of static gestures in dynamic gestures. In traditional classification neural networks, waving your hands randomly can easily trigger actions such as grasping. Using the solution of this patent, waving your hands randomly for ten minutes can be tested to trigger without error.

[0068] It should be noted that some blurred images or some undefined gestures will also be classified as non-robust gestures to reduce false triggers, misoperations, etc. during the interaction process. For example, in some static gesture-triggered applications, making a heart shape with one hand triggers some animation effects. If you quickly wave your fist to produce some blurred images, there is a high probability of false triggering. If the patented method is used, these blurred images will most likely be recognized as unknown gestures. Among them, for AR or Virtual Reality (VR) applications, a commonly used dynamic gesture is "pinch". The embodiment of the present application can completely avoid the phenomenon of "continuous clicks". The phenomenon caused by "continuous clicks" is that the intermediate state of the finger from release to pinch is repeatedly recognized as two gestures of "release" and "pinch", which may result in multiple clicks. Therefore, in the gesture recognition method of the present application, these intermediate states will be recognized as unknown gestures, which will not affect the judgment of pinching.

[0069] Through the above embodiments, in actual applications, the gesture category results and robustness results are applied to the interaction state information that is continuously triggered in time sequence, so as to identify the corresponding effects of gestures in actual applications such as static gesture superposition and dynamic gesture triggering based on the robustness of the gesture, and then generate the final interaction state information, thereby avoiding misjudgment caused by ambiguous gestures or unknown gestures, etc., and can very conveniently find the intermediate state of gestures, unknown gestures, ambiguous gestures and non-hand states that have an impact on interaction judgment, further improving the accuracy of the gesture recognition method.

[0070] In some embodiments, after generating final interaction state information using the category result and the robustness result according to actual applications, the method further includes:

[0071] The interaction status information is sent to the upper-layer application, and corresponding interaction feedback is obtained based on the interaction status information. Among them, the use of gestures and robustness judgment results improves the robustness of various gesture interaction scenarios, significantly reducing false triggers without affecting the recall rate.

[0072] It should be noted that the above parameters thre1 to thre12 represent parameters with different values.

[0073] This embodiment also provides a gesture recognition device, which is used to implement the above-mentioned embodiments and preferred implementations. Details already described are omitted. As used below, terms such as "module," "unit," and "subunit" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0074] Figure 5is a structural block diagram of a gesture recognition device according to an embodiment of the present application. Figure 5 As shown, the gesture recognition device includes: an acquisition module 501, a first detection module 502, a classification neural network module 503 and an interaction module 504.

[0075] The acquisition module 501 is used to acquire the image to be identified; the first detection module 502 is used to use the first neural network detector to detect and obtain the first bounding box of all hands in the image to be identified, and preprocess the first bounding box to obtain a first preprocessed image; the classification neural network module 503 is used to use the classification neural network to calculate the representation vector of the gesture in the preprocessed image in the embedding space, and obtain the category result and robustness result of the gesture based on the representation vector; the interaction module 504 is used to generate final interaction state information based on the category result and the robustness result according to actual application.

[0076] Through the above embodiment, the acquisition module 501 acquires the image to be recognized, and the first detection module 502 preprocesses the image to be recognized to obtain a preprocessed image; the classification neural network module 503 uses the classification neural network detection to obtain the representation vector of the gesture in the embedding space in the preprocessed image, and then determines the category result of the gesture based on the representation vector. Then, the interaction module 504 uses the above-mentioned method of mapping to the embedding space to judge the robustness of the gesture. When the gesture meets the robustness requirements, the category of the gesture will be output, and the final interaction state information will be generated based on the category to make interactive feedback. Therefore, by optimizing the gesture recognition results, the gesture recognition device in the embodiment of the present application can cope with and detect unknown gestures or ambiguous gestures, enhance the robustness of gesture recognition, thereby solving the problem of low accuracy of traditional gesture recognition and achieving more accurate gesture interaction.

[0077] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0078] This embodiment further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0079] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0080] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:

[0081] Step S1: Obtain an image to be recognized.

[0082] Step S2: Utilize a first neural network detector to detect first bounding boxes of all hands in the image to be identified, and preprocess the first bounding boxes to obtain a first preprocessed image.

[0083] Step S3: Using a classification neural network to calculate a representation vector of the gesture in the first preprocessed image in the embedding space, and obtaining a category result and a robustness result of the gesture based on the representation vector.

[0084] Step S4: generating final interaction state information using the category result and the robustness result according to actual application.

[0085] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be repeated here.

[0086] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0087] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the gesture recognition method provided in the above embodiments are implemented.

[0088] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0089] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0090] The above embodiments only express several implementation methods of the present application. The descriptions are relatively specific and detailed, but they should not be understood as limiting the scope of the invention patent. It should be pointed out that for those skilled in the art, without departing from the concept of the present application, several variations and improvements can be made, which fall within the scope of protection of the present application. Therefore, the scope of protection of the patent application shall be based on the appended claims.

Claims

1. A method for gesture recognition, It is characterized in that include: Obtain an image to be recognized; Detecting first bounding boxes of all hands in the image to be identified using a first neural network detector, and preprocessing the first bounding boxes to obtain a first preprocessed image; Using a classification neural network to calculate a representation vector of the gesture in the first preprocessed image in an embedding space, and obtaining a category result and a robustness result of the gesture according to the representation vector; According to actual applications, generating final interaction state information using the category result and the robustness result; The interaction state information includes static gestures, superimposed gestures and dynamic gestures; non-robust gestures that are continuous in time sequence will maintain the results of the previous static gestures; The obtaining of the category result and the robustness result of the gesture according to the characterization vector includes: Calculating the distance between the representation vector and the category representation vector, and obtaining the category result according to the category represented by the vector with the closest distance in the category representation vector; If the point of the closest distance vector is within the maximum distance range of the category representation vector, the gesture is determined to be robust.

2. The method according to claim 1, It is characterized in that The preprocessing the first bounding box to obtain a preprocessed image includes: Expanding the first bounding box into a square while keeping the center of the first bounding box unchanged; intercepting the image in the first bounding box from the image to be recognized, and if the image in the first bounding box exceeds the boundary of the image to be recognized, filling the portion of the image to be recognized that exceeds the boundary with a preset parameter; The padded image to be recognized is scaled to the size required by the classification neural network to obtain the preprocessed image.

3. The method according to claim 1, It is characterized in that Before calculating the representation vector of the gesture in the preprocessed image in the embedding space using the classification neural network, the method further includes: The classification neural network is trained offline.

4. The method according to claim 3, It is characterized in that The training of the classification neural network comprises: Collecting training images; marking category labels of the training images and second bounding boxes of all gestures of the training images, wherein the training images include a training set and a test set; Preprocessing the training image based on the second bounding box; In the training set, training the classification neural network and the category representation vector in combination with the category label; After the training is completed, the test representation vector of the test set in the embedding space is calculated, and each type of test representation vector is fitted with the category representation vector of each type as the center to obtain the maximum distance allowed by the robustness between the test representation vector of each type and the corresponding category representation vector.

5. The method according to claim 1, It is characterized in that The generating final interaction state information by using the category result and the robustness result according to the actual application includes: The final required interaction state information is generated by utilizing the category result and the robustness result in the current frame, or by comprehensively utilizing the category results and the robustness results in multiple consecutive frames in time sequence.

6. The method according to claim 5, It is characterized in that After generating final interaction state information using the category result and the robustness result according to actual application, the method further includes: The interaction status information is sent to an upper layer application, and corresponding interaction feedback is obtained according to the interaction status information.

7. A gesture recognition device, It is characterized in that include: An acquisition module, a first detection module, a classification neural network module, and an interaction module; An acquisition module, used for acquiring an image to be recognized; A first detection module, configured to detect and obtain a first bounding box of all hands in the image to be identified by using a first neural network detector, and preprocess the first bounding box to obtain a first preprocessed image; A classification neural network module, used to calculate a representation vector of the gesture in the preprocessed image in an embedding space using a classification neural network, and obtain a category result and a robustness result of the gesture according to the representation vector; Calculating the distance between the representation vector and the category representation vector, and obtaining the category result according to the category represented by the closest vector in the category representation vector; if the closest vector falls within the maximum distance range of the category representation vector, determining that the gesture is robust; An interaction module is used to generate final interaction state information based on the actual application using the category results and the robustness results; wherein the interaction state information includes static gestures, superimposed gestures and dynamic gestures; non-robust gestures that are continuous in time sequence will maintain the results of the previous static gestures.

8. An electronic device comprising a memory and a processor, It is characterized in that A computer program is stored in the memory, and the processor is configured to run the computer program to execute a gesture recognition method according to any one of claims 1 to 6.

9. A storage medium, It is characterized in that The storage medium stores a computer program, wherein the computer program is configured to execute a gesture recognition method according to any one of claims 1 to 6 when running.

Citation Information

Patent Citations

  • Gesture recognition method, gesture control method, neural network training method, devices and electronic apparatus

    CN108229277A

  • Gesture recognition method, gesture recognition device and electronic device

    CN109190559A

  • Dynamic and static gesture recognition method and system

    CN109614922A

  • Robot gesture recognition method based on improved K-means clustering algorithm

    CN111368762A

  • Gesture recognition method and related device

    CN111695420A