WO2023185887A1 - Model acquisition system, gesture recognition method and apparatus, device, and storage medium - Google Patents

Model acquisition system, gesture recognition method and apparatus, device, and storage medium Download PDF

Info

Publication number
WO2023185887A1
WO2023185887A1 PCT/CN2023/084526 CN2023084526W WO2023185887A1 WO 2023185887 A1 WO2023185887 A1 WO 2023185887A1 CN 2023084526 W CN2023084526 W CN 2023084526W WO 2023185887 A1 WO2023185887 A1 WO 2023185887A1
Authority
WO
WIPO (PCT)
Prior art keywords
gesture
current
meta
data
gesture recognition
Prior art date
Application number
PCT/CN2023/084526
Other languages
French (fr)
Chinese (zh)
Inventor
王友好
王译
Original Assignee
深圳市应和脑科学有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市应和脑科学有限公司 filed Critical 深圳市应和脑科学有限公司
Publication of WO2023185887A1 publication Critical patent/WO2023185887A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/217Validation; Performance evaluation; Active pattern learning techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • G06F3/015Input arrangements based on nervous system activity detection, e.g. brain waves [EEG] detection, electromyograms [EMG] detection, electrodermal response detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/017Gesture based interaction, e.g. based on a set of recognized hand gestures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/01Indexing scheme relating to G06F3/01
    • G06F2203/011Emotion or mood input determined on the basis of sensed human body parameters such as pulse, heart rate or beat, temperature of skin, facial expressions, iris, voice pitch, brain activity patterns

