Gesture recognition method and device, equipment and storage medium

By using the reference feature vector of the predefined set of gesture categories to calculate the similarity of the image to be identified, the problem of high computational complexity in gesture recognition technology is solved, and the efficiency and speed of gesture recognition are improved.

CN118898870APending Publication Date: 2024-11-05UBTECH ROBOTICS CORP LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410978609.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-11-05

AI Technical Summary

Technical Problem

Existing gesture recognition technology has the problem of low efficiency due to high computational complexity, especially under the limitations of hardware conditions, which makes gesture recognition slow.

Method used

By obtaining the reference feature vectors corresponding to the image to be identified and the predefined set of gesture categories, gesture features are extracted and fused, the calculation complexity when judging gesture categories is reduced, and the similarity calculation is used to determine the gesture category.

Benefits of technology

It effectively improves gesture recognition efficiency, reduces calculation complexity, and speeds up gesture recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118898870A_ABST
    Figure CN118898870A_ABST
Patent Text Reader

Abstract

The invention provides a gesture recognition method and device, equipment and a storage medium. The method comprises the following steps: acquiring an image to be recognized and a reference feature vector set corresponding to a predefined gesture category set; wherein the gesture category set comprises M gesture categories; the reference feature vector set comprises M reference feature vectors corresponding to the M gesture categories; the reference feature vector is a feature vector obtained by performing vector fusion on initial feature vectors of N sample images under the gesture category; the initial feature vector is a feature vector obtained after hand feature extraction is carried out on the sample image; performing hand feature extraction on the to-be-recognized image to obtain a to-be-recognized feature vector; and determining the gesture category of the to-be-recognized image based on the similarity between the to-be-recognized feature vector and M reference feature vectors in the reference feature vector set. According to the method, the calculation complexity during gesture category judgment can be reduced, and the gesture recognition efficiency is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Thanks to the rapid development of deep learning, computer vision and sensor technology, the application of gesture recognition methods is becoming more and more extensive. Gesture recognition technology in the field of image processing has gradually moved from laboratories to practical applications, and has expanded from early games and entertainment to wider fields, such as human-computer interaction, smart homes, and security monitoring.

[0003] However, the related technology needs to process and analyze a large amount of gesture image data during the gesture recognition process. For example, in the gesture recognition process based on the deep learning model, when the gesture category is judged by the classifier of the deep learning model, a large number of calculation operations will be performed on the extracted gesture feature data, which has high computational complexity. Due to the limitations of hardware conditions, the gesture recognition speed is slow and there is a problem of low gesture recognition efficiency. Summary of the invention

[0004] The embodiments of the present application provide a gesture recognition method, apparatus, device and storage medium. The embodiments of the present application calculate the similarity between the gesture feature vector of the image to be recognized and the reference feature vector, compare the gesture features of the image to be recognized with the predefined gesture category features to perform gesture recognition, and the predefined gesture category features are obtained by extracting and fusing features of multiple images corresponding to specific gestures, thereby reducing the computational complexity when judging the gesture category and effectively improving the gesture recognition efficiency.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] An embodiment of the present application provides a gesture recognition method, which includes: obtaining a reference feature vector set corresponding to an image to be recognized and a predefined gesture category set; wherein the gesture category set includes M gesture categories; the reference feature vector set includes M reference feature vectors corresponding to the M gesture categories; the reference feature vector is a feature vector obtained by vector fusion of initial feature vectors of N sample images under the gesture category; the initial feature vector is a feature vector obtained by hand feature extraction of the sample image; M and N are both integers greater than 1; hand feature extraction is performed on the image to be recognized to obtain a feature vector to be recognized; based on the similarity between the feature vector to be recognized and the M reference feature vectors in the reference feature vector set, the gesture category of the image to be recognized is determined.

[0007] An embodiment of the present application provides a gesture recognition device, comprising: a data acquisition module, used to acquire a reference feature vector set corresponding to an image to be recognized and a predefined gesture category set; wherein the gesture category set includes M gesture categories; the reference feature vector set includes M reference feature vectors corresponding to the M gesture categories; the reference feature vector is a feature vector obtained by vector fusion of initial feature vectors of N sample images under the gesture category; the initial feature vector is a feature vector obtained by hand feature extraction of the sample image; M and N are both integers greater than 1; a feature extraction module, used to extract hand features of the image to be recognized to obtain a feature vector to be recognized; a gesture category determination module, used to determine the gesture category of the image to be recognized based on the similarity between the feature vector to be recognized and the M reference feature vectors in the reference feature vector set.

[0008] In the above scheme, the device also includes: a reference feature vector generation module, used to obtain a first sample image set of a gesture category in the predefined gesture category set; the first sample image set includes the N sample images; hand feature extraction is performed on the N sample images under the gesture category to obtain N initial feature vectors; vector fusion is performed on the N initial feature vectors to obtain a reference feature vector of the gesture category.

[0009] In the above scheme, the reference feature vector generation module is also used to: perform hand target detection on the N sample images under the gesture category to obtain N hand target areas corresponding to the N sample images; crop out regional images corresponding to the N hand target areas from the N sample images; perform feature extraction on the regional images corresponding to the N hand target areas to obtain N initial feature vectors.

[0010] In the above scheme, the reference feature vector generation module is also used to: obtain the vector elements of the N initial feature vectors at each element position in the initial feature vector; calculate the mean of the obtained N vector elements to obtain the element mean; combine the element means at each element position into a first mean vector; and determine the first mean vector as the reference feature vector of the gesture category.

[0011] In the above scheme, the reference feature vector generation module is also used to: for each of the N initial feature vectors, use the P feature elements of the initial feature vector as feature data and the gesture category corresponding to the initial feature vector as label data to train a target classification model; wherein P is the number of feature vector elements included in the initial feature vector; based on the feature evaluation result of the initial feature vector determined by the trained target classification model, determine the importance weights of the P feature elements corresponding to the initial feature vector; wherein the feature evaluation result is the data processing result of the trained target classification model evaluating the feature importance of the initial feature vector during the classification process; based on the importance weights of the P feature elements, perform weighted calculation on the feature elements of the initial feature vector to obtain a weighted feature vector of the initial feature vector; the number of the weighted feature vectors is N; determine a second mean vector of the N weighted feature vectors; and determine the second mean vector as the reference feature vector of the gesture category.

[0012] In the above scheme, the device also includes a first similarity determination module, which is used to: perform vector splicing on the M reference feature vectors to obtain a reference feature matrix; perform similarity calculation on the feature vector to be identified and the reference feature matrix to obtain a similarity vector; wherein the elements in the similarity vector include the similarity between the feature vector to be identified and the M reference feature vectors.

[0013] In the above scheme, each element in the similarity vector corresponds to a gesture category; the gesture category determination module is also used to: normalize the similarity vector to obtain a normalized similarity vector; determine the maximum element value in the normalized similarity vector; and determine the gesture category corresponding to the maximum element value as the gesture category of the image to be identified.

[0014] In the above scheme, the device also includes a second similarity determination module, which is used to: perform Fourier transform processing on the M reference feature vectors in the reference feature vector set to obtain M frequency domain reference feature vectors; perform Fourier transform processing on the feature vector to be identified to obtain the frequency domain feature vector to be identified; perform similarity calculation on the frequency domain feature vector to be identified and the M frequency domain reference feature vectors in turn to obtain the similarity between the feature vector to be identified and the M reference feature vectors in the reference feature vector set.