Definitions

  • Embodiments of the present application relate to the field of electrophysiological signal recognition, and in particular to a model acquisition system, gesture recognition method, device, equipment and storage medium.
  • Electromyography is the recording of electrophysiological signals obtained by discharging muscle motor neurons through electromyographic electrodes. It contains rich neural information that can be decoded into many limb-related activity signals.
  • the collection of EMG is harmless to the human body, easy to obtain and easy to operate. It has good application prospects in the field of gesture recognition and classification, especially in medical treatment, entertainment and other industries involving machine control.
  • the transfer learning method provides a solution, but transfer learning will face the problem of catastrophic forgetting, and in order to ensure the accuracy of the model, a large amount of individual data is still needed for training, model training and model application. Scene switching is still relatively complex, and training and adjustment efficiency is low.
  • the embodiments of this application aim to provide a model acquisition system, gesture recognition method, device, equipment and storage medium, aiming to use meta-learning to accurately obtain the current gesture recognition model that adapts to the current individual characteristics through a small amount of individual data. , improve the efficiency of gesture recognition model training and adjustment, and then complete the accurate recognition of the current individual gesture.
  • a model acquisition system including: an input unit for acquiring the current myoelectric data and gesture tags of the current individual.
  • the gesture tags Containing gesture information; the processing unit is configured to: obtain an initial gesture recognition model when the current individual does not have a personal gesture recognition model, wherein the initial gesture recognition model is based on historical myoelectric data and gestures based on multiple individuals.
  • Several meta-learning tasks for label generation are generated through meta-learning training, and each of the meta-learning tasks is based on the historical electromyography data and gesture label generation of the same individual, or each of the meta-learning tasks is based on the historical electromyography of similar individuals.
  • the data and gesture labels are mixed and generated; according to the current electromyographic data and gesture labels of the current individual, the initial gesture recognition model is fine-tuned to obtain the current gesture recognition model of the current individual.
  • a model acquisition method which includes: acquiring the current myoelectric data and gesture tags of the current individual, where the gesture tags include gesture information;
  • an initial gesture recognition model is obtained, wherein the initial gesture recognition model is meta-learned based on several meta-learning tasks generated based on historical myoelectric data and gesture labels of multiple individuals.
  • each of the meta-learning tasks is generated based on the historical myoelectric data and gesture labels of the same individual, or each of the meta-learning tasks is generated based on a mixture of historical myoelectric data and gesture labels of similar individuals; according to the Using the current electromyographic data and gesture tags of the current individual, fine-tune the initial gesture recognition model to obtain the current gesture recognition model of the current individual.
  • embodiments of the present application provide a gesture recognition method, including: obtaining the current gesture recognition model of the current individual through the above model acquisition system; obtaining the current individual's current gesture recognition model. Real-time electromyographic data; through the current gesture recognition model, the gesture of the current individual is obtained according to the real-time electromyographic data.
  • embodiments of the present application also provide a gesture recognition device, including: a first acquisition module for acquiring the current gesture recognition of the current individual through the above model acquisition system. model; a second acquisition module, used to acquire the real-time electromyographic data of the current individual; an identification module, used to pass the The current gesture recognition model acquires the gesture of the current individual based on the real-time electromyographic data.
  • embodiments of the present application also provide an electronic device, including: at least one processor; and a memory communicatively connected with the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can perform the above-mentioned gesture recognition method, or execute the above-mentioned model. Get method.
  • embodiments of the present application also provide a computer-readable storage medium storing a computer program.
  • the computer program is executed by a processor, the above gesture recognition method is implemented, or Execute the above model acquisition method.
  • the model acquisition system proposed in this application when the current individual does not have a personal gesture recognition model, first obtains the current electromyographic data and gesture information of the current individual through the input unit, and based on the current individual's current electromyographic data and gesture tags, The initial gesture recognition model is fine-tuned to obtain the current gesture recognition model suitable for the current individual, and the initial gesture recognition model is generated based on meta-learning training based on several meta-learning tasks generated based on the historical electromyographic data and gesture labels of multiple individuals, and Each meta-learning task is generated based on the historical EMG data and gesture labels of the same individual or based on a mixture of historical EMG data and gesture labels of similar individuals.
  • meta-learning tasks are first formed based on the historical myoelectric data and gesture labels of multiple individuals, which are generated based on the historical myoelectric data and gesture labels of the same individual or based on a mixture of historical myoelectric data and gesture labels of similar individuals.
  • the initial gesture recognition model obtained through learning and training is suitable for the crowd and has good generalization ability.
  • the initial gesture recognition model is evaluated based on the current myoelectric data and gesture labels of the current individual. Fine-tuning, in this way, with the support of a small amount of individual data, the initial gesture recognition model can be fine-tuned accurately and efficiently to obtain the current gesture recognition model that adapts to the current individual, thereby ensuring the accuracy of gesture recognition.
  • Figure 1 is a schematic structural diagram of a model acquisition system in an embodiment of the present application
  • Figure 2 is a schematic structural diagram of a meta-learning task in the embodiment of the present application.
  • Figure 3 is a schematic diagram of a meta-learning training process in an embodiment of the present application.
  • Figure 4 is a flow chart of a model acquisition method in another embodiment of the present application.
  • Figure 5 is a flow chart of a gesture recognition method in another embodiment of the present application.
  • Figure 6 is a schematic structural diagram of a gesture recognition device in another embodiment of the present application.
  • Figure 7 is a schematic structural diagram of an electronic device in another embodiment of the present application.
  • a model acquisition system including: an input unit, used to acquire the current electromyographic data and gesture tags of the current individual, where the gesture tags contain gesture information; a processing unit, configured as: When the current individual does not have a personal gesture recognition model, an initial gesture recognition model is obtained.
  • the initial gesture recognition model is generated based on meta-learning training based on several meta-learning tasks generated based on historical myoelectric data and gesture labels of multiple individuals.
  • each meta-learning task is generated based on the historical EMG data and gesture labels of the same individual, or each meta-learning task is generated based on a mixture of historical EMG data and gesture labels of similar individuals; based on the current EMG data and gesture labels of the current individual Label, fine-tune the initial gesture recognition model to obtain the current gesture recognition model of the current individual.
  • the model acquisition system proposed in this application before acquiring the current gesture recognition model of the current individual, when the current individual does not have a personal gesture recognition model, acquires the historical myoelectric data and gesture tags of multiple individuals, based on each individual
  • the historical EMG data and gesture labels form a meta-learning task, or the historical EMG data and gesture labels of similar individuals are mixed to form a meta-learning task, and a more general initial gesture recognition model is generated through meta-learning training.
  • obtaining the current gesture recognition model of the current individual first obtain the current electromyographic data and gesture labels of the current individual through the input unit, and fine-tune the initial gesture recognition model based on the obtained current electromyographic data and gesture labels, and obtain Current gesture recognition model applicable to the current individual.
  • meta-learning tasks are obtained based on the historical EMG data and gesture labels of multiple individuals.
  • Each meta-learning task is generated based on the historical EMG data and gesture labels of the same individual, or each meta-learning task is based on the historical EMG data and gesture labels of similar individuals.
  • Electrical data and gesture labels are mixed and generated, combined with the meta-learning training method to obtain an initial gesture recognition model that is suitable for the crowd and has good generalization ability.
  • the initial gesture recognition model When applied to a specific current individual, it is based on the current EMG of the current individual.
  • Data and gesture labels to fine-tune the initial gesture recognition model. In this way, with the support of a small amount of individual data, the initial gesture recognition model can be fine-tuned accurately and efficiently to obtain the current gesture recognition model that adapts to the current individual, thereby ensuring the accuracy of gesture recognition.
  • the first aspect of the embodiment of the present application provides a model acquisition system.
  • the model acquisition system includes an input unit 101 and a processing unit 102:
  • the input unit 101 is used to obtain the current electromyographic data and gesture tags of the current individual.
  • the gesture tags include gesture information.
  • the input unit 101 is first used to correspond to the electromyographic data of the current individual within a certain period of time in the current state and the gesture correspondence of the individual when the electromyographic data is collected.
  • Collect and record the gesture tags to obtain the current myoelectric data and gesture tags of the current individual.
  • the gesture tag is a data tag created for gesture storage. Different gesture tags correspond to different gestures. For example, gesture tag 1 corresponds to the individual's raised index finger, gesture tag 2 corresponds to the individual's raised middle finger, gesture tag 3 corresponds to the individual's fist, etc.
  • the meaning of each tag can be set as needed. This embodiment does not limit the specific setting and meaning of gesture tags.
  • the input unit 101 automatically prompts the current individual through voice or text to make gestures corresponding to several preset gesture tags in a certain order within a specified time, and
  • the electromyographic signals generated by muscle motor neurons when the current individual makes different gestures are recorded through electromyographic electrodes, and the electromyographic signals and gesture labels are encoded and stored according to the time interval corresponding to each gesture.
  • gesture labels may be obtained in an unsupervised or self-supervised manner.
  • the collection system or staff do not need to set a specific "label meaning" for each gesture. Instead, the labels are handed over to the statistical model for automatic classification.
  • This embodiment has no special restrictions on processing classification methods, such as dimensionality reduction, clustering, autoencoders and other machine learning methods.
  • the processing classification method is principal component analysis PCA, K-Means clustering method.
  • the processing unit 102 is configured to: obtain an initial gesture recognition model when the current individual does not have a personal gesture recognition model, wherein the initial gesture recognition model is generated based on several historical myoelectric data and gesture tags of multiple individuals. Meta-learning tasks are generated through meta-learning training, and each meta-learning task is generated based on the historical electromyographic data and gesture labels of the same individual, or each meta-learning task is generated based on a mixture of historical electromyographic data and gesture labels of similar individuals; based on the current The individual's current electromyographic data and gesture labels are used to fine-tune the initial gesture recognition model to obtain the current gesture recognition model of the current individual.
  • the processing unit 102 obtains the current electromyographic data and gestures of the current individual through the input unit 101 Before or after the tag, according to the pre-configured program, first detect whether the current individual's personal gesture recognition model is pre-stored based on the current individual's identity. If it is detected that the current individual does not have a personal gesture recognition model, the processing unit 102 obtains the initial Gesture recognition model.
  • the initial gesture recognition model is generated based on meta-learning training based on several meta-learning tasks generated based on the historical electromyographic data and gesture labels of multiple individuals, and each meta-learning task is generated based on the historical electromyographic data and gesture labels of the same individual, or Each meta-learning task is generated based on a mixture of historical EMG data and gesture labels of similar individuals.
  • the processing unit 102 may read the pre-trained initial gesture recognition model from the storage address where the initial gesture recognition model is stored through communication.
  • the processing unit 102 can also read the historical myoelectric data and gesture tags of several individuals from the designated storage address, first generate several meta-learning tasks based on the historical myoelectric data and gesture tags of each individual or similar individuals, and then perform a The trained meta-learner undergoes meta-learning training to generate an initial gesture recognition model.
  • the processing unit 102 can also directly read several meta-learning tasks pre-generated based on historical myoelectric data and gesture labels of different individuals to train an untrained meta-learner to generate an initial gesture recognition model.
  • This embodiment does not limit the specific acquisition method of the initial gesture recognition model.
  • This embodiment uses a similarity measurement method to determine similar individuals, which can increase the sample size. This embodiment has no special restrictions on the specific method of similarity measurement. For example, Euclidean distance and Chebyshev distance are used to determine similarity by obtaining the "distance" between two objects.
  • the processing unit 102 fine-tunes the initial gesture recognition model for the current individual according to the current electromyographic data and gesture tags of the current individual, for example, by
  • the current myoelectric data is used as input information
  • the gesture corresponding to the gesture tag is used as supervision information.
  • Supervised learning is performed on the initial gesture recognition model, so that the initial gesture recognition model has better pertinence and adaptability to the current individual.
  • the fine-tuned initial gesture recognition model is used as the input information.
  • the gesture recognition model serves as the current gesture recognition model of the current individual.
  • the initial gesture recognition model can be trained and generated in the following way: based on the historical myoelectric data and gesture labels of multiple individuals, train a network model with gradient backpropagation to obtain the original gesture recognition model; Historical EMG data and gesture labels are used to generate several meta-learning tasks, and each meta-learning task is based on the historical EMG data and gesture labels of the same individual, or each meta-learning task is based on the historical EMG data and gestures of similar individuals. Label hybrid generation; use each meta-learning task to perform meta-learning training on the meta-learner based on the original gesture recognition model to obtain the initial gesture recognition model.
  • the processing unit 102 or other model training equipment may first train the initial gesture recognition model based on the historical electromyographic data and gesture tags of multiple individuals.
  • the network model with gradient backpropagation is trained.
  • the training methods include supervised training, unsupervised training, etc., and the original A gesture recognition model is started, and then several meta-learning tasks are formed from the EMG data set consisting of historical EMG data and gesture labels of multiple individuals according to preset constraints, and the data included in each meta-learning task comes from the same individual. , or from similar individuals.
  • an EMG data set composed of historical EMG data and gesture labels of multiple individuals is randomly sampled to extract historical EMG data and gesture labels of multiple individuals.
  • one or more meta-learning tasks are generated based on the historical myoelectric data and gesture labels of each individual obtained through random sampling.
  • each meta-learning task among several tasks contains data from the same individual.
  • the similarity measurement method is used to determine whether the individuals are similar, and then based on the historical EMG data and gesture labels of similar individuals obtained through random sampling, a generated One or more meta-learning tasks.
  • each meta-learning task is used to perform meta-learning training on the meta-learner based on the original gesture recognition model to optimize the meta-learner parameters, and then obtain the initial gesture recognition model.
  • the acquisition of the original gesture recognition model and the formation of the meta-learning task can also be carried out at the same time, or the meta-learning task can be formed first and then the original gesture recognition model is obtained.
  • the electromyographic data and gesture tags of multiple individuals are randomly selected, and then based on the electromyographic data of each individual or similar individuals and gesture labels, generate one or more meta-learning tasks, and use the generated meta-learning tasks to perform meta-learning training on the meta-learner based on the original gesture recognition model, so that the trained initial gesture recognition model can target different individuals and new Individuals have good generalization ability.
  • the network model with gradient backpropagation is any of the convolutional neural network CNN model, the long-short-term neural network LSTM model and the recurrent neural network RNN model.
  • a neural network model optimized by an optimization algorithm based on stochastic gradient descent can be used as the basic model, such as a 3-layer convolutional neural network model using the Adam optimizer as the basic model, combined with a preset loss function, such as cross-entropy loss. function to perform model training.
  • the historical EMG data in the EMG data set are used as input, and the gestures to which the historical EMG data belong are used as supervision signals.
  • the loss value is calculated using the preset loss function, and the model parameters are optimized based on the gradient update of the loss value to complete the training of the model. Get the original gesture recognition model.
  • the EMG data set containing the historical EMG data and gesture labels of several individuals can be expanded, and then based on the expanded EMG data Set, retrain the original gesture model to improve the generalization effect of the original gesture recognition model. Retraining may be performed regularly according to a preset period, or may be performed after the myoelectric data set has been expanded to a certain extent. This embodiment does not limit this.
  • the meta-learning task includes a support set (Support Set) and a query set (Query Set).
  • Each meta-learning task is used to perform meta-learning training on a meta-learner based on the original gesture recognition model, including: for each element For learning tasks, first assign the parameters of the meta-learner to the base learner, and then train the base learner based on the EMG data in the support set and the gesture labels corresponding to the EMG data to optimize the parameters of the base learner; according to the query set The EMG data and the gesture label corresponding to the EMG data are obtained to obtain the prediction error of the gesture label prediction result of the parameter-optimized base learner; Based on the prediction error, gradient updates are performed on the meta-learner to optimize the parameters of the meta-learner.
  • the meta-learning task includes a support set and a query set.
  • the support set has an important setting of N-way K-shot, that is, there are N types of samples in the support set, and K samples of each type are labeled.
  • Data, and the query set can contain n types of samples, each type of sample has k labeled data, where N, K, n and k are all positive integers.
  • the support set contains 6 gesture tags, and each gesture tag samples three pieces of electromyographic data.
  • the query set contains two gesture tags, and each gesture tag samples one piece of myoelectric data.
  • the meta-learning task generated based on the historical electromyographic data and gesture labels of each individual can be referred to Figure 2.
  • the labeled data represents the acquired electromyographic data, and the samples are various types of gesture labels.
  • the parameters in the meta-learner are first copied through the base learner, and then the support is read Each concentrated EMG data and the gesture labels corresponding to the EMG data are used as input.
  • the base learner is used to predict the gesture labels, and the loss value between the prediction results and the gesture labels corresponding to the EMG data is used. Gradient updates to optimize parameters in the base learner.
  • the gesture tags corresponding to the electromyographic data use the electromyographic data corresponding to each gesture tag in the query set as input, and use the parameter-optimized base learner to predict the gesture tags and predict the gesture tags according to the query
  • the gesture labels corresponding to the electromyographic data are concentrated to obtain the prediction error of the gesture label prediction result output by the parameter-optimized base learner.
  • the gradient of the meta-learner is updated to obtain the optimized new parameters, and the new parameters are used as parameters of the meta-learner.
  • the optimized parameters of the meta-learner are copied back to the base learner.
  • the meta-learner with optimized parameters at this time is used as the initial gesture recognition model.
  • the required initial gesture recognition model is obtained accurately and efficiently based on the original gesture recognition model.
  • the obtained initial gesture recognition model only requires a small number of gradient update steps and a meta-learning task related to the specific task for fine-tuning to adapt to the specific task.
  • the preset constraints can also include that when generating meta-learning tasks, the electromyographic data and gesture labels used to generate the support set can be taken from the data collected relatively early in the individual electromyographic data collected, and The electromyographic data and gesture labels used to generate the query set are taken from the relatively later collection time of the individual electromyographic data collected.
  • the trained meta-learner is based on the earlier EMG data versus the later EMG data.
  • the prediction model can then improve the consistency between the trained model and the actual gesture recognition process, and further improve the accuracy of the model's gesture prediction.
  • the original gesture recognition model will learn to a certain extent the data distribution shift caused by differences in acquisition time (i.e. different muscle/surface electromyographic states), it can better adapt to subsequent actual usage scenarios.
  • base learning is performed based on the EMG data in the support set and the gesture labels corresponding to the EMG data.
  • the machine is trained to optimize the parameters of the base learner, including: using the EMG data in the support set as input, the gesture label corresponding to the EMG data as a supervision signal, and obtaining the loss value of the gesture label prediction result of the base learner; according to the loss value , perform gradient updates on the base learner to obtain new parameters of the base learner.
  • the electromyographic data is used as the input signal
  • the gesture label corresponding to the centrally recorded electromyographic data is used as the supervision signal during the training process.
  • the base learner uses the input electromyoelectric data to The data predicts the gesture label, and calculates the loss value of the gesture label prediction result through a preset loss function, such as a cross-entropy loss function, a pairwise loss function or an exponential loss function, the gesture label prediction result and the supervision signal, and then calculates the loss value of the gesture label prediction result according to The loss value performs a gradient update on the base learner to obtain the parameters optimized by the base learner.
  • a preset loss function such as a cross-entropy loss function, a pairwise loss function or an exponential loss function
  • obtaining the prediction error of the gesture label prediction result of the parameter-optimized base learner includes: obtaining the gesture label prediction result of the electromyographic data based on the parameter-optimized base learner and the electromyographic data in the query set; Through the preset loss function, gesture label prediction results, and gesture labels corresponding to the electromyographic data in the query set, the loss value corresponding to the gesture label prediction result is obtained, and the prediction error is obtained based on the loss values corresponding to all myoelectric data in the query set.
  • the electromyographic data in the query set are used as input, a base learner with optimized parameters is used to predict gesture labels, and the gesture labels corresponding to the electromyographic data in the query set are used as supervision signals.
  • the preset loss function such as cross-entropy loss function, pairwise loss function or exponential loss function
  • the gesture label predicted by the parameter-optimized base learner and the gesture label corresponding to the electromyographic data in the query set
  • the parameter optimization is obtained
  • the loss value of the gesture label prediction result of the base learner is obtained, and the prediction error is obtained based on the loss value corresponding to all the electromyographic data in the query set, so as to facilitate the subsequent gradient update of the meta-learner based on the prediction error, and then complete the meta-learner.
  • Learner parameter optimization The prediction error of the prediction result is accurately obtained through the preset loss function, which facilitates accurate parameter adjustment of the meta-learner and completes model optimization.
  • obtaining the prediction error based on the loss values corresponding to all the electromyographic data in the query set includes: obtaining the average value of the loss values corresponding to all the electromyographic data in the query set, and using the average value as the prediction error.
  • the average here can be any one of arithmetic mean, weighted mean, geometric mean, root mean square mean and harmonic mean.
  • the average value is an arithmetic mean.
  • the loss values corresponding to each EMG data in the query set can be obtained one by one, and then the loss values corresponding to each EMG data are arithmetic averaged to obtain all muscle parameters.
  • the arithmetic mean of the loss values corresponding to the electrical data is used as the prediction error.
  • the gradient of the base learner is updated based on the electromyographic data in the support set and the gesture labels corresponding to the electromyographic data.
  • the learning rate when is smaller than the learning rate when updating the gradient of the meta-learner based on the EMG data in the query set and the gesture labels corresponding to the EMG data.
  • Step 301 Obtain the meta-learning task used in the current round of training.
  • Step 302 Assign the parameters of the meta-learner to the base learner.
  • Step 303 Train the base learner based on the support set data of the meta-learning task used in the current round of training, and obtain the optimized parameters of the base learner after the gradient update.
  • Step 304 Based on the parameter-optimized base learner and the query set data of the meta-learning task used in the current round of training, calculate the loss value of the meta-learning task as the prediction error, and calculate the corresponding gradient.
  • Step 305 Update the parameters of the meta-learner according to the calculated gradient to complete the current round of meta-learning training.
  • the initial gesture recognition model can also be trained and generated in the following way: generating several meta-learning tasks based on the historical electromyographic data and gesture labels of multiple individuals, and each meta-learning task is based on the same individual or Historical EMG data and gesture labels of similar individuals are generated; each meta-learning task is used to perform meta-learning training on a meta-learner based on a network model with gradient backpropagation to obtain an initial gesture recognition model.
  • the historical EMG data and gesture labels of multiple individuals can be randomly obtained, and then one or more meta-learning tasks are generated based on the historical EMG data and gesture labels of each individual. , multiple meta-learning tasks are finally obtained, and each meta-learning task is generated based on the historical electromyographic data and gesture labels of the same individual, or based on the historical electromyographic data and gesture labels of similar individuals. Then a grid model with gradient backpropagation is taken as a meta-learner, and each meta-learning task is used to perform meta-learning training on the network model to obtain the initial gesture recognition model. The parameters of the grid model with gradient backpropagation are randomly obtained at the initial stage of training.
  • the meta-task training method in meta-learning drives the model to optimize parameters in a direction with stronger generalization and improve the accuracy of the model.
  • By directly obtaining a grid model with random parameters and gradient backpropagation, and obtaining the initial gesture recognition model through meta-learning training the acquisition process of the initial gesture recognition model is simplified, the model acquisition efficiency is improved, and only a small amount of gradients are required.
  • the number of steps is updated, and a meta-learning task related to the specific task can be fine-tuned to adapt to the specific task.
  • fine-tuning the initial gesture recognition model based on the current electromyographic data and gesture labels of the current individual includes: supervising and training the initial gesture recognition model based on the current electromyographic data and gesture labels of the current individual; Preset the number of gradient update steps, and perform gradient updates on the initial gesture recognition model to obtain new parameters to form the current Current gesture recognition model of ex-individuals.
  • the initial gesture recognition model when fine-tuning the initial gesture recognition model based on the current EMG data and gesture labels of the current individual, it can be achieved through supervised training, that is, the current EMG data of the current individual is used as input data, and the current EMG data is used as the input data.
  • the gesture label corresponding to the electromyographic data is used as a supervision signal for supervised training.
  • the initial gesture recognition model is gradient updated according to the preset gradient update steps to obtain optimized parameters and form the current individual's current Gesture recognition model.
  • the initial gesture recognition model can be accurately fine-tuned to ensure the recognition accuracy of the current gesture recognition model.
  • the processing unit 102 is further configured to: generate a current meta-learning task for the current individual based on the current electromyographic data and gesture labels of the current individual; and perform meta-learning based on the initial gesture recognition model based on the current meta-learning task.
  • the machine performs meta-learning training to generate the current individual's personal gesture recognition model.
  • the processing unit 102 will also generate the current meta-learning task of the current individual based on the current myoelectric data and gesture labels of the current individual. Then, according to the current meta-learning task of the current individual, the meta-learner based on the initial gesture recognition model is trained for the current individual, so that the meta-learner with optimized parameters has better pertinence and adaptability to the current individual.
  • the meta-learner after completing meta-learning training is used as the current individual's personal gesture recognition model. For example, collect myoelectric data when an individual makes gestures corresponding to different gesture tags within 2 minutes in the current state.
  • the initial gesture recognition model is fine-tuned and the preset settings are also used.
  • the electromyographic data collected first and the corresponding gesture tags are taken as the support set, and the electromyographic data collected later and the corresponding gesture tags are used as the query set to generate the current individual's
  • the current meta-learning training task is performed, and the meta-learner based on the initial gesture recognition model is meta-learning trained according to the current meta-learning task to obtain the current individual's personal gesture recognition model.
  • the method of constructing the support set and query set generation meta-task according to the time sequence can enable the personal gesture recognition model to have the ability to learn the overall distribution drift of myoelectric data over time.
  • the EMG data when the individual makes gestures corresponding to different gesture labels within 2 minutes of the current state can also be collected.
  • the electromyographic data and the gesture labels corresponding to the electromyographic data generate a meta-learning training task, and the meta-learning verification task is generated based on the electromyographic data and the gesture labels corresponding to the electromyographic data within the next minute.
  • a meta-learning training task based on the EMG data and the gesture labels corresponding to the EMG data in the first minute and a half
  • a meta-learning verification task based on the EMG data and the gesture labels corresponding to the EMG data in the second half minute.
  • Task a meta-learning training task based on the EMG data and the gesture labels corresponding to the EMG data in the first minute and a half
  • meta-learning verification task based on the EMG data and the gesture labels corresponding to the EMG data in the second half minute.
  • other time ratios can also be used to divide time to obtain training tasks and verification tasks, and this embodiment is not limited to this.
  • the proportion of time before and after segmentation can be determined according to the proportion of K-WAY-N-SHOT, which can ensure the balance of the sample.
  • the initial gesture recognition model continues to be repeatedly trained and parameter fine-tuned according to the meta-learning training task, or Collect the electromyographic data of the current individual over a longer period of time and the gesture labels corresponding to the electromyographic data, generate a new meta-learning task, retrain the initial gesture recognition model and fine-tune parameters until the gesture prediction accuracy reaches the preset threshold, and the gesture labels The loss value of the prediction result no longer decreases.
  • the verification task to detect the prediction accuracy, the accuracy of the obtained personal gesture recognition model is guaranteed.
  • the preset duration and prediction accuracy thresholds can be set as needed.
  • training tasks can be generated based on data collected earlier, and verification tasks can be generated based on data collected later.
  • Training tasks can be generated based on data collected later, and verification tasks can be generated based on data collected earlier. All collected data can be used for meta-learning task generation, or only part of the data can be selected for meta-learning task generation. In this embodiment There are no restrictions on this.
  • the model acquisition system also includes: a storage unit; a storage unit for storing a personal gesture recognition model; a processing unit, also configured to: when the current individual has a personal gesture recognition model, according to the current individual's current muscle According to the electromyographic data and gesture labels of the current individual, the personal gesture recognition model is fine-tuned to obtain the current gesture recognition model of the current individual; based on the current individual's electromyographic data and gesture labels, the current meta-learning task of the current individual is generated, and the current meta-learning task is generated based on the current meta-learning task.
  • the personal gesture recognition model continues to undergo meta-learning training to generate a parameter-optimized personal gesture recognition model.
  • the processing unit 102 reads the current individual's personal gesture recognition model if it is stored in the storage unit.
  • the individual's personal gesture recognition model is then fine-tuned based on the current individual's current myoelectric data and gesture tags to obtain the current individual's current gesture recognition model. That is, when it is detected that the current individual is not a new user, the pre-stored personal gesture recognition model of the current individual is read and used as the basis for obtaining the current gesture recognition model.
  • the processing unit 102 is also configured to generate a current meta-learning task for the current individual based on the current electromyographic data and gesture labels of the current individual, and then perform a personal gesture recognition model of the current individual based on the current meta-learning task for the current individual.
  • Meta-learning training of the individual's current state enables the personal gesture recognition model to have better performance for the current individual.
  • the parameters of the personal gesture recognition model are optimized through meta-learning training, and the optimized personal gesture recognition model is stored in the storage unit.
  • the processing unit can be hardware that performs logical operations, such as a microcontroller, a microprocessor, a programmable logic controller (PLC) or a field-programmable logic gate array (FPGA), or in a Software programs, functional modules, functions, object libraries (Object Libraries) or dynamic link libraries (Dynamic-Link Libraries) that implement the above functions based on hardware. Or, a combination of both.
  • logical operations such as a microcontroller, a microprocessor, a programmable logic controller (PLC) or a field-programmable logic gate array (FPGA), or in a Software programs, functional modules, functions, object libraries (Object Libraries) or dynamic link libraries (Dynamic-Link Libraries) that implement the above functions based on hardware. Or, a combination of both.
  • FIG. 4 Another aspect of the embodiments of the present application provides a method for generating a gesture model.
  • the process of the gesture model generation method can be referred to Figure 4, including the following steps:
  • Step 401 Obtain the current electromyographic data and gesture tag of the current individual.
  • the gesture tag contains gesture information.
  • Step 402 When the current individual does not have a personal gesture recognition model, obtain an initial gesture recognition model.
  • the initial gesture recognition model is meta-learned based on several meta-learning tasks generated based on historical myoelectric data and gesture labels of multiple individuals. Learning and training generation, each meta-learning task is generated based on the historical electromyographic data and gesture labels of the same individual, or each meta-learning task is generated based on the historical electromyographic data and gesture labels of similar individuals.
  • Step 403 Fine-tune the initial gesture recognition model based on the current electromyographic data and gesture labels of the current individual to obtain the current gesture recognition model of the current individual.
  • this embodiment is a method embodiment corresponding to the system embodiment, and this embodiment can be implemented in cooperation with the system embodiment.
  • the relevant technical details mentioned in the system embodiment are still valid in this embodiment. In order to reduce duplication, they will not be described again here. Correspondingly, the relevant technical details mentioned in this embodiment can also be applied to the system embodiment.
  • FIG. 5 Another aspect of the embodiment of the present application provides a gesture recognition method.
  • the flow of the gesture recognition method can be referred to Figure 5, which includes the following steps:
  • Step 501 Obtain the current gesture recognition model of the current individual.
  • the terminal device that recognizes the gesture of the current individual obtains the current gesture recognition model obtained by fine-tuning the initial gesture recognition model for the current individual through the above model acquisition system.
  • Step 502 Obtain real-time electromyographic data of the current individual.
  • the electromyographic data of the current individual is collected in real time through electromyographic electrodes, and the collected real-time electromyographic data is input into the current gesture recognition model.
  • the method of cumulative sharding of data sampling points is used to determine the size of the data slices input to the statistical model.
  • Fragmentation methods include but are not limited to sliding window segmentation methods and endpoint detection segmentation methods (endpoint detection based on RMS or other methods).
  • Step 503 Obtain the current individual's gesture based on the real-time myoelectric data through the current gesture recognition model. Specifically, after obtaining the real-time electromyographic data of the current individual, the current gesture recognition model performs Predict the gestures of the current individual and output the predicted gestures of the current individual.
  • the current gesture recognition model of the current individual after obtaining the current gesture recognition model of the current individual through the above model acquisition system, it also includes: obtaining the prediction accuracy of the current gesture recognition model; when the prediction accuracy does not meet the preset threshold, re-obtaining a new prediction Set the current electromyographic data and gesture tags of the current individual within the time period; re-fine-tune the current gesture recognition model based on the re-obtained current electromyographic data and gesture tags.
  • the current gesture recognition model Monitor the prediction accuracy of the current gesture recognition model.
  • the prediction accuracy of the current gesture recognition model is insufficient, reacquire the gestures corresponding to different gesture labels and the electromyographic data when making different gestures within the preset time period of the current individual's current state, and based on The current myoelectric data and gesture labels are re-acquired, and the current gesture recognition model is fine-tuned again, so that the current gesture recognition model can better adapt to the current status of the current individual and ensure the accuracy of gesture recognition.
  • the gesture recognition model is updated and iterated periodically to ensure the accuracy of the gesture recognition results obtained by the gesture recognition model.
  • FIG. 6 Another aspect of the embodiment of the present application also provides a gesture recognition device. Referring to Figure 6, it includes:
  • the first acquisition module 601 is used to acquire the current gesture recognition model of the current individual through the above-mentioned model acquisition system.
  • the second acquisition module 602 is used to acquire the real-time electromyographic data of the current individual
  • the recognition module 603 is used to obtain the current individual's gesture according to the real-time myoelectric data through the current gesture recognition model.
  • the gesture recognition device further includes a third acquisition model; the third acquisition module is used to acquire the prediction accuracy of the current gesture recognition model; when the prediction accuracy does not meet the preset threshold, re-obtain a new preset duration.
  • the current myoelectric data and gesture tags of the current individual in the system are retrieved; the current gesture recognition model is re-fine-tuned based on the re-obtained current myoelectric data and gesture tags.
  • this embodiment is a device embodiment corresponding to the method embodiment, and this embodiment can be implemented in cooperation with the method embodiment.
  • the relevant technical details mentioned in the method embodiment are still valid in this embodiment. In order to reduce duplication, they will not be described again here. Correspondingly, the relevant technical details mentioned in this embodiment can also be applied to the method embodiment.
  • FIG. 7 Another aspect of the embodiment of the present application also provides an electronic device, with reference to Figure 7, including: at least one processor 701; and a memory 702 communicatively connected to the at least one processor 701; wherein the memory 702 stores data that can be Instructions executed by at least one processor 701, the instructions are executed by at least one processor 701, so that at least one processor 701 can execute the gesture recognition method as described above, or the model acquisition method as described above.
  • the memory 702 and the processor 701 are connected using a bus.
  • the bus may include any number of interconnected buses and bridges.
  • the bus connects various circuits of one or more processors 701 and the memory 702 together.
  • the bus is ok To connect various other circuits together, such as peripherals, voltage regulators, and power management circuits, etc., these are all well known in the art and, therefore, will not be described further herein.
  • the bus interface provides the interface between the bus and the transceiver.
  • a transceiver may be one element or may be multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium.
  • the data processed by the processor 701 is transmitted on the wireless medium through the antenna. Furthermore, the antenna also receives the data and transmits the data to the processor 701 .
  • Processor 701 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions.
  • the memory 702 may be used to store data used by the processor 701 when performing operations.
  • Another aspect of the embodiments of the present application also provides a computer-readable storage medium storing a computer program.
  • the computer program is executed by the processor, the gesture recognition method as described above, or the model acquisition method as described above, is implemented.
  • the program is stored in a storage medium and includes several instructions to cause a device ( It may be a microcontroller, a chip, etc.) or a processor (processor) that executes all or part of the steps of the methods described in various embodiments of this application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program code. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Medical Informatics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Dermatology (AREA)
  • General Health & Medical Sciences (AREA)
  • Neurology (AREA)
  • Neurosurgery (AREA)
  • User Interface Of Digital Computer (AREA)
  • Image Analysis (AREA)

Abstract

The present application relates to the field of electrophysiologic signal recognition, and discloses a model acquisition system, a gesture recognition method and apparatus, a device, and a storage medium. The model acquisition system comprises: an input unit 101, which is used to acquire current electromyographic data and a gesture label of a current individual; and a processing unit 102, which is configured to: acquire an initial gesture recognition model when the current individual does not have a personal gesture recognition model, wherein the initial gesture recognition model is generated by carrying out meta-learning training according to a plurality of meta-learning tasks generated on the basis of historical electromyographic data and gesture labels of a plurality of individuals, and each meta-learning task is generated on the basis of historical electromyographic data and a gesture label of the same individual, or each meta-learning task is generated in a hybrid manner on the basis of historical electromyographic data and gesture labels of similar individuals; and fine-tune the initial gesture recognition model according to the current electromyographic data and the gesture label of the current individual to obtain a current gesture recognition model. The current gesture recognition model is accurately obtained on the basis of individual data.

Description

模型获取系统、手势识别方法、装置、设备及存储介质Model acquisition system, gesture recognition method, device, equipment and storage medium
交叉引用cross reference
本申请基于申请号为“2022103417552”、申请日为2022年3月29日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以引入方式并入本申请。This application is filed based on a Chinese patent application with application number “2022103417552” and a filing date of March 29, 2022, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby incorporated by reference. Apply.
技术领域Technical field
本申请实施例涉及电生理信号识别领域,特别涉及一种模型获取系统、手势识别方法、装置、设备及存储介质。Embodiments of the present application relate to the field of electrophysiological signal recognition, and in particular to a model acquisition system, gesture recognition method, device, equipment and storage medium.
背景技术Background technique
肌电图(Electromyography,EMG)是通过肌电电极对肌肉运动神经元放电而得到的电生理信号的记录。它包含有丰富的神经信息,可被解码为许多与肢体相关的活动信号。EMG的采集具有对人体无害、易获取和易操作等特点,在手势识别分类领域有良好的应用前景,尤其是在医疗、娱乐以及其他的一些涉及机器控制的行业。Electromyography (EMG) is the recording of electrophysiological signals obtained by discharging muscle motor neurons through electromyographic electrodes. It contains rich neural information that can be decoded into many limb-related activity signals. The collection of EMG is harmless to the human body, easy to obtain and easy to operate. It has good application prospects in the field of gesture recognition and classification, especially in medical treatment, entertainment and other industries involving machine control.
传统的肌电手势识别使用大量的单个个体预采集数据训练相应的模式识别分类器,常用的分类器模型包含传统机器学习的支持向量机、随机森林等模型,以及深度学习中基于卷积神经网络、循环神经网络等方法构建的模型。目前,肌电信号在手势识别的应用中有许多固有的问题,由于个体的肌肉神经分布具有特异性,并且受皮肤阻抗、肌肉结构等高度依赖个体特性的因素影响,肌电信号存在显著的个体差异,分类精度依赖单个个体的大量数据训练。此外,受电极移位、环境等因素影响,肌电信号特性的变化十分迅速,导致即便是在大量个体数据上训练出的模型,其精度依然会随着使用时间增长而逐渐降低。基于以上的原因,基于大量个体数据训练出的模型常常会因为采集数据量受限和先验知识浪费等因素,导致过拟合与模型性能不稳定等问题。 Traditional myoelectric gesture recognition uses a large amount of pre-collected data from a single individual to train the corresponding pattern recognition classifier. Commonly used classifier models include support vector machines, random forests and other models of traditional machine learning, as well as convolutional neural networks based on deep learning. , recurrent neural network and other methods to build models. At present, there are many inherent problems in the application of electromyographic signals in gesture recognition. Due to the specificity of individual muscle nerve distribution and the influence of skin impedance, muscle structure and other factors that are highly dependent on individual characteristics, there are significant individual differences in electromyographic signals. Differential,classification accuracy relies on training on a large,amount of data from a single individual. In addition, affected by factors such as electrode displacement and environment, the characteristics of myoelectric signals change very rapidly. As a result, even if a model is trained on a large amount of individual data, its accuracy will gradually decrease as the use time increases. For the above reasons, models trained based on a large amount of individual data often lead to problems such as overfitting and unstable model performance due to factors such as limited data collection and waste of prior knowledge.
为了应对先验知识浪费的问题,迁移学习的方法给出了一种方案,但是迁移学习会面临灾难性遗忘问题,并且为了保证模型精度,依旧需要大量的个体数据进行训练,模型训练和模型应用场景切换仍旧较为复杂,训练和调整效率低。In order to deal with the problem of waste of prior knowledge, the transfer learning method provides a solution, but transfer learning will face the problem of catastrophic forgetting, and in order to ensure the accuracy of the model, a large amount of individual data is still needed for training, model training and model application. Scene switching is still relatively complex, and training and adjustment efficiency is low.
发明内容Contents of the invention
本申请实施例旨在提供一种模型获取系统、手势识别方法、装置、设备及存储介质,旨在利用元学习的方式,通过少量个体数据准确的获取到适配当前个体特质的当前手势识别模型,提高手势识别模型训练和调整的效率,进而完成对当前个体手势的准确识别。The embodiments of this application aim to provide a model acquisition system, gesture recognition method, device, equipment and storage medium, aiming to use meta-learning to accurately obtain the current gesture recognition model that adapts to the current individual characteristics through a small amount of individual data. , improve the efficiency of gesture recognition model training and adjustment, and then complete the accurate recognition of the current individual gesture.
为解决上述问题中的一个或多个并实现上述目的,本申请实施例提供了一种模型获取系统,包括:输入单元,用于获取当前个体的当前肌电数据及手势标签,所述手势标签包含手势信息;处理单元,被配置为:在当前个体不存在个人手势识别模型的情况下,获取初始手势识别模型,其中,所述初始手势识别模型根据基于多个个体的历史肌电数据及手势标签生成的若干个元学习任务进行元学习训练生成,且每个所述元学习任务基于同一个体的历史肌电数据及手势标签生成,或者每个所述元学习任务基于相似个体的历史肌电数据及手势标签混合生成;根据所述当前个体的当前肌电数据及手势标签,对所述初始手势识别模型进行微调,得到所述当前个体的当前手势识别模型。In order to solve one or more of the above problems and achieve the above objects, embodiments of the present application provide a model acquisition system, including: an input unit for acquiring the current myoelectric data and gesture tags of the current individual. The gesture tags Containing gesture information; the processing unit is configured to: obtain an initial gesture recognition model when the current individual does not have a personal gesture recognition model, wherein the initial gesture recognition model is based on historical myoelectric data and gestures based on multiple individuals. Several meta-learning tasks for label generation are generated through meta-learning training, and each of the meta-learning tasks is based on the historical electromyography data and gesture label generation of the same individual, or each of the meta-learning tasks is based on the historical electromyography of similar individuals. The data and gesture labels are mixed and generated; according to the current electromyographic data and gesture labels of the current individual, the initial gesture recognition model is fine-tuned to obtain the current gesture recognition model of the current individual.
为解决上述问题中的一个或多个并实现上述目的,本申请实施例提供了一种模型获取方法,包括:获取当前个体的当前肌电数据及手势标签,所述手势标签包含手势信息;在所述当前个体不存在个人手势识别模型的情况下,获取初始手势识别模型,其中,所述初始手势识别模型根据基于多个个体的历史肌电数据及手势标签生成的若干个元学习任务进行元学习训练生成,且每个所述元学习任务基于同一个体的历史肌电数据及手势标签生成,或者每个所述元学习任务基于相似个体的历史肌电数据及手势标签混合生成;根据所述当前个体的当前肌电数据及手势标签,对所述初始手势识别模型进行微调,得到所述当前个体的当前手势识别模型。In order to solve one or more of the above problems and achieve the above objects, embodiments of the present application provide a model acquisition method, which includes: acquiring the current myoelectric data and gesture tags of the current individual, where the gesture tags include gesture information; When the current individual does not have a personal gesture recognition model, an initial gesture recognition model is obtained, wherein the initial gesture recognition model is meta-learned based on several meta-learning tasks generated based on historical myoelectric data and gesture labels of multiple individuals. Learning and training are generated, and each of the meta-learning tasks is generated based on the historical myoelectric data and gesture labels of the same individual, or each of the meta-learning tasks is generated based on a mixture of historical myoelectric data and gesture labels of similar individuals; according to the Using the current electromyographic data and gesture tags of the current individual, fine-tune the initial gesture recognition model to obtain the current gesture recognition model of the current individual.
为解决上述问题中的一个或多个并实现上述目的,本申请实施例提供了一种手势识别方法,包括:通过上述的模型获取系统获取当前个体的当前手势识别模型;获取所述当前个体的实时肌电数据;通过所述当前手势识别模型,根据所述实时肌电数据获取所述当前个体的手势。In order to solve one or more of the above problems and achieve the above objects, embodiments of the present application provide a gesture recognition method, including: obtaining the current gesture recognition model of the current individual through the above model acquisition system; obtaining the current individual's current gesture recognition model. Real-time electromyographic data; through the current gesture recognition model, the gesture of the current individual is obtained according to the real-time electromyographic data.
为解决上述问题中的一个或多个并实现上述目的,本申请实施例还提供了一种手势识别装置,包括:第一获取模块,用于通过上述的模型获取系统获取当前个体的当前手势识别模型;第二获取模块,用于获取所述当前个体的实时肌电数据;识别模块,用于通过所述 当前手势识别模型,根据所述实时肌电数据获取所述当前个体的手势。In order to solve one or more of the above problems and achieve the above objects, embodiments of the present application also provide a gesture recognition device, including: a first acquisition module for acquiring the current gesture recognition of the current individual through the above model acquisition system. model; a second acquisition module, used to acquire the real-time electromyographic data of the current individual; an identification module, used to pass the The current gesture recognition model acquires the gesture of the current individual based on the real-time electromyographic data.
为解决上述问题中的一个或多个并实现上述目的,本申请实施例还提供了一种电子设备,包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行上述的手势识别方法,或执行上述的模型获取方法。In order to solve one or more of the above problems and achieve the above objects, embodiments of the present application also provide an electronic device, including: at least one processor; and a memory communicatively connected with the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can perform the above-mentioned gesture recognition method, or execute the above-mentioned model. Get method.
为解决上述问题中的一个或多个并实现上述目的,本申请实施例还提供了一种计算机可读存储介质,存储有计算机程序,计算机程序被处理器执行时实现上述的手势识别方法,或执行上述的模型获取方法。In order to solve one or more of the above problems and achieve the above objects, embodiments of the present application also provide a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the above gesture recognition method is implemented, or Execute the above model acquisition method.
本申请提出的模型获取系统,在当前个体不存在个人手势识别模型的情况下,先通过输入单元获取当前个体的当前肌电数据及手势信息,并根据当前个体的当前肌电数据及手势标签对初始手势识别模型进行微调,得到适用于当前个体的当前手势识别模型,而初始手势识别模型根据基于多个个体的历史肌电数据及手势标签生成的若干个元学习任务进行元学习训练生成,且每个元学习任务基于同一个体的历史肌电数据及手势标签生成或者基于相似个体的历史肌电数据及手势标签混合生成。先根据多个个体的历史肌电数据和手势标签形成分别基于同一个体的历史肌电数据及手势标签生成或者基于相似个体的历史肌电数据及手势标签混合生成的若干个元学习任务,结合元学习训练的方式获取到的与人群适配,并且具有良好泛化能力的初始手势识别模型,在应用到具体的当前个体时,根据当前个体的当前肌电数据和手势标签对初始手势识别模型进行微调,如此在少量个体数据的支持下,准确高效的对初始手势识别模型进行微调,得到适应当前个体的当前手势识别模型,进而保证手势识别的准确性。The model acquisition system proposed in this application, when the current individual does not have a personal gesture recognition model, first obtains the current electromyographic data and gesture information of the current individual through the input unit, and based on the current individual's current electromyographic data and gesture tags, The initial gesture recognition model is fine-tuned to obtain the current gesture recognition model suitable for the current individual, and the initial gesture recognition model is generated based on meta-learning training based on several meta-learning tasks generated based on the historical electromyographic data and gesture labels of multiple individuals, and Each meta-learning task is generated based on the historical EMG data and gesture labels of the same individual or based on a mixture of historical EMG data and gesture labels of similar individuals. First, several meta-learning tasks are first formed based on the historical myoelectric data and gesture labels of multiple individuals, which are generated based on the historical myoelectric data and gesture labels of the same individual or based on a mixture of historical myoelectric data and gesture labels of similar individuals. Combined with the meta-learning tasks, The initial gesture recognition model obtained through learning and training is suitable for the crowd and has good generalization ability. When applied to a specific current individual, the initial gesture recognition model is evaluated based on the current myoelectric data and gesture labels of the current individual. Fine-tuning, in this way, with the support of a small amount of individual data, the initial gesture recognition model can be fine-tuned accurately and efficiently to obtain the current gesture recognition model that adapts to the current individual, thereby ensuring the accuracy of gesture recognition.
附图说明Description of drawings
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,附图中具有相同参考数字标号的元件表示为类似的元件,除非有特别申明,附图中的图不构成比例限制。One or more embodiments are exemplified by the pictures in the corresponding drawings. These illustrative illustrations do not constitute limitations to the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements. Unless otherwise stated, the figures in the drawings are not intended to be limited to scale.
图1是本申请实施例中的一种模型获取系统结构示意图;Figure 1 is a schematic structural diagram of a model acquisition system in an embodiment of the present application;
图2是本申请实施例中的一种元学习任务结构示意图;Figure 2 is a schematic structural diagram of a meta-learning task in the embodiment of the present application;
图3是本申请实施例中的一种元学习训练流程示意图;Figure 3 is a schematic diagram of a meta-learning training process in an embodiment of the present application;
图4是本申请另一实施例中的模型获取方法流程图;Figure 4 is a flow chart of a model acquisition method in another embodiment of the present application;
图5是本申请另一实施例中的手势识别方法流程图;Figure 5 is a flow chart of a gesture recognition method in another embodiment of the present application;
图6是本申请另一实施例中的手势识别装置结构示意图;Figure 6 is a schematic structural diagram of a gesture recognition device in another embodiment of the present application;
图7是本申请另一实施例中的电子设备结构示意图。 Figure 7 is a schematic structural diagram of an electronic device in another embodiment of the present application.
具体实施方式Detailed ways
由背景技术可知,传统模型训练方式存在过拟合和模型性能不稳定的问题,而通过迁移学习得到的模型其训练和调整的效率低,需要依赖大量的个体数据保证识别精度。因此,如何提供一种能够满足不同应用场景高效切换,训练和调整效率高的模型获取方法以保证手势的准确高效识别是一个迫切需要得到解决的问题。It can be seen from the background technology that traditional model training methods have problems of over-fitting and unstable model performance, while models obtained through transfer learning have low training and adjustment efficiency and need to rely on a large amount of individual data to ensure recognition accuracy. Therefore, how to provide a model acquisition method that can meet the needs of efficient switching, training and adjustment in different application scenarios to ensure accurate and efficient recognition of gestures is an urgent problem that needs to be solved.
为了解决上述问题,本申请的实施例提供了一种模型获取系统,包括:输入单元,用于获取当前个体的当前肌电数据及手势标签,手势标签包含手势信息;处理单元,被配置为:在当前个体不存在个人手势识别模型的情况下,获取初始手势识别模型,其中,初始手势识别模型根据基于多个个体的历史肌电数据及手势标签生成的若干个元学习任务进行元学习训练生成,且每个元学习任务基于同一个体的历史肌电数据及手势标签生成,或者每个元学习任务基于相似个体的历史肌电数据及手势标签混合生成;根据当前个体的当前肌电数据及手势标签,对初始手势识别模型进行微调,得到当前个体的当前手势识别模型。In order to solve the above problems, embodiments of the present application provide a model acquisition system, including: an input unit, used to acquire the current electromyographic data and gesture tags of the current individual, where the gesture tags contain gesture information; a processing unit, configured as: When the current individual does not have a personal gesture recognition model, an initial gesture recognition model is obtained. The initial gesture recognition model is generated based on meta-learning training based on several meta-learning tasks generated based on historical myoelectric data and gesture labels of multiple individuals. , and each meta-learning task is generated based on the historical EMG data and gesture labels of the same individual, or each meta-learning task is generated based on a mixture of historical EMG data and gesture labels of similar individuals; based on the current EMG data and gesture labels of the current individual Label, fine-tune the initial gesture recognition model to obtain the current gesture recognition model of the current individual.
本申请提出的模型获取系统,在获取当前个体的当前手势识别模型前,在当前个体不存在个人手势识别模型的情况下,获取根据多个个体的历史肌电数据及手势标签,基于每个个体的历史肌电数据及手势标签形成元学习任务,或者基于相似个体的历史肌电数据及手势标签混合形成元学习任务,通过元学习训练的方式生成的较为通用的初始手势识别模型。然后在获取当前个体的当前手势识别模型时,先通过输入单元获取根据当前个体的当前肌电数据及手势标签,并根据获取到的当前肌电数据及手势标签对初始手势识别模型进行微调,得到适用于当前个体的当前手势识别模型。先根据多个个体的历史肌电数据和手势标签得到若干个元学习任务,每个元学习任务基于同一个体的历史肌电数据及手势标签生成,或者每个元学习任务基于相似个体的历史肌电数据及手势标签混合生成,结合元学习训练的方式获取到的与人群适配,并且具有良好泛化能力的初始手势识别模型,在应用到具体的当前个体时,根据当前个体的当前肌电数据和手势标签对初始手势识别模型进行微调。如此,在少量个体数据的支持下,准确高效的对初始手势识别模型进行微调,得到适应当前个体的当前手势识别模型,进而保证手势识别的准确性。The model acquisition system proposed in this application, before acquiring the current gesture recognition model of the current individual, when the current individual does not have a personal gesture recognition model, acquires the historical myoelectric data and gesture tags of multiple individuals, based on each individual The historical EMG data and gesture labels form a meta-learning task, or the historical EMG data and gesture labels of similar individuals are mixed to form a meta-learning task, and a more general initial gesture recognition model is generated through meta-learning training. Then, when obtaining the current gesture recognition model of the current individual, first obtain the current electromyographic data and gesture labels of the current individual through the input unit, and fine-tune the initial gesture recognition model based on the obtained current electromyographic data and gesture labels, and obtain Current gesture recognition model applicable to the current individual. First, several meta-learning tasks are obtained based on the historical EMG data and gesture labels of multiple individuals. Each meta-learning task is generated based on the historical EMG data and gesture labels of the same individual, or each meta-learning task is based on the historical EMG data and gesture labels of similar individuals. Electrical data and gesture labels are mixed and generated, combined with the meta-learning training method to obtain an initial gesture recognition model that is suitable for the crowd and has good generalization ability. When applied to a specific current individual, it is based on the current EMG of the current individual. Data and gesture labels to fine-tune the initial gesture recognition model. In this way, with the support of a small amount of individual data, the initial gesture recognition model can be fine-tuned accurately and efficiently to obtain the current gesture recognition model that adapts to the current individual, thereby ensuring the accuracy of gesture recognition.
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请的各实施例进行详细的阐述。然而,本领域的普通技术人员可以理解,在本申请各实施例中,为了使读者更好地理解本申请而提出了许多技术细节。但是,即使没有这些技术细节和基于以下各实施例的种种变化和修改,也可以实现本申请所要求保护的技术方案。以下各个实施例的划分是为了描述方便,不应对本申请的具体实现方式构成任何限定,各个实施例在不矛 盾的前提下可以相互结合相互引用。In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, each embodiment of the present application will be described in detail below with reference to the accompanying drawings. However, those of ordinary skill in the art can understand that in each embodiment of the present application, many technical details are provided to enable readers to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solution claimed in this application can also be implemented. The division of the following embodiments is for convenience of description and should not constitute any limitation on the specific implementation of the present application. They can be combined and referenced with each other under the premise of shielding.
下面将结合具体的实施例对本申请记载的模型获取系统的实现细节进行具体的说明,以下内容仅为方便理解提供的实现细节,并非实时本方案的必须。The implementation details of the model acquisition system recorded in this application will be described in detail below with reference to specific embodiments. The following contents are only implementation details provided for convenience of understanding and are not necessary for the real-time solution.
本申请实施例的第一方面提供了一种模型获取系统,如图1所示,模型获取系统包括输入单元101和处理单元102:The first aspect of the embodiment of the present application provides a model acquisition system. As shown in Figure 1, the model acquisition system includes an input unit 101 and a processing unit 102:
输入单元101,用于获取当前个体的当前肌电数据及手势标签,手势标签包含手势信息。The input unit 101 is used to obtain the current electromyographic data and gesture tags of the current individual. The gesture tags include gesture information.
具体地说,在获取针对当前个体具有较好识别效果的当前手势识别模型时,先通过输入单元101对当前个体在当前状态下一定时长内的肌电数据及肌电数据采集时个体的手势对应的手势标签进行采集和记录,获取当前个体的当前肌电数据及手势标签。其中,手势标签是为进行手势存储时创建的数据标签,不同手势标签对应不同的手势,例如,手势标签1对应个体竖食指,手势标签2对应个体竖中指,手势标签3对应个体握拳等。具体的应用中可以根据需要对各标签的含义进行设置,本实施例对手势标签的具体设置和含义不做限制。Specifically, when obtaining the current gesture recognition model with better recognition effect for the current individual, the input unit 101 is first used to correspond to the electromyographic data of the current individual within a certain period of time in the current state and the gesture correspondence of the individual when the electromyographic data is collected. Collect and record the gesture tags to obtain the current myoelectric data and gesture tags of the current individual. Among them, the gesture tag is a data tag created for gesture storage. Different gesture tags correspond to different gestures. For example, gesture tag 1 corresponds to the individual's raised index finger, gesture tag 2 corresponds to the individual's raised middle finger, gesture tag 3 corresponds to the individual's fist, etc. In specific applications, the meaning of each tag can be set as needed. This embodiment does not limit the specific setting and meaning of gesture tags.
例如,在采集当前个体的当前肌电数据时,输入单元101通过语音或者文字的方式自动提示当前个体,在指定时间内,按照一定的顺序做出与预先设置的若干手势标签对应的手势,并通过肌电电极记录肌肉运动神经元在当前个体做出不同手势下产生的肌电信号,并根据各手势对应的时间区间对肌电信号和手势标签进行编码存储。通过获取当前个体在当前状态下的当前肌电数据及手势标签,便于后续对初始手势识别模型进行微调,进而高效准确的获取针对当前个体当前状态的当前手势识别模型。For example, when collecting the current electromyographic data of the current individual, the input unit 101 automatically prompts the current individual through voice or text to make gestures corresponding to several preset gesture tags in a certain order within a specified time, and The electromyographic signals generated by muscle motor neurons when the current individual makes different gestures are recorded through electromyographic electrodes, and the electromyographic signals and gesture labels are encoded and stored according to the time interval corresponding to each gesture. By obtaining the current electromyographic data and gesture labels of the current individual in the current state, it is convenient to fine-tune the initial gesture recognition model in the future, and then efficiently and accurately obtain the current gesture recognition model for the current individual's current state.
在其他一些替代性实施例中,可以采用无监督或者自监督的方式来获得手势标签。这种采集方式下,采集工作系统或工作人员无需为每个手势设置具体的“标签含义”,而是将标签交给统计模型自动处理分类。本实施例对处理分类方法没有特别的限制,例如降维,聚类,自编码器等机器学习方法。示范性地,处理分类方法为主成分分析PCA,K-Means聚类方法。In some other alternative embodiments, gesture labels may be obtained in an unsupervised or self-supervised manner. In this collection method, the collection system or staff do not need to set a specific "label meaning" for each gesture. Instead, the labels are handed over to the statistical model for automatic classification. This embodiment has no special restrictions on processing classification methods, such as dimensionality reduction, clustering, autoencoders and other machine learning methods. Exemplarily, the processing classification method is principal component analysis PCA, K-Means clustering method.
处理单元102,被配置为:在当前个体不存在个人手势识别模型的情况下,获取初始手势识别模型,其中,初始手势识别模型根据基于多个个体的历史肌电数据及手势标签生成的若干个元学习任务进行元学习训练生成,且每个元学习任务基于同一个体的历史肌电数据及手势标签生成,或者每个元学习任务基于相似个体的历史肌电数据及手势标签混合生成;根据当前个体的当前肌电数据及手势标签,对初始手势识别模型进行微调,得到当前个体的当前手势识别模型。The processing unit 102 is configured to: obtain an initial gesture recognition model when the current individual does not have a personal gesture recognition model, wherein the initial gesture recognition model is generated based on several historical myoelectric data and gesture tags of multiple individuals. Meta-learning tasks are generated through meta-learning training, and each meta-learning task is generated based on the historical electromyographic data and gesture labels of the same individual, or each meta-learning task is generated based on a mixture of historical electromyographic data and gesture labels of similar individuals; based on the current The individual's current electromyographic data and gesture labels are used to fine-tune the initial gesture recognition model to obtain the current gesture recognition model of the current individual.
具体地说,处理单元102通过输入单元101获取到当前个体的当前肌电数据及手势 标签之前或者之后,根据预先配置的程序,先根据当前个体的身份标识,检测是否预先存储有当前个体的个人手势识别模型,如果检测到当前个体不存在个人手势识别模型时,处理单元102获取初始手势识别模型。初始手势识别模型根据基于多个个体的历史肌电数据及手势标签生成的若干个元学习任务进行元学习训练生成,且每个元学习任务基于同一个体的历史肌电数据及手势标签生成,或者每个元学习任务基于相似个体的历史肌电数据及手势标签混合生成。在获取针对当前个体的当前手势识别模型时,处理单元102可以通过通信的方式从存储了初始手势识别模型的存储地址中,读取预先训练好的初始手势识别模型。处理单元102也可以从指定存储地址中读取若干个体的历史肌电数据及手势标签,基于每个个体或者相似个体的历史肌电数据及手势标签先生成若干个元学习任务,然后对一个未经过训练的元学习器进行元学习训练生成初始手势识别模型。处理单元102还可以直接读取基于不同个体的历史肌电数据及手势标签预先生成的若干个元学习任务对未经训练的元学习器进行训练生成初始手势识别模型。本实施例对初始手势识别模型的具体获取方式不做限制。本实施例对相似个体采用相似性度量方法来判断,这样可以增加样本量。本实施例对相似性度量的具体方法没有特别的限制,例如通过获取两个之间的“距离”来判断相似性的欧氏距离、切比雪夫距离。Specifically, the processing unit 102 obtains the current electromyographic data and gestures of the current individual through the input unit 101 Before or after the tag, according to the pre-configured program, first detect whether the current individual's personal gesture recognition model is pre-stored based on the current individual's identity. If it is detected that the current individual does not have a personal gesture recognition model, the processing unit 102 obtains the initial Gesture recognition model. The initial gesture recognition model is generated based on meta-learning training based on several meta-learning tasks generated based on the historical electromyographic data and gesture labels of multiple individuals, and each meta-learning task is generated based on the historical electromyographic data and gesture labels of the same individual, or Each meta-learning task is generated based on a mixture of historical EMG data and gesture labels of similar individuals. When acquiring the current gesture recognition model for the current individual, the processing unit 102 may read the pre-trained initial gesture recognition model from the storage address where the initial gesture recognition model is stored through communication. The processing unit 102 can also read the historical myoelectric data and gesture tags of several individuals from the designated storage address, first generate several meta-learning tasks based on the historical myoelectric data and gesture tags of each individual or similar individuals, and then perform a The trained meta-learner undergoes meta-learning training to generate an initial gesture recognition model. The processing unit 102 can also directly read several meta-learning tasks pre-generated based on historical myoelectric data and gesture labels of different individuals to train an untrained meta-learner to generate an initial gesture recognition model. This embodiment does not limit the specific acquisition method of the initial gesture recognition model. This embodiment uses a similarity measurement method to determine similar individuals, which can increase the sample size. This embodiment has no special restrictions on the specific method of similarity measurement. For example, Euclidean distance and Chebyshev distance are used to determine similarity by obtaining the "distance" between two objects.
处理单元102在获取到当前个体的当前肌电数据及手势标签和初始手势识别模型后,根据当前个体的当前肌电数据及手势标签,对初始手势识别模型进行针对当前个体的微调,例如,通过将当前肌电数据作为输入信息,手势标签对应的手势作为监督信息,对初始手势识别模型进行监督学习,使得初始手势识别模型对当前个体具有更好的针对性和适应性,将微调后的初始手势识别模型作为当前个体的当前手势识别模型。通过根据当前个体的当前肌电数据及手势标签对初始手势识别模型进行针对当前个体的微调,提高得到的当前手势识别模型的针对性,保证针对当前个体的手势识别的准确性。After acquiring the current electromyographic data and gesture tags of the current individual and the initial gesture recognition model, the processing unit 102 fine-tunes the initial gesture recognition model for the current individual according to the current electromyographic data and gesture tags of the current individual, for example, by The current myoelectric data is used as input information, and the gesture corresponding to the gesture tag is used as supervision information. Supervised learning is performed on the initial gesture recognition model, so that the initial gesture recognition model has better pertinence and adaptability to the current individual. The fine-tuned initial gesture recognition model is used as the input information. The gesture recognition model serves as the current gesture recognition model of the current individual. By fine-tuning the initial gesture recognition model for the current individual based on the current myoelectric data and gesture labels of the current individual, the pertinence of the obtained current gesture recognition model is improved and the accuracy of gesture recognition for the current individual is ensured.
进一步地,初始手势识别模型可以通过以下方式训练生成:基于多个个体的历史肌电数据及手势标签,对具有梯度反向传递的网络模型进行训练,得到原始手势识别模型;根据多个个体的历史肌电数据及手势标签,生成若干个元学习任务,且每个元学习任务基于同一个体的历史肌电数据及手势标签生成,或者每个元学习任务基于相似个体的历史肌电数据及手势标签混合生成;利用各元学习任务对基于原始手势识别模型的元学习器进行元学习训练,获取初始手势识别模型。Furthermore, the initial gesture recognition model can be trained and generated in the following way: based on the historical myoelectric data and gesture labels of multiple individuals, train a network model with gradient backpropagation to obtain the original gesture recognition model; Historical EMG data and gesture labels are used to generate several meta-learning tasks, and each meta-learning task is based on the historical EMG data and gesture labels of the same individual, or each meta-learning task is based on the historical EMG data and gestures of similar individuals. Label hybrid generation; use each meta-learning task to perform meta-learning training on the meta-learner based on the original gesture recognition model to obtain the initial gesture recognition model.
具体而言,处理单元102或者其他的模型训练设备在根据多个个体的历史肌电数据及手势标签训练出初始手势识别模型时,可以先基于多个个体的历史肌电数据及手势标签,对具有梯度反向传递的网络模型进行训练,训练方式包括监督训练、无监督训练等,得到原 始手势识别模型,然后根据预先设置的约束条件从多个个体的历史肌电数据及手势标签构成的肌电数据集中形成若干个元学习任务,且每个元学习任务中包含的数据来自同一个体,或者来自相似个体。例如对由多个个体的历史肌电数据及手势标签构成的肌电数据集进行随机采样提取出多个个体的历史肌电数据及手势标签。然后基于随机采样获取的每个个体的历史肌电数据及手势标签,生成一个或多个元学习任务。如此,若干个任务中的每个元学习任务包含的数据来自同一个体。或者,在随机采样提取出多个个体的历史肌电数据及手势标签后,对个体进行相似性度量方法来判断是否相似,然后基于随机采样获取的相似个体的历史肌电数据及手势标签,生成一个或多个元学习任务。随后根据生成的若干个元学习任务,利用各元学习任务对基于原始手势识别模型的元学习器进行元学习训练以优化元学习器参数,进而获取到初始手势识别模型。这里,原始手势识别模型的获得与元学习任务的形成还可以同时进行,也可以先形成元学习任务,再获得原始手势识别模型。通过获取多个个体的肌电数据及肌电数据对应的手势标签,并根据预设约束条件,随机筛选出多个体的肌电数据及手势标签,进而基于每个个体或者相似个体的肌电数据及手势标签,生成一个或多个元学习任务,利用生成的若干个元学习任务对基于原始手势识别模型的元学习器进行元学习训练,使得训练出的初始手势识别模型针对不同个体和新增个体都具有良好泛化能力。Specifically, when the processing unit 102 or other model training equipment trains the initial gesture recognition model based on the historical electromyographic data and gesture tags of multiple individuals, the processing unit 102 or other model training equipment may first train the initial gesture recognition model based on the historical electromyographic data and gesture tags of multiple individuals. The network model with gradient backpropagation is trained. The training methods include supervised training, unsupervised training, etc., and the original A gesture recognition model is started, and then several meta-learning tasks are formed from the EMG data set consisting of historical EMG data and gesture labels of multiple individuals according to preset constraints, and the data included in each meta-learning task comes from the same individual. , or from similar individuals. For example, an EMG data set composed of historical EMG data and gesture labels of multiple individuals is randomly sampled to extract historical EMG data and gesture labels of multiple individuals. Then one or more meta-learning tasks are generated based on the historical myoelectric data and gesture labels of each individual obtained through random sampling. In this way, each meta-learning task among several tasks contains data from the same individual. Alternatively, after randomly sampling and extracting the historical EMG data and gesture labels of multiple individuals, the similarity measurement method is used to determine whether the individuals are similar, and then based on the historical EMG data and gesture labels of similar individuals obtained through random sampling, a generated One or more meta-learning tasks. Then, according to several generated meta-learning tasks, each meta-learning task is used to perform meta-learning training on the meta-learner based on the original gesture recognition model to optimize the meta-learner parameters, and then obtain the initial gesture recognition model. Here, the acquisition of the original gesture recognition model and the formation of the meta-learning task can also be carried out at the same time, or the meta-learning task can be formed first and then the original gesture recognition model is obtained. By obtaining the electromyographic data and gesture tags corresponding to the electromyographic data of multiple individuals, and based on the preset constraints, the electromyographic data and gesture tags of multiple individuals are randomly selected, and then based on the electromyographic data of each individual or similar individuals and gesture labels, generate one or more meta-learning tasks, and use the generated meta-learning tasks to perform meta-learning training on the meta-learner based on the original gesture recognition model, so that the trained initial gesture recognition model can target different individuals and new Individuals have good generalization ability.
值得一提的是,具有梯度反向传递的网络模型为卷积神经网络CNN模型,长短期神经网络LSTM模型和循环神经网络RNN模型中任一种。It is worth mentioning that the network model with gradient backpropagation is any of the convolutional neural network CNN model, the long-short-term neural network LSTM model and the recurrent neural network RNN model.
例如,可以使用基于随机梯度下降的优化算法进行优化的神经网络模型作为基础模型,如,使用Adam优化器的3层卷积神经网络模型作为基础模型,结合预设损失函数,如,交叉熵损失函数,进行模型训练。将肌电数据集中的历史肌电数据作为输入,历史肌电数据所属手势作为监督信号,利用预设损失函数计算损失值,并基于损失值梯度更新对模型参数进行优化,完成对模型的训练,得到原始手势识别模型。For example, a neural network model optimized by an optimization algorithm based on stochastic gradient descent can be used as the basic model, such as a 3-layer convolutional neural network model using the Adam optimizer as the basic model, combined with a preset loss function, such as cross-entropy loss. function to perform model training. The historical EMG data in the EMG data set are used as input, and the gestures to which the historical EMG data belong are used as supervision signals. The loss value is calculated using the preset loss function, and the model parameters are optimized based on the gradient update of the loss value to complete the training of the model. Get the original gesture recognition model.
另外,在每次采集到当前个体的当前肌电数据及手势标签后,还可以对包含若干个体的历史肌电数据及手势标签的肌电数据集进行数据扩充,然后基于扩充后的肌电数据集,对原始手势模型进行再训练,以此提升原始手势识别模型的泛化效果。再训练可以是根据预设周期定期进行,也可以是肌电数据集扩充达到一定的程度后进行,本实施例对此不做限制。In addition, after each collection of the current EMG data and gesture labels of the current individual, the EMG data set containing the historical EMG data and gesture labels of several individuals can be expanded, and then based on the expanded EMG data Set, retrain the original gesture model to improve the generalization effect of the original gesture recognition model. Retraining may be performed regularly according to a preset period, or may be performed after the myoelectric data set has been expanded to a certain extent. This embodiment does not limit this.
在另一个例子中,元学习任务包括支撑集(Support Set)和查询集(Query Set),利用各元学习任务对基于原始手势识别模型的元学习器进行元学习训练,包括:对于每一个元学习任务,先将元学习器的参数赋值给基学习器,然后根据支撑集中的肌电数据及肌电数据对应的手势标签,对基学习器进行训练以优化基学习器的参数;根据查询集中的肌电数据及肌电数据对应的手势标签,获取参数优化后的基学习器的手势标签预测结果的预测误差; 根据预测误差,对元学习器进行梯度更新以优化元学习器的参数。In another example, the meta-learning task includes a support set (Support Set) and a query set (Query Set). Each meta-learning task is used to perform meta-learning training on a meta-learner based on the original gesture recognition model, including: for each element For learning tasks, first assign the parameters of the meta-learner to the base learner, and then train the base learner based on the EMG data in the support set and the gesture labels corresponding to the EMG data to optimize the parameters of the base learner; according to the query set The EMG data and the gesture label corresponding to the EMG data are obtained to obtain the prediction error of the gesture label prediction result of the parameter-optimized base learner; Based on the prediction error, gradient updates are performed on the meta-learner to optimize the parameters of the meta-learner.
具体而言,元学习任务中包括支撑集和查询集,其中,支撑集有一个重要的设置为N-way K-shot,即在支撑集内有N类样本,每类样本有K个被标记数据,而查询集中则可以包含n类样本,每类样本有k个被标记数据,其中,N、K、n和k都是正整数。以支撑集中包含6个手势标签,每个手势标签对应地采样了3个肌电数据,查询集中包含了两个手势标签,每个手势标签对应地采样了一个肌电数据为例,本实施例中根据各个体的历史肌电数据及手势标签生成的元学习任务可以参考图2,被标记数据表征获取到的肌电数据,样本为各类型的手势标签。Specifically, the meta-learning task includes a support set and a query set. Among them, the support set has an important setting of N-way K-shot, that is, there are N types of samples in the support set, and K samples of each type are labeled. Data, and the query set can contain n types of samples, each type of sample has k labeled data, where N, K, n and k are all positive integers. For example, the support set contains 6 gesture tags, and each gesture tag samples three pieces of electromyographic data. The query set contains two gesture tags, and each gesture tag samples one piece of myoelectric data. As an example, this embodiment The meta-learning task generated based on the historical electromyographic data and gesture labels of each individual can be referred to Figure 2. The labeled data represents the acquired electromyographic data, and the samples are various types of gesture labels.
在根据各元学习任务对基于原始手势识别模型的元学习器进行元学习训练的过程中,对于每一个元学习任务,先通过基学习器对元学习器中的参数进行拷贝,然后读取支持集中的各肌电数据及肌电数据对应的手势标签,以肌电数据作为输入,利用基学习器对手势标签进行预测,并根据预测结果与肌电数据对应的手势标签之间的损失值进行梯度更新,以优化基学习器中的参数。然后读取查询集中的肌电数据及肌电数据对应的手势标签,将查询集中各手势标签对应的肌电数据作为输入,利用参数优化后的基学习器,对手势标签进行预测,并根据查询集中肌电数据对应的手势标签,获取参数优化后的基学习器输出的手势标签预测结果的预测误差。然后根据得到的预测误差,对元学习器进行梯度更新以获得优化后的新的参数,并将新的参数作为元学习器的参数。在进行下一轮训练的情况时,将元学习器优化后的参数重新拷贝到基学习器中。如此进行多轮训练,直至手势标签的预测误差不再下降,然后停止训练,并将此时参数优化后的元学习器作为初始手势识别模型。通过根据元学习任务中的支撑集和查询集进行双层循环训练和参数优化,准确高效的基于原始手势识别模型得到所需的初始手势识别模型。而且获取到的初始手势识别模型,只需要少量的梯度更新步数,以及一个与特定任务相关的元学习任务进行微调即可适应特定任务。In the process of meta-learning training of the meta-learner based on the original gesture recognition model according to each meta-learning task, for each meta-learning task, the parameters in the meta-learner are first copied through the base learner, and then the support is read Each concentrated EMG data and the gesture labels corresponding to the EMG data are used as input. The base learner is used to predict the gesture labels, and the loss value between the prediction results and the gesture labels corresponding to the EMG data is used. Gradient updates to optimize parameters in the base learner. Then read the electromyographic data in the query set and the gesture tags corresponding to the electromyographic data, use the electromyographic data corresponding to each gesture tag in the query set as input, and use the parameter-optimized base learner to predict the gesture tags and predict the gesture tags according to the query The gesture labels corresponding to the electromyographic data are concentrated to obtain the prediction error of the gesture label prediction result output by the parameter-optimized base learner. Then, based on the obtained prediction error, the gradient of the meta-learner is updated to obtain the optimized new parameters, and the new parameters are used as parameters of the meta-learner. In the next round of training, the optimized parameters of the meta-learner are copied back to the base learner. Multiple rounds of training are carried out in this way until the prediction error of the gesture label no longer decreases, then the training is stopped, and the meta-learner with optimized parameters at this time is used as the initial gesture recognition model. By performing double-layer loop training and parameter optimization based on the support set and query set in the meta-learning task, the required initial gesture recognition model is obtained accurately and efficiently based on the original gesture recognition model. Moreover, the obtained initial gesture recognition model only requires a small number of gradient update steps and a meta-learning task related to the specific task for fine-tuning to adapt to the specific task.
另外,预先设置的约束条件还可以包括在进行元学习任务生成时,生成支撑集所采用的肌电数据和手势标签可以取自采集到的个体肌电数据中采集时间相对靠前的数据,而生成查询集所采用的肌电数据和手势标签取自采集到的个体肌电数据中采集时间相对靠后的数据。通过利用个体较早的肌电数据进行支撑集生成,较晚的肌电数据进行查询集的生成,使得训练出的元学习器是基于时间较早的肌电数据对时间较晚的肌电数据进行预测的模型,进而提高训练出的模型与实际手势识别过程的吻合程度,进一步提升模型手势预测的准确性。并且,由于原始手势识别模型会一定程度学习由采集时间先后差异(即肌肉/表面肌电状态不同)导致的数据分布偏移,更好地适配后续的实际使用场景。In addition, the preset constraints can also include that when generating meta-learning tasks, the electromyographic data and gesture labels used to generate the support set can be taken from the data collected relatively early in the individual electromyographic data collected, and The electromyographic data and gesture labels used to generate the query set are taken from the relatively later collection time of the individual electromyographic data collected. By using the individual's earlier EMG data to generate the support set and the later EMG data to generate the query set, the trained meta-learner is based on the earlier EMG data versus the later EMG data. The prediction model can then improve the consistency between the trained model and the actual gesture recognition process, and further improve the accuracy of the model's gesture prediction. Moreover, because the original gesture recognition model will learn to a certain extent the data distribution shift caused by differences in acquisition time (i.e. different muscle/surface electromyographic states), it can better adapt to subsequent actual usage scenarios.
在另一个例子中,根据支撑集中的肌电数据及肌电数据对应的手势标签,对基学习 器进行训练以优化基学习器的参数,包括:将支撑集中的肌电数据作为输入,肌电数据对应的手势标签作为监督信号,获取基学习器的手势标签预测结果的损失值;根据损失值,对基学习器进行梯度更新,以获取基学习器新的参数。In another example, base learning is performed based on the EMG data in the support set and the gesture labels corresponding to the EMG data. The machine is trained to optimize the parameters of the base learner, including: using the EMG data in the support set as input, the gesture label corresponding to the EMG data as a supervision signal, and obtaining the loss value of the gesture label prediction result of the base learner; according to the loss value , perform gradient updates on the base learner to obtain new parameters of the base learner.
具体而言,在对基学习器进行训练的时候,将肌电数据作为输入信号,将支撑集中记录的肌电数据对应的手势标签作为训练过程中的监督信号,基学习器根据输入的肌电数据对手势标签进行预测,并通过预设的损失函数,例如,交叉熵损失函数、对值损失函数或者指数损失函数,手势标签预测结果和监督信号计算出手势标签预测结果的损失值,然后根据损失值对基学习器进行梯度更新,以获得基学习器优化的参数。通过监督训练的方式,准确的完成基学习器的参数优化,保证元学习训练的效果。Specifically, when training the base learner, the electromyographic data is used as the input signal, and the gesture label corresponding to the centrally recorded electromyographic data is used as the supervision signal during the training process. The base learner uses the input electromyoelectric data to The data predicts the gesture label, and calculates the loss value of the gesture label prediction result through a preset loss function, such as a cross-entropy loss function, a pairwise loss function or an exponential loss function, the gesture label prediction result and the supervision signal, and then calculates the loss value of the gesture label prediction result according to The loss value performs a gradient update on the base learner to obtain the parameters optimized by the base learner. Through supervised training, the parameter optimization of the base learner is accurately completed to ensure the effect of meta-learning training.
在另一个例子中,获取参数优化后的基学习器手势标签预测结果的预测误差,包括:根据参数优化后的基学习器及查询集中的肌电数据,获取肌电数据的手势标签预测结果;通过预设损失函数、手势标签预测结果和肌电数据在查询集中对应的手势标签,获取手势标签预测结果对应的损失值,并根据查询集中所有肌电数据所对应的损失值,获取预测误差。In another example, obtaining the prediction error of the gesture label prediction result of the parameter-optimized base learner includes: obtaining the gesture label prediction result of the electromyographic data based on the parameter-optimized base learner and the electromyographic data in the query set; Through the preset loss function, gesture label prediction results, and gesture labels corresponding to the electromyographic data in the query set, the loss value corresponding to the gesture label prediction result is obtained, and the prediction error is obtained based on the loss values corresponding to all myoelectric data in the query set.
具体而言,将查询集中的肌电数据作为输入,利用参数优化后的基学习器进行手势标签预测,并将查询集中的肌电数据对应的手势标签作为监督信号。结合预设损失函数,例如,交叉熵损失函数、对值损失函数或者指数损失函数,参数优化后的基学习器预测出的手势标签,以及查询集中的肌电数据对应的手势标签,获取参数优化后的基学习器的手势标签预测结果的损失值,并基于获取到查询集中所有肌电数据所对应的损失值,获取预测误差,便于后续根据预测误差对元学习器进行梯度更新,进而完成元学习器的参数优化。通过预设的损失函数准确获取预测结果的预测误差,便于准确进行元学习器的参数调整,完成模型优化。Specifically, the electromyographic data in the query set are used as input, a base learner with optimized parameters is used to predict gesture labels, and the gesture labels corresponding to the electromyographic data in the query set are used as supervision signals. Combining the preset loss function, such as cross-entropy loss function, pairwise loss function or exponential loss function, the gesture label predicted by the parameter-optimized base learner, and the gesture label corresponding to the electromyographic data in the query set, the parameter optimization is obtained The loss value of the gesture label prediction result of the base learner is obtained, and the prediction error is obtained based on the loss value corresponding to all the electromyographic data in the query set, so as to facilitate the subsequent gradient update of the meta-learner based on the prediction error, and then complete the meta-learner. Learner parameter optimization. The prediction error of the prediction result is accurately obtained through the preset loss function, which facilitates accurate parameter adjustment of the meta-learner and completes model optimization.
进一步地,根据查询集中的所有肌电数据所对应的损失值,获取预测误差,包括:获取查询集中的所有肌电数据所对应的损失值的平均值,将平均值作为预测误差。这里的平均值可以是算术平均值,加权平均值,几何平均值,均方根平均值和调和平均值中的任一种。优选,平均值采用算术平均值。具体而言,在获取参数优化后的基学习器的预测误差过程中,可以逐一获取查询集中各肌电数据对应的损失值,然后对各肌电数据对应的损失值进行算术平均,得到所有肌电数据对应的损失值的算术平均值,并将得到的算术平均值作为预测误差。通过对查询集中所有肌电数据对应的损失值进行算术平均,利用算术平均值作为预测误差,尽可能准确的获取预测误差,避免单次预测的偶然因素对预测结果的影响。Further, obtaining the prediction error based on the loss values corresponding to all the electromyographic data in the query set includes: obtaining the average value of the loss values corresponding to all the electromyographic data in the query set, and using the average value as the prediction error. The average here can be any one of arithmetic mean, weighted mean, geometric mean, root mean square mean and harmonic mean. Preferably, the average value is an arithmetic mean. Specifically, in the process of obtaining the prediction error of the parameter-optimized base learner, the loss values corresponding to each EMG data in the query set can be obtained one by one, and then the loss values corresponding to each EMG data are arithmetic averaged to obtain all muscle parameters. The arithmetic mean of the loss values corresponding to the electrical data is used as the prediction error. By performing an arithmetic average of the loss values corresponding to all electromyographic data in the query set, and using the arithmetic average as the prediction error, we can obtain the prediction error as accurately as possible and avoid the impact of accidental factors in a single prediction on the prediction result.
更进一步地,在利用各元学习任务对基于原始手势识别模型的元学习器进行元学习训练过程中,根据支撑集中的肌电数据及肌电数据对应的手势标签,对基学习器的梯度更新 时的学习率,小于根据查询集中的肌电数据及肌电数据对应的手势标签,对元学习器的梯度更新时的学习率。通过对根据支撑集进行的内循环训练和根据查询集进行的外循环训练的学习率进行限制,通过高学习率的内循环结合低学习率的外循环,使得元学习器能够尽快收敛,提高元学习器训练效率。Furthermore, during the meta-learning training process of the meta-learner based on the original gesture recognition model using each meta-learning task, the gradient of the base learner is updated based on the electromyographic data in the support set and the gesture labels corresponding to the electromyographic data. The learning rate when is smaller than the learning rate when updating the gradient of the meta-learner based on the EMG data in the query set and the gesture labels corresponding to the EMG data. By limiting the learning rate of the inner loop training based on the support set and the outer loop training based on the query set, and combining the high learning rate inner loop with the low learning rate outer loop, the meta-learner can converge as quickly as possible and improve the meta-learner. Learner training efficiency.
综上,基于原始手势识别模型的元学习器训练中,基于一个元学习任务进行一轮元学习训练的流程可以参考图3,包括:In summary, in the meta-learner training based on the original gesture recognition model, the process of conducting a round of meta-learning training based on a meta-learning task can be referred to Figure 3, including:
步骤301,获取当前轮次训练采用的元学习任务。Step 301: Obtain the meta-learning task used in the current round of training.
步骤302,将元学习器的参数赋值给基学习器。Step 302: Assign the parameters of the meta-learner to the base learner.
步骤303,根据当前轮次训练采用的元学习任务的支撑集数据,对基学习器进行训练,梯度更新后得到基学习器优化的参数。Step 303: Train the base learner based on the support set data of the meta-learning task used in the current round of training, and obtain the optimized parameters of the base learner after the gradient update.
步骤304,基于参数优化后的基学习器,根据当前轮次训练采用的元学习任务的查询集数据,计算元学习任务的损失值作为预测误差,并计算出对应的梯度。Step 304: Based on the parameter-optimized base learner and the query set data of the meta-learning task used in the current round of training, calculate the loss value of the meta-learning task as the prediction error, and calculate the corresponding gradient.
步骤305,根据计算出的梯度,对元学习器的参数进行更新,完成当前轮次的元学习训练。Step 305: Update the parameters of the meta-learner according to the calculated gradient to complete the current round of meta-learning training.
在另一个替代性例子中,初始手势识别模型还可以通过以下方式训练生成:根据多个个体的历史肌电数据及手势标签,生成若干个元学习任务,且每个元学习任务基于同一个体或者相似个体的历史肌电数据及手势标签生成;利用各元学习任务对基于具有梯度反向传递的网络模型的元学习器进行元学习训练,获取初始手势识别模型。In another alternative example, the initial gesture recognition model can also be trained and generated in the following way: generating several meta-learning tasks based on the historical electromyographic data and gesture labels of multiple individuals, and each meta-learning task is based on the same individual or Historical EMG data and gesture labels of similar individuals are generated; each meta-learning task is used to perform meta-learning training on a meta-learner based on a network model with gradient backpropagation to obtain an initial gesture recognition model.
具体而言,在进行初始手势识别模型获取的时候,可以随机获取多个个体的历史肌电数据及手势标签,然后基于每个个体历史肌电数据及手势标签,生成一个或多个元学习任务,最终获得多个元学习任务,且每个元学习任务基于同一个体的历史肌电数据及手势标签生成,或者基于相似个体的历史肌电数据及手势标签生成。然后取一个具有梯度反向传递的网格模型作为元学习器,利用各元学习任务对该网络模型进行元学习训练,获取初始手势识别模型。该梯度反向传递的网格模型在训练初始时候的参数为随机获得。元学习中元任务训练的方式驱使模型向泛化性更强的方向优化参数,提高模型的准确性。通过直接获取一个参数随机的具有梯度反向传递的网格模型,并通过元学习训练的方式得到初始手势识别模型,简化初始手势识别模型的获取过程,提高模型获取效率,且只需要少量的梯度更新步数,以及一个与特定任务相关的元学习任务进行微调即可适应特定任务。Specifically, when acquiring the initial gesture recognition model, the historical EMG data and gesture labels of multiple individuals can be randomly obtained, and then one or more meta-learning tasks are generated based on the historical EMG data and gesture labels of each individual. , multiple meta-learning tasks are finally obtained, and each meta-learning task is generated based on the historical electromyographic data and gesture labels of the same individual, or based on the historical electromyographic data and gesture labels of similar individuals. Then a grid model with gradient backpropagation is taken as a meta-learner, and each meta-learning task is used to perform meta-learning training on the network model to obtain the initial gesture recognition model. The parameters of the grid model with gradient backpropagation are randomly obtained at the initial stage of training. The meta-task training method in meta-learning drives the model to optimize parameters in a direction with stronger generalization and improve the accuracy of the model. By directly obtaining a grid model with random parameters and gradient backpropagation, and obtaining the initial gesture recognition model through meta-learning training, the acquisition process of the initial gesture recognition model is simplified, the model acquisition efficiency is improved, and only a small amount of gradients are required. The number of steps is updated, and a meta-learning task related to the specific task can be fine-tuned to adapt to the specific task.
在另一个例子中,根据当前个体的当前肌电数据及手势标签,对初始手势识别模型进行微调,包括:根据当前个体的当前肌电数据及手势标签,对初始手势识别模型进行监督训练;根据预设梯度更新步数,对初始手势识别模型进行梯度更新获得新的参数,以形成当 前个体的当前手势识别模型。In another example, fine-tuning the initial gesture recognition model based on the current electromyographic data and gesture labels of the current individual includes: supervising and training the initial gesture recognition model based on the current electromyographic data and gesture labels of the current individual; Preset the number of gradient update steps, and perform gradient updates on the initial gesture recognition model to obtain new parameters to form the current Current gesture recognition model of ex-individuals.
具体而言,在根据当前个体的当前肌电数据及手势标签,对初始手势识别模型进行微调时,可以通过监督训练的方式实现,即,将当前个体的当前肌电数据作为输入数据,将当前肌电数据对应的手势标签作为监督信号,进行监督训练,在进行梯度更新的过程中,根据预设梯度更新步数对初始手势识别模型进行梯度更新,从而获得优化的参数,形成当前个体的当前手势识别模型。通过监督训练和预设梯度更新步数,准确实现初始手势识别模型的微调,保证当前手势识别模型的识别精度。Specifically, when fine-tuning the initial gesture recognition model based on the current EMG data and gesture labels of the current individual, it can be achieved through supervised training, that is, the current EMG data of the current individual is used as input data, and the current EMG data is used as the input data. The gesture label corresponding to the electromyographic data is used as a supervision signal for supervised training. During the gradient update process, the initial gesture recognition model is gradient updated according to the preset gradient update steps to obtain optimized parameters and form the current individual's current Gesture recognition model. Through supervised training and preset gradient update steps, the initial gesture recognition model can be accurately fine-tuned to ensure the recognition accuracy of the current gesture recognition model.
在另一个例子中,处理单元102还被配置为:根据当前个体的当前肌电数据及手势标签,生成当前个体的当前元学习任务;根据当前元学习任务,对基于初始手势识别模型的元学习器进行元学习训练生成当前个体的个人手势识别模型。In another example, the processing unit 102 is further configured to: generate a current meta-learning task for the current individual based on the current electromyographic data and gesture labels of the current individual; and perform meta-learning based on the initial gesture recognition model based on the current meta-learning task. The machine performs meta-learning training to generate the current individual's personal gesture recognition model.
具体而言,在获取当前个体的当前肌电数据及手势标签后,处理单元102还会根据当前个体的当前肌电数据及手势标签,生成当前个体的当前元学习任务。然后根据当前个体的当前元学习任务,对基于初始手势识别模型的元学习器进行针对当前个体的元学习训练,使得参数优化后的元学习器对当前个体具有更好的针对性和适应性,将完成元学习训练后的元学习器作为当前个体的个人手势识别模型。例如,采集个体当前状态下2分钟内做出对应不同手势标签的手势时的肌电数据,根据采集到的当前肌电数据及手势标签,在对初始手势识别模型进行微调的同时还根据预先设置的约束条件,从采集的2分钟数据中取采集时间在先的肌电数据以及对应的手势标签作为支撑集,将采集时间在后的肌电数据以及对应的手势标签作为查询集生成当前个体的当前元学习训练任务,并根据当前元学习任务对基于初始手势识别模型的元学习器进行元学习训练,得到当前个体的个人手势识别模型。在保证同一个个体的数据情况下,根据时间顺序构建支撑集与查询集生成元任务的方式可以使个人手势识别模型具备对肌电数据的随时间整体分布漂移的学习能力。Specifically, after acquiring the current myoelectric data and gesture labels of the current individual, the processing unit 102 will also generate the current meta-learning task of the current individual based on the current myoelectric data and gesture labels of the current individual. Then, according to the current meta-learning task of the current individual, the meta-learner based on the initial gesture recognition model is trained for the current individual, so that the meta-learner with optimized parameters has better pertinence and adaptability to the current individual. The meta-learner after completing meta-learning training is used as the current individual's personal gesture recognition model. For example, collect myoelectric data when an individual makes gestures corresponding to different gesture tags within 2 minutes in the current state. Based on the collected current myoelectric data and gesture tags, the initial gesture recognition model is fine-tuned and the preset settings are also used. As a constraint, from the 2 minutes of data collected, the electromyographic data collected first and the corresponding gesture tags are taken as the support set, and the electromyographic data collected later and the corresponding gesture tags are used as the query set to generate the current individual's The current meta-learning training task is performed, and the meta-learner based on the initial gesture recognition model is meta-learning trained according to the current meta-learning task to obtain the current individual's personal gesture recognition model. Under the condition of ensuring the data of the same individual, the method of constructing the support set and query set generation meta-task according to the time sequence can enable the personal gesture recognition model to have the ability to learn the overall distribution drift of myoelectric data over time.
另外,根据当前个体的当前肌电数据及手势标签生成当前元学习任务时,还可以采集个体当前状态下2分钟内做出对应不同手势标签的手势时的肌电数据,根据前一分钟内的肌电数据及肌电数据对应的手势标签生成元学习训练任务,根据后一分钟内的肌电数据及肌电数据对应的手势标签生成元学习验证任务。显然,也可以根据前一分半分钟内的肌电数据及肌电数据对应的手势标签生成元学习训练任务,根据后半分钟内的肌电数据及肌电数据对应的手势标签生成元学习验证任务。当然,也可以是其他的时间比例来分割时间,获得训练任务和验证任务,本实施方式对此不做限定。此外,可根据K-WAY-N-SHOT的比例来决定分割前后时间的比例,可以保证样本的均衡性。在根据元学习训练任务对初始手势识别模型进行元学习训练后,根据元学习验证任务对训练后的初始手势识别模型的手势预测精度进行获 取和检测,在手势预测精度达到预设门限,且手势标签预测结果的损失值不再下降(或其浮动不在若干个训练轮次内显著下降)的情况下,判定元学习训练完成,不需要再进行调整,并将得到的初始手势识别模型作为当前个体的个人手势识别模型。例如,将预测精度的门限设置为0.9,即在元学习训练后的初始手势识别模型有百分之九十及以上的概率正确预测当前个体的手势,并且手势标签预测结果的损失值不再下降的情况下,判定训练完成。在手势预测精度未达到预设门限和/或手势标签预测结果的损失值还在下降的情况下,判定训练未完成,根据元学习训练任务继续对初始手势识别模型进行重复训练和参数微调,或者采集当前个体更长时间内的肌电数据及肌电数据对应的手势标签,生成新的元学习任务对初始手势识别模型进行再训练和参数微调,直至手势预测精度达到预设门限,且手势标签预测结果的损失值不再下降。通过利用验证任务对预测精度进行检测,从而保证得到的个人手势识别模型的准确性。In addition, when generating the current meta-learning task based on the current individual's current EMG data and gesture labels, the EMG data when the individual makes gestures corresponding to different gesture labels within 2 minutes of the current state can also be collected. The electromyographic data and the gesture labels corresponding to the electromyographic data generate a meta-learning training task, and the meta-learning verification task is generated based on the electromyographic data and the gesture labels corresponding to the electromyographic data within the next minute. Obviously, it is also possible to generate a meta-learning training task based on the EMG data and the gesture labels corresponding to the EMG data in the first minute and a half, and to generate a meta-learning verification task based on the EMG data and the gesture labels corresponding to the EMG data in the second half minute. Task. Of course, other time ratios can also be used to divide time to obtain training tasks and verification tasks, and this embodiment is not limited to this. In addition, the proportion of time before and after segmentation can be determined according to the proportion of K-WAY-N-SHOT, which can ensure the balance of the sample. After meta-learning training is performed on the initial gesture recognition model according to the meta-learning training task, the gesture prediction accuracy of the trained initial gesture recognition model is obtained according to the meta-learning verification task. Sum detection, when the gesture prediction accuracy reaches the preset threshold, and the loss value of the gesture label prediction result no longer decreases (or its fluctuation does not decrease significantly within several training rounds), it is determined that the meta-learning training is completed, no need Then make adjustments and use the resulting initial gesture recognition model as the current individual's personal gesture recognition model. For example, setting the threshold of prediction accuracy to 0.9 means that the initial gesture recognition model after meta-learning training has a probability of 90% or above to correctly predict the current individual's gesture, and the loss value of the gesture label prediction result will no longer decrease. In the case of , it is judged that the training is completed. When the gesture prediction accuracy does not reach the preset threshold and/or the loss value of the gesture label prediction result is still declining, it is determined that the training is not completed, and the initial gesture recognition model continues to be repeatedly trained and parameter fine-tuned according to the meta-learning training task, or Collect the electromyographic data of the current individual over a longer period of time and the gesture labels corresponding to the electromyographic data, generate a new meta-learning task, retrain the initial gesture recognition model and fine-tune parameters until the gesture prediction accuracy reaches the preset threshold, and the gesture labels The loss value of the prediction result no longer decreases. By using the verification task to detect the prediction accuracy, the accuracy of the obtained personal gesture recognition model is guaranteed.
值得一提的是,预设时长、预测精度的预设门限可以根据需要进行设置,生成元学习任务的时候,可以根据较早采集的数据生成训练任务,较晚采集的数据生成验证任务,也可以根据较晚采集的数据生成训练任务,较早采集的数据生成验证任务,可以将采集的所有数据都用于元学习任务生成,也可以只选取部分数据用于元学习任务生成,本实施例对此不做限制。It is worth mentioning that the preset duration and prediction accuracy thresholds can be set as needed. When generating meta-learning tasks, training tasks can be generated based on data collected earlier, and verification tasks can be generated based on data collected later. Training tasks can be generated based on data collected later, and verification tasks can be generated based on data collected earlier. All collected data can be used for meta-learning task generation, or only part of the data can be selected for meta-learning task generation. In this embodiment There are no restrictions on this.
进一步地,模型获取系统还包括:存储单元;存储单元,用于对存储个人手势识别模型;处理单元,还被配置为:在当前个体存在个人手势识别模型的情况下,根据当前个体的当前肌电数据及手势标签,对个人手势识别模型进行微调,得到当前个体的当前手势识别模型;根据当前个体的肌电数据及手势标签,生成当前个体的当前元学习任务,并根据当前元学习任务对个人手势识别模型继续进行元学习训练,生成参数优化的个人手势识别模型。Further, the model acquisition system also includes: a storage unit; a storage unit for storing a personal gesture recognition model; a processing unit, also configured to: when the current individual has a personal gesture recognition model, according to the current individual's current muscle According to the electromyographic data and gesture labels of the current individual, the personal gesture recognition model is fine-tuned to obtain the current gesture recognition model of the current individual; based on the current individual's electromyographic data and gesture labels, the current meta-learning task of the current individual is generated, and the current meta-learning task is generated based on the current meta-learning task. The personal gesture recognition model continues to undergo meta-learning training to generate a parameter-optimized personal gesture recognition model.
具体而言,处理单元102在根据当前个体的身份标识,检测是否预先存储有当前个体的个人手势识别模型后,在存储单元中存储的有当前个体的个人手势识别模型的情况下,读取当前个体的个人手势识别模型,然后根据当前个体的当前肌电数据及手势标签,对当前个体的个人手势识别模型进行微调,得到当前个体的当前手势识别模型。即在检测到当前个体不是新用户的情况下,读取预先存储的当前个体的个人手势识别模型,并将其作为获取当前手势识别模型的基础。通过对个体的个人手势识别模型的存储和再利用,避免当前手势识别模型生成过程中,个人手势识别模型生成带来的先验经验的浪费。Specifically, after detecting whether the current individual's personal gesture recognition model is pre-stored according to the current individual's identity, the processing unit 102 reads the current individual's personal gesture recognition model if it is stored in the storage unit. The individual's personal gesture recognition model is then fine-tuned based on the current individual's current myoelectric data and gesture tags to obtain the current individual's current gesture recognition model. That is, when it is detected that the current individual is not a new user, the pre-stored personal gesture recognition model of the current individual is read and used as the basis for obtaining the current gesture recognition model. By storing and reusing individual personal gesture recognition models, the waste of prior experience caused by the generation of personal gesture recognition models in the current gesture recognition model generation process is avoided.
另外,处理单元102还用于根据当前个体的当前肌电数据及手势标签,生成当前个体的当前元学习任务,然后根据当前个体的当前元学习任务,对当前个体的个人手势识别模型进行针对当前个体当前状态的元学习训练,使得个人手势识别模型对当前个体具有更好的 针对性和适应性,通过元学习训练的方式,对个人手势识别模型进行参数优化,并通过存储单元存储参数优化后的个人手势识别模型。In addition, the processing unit 102 is also configured to generate a current meta-learning task for the current individual based on the current electromyographic data and gesture labels of the current individual, and then perform a personal gesture recognition model of the current individual based on the current meta-learning task for the current individual. Meta-learning training of the individual's current state enables the personal gesture recognition model to have better performance for the current individual. Targeted and adaptable, the parameters of the personal gesture recognition model are optimized through meta-learning training, and the optimized personal gesture recognition model is stored in the storage unit.
本实施例对处理单元的种类没有特别的限制。处理单元可以是执行逻辑运算的硬件,例如,单片机、微处理器、可编程逻辑控制器(PLC,Programmable Logic Controller)或者现场可编程逻辑门阵列(FPGA,Field-Programmable Gate Array),或者是在硬件基础上的实现上述功能的软件程序、功能模块、函数、目标库(Object Libraries)或动态链接库(Dynamic-Link Libraries)。或者,是以上两者的结合。This embodiment has no particular limitation on the type of processing unit. The processing unit can be hardware that performs logical operations, such as a microcontroller, a microprocessor, a programmable logic controller (PLC) or a field-programmable logic gate array (FPGA), or in a Software programs, functional modules, functions, object libraries (Object Libraries) or dynamic link libraries (Dynamic-Link Libraries) that implement the above functions based on hardware. Or, a combination of both.
本申请实施例的另一方面提供一种手势模型生成方法。手势模型生成方法的流程可以参考图4,包括如下步骤:Another aspect of the embodiments of the present application provides a method for generating a gesture model. The process of the gesture model generation method can be referred to Figure 4, including the following steps:
步骤401,获取当前个体的当前肌电数据及手势标签,手势标签包含手势信息。Step 401: Obtain the current electromyographic data and gesture tag of the current individual. The gesture tag contains gesture information.
步骤402,在当前个体不存在个人手势识别模型的情况下,获取初始手势识别模型,其中,初始手势识别模型根据基于多个个体的历史肌电数据及手势标签生成的若干个元学习任务进行元学习训练生成,每个元学习任务基于同一个体的历史肌电数据及手势标签生成,或者,每个元学习任务基于相似个体的历史肌电数据及手势标签生成。Step 402: When the current individual does not have a personal gesture recognition model, obtain an initial gesture recognition model. The initial gesture recognition model is meta-learned based on several meta-learning tasks generated based on historical myoelectric data and gesture labels of multiple individuals. Learning and training generation, each meta-learning task is generated based on the historical electromyographic data and gesture labels of the same individual, or each meta-learning task is generated based on the historical electromyographic data and gesture labels of similar individuals.
步骤403,根据当前个体的当前肌电数据及手势标签,对初始手势识别模型进行微调,得到当前个体的当前手势识别模型。Step 403: Fine-tune the initial gesture recognition model based on the current electromyographic data and gesture labels of the current individual to obtain the current gesture recognition model of the current individual.
不难发现,本实施例为与系统实施例相对应的方法实施例,本实施例可与系统实施例互相配合实施。系统实施例中提到的相关技术细节在本实施例中依然有效,为了减少重复,这里不再赘述。相应地,本实施例中提到的相关技术细节也可应用在系统实施例中。It is not difficult to find that this embodiment is a method embodiment corresponding to the system embodiment, and this embodiment can be implemented in cooperation with the system embodiment. The relevant technical details mentioned in the system embodiment are still valid in this embodiment. In order to reduce duplication, they will not be described again here. Correspondingly, the relevant technical details mentioned in this embodiment can also be applied to the system embodiment.
本申请实施例的另一方面提供的一种手势识别方法,手势识别方法的流程可以参考图5,包括以下步骤:Another aspect of the embodiment of the present application provides a gesture recognition method. The flow of the gesture recognition method can be referred to Figure 5, which includes the following steps:
步骤501,获取当前个体的当前手势识别模型。具体地说,对当前个体的手势进行识别的终端设备,通过上述模型获取系统,获取针对当前个体通过对初始手势识别模型进行微调后获取的当前手势识别模型。Step 501: Obtain the current gesture recognition model of the current individual. Specifically, the terminal device that recognizes the gesture of the current individual obtains the current gesture recognition model obtained by fine-tuning the initial gesture recognition model for the current individual through the above model acquisition system.
步骤502,获取当前个体的实时肌电数据。具体地说,在进行手势识别的时候,通过肌电电极对当前个体的肌电数据进行实时采集,并将采集到的实时肌电数据输入到当前手势识别模型中。示范性,在数据采集时(例如训练模型或者实时推理时),采用数据采样点累积分片的方法来确定输入统计模型的数据片大小。分片方法包括但不限于滑窗分割方法,端点检测分割方法(基于RMS或其它方式的端点检测)。Step 502: Obtain real-time electromyographic data of the current individual. Specifically, when performing gesture recognition, the electromyographic data of the current individual is collected in real time through electromyographic electrodes, and the collected real-time electromyographic data is input into the current gesture recognition model. Exemplarily, during data collection (for example, during model training or real-time inference), the method of cumulative sharding of data sampling points is used to determine the size of the data slices input to the statistical model. Fragmentation methods include but are not limited to sliding window segmentation methods and endpoint detection segmentation methods (endpoint detection based on RMS or other methods).
步骤503,通过当前手势识别模型,根据实时肌电数据获取当前个体的手势。具体地说,在获取到当前个体的实时肌电数据后,当前手势识别模型根据输入的实时肌电数据,对 当前个体的手势进行预测,并输出预测出的当前个体的手势。Step 503: Obtain the current individual's gesture based on the real-time myoelectric data through the current gesture recognition model. Specifically, after obtaining the real-time electromyographic data of the current individual, the current gesture recognition model performs Predict the gestures of the current individual and output the predicted gestures of the current individual.
在一个例子中,在通过上述模型获取系统获取当前个体的当前手势识别模型后,还包括:获取当前手势识别模型的预测精度;在预测精度不满足预设阈值的情况下,重新获取新的预设时长内当前个体的当前肌电数据及手势标签;根据重新获取到的当前肌电数据及手势标签,重新对当前手势识别模型进行微调。In one example, after obtaining the current gesture recognition model of the current individual through the above model acquisition system, it also includes: obtaining the prediction accuracy of the current gesture recognition model; when the prediction accuracy does not meet the preset threshold, re-obtaining a new prediction Set the current electromyographic data and gesture tags of the current individual within the time period; re-fine-tune the current gesture recognition model based on the re-obtained current electromyographic data and gesture tags.
具体而言,由于肌电数据的特性,针对当前个体的当前手势识别模型随着使用时间的增加,预测精度会逐渐下降,因此,在获取当前个体的当前手势识别模型后,对当前手势识别模型的预测精度进行监控,在当前手势识别模型预测精度不足的情况下,重新获取当前个体当前状态下预设时长内做出对应不同手势标签的手势及做出不同手势时的肌电数据,并根据重新获取到的当前肌电数据及手势标签,重新对当前手势识别模型进行微调,使得当前手势识别模型能够更加适配当前个体的当前状态,保证手势识别精度。考虑到肌电信号易变更的特性,通过周期性的对手势识别模型进行更新迭代,保证利用手势识别模型获取的手势识别结果的准确性。Specifically, due to the characteristics of electromyographic data, the prediction accuracy of the current gesture recognition model for the current individual will gradually decrease as the use time increases. Therefore, after obtaining the current gesture recognition model of the current individual, the current gesture recognition model Monitor the prediction accuracy of the current gesture recognition model. When the prediction accuracy of the current gesture recognition model is insufficient, reacquire the gestures corresponding to different gesture labels and the electromyographic data when making different gestures within the preset time period of the current individual's current state, and based on The current myoelectric data and gesture labels are re-acquired, and the current gesture recognition model is fine-tuned again, so that the current gesture recognition model can better adapt to the current status of the current individual and ensure the accuracy of gesture recognition. Taking into account the easy-to-change nature of electromyographic signals, the gesture recognition model is updated and iterated periodically to ensure the accuracy of the gesture recognition results obtained by the gesture recognition model.
本申请实施例的另一方面还提供了一种手势识别装置,参考图6,包括:Another aspect of the embodiment of the present application also provides a gesture recognition device. Referring to Figure 6, it includes:
第一获取模块601,用于通过上述模型获取系统,获取当前个体的当前手势识别模型。The first acquisition module 601 is used to acquire the current gesture recognition model of the current individual through the above-mentioned model acquisition system.
第二获取模块602,用于获取当前个体的实时肌电数据;The second acquisition module 602 is used to acquire the real-time electromyographic data of the current individual;
识别模块603,用于通过当前手势识别模型,根据实时肌电数据获取当前个体的手势。The recognition module 603 is used to obtain the current individual's gesture according to the real-time myoelectric data through the current gesture recognition model.
在一个例子中,手势识别装置还包括,第三获取模型;第三获取模块用于获取当前手势识别模型的预测精度;在预测精度不满足预设阈值的情况下,重新获取新的预设时长内当前个体的当前肌电数据及手势标签;根据重新获取到的当前肌电数据及手势标签,重新对当前手势识别模型进行微调。In one example, the gesture recognition device further includes a third acquisition model; the third acquisition module is used to acquire the prediction accuracy of the current gesture recognition model; when the prediction accuracy does not meet the preset threshold, re-obtain a new preset duration. The current myoelectric data and gesture tags of the current individual in the system are retrieved; the current gesture recognition model is re-fine-tuned based on the re-obtained current myoelectric data and gesture tags.
不难发现,本实施例为与方法实施例相对应的装置实施例,本实施例可与方法实施例互相配合实施。方法实施例中提到的相关技术细节在本实施例中依然有效,为了减少重复,这里不再赘述。相应地,本实施例中提到的相关技术细节也可应用在方法实施例中。It is not difficult to find that this embodiment is a device embodiment corresponding to the method embodiment, and this embodiment can be implemented in cooperation with the method embodiment. The relevant technical details mentioned in the method embodiment are still valid in this embodiment. In order to reduce duplication, they will not be described again here. Correspondingly, the relevant technical details mentioned in this embodiment can also be applied to the method embodiment.
本申请实施例的另一方面还提供了一种电子设备,参考图7,包括:包括至少一个处理器701;以及,与至少一个处理器701通信连接的存储器702;其中,存储器702存储有可被至少一个处理器701执行的指令,指令被至少一个处理器701执行,以使至少一个处理器701能够执行如上所述手势识别方法,或如上所述的模型获取方法。Another aspect of the embodiment of the present application also provides an electronic device, with reference to Figure 7, including: at least one processor 701; and a memory 702 communicatively connected to the at least one processor 701; wherein the memory 702 stores data that can be Instructions executed by at least one processor 701, the instructions are executed by at least one processor 701, so that at least one processor 701 can execute the gesture recognition method as described above, or the model acquisition method as described above.
其中,存储器702和处理器701采用总线方式连接,总线可以包括任意数量的互联的总线和桥,总线将一个或多个处理器701和存储器702的各种电路连接在一起。总线还可 以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路连接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口在总线和收发机之间提供接口。收发机可以是一个元件,也可以是多个元件,比如多个接收器和发送器,提供用于在传输介质上与各种其他装置通信的单元。经处理器701处理的数据通过天线在无线介质上进行传输,进一步,天线还接收数据并将数据传输给处理器701。The memory 702 and the processor 701 are connected using a bus. The bus may include any number of interconnected buses and bridges. The bus connects various circuits of one or more processors 701 and the memory 702 together. The bus is ok To connect various other circuits together, such as peripherals, voltage regulators, and power management circuits, etc., these are all well known in the art and, therefore, will not be described further herein. The bus interface provides the interface between the bus and the transceiver. A transceiver may be one element or may be multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. The data processed by the processor 701 is transmitted on the wireless medium through the antenna. Furthermore, the antenna also receives the data and transmits the data to the processor 701 .
处理器701负责管理总线和通常的处理,还可以提供各种功能,包括定时,外围接口,电压调节、电源管理以及其他控制功能。而存储器702可以被用于存储处理器701在执行操作时所使用的数据。Processor 701 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. The memory 702 may be used to store data used by the processor 701 when performing operations.
本申请实施例的另一方面还提供了一种计算机可读存储介质,存储有计算机程序。计算机程序被处理器执行时实现如上所述的手势识别方法,或如上所述的模型获取方法。Another aspect of the embodiments of the present application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by the processor, the gesture recognition method as described above, or the model acquisition method as described above, is implemented.
即,本领域技术人员可以理解,实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。That is, those skilled in the art can understand that all or part of the steps in the methods of the above embodiments can be completed by instructing relevant hardware through a program. The program is stored in a storage medium and includes several instructions to cause a device ( It may be a microcontroller, a chip, etc.) or a processor (processor) that executes all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program code. .
本领域的普通技术人员可以理解,上述各实施例是实现本发明的具体实施例,而在实际应用中,可以在形式上和细节上对其作各种改变,而不偏离本发明的精神和范围。 Those of ordinary skill in the art can understand that the above-mentioned embodiments are specific embodiments for realizing the present invention, and in practical applications, various changes can be made in form and details without departing from the spirit and spirit of the present invention. scope.