[0015] In the above scheme, the feature extraction module is also used to: perform hand target detection on the image to be identified to obtain a hand target area to be identified corresponding to the image to be identified; call the feature extraction unit of the pre-trained image classification model to perform feature extraction on the image of the area to be identified corresponding to the hand target area to be identified to obtain the feature vector to be identified; wherein the pre-trained image classification model is an image classification model obtained by training based on a second sample image set with classification labels, and the feature extraction unit is the backbone network unit of the pre-trained image classification model that completes network parameter adjustment through a back-propagation algorithm during the training process.

[0016] An embodiment of the present application provides an electronic device, which includes: a memory for storing computer-executable instructions; and a processor for implementing the gesture recognition method provided in the embodiment of the present application when executing the computer-executable instructions stored in the memory.

[0017] An embodiment of the present application provides a computer-readable storage medium storing a computer program or computer-executable instructions for implementing the gesture recognition method provided in the embodiment of the present application when executed by a processor.

[0018] An embodiment of the present application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, the gesture recognition method provided in the embodiment of the present application is implemented.

[0019] The embodiments of the present application have the following beneficial effects:

[0020] Based on the similarity calculated between the gesture feature vector of the image to be identified and the reference feature vector, the gesture features of the image to be identified are compared with the predefined gesture category features to perform gesture recognition. The predefined gesture category features are obtained by extracting and fusing features of multiple images corresponding to specific gestures. Therefore, when performing gesture recognition, the computational complexity of judging the gesture category can be reduced, the gesture recognition speed can be accelerated, and the gesture recognition efficiency can be effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1A is a flowchart of a gesture recognition method provided in an embodiment of the present application;

[0022] Figure 1B is a schematic diagram of the process of hand feature extraction provided in an embodiment of the present application;

[0023] Figure 1C is a schematic diagram of a process for obtaining a reference feature vector provided in an embodiment of the present application;

[0024] Figure 1Dis a schematic diagram of a process for determining an initial feature vector provided in an embodiment of the present application;

[0025] Figure 1E It is a schematic diagram of a process of performing vector fusion to determine a feature reference matrix provided in an embodiment of the present application;

[0026] Figure 1F is a schematic diagram of a process for determining a first mean vector provided in an embodiment of the present application;

[0027] Figure 1G is a schematic diagram of a process for determining similarity provided in an embodiment of the present application;

[0028] Figure 1H is another schematic diagram of a process for determining similarity provided in an embodiment of the present application;

[0029] Fig. 1I is a schematic diagram of a flow chart of determining a gesture category provided in an embodiment of the present application;

[0030] Figure 2A is a schematic diagram of the application process of the gesture recognition model provided in the embodiment of the present application;

[0031] Figure 2B is an image schematic diagram of a hand target area provided in an embodiment of the present application;

[0032] Figure 3 is a structural diagram of a gesture recognition device provided in an embodiment of the present application;

[0033] Figure 4 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0035] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0036] In the following description, the terms "first / second / third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first / second / third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0037] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

[0038] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by those skilled in the art. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0039] The relevant data collection and processing in the embodiments of this application should be strictly in accordance with the requirements of relevant laws and regulations when applied in examples, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of authorization of laws and regulations and the personal information subject.

[0040] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0041] 1) Network Parameters, which refer to the variables inside the network unit. These variables are adjusted by the learning algorithm during the training process so that the network unit can perform specific tasks more accurately, such as weights and biases in the network unit.

[0042] 2) Training Data: It is the data set used to train the model. Training data usually contains multiple feature data and corresponding label data. The model predicts or classifies by learning the rules and patterns in the training data. The quality and quantity of training data have a crucial impact on the performance and accuracy of the model.

[0043] 3) Labeled Data refers to data in which each sample (such as an image, a piece of text, or a transaction record) in a data set has a corresponding label or target value. This label or target value is defined in advance and is usually the result that the model is expected to predict. For example, in the task of image recognition, the image and its corresponding category (such as "cat", "dog", etc.) are labeled data; in the task of email classification, the email and its corresponding category (such as "spam", "non-spam") are also labeled data. Labeled data is the basis of supervised learning, because supervised learning algorithms need to use these labels to train models so that they can make predictions on unlabeled data.

[0044] 4) Feature Data refers to the data used to describe all the information of each sample in the data set. In machine learning, feature data is the input variable used to predict the label. Features are attributes extracted from the data that are meaningful to the model, and features can represent the key information in the data. For example, in a house price prediction model, feature data may include the area of ​​the house, the number of rooms, the year of construction, etc.; in a recommendation system, feature data may include the user's historical purchase records, browsing history, ratings, etc. Selecting and constructing effective features is crucial to the performance of the model.

[0045] 5) Fourier Transform is an important mathematical tool used to convert functions or signals from the time domain (or space domain) to the frequency domain. Fourier Transform can make it easier to analyze and process the frequency components of signals or functions, and helps to identify and analyze the frequency components of signals.

[0046] 6) Object Detection is an important task in the field of computer vision, which aims to identify and locate the position and range of one or more objects in an image. In the object detection task, it is usually necessary to identify the target objects in the image and provide a bounding box and corresponding category label for each identified target.

[0047] The embodiment of the present application provides a gesture recognition method, which calculates the similarity between the gesture feature vector of the image to be recognized and the reference feature vector, compares the gesture features of the image to be recognized with predefined gesture category features to perform gesture recognition, and the predefined gesture category features are obtained by extracting and fusing features of multiple images corresponding to specific gestures. Therefore, it is possible to reduce the computational complexity when judging the gesture category, speed up the gesture recognition speed, and effectively improve the gesture recognition efficiency.

[0048] Before explaining the gesture recognition method of the embodiment of the present application, here, first explain the exemplary application of the gesture recognition device of the embodiment of the present application, and the gesture recognition device is an electronic device for implementing the gesture recognition method. In one implementation, the gesture recognition device (i.e., electronic device) provided in the embodiment of the present application can be implemented as a server. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms. Multiple servers can be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiment of the present application. The electronic device provided in the embodiment of the present application can also be implemented as a terminal device. The terminal device can be various types of terminals such as a laptop, a tablet computer, a desktop computer, a smart phone, a smart watch, a smart TV, and a car terminal. The electronic device provided in the embodiment of the present application can also be implemented as a combination of a terminal device and a server.

[0049] The gesture recognition method provided in the embodiments of the present application is described in detail below with reference to the accompanying drawings.

[0050] See also Figure 1A , Figure 1A This is an optional flow chart of the gesture recognition method provided in the embodiment of the present application. Figure 1A The steps shown are explained as Figure 1A As shown, the gesture recognition method is described by taking the execution subject of the electronic device as an example, and the method includes the following steps 101 to 103:

[0051] Step 101, obtain a reference feature vector set corresponding to the image to be identified and a predefined gesture category set; wherein the gesture category set includes M gesture categories; the reference feature vector set includes M reference feature vectors corresponding to the M gesture categories; the reference feature vector is a feature vector obtained by vector fusion of initial feature vectors of N sample images under the gesture category; the initial feature vector is a feature vector obtained by hand feature extraction of the sample image; M and N are both integers greater than 1.