Claims (20)

  1. 一种模型获取系统,其特征在于,包括:A model acquisition system is characterized by including:
    输入单元,用于获取当前个体的当前肌电数据及手势标签,所述手势标签包含手势信息;An input unit, used to obtain the current electromyographic data and gesture tags of the current individual, where the gesture tags include gesture information;
    处理单元,被配置为:Processing unit, configured as:
    在所述当前个体不存在个人手势识别模型的情况下,获取初始手势识别模型,其中,所述初始手势识别模型根据基于多个个体的历史肌电数据及手势标签生成的若干个元学习任务进行元学习训练生成,且每个所述元学习任务基于同一个体的历史肌电数据及手势标签生成,或者每个所述元学习任务基于相似个体的历史肌电数据及手势标签混合生成;When the current individual does not have a personal gesture recognition model, an initial gesture recognition model is obtained, wherein the initial gesture recognition model is performed based on several meta-learning tasks generated based on historical myoelectric data and gesture labels of multiple individuals. Meta-learning training is generated, and each of the meta-learning tasks is generated based on the historical electromyographic data and gesture labels of the same individual, or each of the meta-learning tasks is generated based on a mixture of historical electromyographic data and gesture labels of similar individuals;
    根据所述当前个体的当前肌电数据及手势标签,对所述初始手势识别模型进行微调,得到所述当前个体的当前手势识别模型。According to the current electromyographic data and gesture tags of the current individual, the initial gesture recognition model is fine-tuned to obtain the current gesture recognition model of the current individual.
  2. 根据权利要求1所述的模型获取系统,其特征在于,所述初始手势识别模型可以通过以下方式训练生成:The model acquisition system according to claim 1, wherein the initial gesture recognition model can be trained and generated in the following manner:
    基于多个个体的历史肌电数据及手势标签,对具有梯度反向传递的网络模型进行训练,得到原始手势识别模型;Based on the historical electromyographic data and gesture labels of multiple individuals, the network model with gradient backpropagation is trained to obtain the original gesture recognition model;
    根据多个个体的历史肌电数据及手势标签,生成若干个所述元学习任务,且每个所述元学习任务基于同一个体的历史肌电数据及手势标签生成,或者每个所述元学习任务基于相似个体的历史肌电数据及手势标签混合生成;Generate several of the meta-learning tasks based on the historical myoelectric data and gesture labels of multiple individuals, and each meta-learning task is generated based on the historical myoelectric data and gesture labels of the same individual, or each of the meta-learning tasks The task is generated based on a mixture of historical EMG data and gesture labels of similar individuals;
    利用各所述元学习任务对基于所述原始手势识别模型的元学习器进行元学习训练,获取所述初始手势识别模型。Each of the meta-learning tasks is used to perform meta-learning training on a meta-learner based on the original gesture recognition model to obtain the initial gesture recognition model.
  3. 根据权利要求2所述的模型获取系统,其特征在于,所述具有梯度反向传递的网络模型为卷积神经网络CNN模型,长短期神经网络LSTM模型和循环神经网络RNN模型中任一种。The model acquisition system according to claim 2, wherein the network model with gradient backpropagation is any one of a convolutional neural network CNN model, a long-short-term neural network LSTM model, and a recurrent neural network RNN model.
  4. 根据权利要求2所述的模型获取系统,其特征在于,所述元学习任务包括支撑集和查询集,所述利用各所述元学习任务对基于所述原始手势识别模型的元学习器进行元学习训练,包括:The model acquisition system according to claim 2, wherein the meta-learning task includes a support set and a query set, and each of the meta-learning tasks is used to meta-learn a meta-learner based on the original gesture recognition model. Learning and training, including:
    对于每一个所述元学习任务,先将所述元学习器的参数赋值给基学习器,然后根据所述支撑集中的肌电数据及肌电数据对应的手势标签,对所述基学习器进行训练以优化所述基学习器的参数;For each meta-learning task, the parameters of the meta-learner are first assigned to the base learner, and then the base learner is evaluated based on the electromyographic data in the support set and the gesture labels corresponding to the electromyographic data. training to optimize the parameters of said base learner;
    根据所述查询集中的肌电数据及肌电数据对应的手势标签,获取参数优化后的所述基学习器的手势标签预测结果的预测误差;According to the electromyographic data in the query set and the gesture labels corresponding to the electromyographic data, obtain the prediction error of the gesture label prediction result of the base learner after parameter optimization;
    根据所述预测误差,对所述元学习器进行梯度更新以优化所述元学习器的参数。 Based on the prediction error, the meta-learner is gradient updated to optimize the parameters of the meta-learner.
  5. 根据权利要求4所述的模型获取系统,其特征在于,所述根据所述支撑集中的肌电数据及肌电数据对应的手势标签,对所述基学习器进行训练以优化所述基学习器的参数,包括:The model acquisition system according to claim 4, wherein the base learner is trained according to the electromyographic data in the support set and the gesture tag corresponding to the electromyographic data to optimize the base learner. parameters, including:
    将所述支撑集中的肌电数据作为输入,肌电数据对应的手势标签作为监督信号,获取所述基学习器的手势标签预测结果的损失值;Using the electromyographic data in the support set as input and the gesture label corresponding to the electromyographic data as a supervision signal, the loss value of the gesture label prediction result of the base learner is obtained;
    根据所述损失值,对所述基学习器进行梯度更新,以获取基学习器新的参数。According to the loss value, the gradient of the base learner is updated to obtain new parameters of the base learner.
  6. 根据权利要求4所述的模型获取系统,其特征在于,所述获取参数优化后的所述基学习器的手势标签预测结果的预测误差,包括:The model acquisition system according to claim 4, wherein the prediction error of the gesture label prediction result of the base learner after the parameters are optimized includes:
    根据参数优化后的所述基学习器及所述查询集中的肌电数据,获取肌电数据的所述手势标签预测结果;According to the parameter-optimized base learner and the electromyographic data in the query set, obtain the gesture label prediction result of the electromyographic data;
    通过预设损失函数、所述手势标签预测结果和所述肌电数据在所述查询集中对应的手势标签,获取所述手势标签预测结果对应的损失值,根据所述查询集中的所有肌电数据所对应的损失值,获取所述预测误差。Through the preset loss function, the gesture label prediction result and the gesture label corresponding to the myoelectric data in the query set, the loss value corresponding to the gesture label prediction result is obtained, based on all the myoelectric data in the query set The corresponding loss value is used to obtain the prediction error.
  7. 根据权利要求6所述的模型获取系统,其特征在于,所述根据所述查询集中的所有肌电数据所对应的损失值,获取所述预测误差,包括:The model acquisition system according to claim 6, wherein obtaining the prediction error based on the loss values corresponding to all myoelectric data in the query set includes:
    获取所述查询集中的所有肌电数据所对应的损失值的平均值,将所述平均值作为所述预测误差。Obtain the average value of the loss values corresponding to all the electromyographic data in the query set, and use the average value as the prediction error.
  8. 根据权利要求4所述的模型获取系统,其特征在于,在所述利用各所述元学习任务对基于所述原始手势识别模型的元学习器进行元学习训练过程中,根据所述支撑集中的肌电数据及肌电数据对应的手势标签,对所述基学习器的梯度更新时的学习率,小于根据所述查询集中的肌电数据及肌电数据对应的手势标签,对所述元学习器的梯度更新时的学习率。The model acquisition system according to claim 4, characterized in that, in the process of performing meta-learning training on the meta-learner based on the original gesture recognition model using each of the meta-learning tasks, according to the support set The learning rate when updating the gradient of the base learner based on the electromyographic data and the gesture tags corresponding to the electromyographic data is smaller than the myoelectric data and the gesture tags corresponding to the electromyographic data in the query set, and the learning rate for the meta-learning The learning rate when the gradient of the controller is updated.
  9. 根据权利要求1所述的模型获取系统,其特征在于,所述初始手势识别模型还可以通过以下方式训练生成:The model acquisition system according to claim 1, characterized in that the initial gesture recognition model can also be trained and generated in the following manner:
    根据多个个体的历史肌电数据及手势标签,生成若干个所述元学习任务,且每个所述元学习任务基于同一个体的历史肌电数据及手势标签生成,或者每个所述元学习任务基于相似个体的历史肌电数据及手势标签混合生成;Generate several of the meta-learning tasks based on the historical myoelectric data and gesture labels of multiple individuals, and each meta-learning task is generated based on the historical myoelectric data and gesture labels of the same individual, or each of the meta-learning tasks The task is generated based on a mixture of historical EMG data and gesture labels of similar individuals;
    利用各所述元学习任务对基于具有梯度反向传递的网络模型的元学习器进行元学习训练,获取所述初始手势识别模型。Each of the meta-learning tasks is used to perform meta-learning training on a meta-learner based on a network model with gradient backpropagation to obtain the initial gesture recognition model.
  10. 根据权利要求1所述的模型获取系统,其特征在于,根据所述当前个体的当前肌电数据及手势标签,对所述初始手势识别模型进行微调,包括:The model acquisition system according to claim 1, characterized in that, fine-tuning the initial gesture recognition model according to the current electromyographic data and gesture tags of the current individual includes:
    根据所述当前个体的当前肌电数据及手势标签,对所述初始手势识别模型进行监督训练; Supervise and train the initial gesture recognition model according to the current electromyographic data and gesture tags of the current individual;
    根据预设梯度更新步数,对所述初始手势识别模型进行梯度更新获得新的参数,以形成所述当前个体的所述当前手势识别模型。According to the preset number of gradient update steps, gradient update is performed on the initial gesture recognition model to obtain new parameters to form the current gesture recognition model of the current individual.
  11. 根据权利要求1至10中任一项所述的模型获取系统,其特征在于,所述处理单元,还被配置为:The model acquisition system according to any one of claims 1 to 10, wherein the processing unit is further configured to:
    根据所述当前个体的当前肌电数据及手势标签,生成所述当前个体的当前元学习任务;Generate a current meta-learning task for the current individual based on the current electromyographic data and gesture labels of the current individual;
    根据所述当前元学习任务,对基于所述初始手势识别模型的元学习器进行元学习训练生成所述当前个体的所述个人手势识别模型。According to the current meta-learning task, meta-learning training is performed on a meta-learner based on the initial gesture recognition model to generate the personal gesture recognition model of the current individual.
  12. 根据权利要求11所述的模型获取系统,其特征在于,所述模型获取系统还包括:存储单元;The model acquisition system according to claim 11, characterized in that the model acquisition system further includes: a storage unit;
    所述存储单元,用于对存储所述个人手势识别模型;The storage unit is used to store the personal gesture recognition model;
    所述处理单元,还被配置为:The processing unit is also configured to:
    在所述当前个体存在所述个人手势识别模型的情况下,根据所述当前个体的当前肌电数据及手势标签,对所述个人手势识别模型进行微调,得到所述当前个体的所述当前手势识别模型;When the personal gesture recognition model exists for the current individual, fine-tune the personal gesture recognition model according to the current electromyographic data and gesture tags of the current individual to obtain the current gesture of the current individual. identification model;
    根据所述当前个体的肌电数据及手势标签,生成所述当前个体的所述当前元学习任务,并根据所述当前元学习任务对所述个人手势识别模型继续进行元学习训练,生成参数优化后的所述个人手势识别模型。Generate the current meta-learning task of the current individual based on the electromyographic data and gesture tags of the current individual, and continue to perform meta-learning training on the personal gesture recognition model based on the current meta-learning task to generate parameter optimization The latter personal gesture recognition model.
  13. 根据权利要求1所述的模型获取系统,其特征在于,The model acquisition system according to claim 1, characterized in that:
    所述元学习任务包括支撑集和查询集,在进行所述元学习任务生成的过程中,将所述当前个体的当前肌电数据及手势标签中采集时间相对靠前的数据作为所述支撑集,将所述当前个体的当前肌电数据及手势标签中采集时间相对靠后的数据作为所述查询集。The meta-learning task includes a support set and a query set. In the process of generating the meta-learning task, the data with a relatively early collection time among the current individual's current myoelectric data and gesture tags is used as the support set. , use the data collected relatively later in the current individual's current electromyographic data and gesture tags as the query set.
  14. 一种模型获取方法,其特征在于,包括:A model acquisition method is characterized by including:
    获取当前个体的当前肌电数据及手势标签,所述手势标签包含手势信息;Obtain the current electromyographic data and gesture tags of the current individual, where the gesture tags include gesture information;
    在所述当前个体不存在个人手势识别模型的情况下,获取初始手势识别模型,其中,所述初始手势识别模型根据基于多个个体的历史肌电数据及手势标签生成的若干个元学习任务进行元学习训练生成,且每个所述元学习任务基于同一个体的历史肌电数据及手势标签生成,或者每个所述元学习任务基于相似个体的历史肌电数据及手势标签混合生成;When the current individual does not have a personal gesture recognition model, an initial gesture recognition model is obtained, wherein the initial gesture recognition model is performed based on several meta-learning tasks generated based on historical myoelectric data and gesture labels of multiple individuals. Meta-learning training is generated, and each of the meta-learning tasks is generated based on the historical electromyographic data and gesture labels of the same individual, or each of the meta-learning tasks is generated based on a mixture of historical electromyographic data and gesture labels of similar individuals;
    根据所述当前个体的当前肌电数据及手势标签,对所述初始手势识别模型进行微调,得到所述当前个体的当前手势识别模型。According to the current electromyographic data and gesture tags of the current individual, the initial gesture recognition model is fine-tuned to obtain the current gesture recognition model of the current individual.
  15. 一种手势识别方法,其特征在于,包括:通过权利要求1至13中任一项所述的模型获取系统获取当前个体的当前手势识别模型; A gesture recognition method, characterized in that it includes: acquiring the current gesture recognition model of the current individual through the model acquisition system according to any one of claims 1 to 13;
    获取所述当前个体的实时肌电数据;Obtain real-time electromyographic data of the current individual;
    通过所述当前手势识别模型,根据所述实时肌电数据获取所述当前个体的手势。Through the current gesture recognition model, the gesture of the current individual is obtained according to the real-time myoelectric data.
  16. 根据权利要求15所述的手势识别方法,其特征在于,在所述通过权利要求1至12中任一项所述的模型获取系统获取当前手势识别模型后,还包括:The gesture recognition method according to claim 15, characterized in that, after obtaining the current gesture recognition model through the model acquisition system according to any one of claims 1 to 12, it further includes:
    获取所述当前手势识别模型的预测精度;Obtain the prediction accuracy of the current gesture recognition model;
    在所述预测精度不满足预设阈值的情况下,重新获取新的预设时长内所述当前个体的当前肌电数据及手势标签;If the prediction accuracy does not meet the preset threshold, reacquire the current electromyographic data and gesture tags of the current individual within a new preset time period;
    根据重新获取到的当前肌电数据及手势标签,重新对所述当前手势识别模型进行微调。The current gesture recognition model is fine-tuned again based on the reacquired current electromyographic data and gesture tags.
  17. 一种手势识别装置,其特征在于,包括:A gesture recognition device, characterized by including:
    第一获取模块,用于通过权利要求1至13中任一项所述的模型获取系统获取当前个体的当前手势识别模型;A first acquisition module, configured to acquire the current gesture recognition model of the current individual through the model acquisition system according to any one of claims 1 to 13;
    第二获取模块,用于获取所述当前个体的实时肌电数据;The second acquisition module is used to acquire the real-time electromyographic data of the current individual;
    识别模块,用于通过所述当前手势识别模型,根据所述实时肌电数据获取所述当前个体的手势。A recognition module, configured to obtain the gesture of the current individual according to the real-time myoelectric data through the current gesture recognition model.
  18. 根据权利要求17所述的手势识别装置,其特征在于,还包括,第三获取模型;The gesture recognition device according to claim 17, further comprising: a third acquisition model;
    所述第三获取模块用于获取所述当前手势识别模型的预测精度;The third acquisition module is used to acquire the prediction accuracy of the current gesture recognition model;
    在所述预测精度不满足预设阈值的情况下,重新获取新的预设时长内所述当前个体的当前肌电数据及手势标签;When the prediction accuracy does not meet the preset threshold, re-obtain the current electromyographic data and gesture tags of the current individual within a new preset time period;
    根据重新获取到的当前肌电数据及手势标签,重新对所述当前手势识别模型进行微调。The current gesture recognition model is fine-tuned again based on the reacquired current electromyographic data and gesture tags.
  19. 一种电子设备,其特征在于,包括:An electronic device, characterized by including:
    至少一个处理器;以及,at least one processor; and,
    与所述至少一个处理器通信连接的存储器;其中,a memory communicatively connected to the at least one processor; wherein,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如权利要求14所述模型获取方法,或如权利要求15或16所述的手势识别方法。The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the model acquisition method as claimed in claim 14, or The gesture recognition method according to claim 15 or 16.
  20. 一种计算机可读存储介质,存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求14所述模型获取方法,或如权利要求15或16所述的手势识别方法。 A computer-readable storage medium storing a computer program, characterized in that when the computer program is executed by a processor, it implements the model acquisition method as claimed in claim 14, or the gesture recognition method as claimed in claim 15 or 16. .