[0052] In some embodiments, the image to be identified is an image containing a hand gesture for which a gesture category needs to be identified at present; the image to be identified may be a static photo or a frame in a series of video frames. The predefined gesture category set is a set containing all preset gesture categories, and each gesture category represents a different hand movement or posture, such as "clenching a fist", "extending an index finger", "thumbs up", etc. The reference feature vector set is a set of feature vectors corresponding to the predefined gesture category set, and the reference feature vector set contains reference feature vectors corresponding to each gesture category in the predefined gesture category set. The reference feature vector is a feature vector associated with a gesture category; any reference feature vector is obtained by fusing the initial feature vectors of multiple sample images under a specific gesture category. The initial feature vector is a feature vector extracted from a single sample image. The sample image is an image used to construct a reference feature vector; each gesture category has multiple sample images, and the multiple sample images may contain different states of the corresponding gesture category, such as different angles, lighting conditions, and hand colors. M represents the number of all gesture categories, and N represents the number of sample images under any gesture category. The number of sample images under different gesture categories may be different; M and N are both positive integers greater than 1.

[0053] For example, in a human-computer interaction game scenario (such as playing games with a VR helmet), it is necessary to identify the user's gesture category to control the character in the game or perform specific game actions. In the implementation process of step 101, first, the image of the user's hand area captured by the camera built into the VR helmet can be used as the user's current image to be identified; then, a predefined gesture category set can be loaded, and this predefined gesture category set contains all preset gesture categories in the game, such as "clenching fist" for attack, "extending index finger" for pointing, "thumbs up" for confirmation, etc.; then, for each gesture category, a pre-stored reference feature vector can be obtained, and these reference feature vectors are obtained by extracting initial feature vectors from multiple sample images under each gesture category and performing vector fusion on the initial feature vectors; and then the user's gesture category in the game is identified through subsequent steps. In this example, M represents the total number of all game gesture categories, for example, if there are 10 different gesture actions, then M=10; N represents the number of sample images under a certain gesture category, and 50 or more sample images can be prepared for a certain gesture category, then N=50 or a larger value.

[0054] For example, in the scenario of smart home control, users can control home appliances such as lights, televisions, and stereos through specific gestures. In the implementation process of step 101, first, the user image can be captured in real time by the camera as the image to be recognized; then, a predefined gesture category set can be loaded, which contains all preset gesture categories, such as "clenching a fist" for turning off the light, "extending the index finger" for turning off the stereo, and "thumbs up" for confirmation, etc.; then, for each gesture category, a pre-stored reference feature vector can be obtained, which is obtained by extracting the initial feature vector from multiple sample images under each gesture category and performing vector fusion on the initial feature vector; and then the user's gesture category is recognized through subsequent steps, thereby realizing intelligent control of home appliances.

[0055] For example, in the scenario of educational assistance, teachers can control the playback, switching and operation of PPT presentations through specific gestures. In the implementation process of step 101, first, the teacher's gesture image is captured by the camera as the image to be recognized; then, a predefined gesture category set can be loaded, which contains all preset gesture categories, such as "clenching fist" for pause, "extending index finger and middle finger" for full screen switching, "five fingers together" for continued playback, etc.; for each gesture category, a pre-stored reference feature vector can be obtained, which is obtained by extracting initial feature vectors from multiple sample images under each gesture category and performing vector fusion on the initial feature vectors; and then the teacher's gesture category is recognized through subsequent steps, thereby realizing intelligent control of the PPT presentation.

[0056] For example, in the scenario of drone operation, the operator can control the take-off, landing and flight path of the drone through specific gestures. In the implementation process of step 101, first, the image of the operator's hand area is captured by the camera as the operator's current image to be recognized; then, a predefined gesture category set is loaded, which contains all preset gesture categories, such as "clenching a fist" for landing, "extending the index finger" for take-off, etc.; then, for each gesture category, a pre-stored reference feature vector can be obtained, and these reference feature vectors are obtained by extracting initial feature vectors from multiple sample images under each gesture category and performing vector fusion on the initial feature vectors; finally, the operator's gesture category is recognized through subsequent steps, thereby realizing intelligent control of the drone.

[0057] For example, in the scenario of intelligent vehicle control, the driver can control the acceleration, deceleration and steering of the vehicle through specific gestures. In the implementation process of step 101, first, the image of the driver's hand area is captured by the in-vehicle camera as the driver's current image to be recognized; then, a predefined gesture category set is loaded, which contains all preset gesture categories, such as "clenching a fist" for deceleration, "extending the index finger" for acceleration, "thumbs up" for opening the sunroof, etc.; then, for each gesture category, a pre-stored reference feature vector can be obtained, which is obtained by extracting the initial feature vector from multiple sample images under each gesture category and performing vector fusion on the initial feature vector; finally, the driver's gesture category is recognized through subsequent steps, thereby realizing intelligent control of the intelligent vehicle.

[0058] For example, in the scenario of intelligent medical diagnosis, doctors can control the zooming in, zooming out and rotating of images through specific gestures. In the implementation process of step 101, first, the image of the doctor's hand area is captured by the camera in the operating room as the doctor's current image to be recognized; then, a predefined gesture category set is loaded, which contains all preset gesture categories, such as "open five fingers" for zooming in the image, "clenching a fist" for zooming out the image, "thumbs up" for rotating the image, etc.; then, for each gesture category, a pre-stored reference feature vector can be obtained. These reference feature vectors are obtained by extracting initial feature vectors from multiple sample images under each gesture category and performing vector fusion on the initial feature vectors; finally, the doctor's gesture category is identified through subsequent steps, thereby realizing intelligent control of medical images.

[0059] For example, in the scenario of smart fitness, users can control the start, stop and adjustment of fitness equipment through specific gestures. In the implementation process of step 101, first, the image of the user's hand area is captured by the built-in camera of the fitness equipment as the user's current image to be recognized; then, a predefined gesture category set is loaded, which contains all preset gesture categories, such as "clenching a fist" for starting the device, "extending the index finger" for stopping the device, "thumbs up" for adjusting the speed, etc.; then, for each gesture category, a pre-stored reference feature vector can be obtained, which is obtained by extracting the initial feature vector from multiple sample images under each gesture category and performing vector fusion on the initial feature vector; finally, the user's gesture category is identified through subsequent steps, thereby realizing intelligent control of the fitness equipment.

[0060] For example, in the scenario of intelligent security monitoring, security personnel can control the switching, zooming in and out of the monitoring screen through specific gestures. In the implementation process of step 101, first, the image of the hand area of ​​the security personnel is captured by the built-in camera of the monitoring device as the current image to be identified by the security personnel; then, a predefined gesture category set is loaded, which contains all preset gesture categories, such as "extending the index finger" represents switching the monitoring screen, "opening five fingers" represents zooming in the screen, "clenching a fist" represents zooming out the screen, etc.; then, for each gesture category, a pre-stored reference feature vector can be obtained, and these reference feature vectors are obtained by extracting initial feature vectors from multiple sample images under each gesture category and performing vector fusion on the initial feature vectors; finally, the gesture category of the security personnel is identified through subsequent steps, thereby realizing intelligent control of the monitoring screen.

[0061] Step 102: extract hand features from the image to be identified to obtain a feature vector to be identified.

[0062] In some embodiments, hand feature extraction is a process of extracting a feature vector to be identified that is related to gesture recognition from an image to be identified. This process can extract feature vectors that are helpful in distinguishing different gestures. The hand feature extraction process of obtaining the feature vector to be identified is the same as the hand feature extraction process of obtaining the initial feature vector. The feature vector to be identified is the output result of the hand feature extraction process. The feature vector to be identified is a numerical vector containing all relevant features extracted from the image to be identified. Each element in the feature vector to be identified can represent a specific attribute or feature of the gesture in the image to be identified.