PCT/CN2023/084526 2022-03-29 2023-03-28 Model acquisition system, gesture recognition method and apparatus, device, and storage medium WO2023185887A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210341755.2A CN114781439B (en) 2022-03-29 2022-03-29 Model acquisition system, gesture recognition method, gesture recognition device, apparatus and storage medium
CN202210341755.2 2022-03-29

Publications (1)

Publication Number Publication Date
WO2023185887A1 true WO2023185887A1 (en) 2023-10-05

Family

ID=82426454

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/084526 WO2023185887A1 (en) 2022-03-29 2023-03-28 Model acquisition system, gesture recognition method and apparatus, device, and storage medium

Country Status (2)

Country Link
CN (2) CN114781439B (en)
WO (1) WO2023185887A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117292404A (en) * 2023-10-13 2023-12-26 哈尔滨工业大学 High-precision gesture data identification method, electronic equipment and storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114781439B (en) * 2022-03-29 2023-05-30 深圳市应和脑科学有限公司 Model acquisition system, gesture recognition method, gesture recognition device, apparatus and storage medium
CN116595443B (en) * 2023-07-17 2023-10-03 山东科技大学 Wireless signal book gesture recognition method based on meta learning

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090327171A1 (en) * 2008-06-26 2009-12-31 Microsoft Corporation Recognizing gestures from forearm emg signals
CN110598676A (en) * 2019-09-25 2019-12-20 南京邮电大学 Deep learning gesture electromyographic signal identification method based on confidence score model
CN110852447A (en) * 2019-11-15 2020-02-28 腾讯云计算(北京)有限责任公司 Meta learning method and apparatus, initialization method, computing device, and storage medium
CN111103976A (en) * 2019-12-05 2020-05-05 深圳职业技术学院 Gesture recognition method and device and electronic equipment
CN112818768A (en) * 2021-01-19 2021-05-18 南京邮电大学 Transformer substation reconstruction and extension violation behavior intelligent identification method based on meta-learning
WO2022027822A1 (en) * 2020-08-03 2022-02-10 南京邮电大学 Electromyographic signal-based intelligent gesture action generation method
CN114781439A (en) * 2022-03-29 2022-07-22 应脉医疗科技(上海)有限公司 Model acquisition system, gesture recognition method, device, equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200046284A1 (en) * 2017-07-28 2020-02-13 Meltin Mmi Co., Ltd. System, method, and program for recognizing myoelectric signal-originating motion
CN110796207B (en) * 2019-11-08 2023-05-30 中南大学 Fatigue driving detection method and system
GB2588951A (en) * 2019-11-15 2021-05-19 Prevayl Ltd Method and electronics arrangement for a wearable article
CN111339837B (en) * 2020-02-08 2022-05-03 河北工业大学 Continuous sign language recognition method
CN113971437B (en) * 2021-09-24 2024-01-19 西北大学 Cross-domain gesture recognition method based on commercial Wi-Fi equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090327171A1 (en) * 2008-06-26 2009-12-31 Microsoft Corporation Recognizing gestures from forearm emg signals
CN110598676A (en) * 2019-09-25 2019-12-20 南京邮电大学 Deep learning gesture electromyographic signal identification method based on confidence score model
CN110852447A (en) * 2019-11-15 2020-02-28 腾讯云计算(北京)有限责任公司 Meta learning method and apparatus, initialization method, computing device, and storage medium
CN111103976A (en) * 2019-12-05 2020-05-05 深圳职业技术学院 Gesture recognition method and device and electronic equipment
WO2022027822A1 (en) * 2020-08-03 2022-02-10 南京邮电大学 Electromyographic signal-based intelligent gesture action generation method
CN112818768A (en) * 2021-01-19 2021-05-18 南京邮电大学 Transformer substation reconstruction and extension violation behavior intelligent identification method based on meta-learning
CN114781439A (en) * 2022-03-29 2022-07-22 应脉医疗科技(上海)有限公司 Model acquisition system, gesture recognition method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
RAHIMIAN ELAHE; ZABIHI SOHEIL; ASIF AMIR; FARINA DARIO; ATASHZAR SEYED FAROKH; MOHAMMADI ARASH: "FS-HGR: Few-Shot Learning for Hand Gesture Recognition via Electromyography", IEEE TRANSACTIONS ON NEURAL SYSTEMS AND REHABILITATION ENGINEERING, IEEE, USA, vol. 29, 4 May 2021 (2021-05-04), USA, pages 1004 - 1015, XP011858944, ISSN: 1534-4320, DOI: 10.1109/TNSRE.2021.3077413 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117292404A (en) * 2023-10-13 2023-12-26 哈尔滨工业大学 High-precision gesture data identification method, electronic equipment and storage medium
CN117292404B (en) * 2023-10-13 2024-04-19 哈尔滨工业大学 High-precision gesture data identification method, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN116662773A (en) 2023-08-29
CN114781439A (en) 2022-07-22
CN114781439B (en) 2023-05-30