[0063] In some embodiments, see Figure 1B , Figure 1A The illustrated step 102 can be implemented through steps 1021 to 1022, which are described in detail below.

[0064] Step 1021, performing hand target detection on the image to be identified, and obtaining a hand target area to be identified corresponding to the image to be identified.

[0065] In some embodiments, hand target detection refers to the process of using computer vision technology to identify and locate the hand in the image to be identified; the purpose of hand target detection is to determine which area in the image contains the hand, and to return the coordinates of the two diagonal points of the bounding rectangle of this area; hand target detection can use traditional image processing technology or deep learning technology and other target detection models to accurately identify and locate the hand, and can effectively extract the area containing the hand even in complex backgrounds or different lighting conditions. The hand target area to be identified is the output result of the hand target detection process on the image to be identified, and the hand target area to be identified is the area in the image to be identified that is determined to be a hand after detection.

[0066] Through step 1021, the hand target area can be accurately separated from the image to be recognized, eliminating the interference of the background and other objects, providing more accurate input data for the subsequent initial feature vector extraction, which helps to reduce the computational complexity and improve the accuracy of gesture recognition.

[0067] Step 1022, calling the feature extraction unit of the pre-trained image classification model, performing feature extraction on the image of the area to be identified corresponding to the hand target area to be identified, and obtaining a feature vector to be identified; wherein the pre-trained image classification model is an image classification model trained based on a second sample image set with classification labels, and the feature extraction unit is a backbone network unit of the pre-trained image classification model that completes network parameter adjustment through a back propagation algorithm during the training process.

[0068] In some embodiments, the pre-trained image classification model is a pre-trained deep learning model for classifying images. The feature extraction unit is a backbone network unit (the main network structure in the pre-trained image classification model) in the pre-trained image classification model responsible for extracting feature vectors from the input image. The feature extraction unit can be a network unit composed of convolutional layers, pooling layers and other layers. The feature extraction unit can automatically learn and extract high-level features of the image and characterize these high-level features through feature vectors. The image of the area to be identified is the image portion corresponding to the hand target area to be identified obtained by hand target detection in step 1021. The image data set used to train the pre-trained image classification model is a second sample image set with classification labels, and each image in the second sample image set with classification labels carries a corresponding classification label, and these images may not be limited to images containing only hands.

[0069] Through step 1022, the feature extraction unit of the pre-trained image classification model is called to accurately extract the key feature information of the hand from the image of the area to be identified; and because the pre-trained image classification model is trained on a large number of second sample image sets with classification labels, the pre-trained image classification model is not limited by the number of images containing hands during the training process, and its feature extraction unit can have good generalization ability, can adapt to different types of images, and accurately extract the feature information of the image.

[0070] Next, see Figure 1A , and the description continues with step 102 above.

[0071] Step 103: Determine the gesture category of the image to be recognized based on the similarity between the feature vector to be recognized and the M reference feature vectors in the reference feature vector set.

[0072] In some embodiments, similarity is a quantitative indicator that describes the degree of closeness between the recognition feature vector and the reference feature vector; the higher the similarity, the more similar the recognition feature vector is to the reference feature vector in terms of features, that is, the gesture in the image to be recognized and the gesture corresponding to the reference feature vector are more likely to belong to the same category; in the implementation process, the similarity can be determined by calculating the Euclidean distance, cosine similarity, or Manhattan distance. All similarities can be sorted, the largest similarity can be selected, and then the gesture category to which the gesture in the image to be recognized belongs can be determined based on the reference feature vector that matches the similarity. In order to improve the accuracy of gesture recognition, a similarity threshold can also be set. Only when the largest similarity exceeds this similarity threshold, the gesture category corresponding to the reference feature vector that matches the similarity is determined as a valid gesture category.

[0073] Through steps 101 to 103, gesture recognition can be performed by calculating the similarity based on the gesture feature vector of the image to be recognized and the reference feature vector, and comparing the gesture features of the image to be recognized with the predefined gesture category features. The predefined gesture category features are obtained by extracting and fusing features of multiple images corresponding to specific gestures, which can reduce the computational complexity of determining the gesture category, speed up gesture recognition, and effectively improve gesture recognition efficiency.

[0074] In some embodiments, see Figure 1C (where A represents step 101 to step 103). Before step 101, the reference feature vector in step 101 can be obtained through steps 201 to 203, which are described in detail below.

[0075] Step 201 : obtaining a first sample image set of a gesture category in a predefined gesture category set; the first sample image set includes N sample images.

[0076] In some embodiments, the first sample image set is a set of sample images collected for each gesture category in a predefined set of gesture categories; each gesture category has a corresponding first sample image set.

[0077] Step 202: extract hand features from N sample images under the gesture category to obtain N initial feature vectors.

[0078] In some embodiments, the initial feature vector is a feature vector extracted from a sample image of each gesture category. The initial feature vector is the result of hand feature extraction for each sample image. The initial feature vector maps key features of the gesture, such as hand shape, posture, key point positions, etc.

[0079] In some embodiments, see Figure 1D , Figure 1C The illustrated step 202 may be implemented through steps 2021 to 2023, which are described in detail below.

[0080] Step 2021, performing hand target detection on N sample images under the gesture category to obtain N hand target areas corresponding to the N sample images.

[0081] In some embodiments, N sample images under the gesture category can be loaded, and hand target detection can be performed on each sample image using the trained hand target detection algorithm to obtain N hand target areas corresponding to the N sample images, and the hand target areas and the sample images are in a one-to-one correspondence; the hand target detection algorithm can be a deep learning method (such as a convolutional neural network) or a traditional image processing technique (such as edge detection, color segmentation, etc.), etc.

[0082] Step 2022, cropping N area images corresponding to the hand target areas from the N sample images.

[0083] In some embodiments, N sample images may be traversed, and for each sample image traversed, the starting point and cropping size of the cropping may be determined according to the position and size of the corresponding hand target area; then, image processing techniques such as pixel-level cropping or area copying may be used to crop a partial image containing only the hand area from the original sample image, and the partial image is the regional image corresponding to the hand target area, and finally N regional images may be obtained. Each of the N hand target areas corresponds to a regional image, that is, there is a one-to-one correspondence between the regional image and the hand target area.

[0084] Step 2023, performing feature extraction on the area images corresponding to the N hand target areas to obtain N initial feature vectors.

[0085] In some embodiments, feature extraction can be performed on the regional images corresponding to the N hand target areas obtained in step 2022 by using methods such as scale-invariant feature transform (SIFT), speeded-up robust features (SURF), histograms of oriented gradients (HOG), local binary patterns (LBP), residual network (ResNet) or densely connected network (DenseNet), and the non-vector extraction results are vectorized and converted to finally obtain N initial feature vectors, which are in one-to-one correspondence with the regional images corresponding to the hand target areas.

[0086] Through step 2021 to step 2023, descriptive and distinguishing features for the hand can be automatically extracted from the sample image and represented as initial feature vectors in the form of numerical vectors. These initial feature vectors can effectively capture the changes of the hand in different postures, shapes, textures, etc., and provide strong data support for subsequent gesture category recognition.

[0087] Next, see Figure 1C , and the description continues with step 202 above.

[0088] Step 203: perform vector fusion on the N initial feature vectors to obtain a reference feature vector of the gesture category.

[0089] In some embodiments, see Figure 1E , Figure 1C The illustrated step 203 may be implemented through steps 2031A to 2034A, which are described in detail below.

[0090] Step 2031A, at each element position in the initial feature vector, obtain vector elements of N initial feature vectors.

[0091] In some embodiments, each element position of the initial feature vector may be traversed, and at each position, a corresponding vector element may be selected from the N initial feature vectors.

[0092] For example, if N is 2 and the initial eigenvectors are [1, 3, 6, 8] and [2, 4, 8, 10], then the elements at the first position of the extracted initial eigenvectors are 1 and 2, the elements at the second position are 3 and 4, and so on.

[0093] Step 2032A, calculate the mean of the obtained N vector elements to obtain the element mean.

[0094] In some embodiments, an arithmetic mean calculation may be performed on the N vector elements obtained in step 2031A to obtain a mean value of each element position.

[0095] For example, if N is 2 and the initial eigenvectors are [1,3,6,8] and [2,4,8,10], then the mean of the elements in the first position of the N initial eigenvectors is 1.5, the mean of the elements in the second position is 3.5, and so on.

[0096] Step 2033A, combining the element means at each element position into a first mean vector.

[0097] In some embodiments, the mean of each element position is arranged according to the element order of the initial feature vector to form a new vector, namely the first mean vector. The first mean vector is obtained by calculating the mean of N initial feature vectors.

[0098] For example, if the initial eigenvectors are [1,3,6,8] and [2,4,8,10], then the first mean vector is [1.5,3.5,7,9].

[0099] Step 2034A, determining the first mean vector as the reference feature vector of the gesture category.

[0100] Through step 2031A to step 2034A, the mean vector of the initial feature vectors of multiple sample images can be used as the reference feature vector, which simplifies the feature fusion process and ensures the consistency and representativeness of the reference feature vectors of the same gesture category.

[0101] In some embodiments, see Figure 1F , Figure 1C The illustrated step 203 may also be implemented through steps 2031B to 2035B, which are described in detail below.

[0102] Step 2031B, for each of the N initial feature vectors, use the P feature elements of the initial feature vector as feature data and the gesture category corresponding to the initial feature vector as label data to train a target classification model; wherein P is the number of feature vector elements included in the initial feature vector.

[0103] In some embodiments, different feature elements can represent different feature information such as the shape of the hand, the specific pattern of the gesture, and the position of the key points. The feature elements are an important basis for distinguishing different gesture categories. In the implementation process, N initial feature vectors can be traversed, and P feature elements contained in each initial feature vector can be extracted, and these feature elements can be provided as input data (i.e., feature data) to the target classification model; at the same time, the gesture category corresponding to the current initial feature vector can be obtained, and the gesture category can be used as label data; then, based on the feature data and label data, the target classification model (such as decision tree, random forest or support vector machine, etc.) is trained.

[0104] Step 2032B, based on the feature evaluation result of the initial feature vector determined by the trained target classification model, determine the importance weights of the P feature elements corresponding to the initial feature vector; wherein the feature evaluation result is the data processing result of the trained target classification model evaluating the feature importance of the initial feature vector during the classification process.

[0105] In some embodiments, the feature evaluation result is the result obtained after the target classification model evaluates the P feature elements of each initial feature vector during the classification process when the target classification model is trained; the feature evaluation result reflects the importance of each feature element in distinguishing different gesture categories in the classification process when the target classification model is trained. The feature element importance weight is the weight assigned to the P feature elements of each initial feature vector based on the feature evaluation result; the feature element importance weight reflects the importance of each feature element in distinguishing gesture categories processed by the target classification model. The higher the feature element importance weight, the more important the feature element is in the classification process, and the greater the impact on the prediction result of the target classification model.

[0106] For example, taking the decision tree model as the target classification model, the importance of the feature evaluation results determined by the trained target classification model can be measured by calculating the number of times different feature elements appear as splitting basis in all tree nodes (number of splits). The importance of different feature elements can also be measured by their information gain (information gain can measure the change in data purity before and after splitting), or by their Gini index (the Gini index can be used to evaluate the splitting quality of the feature). Then, the importance evaluation of P feature elements based on the feature evaluation results can be quantified to obtain the corresponding feature element importance weights.

[0107] Through step 2032B, an importance weight can be assigned to each feature element in the initial feature vector, and it can be determined which feature elements are more important to the classification result, thereby guiding the subsequent steps to perform feature selection or optimization, and then in the subsequent processing, more attention can be paid to those feature elements that have a greater impact on the classification results, thereby improving the accuracy and efficiency of classification.

[0108] Step 2033B: Based on the importance weights of the P feature elements, weighted calculation is performed on the feature elements of the initial feature vector to obtain a weighted feature vector of the initial feature vector; the number of weighted feature vectors is N.

[0109] In some embodiments, the feature elements of the initial feature vector may be adjusted according to the feature element importance weights to obtain a weighted feature vector. Each feature element value in the weighted feature vector is the result of adjustment according to its importance weight.

[0110] Through step 2033B, the weighted feature vector obtained not only retains the information of the original feature vector, but also, by introducing importance weights, makes the key features receive more attention, and can more accurately reflect the intrinsic feature distribution and importance of the feature data, thereby improving the performance of subsequent classification tasks.

[0111] Step 2034B, determining a second mean vector of the N weighted feature vectors.

[0112] In some embodiments, the second mean vector is a new feature vector obtained by performing mean calculation on N weighted feature vectors.

[0113] Step 2035B, determining the second mean vector as the reference feature vector of the gesture category.

[0114] Through steps 2031B to 2035B, the target classification model can be used to evaluate the influence of each feature element in the initial feature vector on the classification prediction result, and then the feature elements in the initial feature vector are weighted one by one based on this influence, and then the mean vector is calculated to obtain the final reference feature vector, so that the reference feature vector can improve the discrimination of different gesture feature vectors, more accurately reflect the reference feature vectors of different gestures, thereby improving the accuracy of gesture recognition.

[0115] In some embodiments, see Figure 1G (where B represents step 101 to step 102), Figure 1A Before step 103 shown, the similarity between the feature vector to be identified and the M reference feature vectors in the reference feature vector set may also be obtained through steps 301A to 303A, which is described in detail below.

[0116] Step 301A: Perform Fourier transform processing on the M reference feature vectors in the reference feature vector set to obtain M frequency domain reference feature vectors.

[0117] In some embodiments, the frequency domain reference feature vector is a vector obtained by Fourier transforming the reference feature vector; the frequency domain reference feature vector includes distribution information of the gesture features at different frequencies.

[0118] Step 302A, performing Fourier transform processing on the feature vector to be identified to obtain the feature vector to be identified in the frequency domain.

[0119] In some embodiments, the frequency domain feature vector to be identified refers to a vector obtained by Fourier transforming the feature vector to be identified; the frequency domain feature vector to be identified includes distribution information of gesture features in the image to be identified at different frequencies.

[0120] Step 303A: perform similarity calculations on the frequency domain feature vector to be identified and the M frequency domain reference feature vectors in sequence to obtain the similarities between the feature vector to be identified and the M reference feature vectors in the reference feature vector set.

[0121] In some embodiments, the similarity can be determined by calculating the cosine similarity, Euclidean distance, Manhattan distance, Pearson correlation coefficient or Jaccard similarity coefficient between the frequency domain feature vector to be identified and the frequency domain reference feature vector; based on the similarity calculation between the frequency domain feature vector to be identified and M frequency domain reference feature vectors in turn, the M similarities obtained can be determined as the similarity between the feature vector to be identified and the M reference feature vectors in the reference feature vector set.