Similar Documents

Publication Publication Date Title
WO2023185887A1 (en) Model acquisition system, gesture recognition method and apparatus, device, and storage medium
Lee et al. American sign language recognition and training method with recurrent neural network
US11551103B2 (en) Data-driven activity prediction
Das et al. Unsupervised heart-rate estimation in wearables with Liquid states and a probabilistic readout
KR20200005986A (en) System and method for diagnosing cognitive impairment using face recognization
JP7070255B2 (en) Abnormality discrimination program, abnormality discrimination method and abnormality discrimination device
CN108703824B (en) Bionic hand control system and control method based on myoelectricity bracelet
Malešević et al. Vector autoregressive hierarchical hidden Markov models for extracting finger movements using multichannel surface EMG signals
CN104573630A (en) Multiclass brain electrical mode online identification method based on probability output of twin support vector machine
CN114707562B (en) Electromyographic signal sampling frequency control method and device and storage medium
Li et al. EEG signal classification method based on feature priority analysis and CNN
EP3726435A1 (en) Deep neural network training method and apparatus, and computer device
CN109948427A (en) A kind of idea recognition methods based on long memory models in short-term
Qu et al. Improved perception-based spiking neuron learning rule for real-time user authentication
CN117667749B (en) Fuzzy test case optimization method and system
CN117598674B (en) Multi-parameter heart function monitoring system and method
CN114384999A (en) User irrelevant myoelectricity gesture recognition system based on self-adaptive learning
Zhang et al. ECGID: a human identification method based on adaptive particle swarm optimization and the bidirectional LSTM model
Liew et al. Affect classification using genetic-optimized ensembles of fuzzy ARTMAPs
US20220245434A1 (en) Systems, methods, and media for decoding observed spike counts for spiking cells
Akmal et al. Leveraging training strategies of artificial neural network for classification of multiday electromyography signals
CN110874875B (en) Door lock control method and device
WO2019144311A1 (en) Rule embedded artificial neural network system and training method thereof
Shaikh et al. Towards Robust and Accurate Myoelectric Controller Design based on Multi-objective Optimization using Evolutionary Computation
Boloka et al. Anomaly detection monitoring system for healthcare

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23778252

Country of ref document: EP

Kind code of ref document: A1