[0122] Through step 301A to step 303A, the feature representation of the feature vector is converted from the spatial domain to the frequency domain using Fourier transform; in the frequency domain, the periodic characteristics of the signal are more obvious, and the spectral characteristics of different gestures can be more effectively captured and compared, which helps to improve the anti-interference ability and sensitivity to subtle movement changes of the gesture recognition method of the embodiment of the present application, thereby improving the accuracy of gesture recognition.

[0123] In some embodiments, see Figure 1H (where B represents step 101 to step 102), Figure 1A Before step 103 shown, the similarity between the feature vector to be identified and the M reference feature vectors in the reference feature vector set may also be obtained through steps 301B to 302B, which will be described in detail below.

[0124] Step 301B, perform vector concatenation on the M reference feature vectors to obtain a reference feature matrix.

[0125] In some embodiments, the lengths of the M reference feature vectors are the same, and the M reference feature vectors can be spliced ​​into a matrix by horizontal splicing (i.e., splicing by column) or vertical splicing (i.e., splicing by row), and this matrix is ​​the reference feature matrix. The reference feature matrix contains feature vector information of all gesture categories. In the vertically spliced ​​reference feature matrix, each row represents a feature vector of a gesture category, and each column represents a feature dimension in the feature vector.

[0126] Through step 301B, multiple reference feature vectors are spliced ​​into a feature reference matrix, which can achieve integration and unified representation of multiple reference feature vectors, facilitating subsequent unified processing and analysis.

[0127] Step 302B, performing similarity calculation on the feature vector to be identified and the reference feature matrix to obtain a similarity vector; wherein the elements in the similarity vector include the similarities between the feature vector to be identified and the M reference feature vectors.

[0128] In some embodiments, the feature vector to be identified and the feature elements of each row in a pre-stored reference feature matrix can be extracted to calculate the similarity between the feature vector to be identified and the reference feature matrix. The multiple similarity values ​​obtained after the calculation will form a similarity vector. Each element in this similarity vector represents the similarity between the feature vector to be identified and the feature elements of the corresponding row in the reference feature matrix.

[0129] Through steps 301B to 302B, the problem that the similarity calculation between the feature vector to be identified and multiple reference feature vectors may involve discontinuous memory access can be avoided, especially when multiple reference feature vectors are not stored continuously, resulting in jump access during calculation, which will cause more cache misses and reduce recognition performance. The embodiment of the present application can reduce cache misses and improve the computational efficiency of gesture recognition by performing similarity calculation between the reference feature matrix and the identified feature vector.

[0130] In some embodiments, each element in the similarity vector obtained through steps 301B to 302B corresponds to a gesture category, see Fig. 1I , Figure 1A The illustrated step 103 may be implemented through steps 1031 to 1033, which are described in detail below.

[0131] Step 1031 , normalize the similarity vector to obtain a normalized similarity vector.

[0132] In some embodiments, any normalization method may be applied to transform each element of the similarity vector to ensure that the sum of the absolute values ​​or the sum of the squares of each vector element in the transformed similarity vector (normalized similarity vector) is equal to 1. The normalization method used in the embodiment of the present application may be minimum absolute value normalization, Euclidean normalization, maximum value normalization, minimum-maximum normalization, interval scaling normalization, or zero mean normalization.

[0133] For example, if the similarity vector is [0.8, 0.6, 0.2, 0.4, 0.1], then after performing minimum-maximum normalization on the similarity vector, the normalized similarity vector obtained can be [1.0, 0.714, 0.143, 0.429, 0.0].

[0134] Through step 1031, a normalized similarity vector with a uniform scale can be obtained, which helps to eliminate the scale differences that may exist in the original similarity vector, making subsequent comparison and analysis more accurate and reliable.

[0135] Step 1032, determining the maximum element value in the normalized similarity vector.

[0136] In some embodiments, all elements of the normalized similarity vector can be traversed, and the values ​​of the elements can be compared one by one. During the traversal process, the maximum element value found so far is recorded and updated. When the traversal is completed, the recorded maximum element value and the corresponding element index are output.

[0137] Step 1033: determine the gesture category corresponding to the maximum element value as the gesture category of the image to be recognized.

[0138] In some embodiments, the corresponding gesture category may be determined according to the element subscript of the maximum element value, and the gesture category may be output as the gesture category of the image to be recognized.

[0139] Through step 1031 to step 1033, the gesture category of the image to be recognized can be accurately matched with the maximum element value in the normalized similarity vector, thereby improving the accuracy and efficiency of gesture recognition.

[0140] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.

[0141] The embodiment of the present application provides a gesture classification model, and the core concept of the embodiment of the present application is that it can be quickly trained to have high classification ability based on a small number of sample images, and can be used in machine learning application development scenarios such as human-computer interaction and educational demonstration. In the training stage, the gesture classification model provided by the embodiment of the present application uses the target detection model that has been trained with the hand detection data set and the image classification model that has been trained with the gesture classification data set as the hand detection and hand feature extraction model, and then extracts the initial feature vectors of each custom gesture category from the existing training set containing a small number of samples, and then processes to obtain a reference feature vector matrix of a category; in the inference stage of the gesture classification model, the above-mentioned hand detection and hand feature extraction model is used to extract the feature vector to be identified of the image to be identified, and then the similarity between the feature vector to be identified and the reference feature vector of each category is calculated respectively to obtain a similarity vector, and the similarity vector is normalized to obtain the category prediction vector of the image to be identified, and the category with the highest prediction probability in the category prediction vector is selected as the prediction result of the gesture classification.

[0142] See also Figure 2A The training phase and the reasoning phase of the gesture recognition model provided in the embodiment of the present application can be implemented through steps 401 to 410, which are described in detail below.

[0143] Step 401: Obtain a first sample data set.

[0144] In step 401, first determine the gesture categories that need to be classified in this task, and obtain gesture image samples of each category. The number of gesture image samples does not need to be too many, but to ensure the classification effect, there should be no less than 2 samples for each category. Different gesture sample images in the same category should be transformed into different postures during collection to improve the richness of the sample images. Each sample image should contain a gesture, and a collection of multiple sample images corresponding to multiple gestures is determined as the first sample data set.

[0145] Step 402: hand target detection.

[0146] In step 402, a hand target detection model can be trained using an existing hand image dataset to extract the hand target region. The hand target region refers to the minimum bounding rectangle of the hand region in the image, such as Figure 2B As shown in the thick rectangular frame. The hand image dataset should contain as many possible gesture categories as possible, and the hands in the image should include various postures and lighting conditions. The hand detection model of the embodiment of the present application can select the target detection model in the related technology, such as the yolov6 model and the Single Shot MultiBox Detector (SSD).

[0147] Step 403: extracting initial feature vectors.

[0148] In step 403, an image classification model is trained using existing gesture images to extract features of gesture images. The feature of a gesture image refers to a feature vector calculated based on the gesture image, which reflects the characteristics of the gesture. When training the gesture image classification task, as many gesture categories as possible are covered so that the extracted features have the best classification effect. After the training is completed, only the feature extraction part of the image classification model (i.e., the backbone network part) is retained for feature extraction. Among them, the image classification model can use a lightweight deep learning model, such as the Mobilenetv2 model and the ShuffleNet model.

[0149] The image to be processed is input into the target detection model, and the model outputs one or more hand detection results. The hand area with the highest confidence is retained, and the bounding box information output by the target detection model (i.e. Figure 2B The hand target area is obtained by using the coordinates of the upper left corner and the lower right corner of the rectangular frame 210. The hand target area is cropped and input into the feature extraction unit (the feature extraction part of the image classification model). The one-dimensional vector output by the feature extraction unit is the initial feature vector of the sample image.

[0150] Step 404, calculating reference feature vectors by category.

[0151] In step 404, for each gesture category, the average or weighted average of the initial feature vectors of all sample images of the category is calculated to obtain a reference feature vector of the category.

[0152] Step 405: determine a reference eigenvector matrix.

[0153] In step 405, for a scene with X categories, X reference feature vectors are finally obtained to form an X-dimensional reference feature vector matrix. This reference feature vector matrix will be used in the subsequent classification and recognition process.

[0154] Step 406: Obtain the image to be recognized.

[0155] In step 406, first, an image to be recognized is obtained, and the image to be recognized includes a hand area of ​​a gesture category to be recognized.

[0156] Step 407: hand target detection.

[0157] Step 407 is similar to step 402, and the position of the hand is detected in the image to be identified, which can also be achieved by using a target detection algorithm.

[0158] Step 408: extracting feature vectors to be identified.

[0159] Once the hand region of the image to be recognized is detected, the feature vector to be recognized is extracted from the region. Step 408 is similar to step 403, but the trained gesture recognition model is used at this time.

[0160] Step 409: determine the similarity vector.

[0161] In step 409, the similarity between the feature vector to be identified and each reference feature vector in the reference feature vector matrix is ​​calculated to obtain a 1*X-dimensional similarity vector. The similarity calculation in the embodiment of the present application adopts a cosine similarity calculation method.

[0162] Step 410: determine a normalized similarity vector.

[0163] In step 410, the similarity vector is normalized to obtain a normalized similarity vector. The elements in the normalized similarity vector represent the relative similarity between the gesture to be identified and the gestures of each category. By comparing the element values ​​in the normalized similarity vector, the most likely category of the gesture to be identified can be determined. Each element in the normalized similarity vector can be approximately considered as a predicted probability value after predicting a corresponding category. The vector normalization calculation process can be implemented by the following formula (1):

[0164]

[0165] Among them, y i is the predicted value of the i-th gesture category, x i is the calculation result of the i-th cosine similarity, x j is the jth cosine similarity calculation result, and n is the number of all gesture categories.

[0166] The following is a description of an exemplary structure of a gesture recognition device 455 provided in an embodiment of the present application implemented as a software module. In some embodiments, Figure 3As shown, the software modules in the gesture recognition device 455 may include: a data acquisition module 4551, used to obtain a reference feature vector set corresponding to the image to be recognized and a predefined gesture category set; wherein the gesture category set includes M gesture categories; the reference feature vector set includes M reference feature vectors corresponding to the M gesture categories; the reference feature vector is a feature vector obtained by vector fusion of the initial feature vectors of N sample images under the gesture category; the initial feature vector is a feature vector obtained by hand feature extraction of the sample image; M and N are both integers greater than 1; a feature extraction module 4552, used to extract hand features of the image to be recognized and obtain a feature vector to be recognized; a gesture category determination module 4553, used to determine the gesture category of the image to be recognized based on the similarity between the feature vector to be recognized and the M reference feature vectors in the reference feature vector set.

[0167] In some embodiments, the device also includes: a reference feature vector generation module, used to obtain a first sample image set of a gesture category in a predefined gesture category set; the first sample image set includes N sample images; hand feature extraction is performed on the N sample images under the gesture category to obtain N initial feature vectors; vector fusion is performed on the N initial feature vectors to obtain a reference feature vector of the gesture category.

[0168] In some embodiments, the reference feature vector generation module is also used to: perform hand target detection on N sample images under the gesture category to obtain N hand target areas corresponding to the N sample images; crop out regional images corresponding to the N hand target areas from the N sample images; perform feature extraction on the regional images corresponding to the N hand target areas to obtain N initial feature vectors.

[0169] In some embodiments, the reference feature vector generation module is also used to: obtain N vector elements of the initial feature vector at each element position in the initial feature vector; calculate the mean of the obtained N vector elements to obtain the element mean; combine the element means at each element position into a first mean vector; and determine the first mean vector as the reference feature vector of the gesture category.

[0170] In some embodiments, the reference feature vector generation module is also used to: for each of the N initial feature vectors, use the P feature elements of the initial feature vector as feature data, and use the gesture category corresponding to the initial feature vector as label data to train a target classification model; wherein P is the number of feature vector elements included in the initial feature vector; based on the feature evaluation result of the initial feature vector determined by the trained target classification model, determine the importance weights of the P feature elements corresponding to the initial feature vector; wherein the feature evaluation result is the data processing result of the trained target classification model evaluating the feature importance of the initial feature vector during the classification process; based on the importance weights of the P feature elements, perform weighted calculation on the feature elements of the initial feature vector to obtain a weighted feature vector of the initial feature vector; the number of weighted feature vectors is N; determine a second mean vector of the N weighted feature vectors; and determine the second mean vector as the reference feature vector of the gesture category.

[0171] In some embodiments, the device also includes a first similarity determination module, which is used to: perform vector splicing on M reference feature vectors to obtain a reference feature matrix; perform similarity calculation on the feature vector to be identified and the reference feature matrix to obtain a similarity vector; wherein the elements in the similarity vector include the similarity between the feature vector to be identified and the M reference feature vectors.

[0172] In some embodiments, each element in the similarity vector corresponds to a gesture category; the gesture category determination module 4553 is also used to: normalize the similarity vector to obtain a normalized similarity vector; determine the maximum element value in the normalized similarity vector; and determine the gesture category corresponding to the maximum element value as the gesture category of the image to be identified.

[0173] In some embodiments, the device also includes a second similarity determination module, which is used to: perform Fourier transform processing on M reference feature vectors in the reference feature vector set to obtain M frequency domain reference feature vectors; perform Fourier transform processing on the feature vector to be identified to obtain the frequency domain feature vector to be identified; and perform similarity calculation on the frequency domain feature vector to be identified and the M frequency domain reference feature vectors in sequence to obtain the similarity between the feature vector to be identified and the M reference feature vectors in the reference feature vector set.

[0174] In some embodiments, the feature extraction module is also used to: perform hand target detection on the image to be identified, and obtain a hand target area to be identified corresponding to the image to be identified; call the feature extraction unit of the pre-trained image classification model to perform feature extraction on the image of the area to be identified corresponding to the hand target area to be identified, and obtain a feature vector to be identified; wherein the pre-trained image classification model is an image classification model obtained by training based on a second sample image set with classification labels, and the feature extraction unit is the backbone network unit of the pre-trained image classification model that completes network parameter adjustment through the back propagation algorithm during the training process.

[0175] The embodiment of the present application provides a computer program product, which includes a computer program or a computer executable instruction, and the computer program or the computer executable instruction is stored in a computer-readable storage medium. The processor of the electronic device reads the computer executable instruction from the computer-readable storage medium, and the processor executes the computer executable instruction, so that the electronic device performs the gesture recognition method described in the embodiment of the present application.

[0176] An embodiment of the present application provides an electronic device, Figure 4 Schematic diagram of the structure of the electronic device provided in the embodiment of the present application. Figure 4 As shown, the electronic device 110 includes: at least one processor 111 ( Figure 4 Only one is shown in the figure), a memory 112, and executable instructions 113 stored in the memory 112 and executable on at least one processor 111, when the processor 111 executes the executable instructions 113, the steps in any of the above-mentioned gesture recognition method embodiments are implemented.

[0177] The electronic device may include but is not limited to a processor 111 and a memory 112. Those skilled in the art may understand that: Figure 4 This is merely an example of the electronic device 110 and does not constitute a limitation on the electronic device 110 . The electronic device 110 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.

[0178] The processor 111 may be a central processing unit (CPU), or other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPG), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0179] In some embodiments, the memory 112 may be an internal storage unit of the electronic device 110, such as a hard disk or memory of the electronic device 110. In other embodiments, the memory 112 may also be an external storage device of the electronic device 110, such as a plug-in hard disk, a smart memory card (SMC, Smart Media Card), a secure digital (SD, Secure Digital) card, a flash card, etc. equipped on the electronic device 110. Further, the memory 112 may also include both an internal storage unit of the electronic device 110 and an external storage device. The memory 112 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as program codes of a computer program. The memory 112 may also be used to temporarily store data that has been output or is to be output.

[0180] The present application embodiment provides a computer-readable storage medium in which computer executable instructions or computer programs are stored. When the computer executable instructions or computer programs are executed by a processor, the processor will be caused to execute the gesture recognition method provided by the present application embodiment, for example, Figure 1A The gesture recognition method is shown.

[0181] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.

[0182] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0183] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).

[0184] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.

[0185] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims

1. A gesture recognition method, characterized in that: include: Obtain a reference feature vector set corresponding to the image to be recognized and a predefined gesture category set; wherein the gesture category set includes M gesture categories; the reference feature vector set includes M reference feature vectors corresponding to the M gesture categories; the reference feature vector is a feature vector obtained by vector fusion of initial feature vectors of N sample images under the gesture category; the initial feature vector is a feature vector obtained by hand feature extraction of the sample image; M and N are both integers greater than 1; Extracting hand features from the image to be identified to obtain a feature vector to be identified; Based on the similarity between the feature vector to be recognized and the M reference feature vectors in the reference feature vector set, the gesture category of the image to be recognized is determined.

2. The method according to claim 1, characterized in that Before obtaining a reference feature vector set corresponding to the image to be recognized and the predefined gesture category set, the method further includes: Acquire a first sample image set of a gesture category in the predefined gesture category set; the first sample image set includes the N sample images; Performing hand feature extraction on N sample images under the gesture category to obtain N initial feature vectors; Perform vector fusion on the N initial feature vectors to obtain a reference feature vector of the gesture category.

3. The method according to claim 2, characterized in that The extracting hand features from the N sample images under the gesture category to obtain the N initial feature vectors includes: Performing hand target detection on N sample images under the gesture category to obtain N hand target areas corresponding to the N sample images; Crop N area images corresponding to the hand target areas from the N sample images; Feature extraction is performed on the area images corresponding to the N hand target areas to obtain N initial feature vectors.

4. The method according to claim 2, characterized in that: The performing vector fusion on the N initial feature vectors to obtain a reference feature vector of the gesture category includes: At each element position in the initial feature vector, obtaining vector elements of the N initial feature vectors; Calculate the mean of the obtained N vector elements to obtain the element mean; Combining the element means at each element position into a first mean vector; The first mean vector is determined as a reference feature vector of the gesture category.

5. The method according to claim 2, characterized in that: The performing vector fusion on the N initial feature vectors to obtain a reference feature vector of the gesture category includes: For each of the N initial feature vectors, the P feature elements of the initial feature vector are used as feature data, and the gesture category corresponding to the initial feature vector is used as label data to train a target classification model; wherein P is the number of feature vector elements included in the initial feature vector; Based on the feature evaluation result of the initial feature vector determined by the trained target classification model, determine the importance weights of P feature elements corresponding to the initial feature vector; wherein the feature evaluation result is a data processing result of the trained target classification model evaluating the feature importance of the initial feature vector during the classification process; Based on the importance weights of the P feature elements, weighted calculation is performed on the feature elements of the initial feature vector to obtain a weighted feature vector of the initial feature vector; the number of the weighted feature vectors is N; Determining a second mean vector of the N weighted eigenvectors; The second mean vector is determined as a reference feature vector of the gesture category.

6. The method according to any one of claims 1 to 5, characterized in that: Before determining the gesture category of the image to be identified based on the similarity between the feature vector to be identified and the M reference feature vectors in the reference feature vector set, the method further includes: Performing vector concatenation on the M reference feature vectors to obtain a reference feature matrix; A similarity calculation is performed on the feature vector to be identified and the reference feature matrix to obtain a similarity vector; wherein the elements in the similarity vector include the similarities between the feature vector to be identified and the M reference feature vectors.

7. The method according to claim 6, characterized in that Each element in the similarity vector corresponds to a gesture category; and determining the gesture category of the image to be identified based on the similarity between the feature vector to be identified and the M reference feature vectors in the reference feature vector set includes: Normalizing the similarity vector to obtain a normalized similarity vector; Determining the maximum element value in the normalized similarity vector; The gesture category corresponding to the maximum element value is determined as the gesture category of the image to be recognized.

8. The method according to any one of claims 1 to 5, characterized in that: Before determining the gesture category of the image to be identified based on the similarity between the feature vector to be identified and the M reference feature vectors in the reference feature vector set, the method further includes: Performing Fourier transform processing on the M reference feature vectors in the reference feature vector set to obtain M frequency domain reference feature vectors; Performing Fourier transform processing on the feature vector to be identified to obtain the feature vector to be identified in the frequency domain; The similarity between the frequency domain feature vector to be identified and the M frequency domain reference feature vectors is calculated in sequence to obtain the similarity between the feature vector to be identified and the M reference feature vectors in the reference feature vector set.

9. The method according to any one of claims 1 to 5, characterized in that: The step of extracting hand features from the image to be identified to obtain a feature vector to be identified includes: Performing hand target detection on the image to be identified to obtain a hand target area to be identified corresponding to the image to be identified; Call the feature extraction unit of the pre-trained image classification model to extract features of the image of the area to be identified corresponding to the target area of ​​the hand to be identified, so as to obtain the feature vector to be identified; wherein the pre-trained image classification model is an image classification model trained based on a second sample image set with classification labels, and the feature extraction unit is the backbone network unit of the pre-trained image classification model that completes network parameter adjustment through a back-propagation algorithm during the training process.

10. A gesture recognition device, characterized in that: The device comprises: A data acquisition module, used to acquire a reference feature vector set corresponding to an image to be recognized and a predefined gesture category set; wherein the gesture category set includes M gesture categories; the reference feature vector set includes M reference feature vectors corresponding to the M gesture categories; the reference feature vector is a feature vector obtained by vector fusion of initial feature vectors of N sample images under the gesture category; the initial feature vector is a feature vector obtained by hand feature extraction of the sample image; M and N are both integers greater than 1; A feature extraction module, used to extract hand features from the image to be identified to obtain a feature vector to be identified; The gesture category determination module is used to determine the gesture category of the image to be identified based on the similarity between the feature vector to be identified and the M reference feature vectors in the reference feature vector set.

11. An electronic device, characterized in that: include: A memory for storing computer executable instructions; A processor, configured to implement the gesture recognition method according to any one of claims 1 to 9 when executing the computer executable instructions stored in the memory.

12. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that: When the computer executable instructions or computer program are executed by a processor, the gesture recognition method according to any one of claims 1 to 9 is implemented.

Citation Information

Cited By

  • MediaPipe Handles-based video frame image gesture training action abnormity processing method and system for elderly patients

    CN119339444A

  • Epileptic seizure identification method and device based on multi-modal data

    CN122087733A