CN108388348B - An EMG gesture recognition method based on deep learning and attention mechanism - Google Patents
An EMG gesture recognition method based on deep learning and attention mechanism Download PDFInfo
- Publication number
- CN108388348B CN108388348B CN201810224699.8A CN201810224699A CN108388348B CN 108388348 B CN108388348 B CN 108388348B CN 201810224699 A CN201810224699 A CN 201810224699A CN 108388348 B CN108388348 B CN 108388348B
- Authority
- CN
- China
- Prior art keywords
- neural network
- attention mechanism
- deep learning
- gesture
- new
- Prior art date
- Legal status (The legal status 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 status listed.)
- Expired - Fee Related
Links
- 230000007246 mechanism Effects 0.000 title claims abstract description 32
- 238000000034 method Methods 0.000 title claims abstract description 27
- 238000013135 deep learning Methods 0.000 title claims abstract description 20
- 238000012549 training Methods 0.000 claims abstract description 39
- 238000012360 testing method Methods 0.000 claims abstract description 33
- 238000013528 artificial neural network Methods 0.000 claims abstract description 26
- 230000000306 recurrent effect Effects 0.000 claims abstract description 24
- 238000013527 convolutional neural network Methods 0.000 claims abstract description 16
- 238000001914 filtration Methods 0.000 claims abstract description 11
- 230000009467 reduction Effects 0.000 claims abstract description 3
- 238000002567 electromyography Methods 0.000 claims description 50
- 238000000605 extraction Methods 0.000 claims description 9
- 230000009471 action Effects 0.000 claims description 7
- 239000013598 vector Substances 0.000 claims description 7
- 238000013145 classification model Methods 0.000 claims description 6
- 230000006870 function Effects 0.000 claims description 6
- 238000007781 pre-processing Methods 0.000 claims description 6
- 238000011156 evaluation Methods 0.000 claims description 4
- 238000004364 calculation method Methods 0.000 claims description 3
- 238000002790 cross-validation Methods 0.000 claims description 3
- 125000004122 cyclic group Chemical group 0.000 claims description 3
- 230000011218 segmentation Effects 0.000 claims description 3
- 238000001228 spectrum Methods 0.000 claims description 2
- 239000011159 matrix material Substances 0.000 claims 1
- 230000003183 myoelectrical effect Effects 0.000 claims 1
- 238000013461 design Methods 0.000 abstract description 3
- 238000007476 Maximum Likelihood Methods 0.000 abstract 1
- 230000008569 process Effects 0.000 description 4
- 238000011160 research Methods 0.000 description 4
- 230000006403 short-term memory Effects 0.000 description 4
- 238000010276 construction Methods 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000010801 machine learning Methods 0.000 description 2
- 238000012706 support-vector machine Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000008034 disappearance Effects 0.000 description 1
- 239000003814 drug Substances 0.000 description 1
- 238000004880 explosion Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 210000003205 muscle Anatomy 0.000 description 1
- 230000001537 neural effect Effects 0.000 description 1
- 238000003062 neural network model Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
- 230000003595 spectral effect Effects 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/011—Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
- G06F3/015—Input arrangements based on nervous system activity detection, e.g. brain waves [EEG] detection, electromyograms [EMG] detection, electrodermal response detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2203/00—Indexing scheme relating to G06F3/00 - G06F3/048
- G06F2203/01—Indexing scheme relating to G06F3/01
- G06F2203/011—Emotion 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
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Neurosurgery (AREA)
- General Health & Medical Sciences (AREA)
- Neurology (AREA)
- Health & Medical Sciences (AREA)
- Dermatology (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Biomedical Technology (AREA)
- Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)
- Image Analysis (AREA)
Abstract
本发明公开了一种基于深度学习和注意力机制的肌电信号手势识别方法,步骤如下:对手势肌电信号进行降噪滤波;使用滑动窗口对每个窗口数据提取一个经典特征集,并构建新的基于特征的肌电图像;设计一种基于卷积神经网络、循环神经网络和注意力机制的深度学习框架,并对其网络结构参数进行优化;使用设计好的深度学习框架和训练数据训练得到分类器模型;将测试数据输入到训练好的深度学习网络模型中,根据最后一层输出的似然,最大似然对应的类别即为识别的类别。本发明基于新特征图像及基于注意力机制的深度学习框架对肌电手势信号进行识别。使用基于深度学习和注意力机制的肌电信号手势识别方法能够准确地识别同一被试的多种不同手势。
The invention discloses an electromyographic signal gesture recognition method based on deep learning and attention mechanism. The steps are as follows: noise reduction filtering is performed on the gesture electromyographic signal; a sliding window is used to extract a classical feature set for each window data, and a New feature-based EMG images; design a deep learning framework based on convolutional neural network, recurrent neural network and attention mechanism, and optimize its network structure parameters; use the designed deep learning framework and training data to train Obtain the classifier model; input the test data into the trained deep learning network model, and according to the likelihood of the output of the last layer, the category corresponding to the maximum likelihood is the identified category. The invention recognizes the electromyographic gesture signal based on the new feature image and the deep learning framework based on the attention mechanism. Using deep learning and attention mechanism-based EMG gesture recognition method can accurately identify multiple different gestures of the same subject.
Description
技术领域technical field
本发明属于计算机与生物信号相结合领域,尤其涉及一种基于深度学习和注意力机制的肌电信号手势识别方法。The invention belongs to the field of combining computer and biological signals, and in particular relates to an electromyographic signal gesture recognition method based on deep learning and attention mechanism.
背景技术Background technique
表面肌电信号(surface electromyography,sEMG)是一种通过非侵入式的电极贴在皮肤表面来记录肌肉活动的生物信号。通过记录和分析表面肌电信号能够为辅助和康复技术提供更多有效的信息,对于体育科学研究、人机交互、康复医学临床和基础研究等具有重要的学术价值和应用意义。在这些应用中,基于肌电信号的手势识别技术担当重要的角色。一个经典的肌电信号手势识别流程由数据预处理、特征空间构建和分类组成。数据预处理部分主要对信号进行整流和滤波来减少噪声,特征空间构建部分将预处理后的信号变换到特征空间使得类间有更大的区分度,最后用一个机器学习方法训练好模型用于分类。Surface electromyography (sEMG) is a biological signal that records muscle activity through non-invasive electrodes attached to the skin surface. Recording and analyzing surface EMG signals can provide more effective information for assistive and rehabilitation technologies, and has important academic and application significance for sports science research, human-computer interaction, clinical and basic research in rehabilitation medicine. In these applications, gesture recognition technology based on EMG signals plays an important role. A classic EMG gesture recognition process consists of data preprocessing, feature space construction and classification. The data preprocessing part mainly rectifies and filters the signal to reduce noise. The feature space construction part transforms the preprocessed signal into the feature space to make the class more distinguishable. Finally, a machine learning method is used to train the model for Classification.
特征空间的构建部分和手势类别的识别部分是提高识别准确率十分重要的两个部分。因此有很多研究人员致力于通过他们的领域知识来提出新的特征,如Phinyomark特征集。另一方面,在国内外的研究中,很多机器学习分类器被用于肌电信号手势识别中,比如人工神经网络、K近邻、线性判决分析、支持向量机和隐马尔可夫模型。其中支持向量机和线性判决分析是两种最常用的分类器。The construction part of the feature space and the recognition part of the gesture category are two important parts to improve the recognition accuracy. Therefore there are many researchers working on proposing new features, such as Phinyomark feature sets, by using their domain knowledge. On the other hand, in research at home and abroad, many machine learning classifiers are used in EMG gesture recognition, such as artificial neural network, K-nearest neighbor, linear decision analysis, support vector machine and hidden Markov model. Among them, support vector machines and linear decision analysis are the two most commonly used classifiers.
在近几年国内外的研究进展中,深度学习方法在许多领域都获得了目前最好的表现。其中最著名的卷积神经网络也已被成功应用于肌电信号的手势识别中,获得了目前最好的识别效果。注意力机制是一种十分有效的增强循环神经网络建模能力的方法,目前已在机器翻译等领域取得了较好的效果。但目前没有使用循环神经网络结合卷积神经网络的方法对肌电信号手势进行识别,并且本发明将注意力机制加入到循环神经网络中对模型进行增强。In the research progress at home and abroad in recent years, deep learning methods have achieved the best performance in many fields. Among them, the most famous convolutional neural network has also been successfully applied to the gesture recognition of EMG signals, and obtained the best recognition effect so far. Attention mechanism is a very effective method to enhance the modeling ability of recurrent neural network, and it has achieved good results in machine translation and other fields. However, at present, the method of combining the recurrent neural network with the convolutional neural network is not used to recognize the EMG signal gesture, and the present invention adds the attention mechanism to the recurrent neural network to enhance the model.
发明内容SUMMARY OF THE INVENTION
本发明的目的在于针对现有技术的不足,提供一种基于深度学习和注意力机制的肌电信号手势识别方法,通过设计基于卷积神经网络、循环神经网络和注意力机制的模型结构,提高了手势识别的准确性。The purpose of the present invention is to aim at the deficiencies of the prior art, to provide an EMG signal gesture recognition method based on deep learning and attention mechanism. accuracy of gesture recognition.
本发明的目的是通过以下技术方案来实现的:一种基于深度学习和注意力机制的肌电信号手势识别方法,包括如下步骤:The purpose of the present invention is to be achieved through the following technical solutions: a method for recognizing an EMG signal gesture based on deep learning and an attention mechanism, comprising the following steps:
(1)获取肌电数据,数据预处理,包括以下子步骤:(1) Obtaining EMG data, data preprocessing, including the following sub-steps:
(1.1)从公开数据集NinaProDB1、NinaProDB2、BioPatRec子集、CapgMyo子集和csl-hdemg中获取手势动作肌电数据;(1.1) Obtain the EMG data of gesture movements from the public datasets NinaProDB1, NinaProDB2, BioPatRec subset, CapgMyo subset and csl-hdemg;
(1.2)分别对不同数据集采用不同的预处理方法进行滤波降噪;(1.2) Use different preprocessing methods to filter noise reduction for different data sets;
(2)原始信号训练数据集和原始信号测试数据集的划分,包括以下子步骤:(2) The division of the original signal training data set and the original signal test data set, including the following sub-steps:
(2.1)根据获取到的肌电信号标签,将每个肌电信号文件中的数据分割为若干个肌电信号手势段,每个手势段包含一次动作重复;(2.1) According to the obtained EMG signal label, the data in each EMG signal file is divided into several EMG signal gesture segments, and each gesture segment contains one action repetition;
(2.2)按照不同的评估方法,将手势的多次动作重复分别划分到原始信号训练数据集和原始信号测试数据集中,完成原始训练和测试数据集的划分;(2.2) According to different evaluation methods, the repeated actions of the gesture are divided into the original signal training data set and the original signal test data set respectively, and the division of the original training and test data sets is completed;
(3)数据分割与特征提取,包括以下子步骤:(3) Data segmentation and feature extraction, including the following sub-steps:
(3.1)用滑动窗口将每个手势段分割为多个固定长度的信号段;(3.1) Use a sliding window to divide each gesture segment into multiple fixed-length signal segments;
(3.2)对每个窗口内的定长信号段的每个通道进行特征提取,提取多种特征;(3.2) Feature extraction is performed on each channel of the fixed-length signal segment in each window, and multiple features are extracted;
(4)构建新肌电图像,包括以下子步骤:(4) Constructing a new EMG image, including the following sub-steps:
(4.1)将窗口内每个通道的特征向量重新排布,使得每两个通道都能够相邻;(4.1) Rearrange the feature vectors of each channel in the window so that every two channels can be adjacent;
(4.2)构建新肌电图像,新肌电图像的宽为1,高为重新排列后的通道数,颜色通道数为特征向量维度;(4.2) Constructing a new EMG image, the width of the new EMG image is 1, the height is the number of rearranged channels, and the number of color channels is the dimension of the feature vector;
(5)基于深度学习和注意力机制的肌电信号多类手势识别,包括以下步骤:(5) Multi-type gesture recognition of EMG signals based on deep learning and attention mechanism, including the following steps:
(5.1)设计深度学习和注意力机制的模型结构,模型结构由卷积神经网络、循环神经网络和基本注意力机制构成;卷积神经网络对输入的新肌电图像进行高层特征提取,循环神经网络对新肌电图像序列每帧之间的关系进行建模,基本注意力机制对循环神经网络的输出进行重要性加权,t时刻注意力权重αt的计算公式为:(5.1) Design the model structure of deep learning and attention mechanism. The model structure consists of convolutional neural network, recurrent neural network and basic attention mechanism; The network models the relationship between each frame of the new EMG image sequence, and the basic attention mechanism weights the importance of the output of the recurrent neural network. The calculation formula of the attention weight α t at time t is:
Mt=tanh(Whht)M t =tanh(W h h t )
αt=softmax(wTMt)α t =softmax(w T M t )
其中,ht是循环神经网络的输出,Wh和wT是待训练的权重矩阵,T是一个手势段的时间长度,r是基本注意力机制部分的输出;softmax函数是归一化指数函数;where h t is the output of the recurrent neural network, W h and w T are the weight matrices to be trained, T is the time length of a gesture segment, r is the output of the basic attention mechanism part; the softmax function is a normalized exponential function ;
(5.2)原始信号训练数据集中每个样本进行新肌电图像的构建,得到新肌电图像训练数据集作为整个网络的输入,对卷积神经网络和循环神经网络的网络参数逐一进行优化,得到最优模型参数;(5.2) Construct a new EMG image for each sample in the original signal training data set, and obtain a new EMG image training data set as the input of the entire network, optimize the network parameters of the convolutional neural network and the recurrent neural network one by one, and obtain optimal model parameters;
(5.3)由步骤(5.2)训练得到的最优模型参数和新肌电图像训练数据集训练获得分类模型;(5.3) The classification model is obtained by training the optimal model parameters obtained in step (5.2) and the new EMG image training data set;
(5.4)将测试数据集中每个样本进行新肌电图像的构建,得到新肌电图像测试数据集,输入步骤(5.3)得到的分类模型,输出分类结果。(5.4) Construct a new EMG image for each sample in the test data set to obtain a new EMG image test data set, input the classification model obtained in step (5.3), and output the classification result.
进一步地,所述步骤(1.2)中,对NinaProDB1采用低通butterworth滤波,对NinaProDB2采用低通butterworth滤波并降采样到100Hz,BioPatRec子集和CapgMyo子集不进行滤波,对csl-hdemg进行整流和低通butterworth滤波。Further, in the step (1.2), low-pass butterworth filtering is adopted for NinaProDB1, and low-pass butterworth filtering is adopted for NinaProDB2 and down-sampling to 100Hz, BioPatRec subset and CapgMyo subset are not filtered, and csl-hdemg is rectified and Low-pass butterworth filtering.
进一步地,所述步骤(2.1)中,原始信号训练数据集和原始信号测试数据集的划分使用被试内评估;不同数据集采用不同的划分方法:NinaProDB1将每个被试的第1,3,4,6,8,9和10次重复作为训练数据,第2,5,7次作为测试数据;NinaProDB2将第1,3,4,6次重复作为训练数据,第2,5次作为测试数据;BioPatRec子集将第一次重复作为训练数据,另外两次重复作为测试数据;CapgMyo子集将一半的重复作为训练数据,即5次重复,另外5次重复作为测试数据;csl-hdemg数据集将单个被试的数据划分为10份,并进行10折交叉验证。Further, in the step (2.1), the division of the original signal training data set and the original signal test data set uses intra-subject evaluation; different data sets use different division methods: NinaProDB1 divides the first and third , 4, 6, 8, 9 and 10 repetitions are used as training data, and the 2, 5, and 7 repetitions are used as test data; NinaProDB2 uses the 1st, 3rd, 4th, and 6th repetitions as training data, and the 2nd, 5th repetitions are used as test data Data; BioPatRec subset takes the first repetition as training data and the other two repetitions as test data; CapgMyo subset takes half of the repetitions as training data, i.e. 5 repetitions, and the other 5 repetitions as test data; csl-hdemg data The set divides the data of a single subject into 10 copies and performs 10-fold cross-validation.
进一步地,所述步骤(3.1)中,不同的数据集使用不同的滑动窗口长度及滑动步长;NinaProDB1的滑动窗口长度为150ms和200ms,滑动步长为10ms;NinaProDB2的滑动窗口长度为200ms,滑动步长为100ms;BioPatRec子集的滑动窗口长度为50ms和150ms,滑动步长为50ms;CapgMyo子集的滑动窗口长度为40ms和150ms,滑动步长为1ms;csl-hdemg的滑动窗口长度为150ms和170ms,滑动步长为0.5ms。Further, in the step (3.1), different data sets use different sliding window lengths and sliding steps; the sliding window lengths of NinaProDB1 are 150ms and 200ms, and the sliding steps are 10ms; the sliding window lengths of NinaProDB2 are 200ms, The sliding step size is 100ms; the sliding window lengths of the BioPatRec subset are 50ms and 150ms, and the sliding step size is 50ms; the sliding window lengths of the CapgMyo subset are 40ms and 150ms, and the sliding step size is 1ms; the sliding window length of the csl-hdemg is 150ms and 170ms, the sliding step is 0.5ms.
进一步地,所述步骤(3.2)中,对窗口内的肌电信号基于经典特征集Phinyomark进行特征向量提取,包含特征信号幅值绝对均值MAV、波形长度WL、自回归系数AR、绝对均值斜率MAVSLP、平均频率MNF、功率谱最大值附近能量与总能量比率PSR和Willison幅值WAMP;CapgMyo子集和csl-hdemg是高密度肌电信号,不进行特征提取,直接在原始信号上构建图像。Further, in the step (3.2), feature vector extraction is performed on the EMG signal in the window based on the classical feature set Phinyomark, including the absolute mean value of the characteristic signal amplitude MAV, the waveform length WL, the autoregressive coefficient AR, and the absolute mean slope MAVSLP. , the average frequency MNF, the ratio of energy to total energy near the power spectrum maximum PSR and the Willison amplitude WAMP; CapgMyo subset and csl-hdemg are high-density EMG signals, without feature extraction, images are directly constructed on the original signal.
进一步地,所述步骤(5.1)中,循环神经网络部分,选择长短时记忆单元(LSTM)来解决梯度消失和梯度爆炸问题。Further, in the step (5.1), in the recurrent neural network part, a long short-term memory unit (LSTM) is selected to solve the problems of gradient disappearance and gradient explosion.
进一步地,所述步骤(5.2)中,最优模型中卷积神经网络包含2层卷积层,后接2层局部连接层,最后连接3层全连接层,循环神经网络层由输出大小为512的长短时记忆单元(LSTM)构成,最后识别部分由一个G-way全连接层和softmax层构成。Further, in the step (5.2), the convolutional neural network in the optimal model includes 2 layers of convolutional layers, followed by 2 layers of local connection layers, and finally connected to 3 layers of fully connected layers, and the output size of the recurrent neural network layer is 512 long short-term memory unit (LSTM), and the final recognition part consists of a G-way fully connected layer and a softmax layer.
进一步地,所述步骤(5.3)中,分类模型的训练过程为:新肌电图像训练数据集与该数据集每个样本对应手势标签共同作为模型的输入,经过训练得到模型参数进行存储。Further, in the step (5.3), the training process of the classification model is as follows: the new EMG image training data set and the gesture label corresponding to each sample of the data set are used as the input of the model, and the model parameters are obtained after training and stored.
进一步地,所述步骤(5.4)中,分类模型的输出为标签,即对应测试样本的标签,用识别准确率对识别结果进行衡量,识别准确率为识别正确的样本数除以所有测试样本数。Further, in the step (5.4), the output of the classification model is a label, that is, the label corresponding to the test sample, and the recognition result is measured by the recognition accuracy rate, and the recognition accuracy rate is the number of correct samples divided by the number of all test samples. .
本发明的有益效果是:本发明提出一种基于卷积神经网络和循环神经网络的肌电信号手势识别方法,能够同时对肌电信号的空间和时间特征进行提取和建模,与已有发明中的单纯基于卷积神经网络的方法相比,该方法能够有效提升识别率。将注意力机制加入到基于卷积神经网络和循环神经网络的模型结构中,能够增强模型结构的表现。提取传统肌电信号构建新肌电图像作为模型的输入,能够有效提升肌电信号手势识别的准确率。The beneficial effects of the present invention are as follows: the present invention proposes an EMG signal gesture recognition method based on a convolutional neural network and a cyclic neural network, which can extract and model the spatial and temporal features of the EMG signal at the same time, which is similar to the existing invention. Compared with the method based solely on convolutional neural network, this method can effectively improve the recognition rate. Adding attention mechanism to the model structure based on convolutional neural network and recurrent neural network can enhance the performance of the model structure. Extracting traditional EMG signals to construct new EMG images as the input of the model can effectively improve the accuracy of EMG signal gesture recognition.
附图说明Description of drawings
图1为本发明方法流程图;Fig. 1 is the flow chart of the method of the present invention;
图2为本发明网络结构图。FIG. 2 is a network structure diagram of the present invention.
具体实施方式Detailed ways
下面结合附图和具体实施方式对本发明作进一步详细说明。The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
如图1所示,本发明提供的一种基于深度学习和注意力机制的肌电信号手势识别方法,具体实施步骤如下:As shown in FIG. 1 , the present invention provides a method for recognizing EMG signal gestures based on deep learning and attention mechanism, and the specific implementation steps are as follows:
步骤(1)从公开数据集NinaProDB1、NinaProDB2、BioPatRec子集、CapgMyo子集和csl-hdemg中获取手势动作肌电数据;对NinaProDB1采用低通butterworth滤波,对NinaProDB2采用低通butterworth滤波并降采样到100Hz,BioPatRec子集和CapgMyo子集不进行滤波,对csl-hdemg进行整流和低通butterworth滤波。Step (1) Obtain gesture action EMG data from public datasets NinaProDB1, NinaProDB2, BioPatRec subset, CapgMyo subset and csl-hdemg; use low-pass butterworth filtering for NinaProDB1, and low-pass butterworth filtering for NinaProDB2 and downsample to 100Hz, BioPatRec subset and CapgMyo subset are not filtered, csl-hdemg is rectified and low-pass butterworth filtered.
步骤(2)原始信号训练数据集和原始信号测试数据集的划分,根据获取到的肌电信号标签,将每个肌电信号文件中的数据分割为一个个肌电信号手势段,每个手势段包含一次动作重复;我们的测试使用被试内评估,不同数据集采用不同的划分方法:NinaProDB1将每个被试的第1,3,4,6,8,9和10次重复作为训练数据,第2,5,7次作为测试数据;NinaProDB2将第1,3,4,6次重复作为训练数据,第2,5次作为测试数据;BioPatRec子集将第一次重复作为训练数据,另外两次重复作为测试数据;CapgMyo子集将一半的重复作为训练数据,即5次重复,另外5次重复作为测试数据;csl-hdemg数据集将单个被试的数据划分为10份,并进行10折交叉验证。Step (2) The division of the original signal training data set and the original signal test data set, according to the obtained EMG signal label, the data in each EMG signal file is divided into one EMG signal gesture segment, each gesture The segment contains one action repetition; our test uses within-subject evaluation, and different datasets use different partitioning methods: NinaProDB1 uses the 1st, 3rd, 4th, 6th, 8th, 9th and 10th repetitions of each subject as training data , the 2nd, 5th, and 7th times are used as test data; NinaProDB2 uses the 1st, 3rd, 4th, and 6th repetitions as training data, and the 2nd and 5th times as test data; the BioPatRec subset uses the first repetition as training data, and the other Two repetitions are used as test data; the CapgMyo subset uses half of the repetitions as training data, that is, 5 repetitions, and the other 5 repetitions are used as test data; the csl-hdemg data set divides the data of a single subject into 10 copies, and conducts 10 Fold cross validation.
步骤(3)对数据进行分割与特征提取,不同的数据集使用不同的滑动窗口长度及滑动步长。NinaProDB1的滑动窗口长度为150ms和200ms,滑动步长为10ms;NinaProDB2的滑动窗口长度为200ms,滑动步长为100ms;BioPatRec子集的滑动窗口长度为50ms和150ms,滑动步长为50ms;CapgMyo子集的滑动窗口长度为40ms和150ms,滑动步长为1ms;csl-hdemg的滑动窗口长度为150ms和170ms,滑动步长为0.5ms。对窗口内的肌电信号基于经典特征集Phinyomark进行特征向量提取,包含特征信号幅值绝对均值(MAV)、波形长度(WL)、自回归系数(AR)、绝对均值斜率(MAVSLP)、平均频率(MNF)、功率谱最大值附近能量与总能量比率(PSR)和Willison幅值(WAMP)。Step (3) Segmentation and feature extraction are performed on the data, and different data sets use different sliding window lengths and sliding steps. The sliding window length of NinaProDB1 is 150ms and 200ms, and the sliding step is 10ms; the sliding window length of NinaProDB2 is 200ms and the sliding step is 100ms; the sliding window length of BioPatRec subset is 50ms and 150ms, and the sliding step is 50ms; The sliding window lengths of the set are 40ms and 150ms, and the sliding step is 1ms; the sliding window lengths of csl-hdemg are 150ms and 170ms, and the sliding step is 0.5ms. The EMG signal in the window is extracted based on the classic feature set Phinyomark, including the absolute mean value of the characteristic signal amplitude (MAV), the waveform length (WL), the autoregressive coefficient (AR), the absolute mean slope (MAVSLP), and the average frequency. (MNF), energy near power spectral maximum to total energy ratio (PSR), and Willison amplitude (WAMP).
步骤(5)设计深度学习和注意力机制的模型结构,模型结构由卷积神经网络、循环神经网络和基本注意力机制构成。卷积神经网络对输入的新肌电图像进行高层特征提取,循环神经网络对新肌电图像序列每帧之间的关系进行建模,基本注意力机制对循环神经网络的输出进行重要性加权,从而得到最终的表达用于肌电信号手势识别。对卷积神经网络和循环神经网络的网络参数逐一进行优化,最优的网络结构如下表所示:Step (5) Design the model structure of deep learning and attention mechanism. The model structure is composed of convolutional neural network, recurrent neural network and basic attention mechanism. The convolutional neural network performs high-level feature extraction on the input new EMG image, the recurrent neural network models the relationship between each frame of the new EMG image sequence, and the basic attention mechanism weights the importance of the output of the recurrent neural network. Thus, the final expression is obtained for EMG gesture recognition. The network parameters of the convolutional neural network and the recurrent neural network are optimized one by one. The optimal network structure is shown in the following table:
循环神经网络部分,我们选择长短时记忆单元(LSTM)来解决梯度消失和梯度爆炸问题。注意力机制增加在循环神经网络的后面,即循环神经网络的输出是注意力机制部分的输入,计算公式为:In the recurrent neural network part, we choose a long short-term memory unit (LSTM) to solve the gradient vanishing and gradient exploding problems. The attention mechanism is added behind the recurrent neural network, that is, the output of the recurrent neural network is the input of the attention mechanism part, and the calculation formula is:
Mt=tanh(Whht)M t =tanh(W h h t )
αt=softmax(wTMt)α t =softmax(w T M t )
其中,ht是循环神经网络的输出,Wh和wT是待训练的权重矩阵,T是一个手势段的时间长度,r是基本注意力机制部分的输出;softmax函数是归一化指数函数。训练过程为:原始信号训练数据集中每个样本进行新肌电图像的构建,得到新肌电图像训练数据集,将新肌电图像训练数据集与该数据集每个样本对应手势标签共同作为模型的输入,经过训练得到模型参数并进行存储。测试过程为:将测试数据集中每个样本进行新肌电图像的构建,得到新肌电图像测试数据集,加载由新肌电图像训练数据集训练好的模型,输入新肌电图像测试数据集,输出为手势类别标签,用识别准确率对识别结果进行衡量,识别准确率为识别正确的样本数除以所有样本数。where h t is the output of the recurrent neural network, W h and w T are the weight matrices to be trained, T is the time length of a gesture segment, r is the output of the basic attention mechanism part; the softmax function is a normalized exponential function . The training process is as follows: construct a new EMG image for each sample in the original signal training data set to obtain a new EMG image training data set, and use the new EMG image training data set and the corresponding gesture label of each sample in the data set as a model After training, the model parameters are obtained and stored. The test process is: construct a new EMG image for each sample in the test data set, obtain a new EMG image test data set, load the model trained by the new EMG image training data set, and input the new EMG image test data set , the output is the gesture category label, and the recognition result is measured by the recognition accuracy rate, which is the number of correctly recognized samples divided by the number of all samples.
对NinaProDB1、NinaProDB2、BioPatRec子集、CapgMyo子集和csl-hdemg数据集的手势全集进行识别。NinaProDB1包含52手势,NinaProDB2包含50手势,BioPatRec子集包含26手势,CapgMyo子集包含8手势,csl-hdemg包含27手势。使用本发明基于深度学习和注意力机制的肌电信号手势识别方法的识别率结果为:Recognition on the full set of gestures from NinaProDB1, NinaProDB2, BioPatRec subsets, CapgMyo subsets and csl-hdemg datasets. NinaProDB1 contains 52 gestures, NinaProDB2 contains 50 gestures, BioPatRec subset contains 26 gestures, CapgMyo subset contains 8 gestures, and csl-hdemg contains 27 gestures. The result of the recognition rate of using the EMG signal gesture recognition method based on deep learning and attention mechanism of the present invention is:
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810224699.8A CN108388348B (en) | 2018-03-19 | 2018-03-19 | An EMG gesture recognition method based on deep learning and attention mechanism |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810224699.8A CN108388348B (en) | 2018-03-19 | 2018-03-19 | An EMG gesture recognition method based on deep learning and attention mechanism |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108388348A CN108388348A (en) | 2018-08-10 |
CN108388348B true CN108388348B (en) | 2020-11-24 |
Family
ID=63066958
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810224699.8A Expired - Fee Related CN108388348B (en) | 2018-03-19 | 2018-03-19 | An EMG gesture recognition method based on deep learning and attention mechanism |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108388348B (en) |
Families Citing this family (48)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109124625B (en) * | 2018-09-04 | 2021-07-20 | 大连理工大学 | A classification method of driver fatigue state level |
CN109498362A (en) * | 2018-09-10 | 2019-03-22 | 南京航空航天大学 | A kind of hemiplegic patient's hand movement function device for healing and training and model training method |
CN109190578B (en) * | 2018-09-13 | 2019-10-18 | 合肥工业大学 | Sign language video translation method based on fusion of temporal convolutional network and recurrent neural network |
CN109257622A (en) * | 2018-11-01 | 2019-01-22 | 广州市百果园信息技术有限公司 | A kind of audio/video processing method, device, equipment and medium |
CN109567789B (en) * | 2018-12-03 | 2021-08-31 | 东软集团股份有限公司 | Electrocardiogram data segmentation processing method and device and readable storage medium |
CN109886978B (en) * | 2019-02-20 | 2020-03-13 | 贵州电网有限责任公司 | End-to-end alarm information identification method based on deep learning |
CN110033126A (en) * | 2019-03-14 | 2019-07-19 | 贵州大学 | Shot and long term memory network prediction technique based on attention mechanism and logistic regression |
CN109924977A (en) * | 2019-03-21 | 2019-06-25 | 西安交通大学 | A kind of surface electromyogram signal classification method based on CNN and LSTM |
CN111973388B (en) * | 2019-05-22 | 2021-08-31 | 中国科学院沈阳自动化研究所 | A control method of hand rehabilitation robot based on sEMG |
CN110335261B (en) * | 2019-06-28 | 2020-04-17 | 山东科技大学 | CT lymph node detection system based on space-time circulation attention mechanism |
CN110399846A (en) * | 2019-07-03 | 2019-11-01 | 北京航空航天大学 | A Gesture Recognition Method Based on Correlation of Multi-channel EMG Signals |
CN110333783B (en) * | 2019-07-10 | 2020-08-28 | 中国科学技术大学 | An irrelevant gesture processing method and system for robust electromyography control |
CN110262511B (en) * | 2019-07-12 | 2022-08-09 | 同济人工智能研究院(苏州)有限公司 | Biped robot adaptive walking control method based on deep reinforcement learning |
CN110658915A (en) * | 2019-07-24 | 2020-01-07 | 浙江工业大学 | A method of EMG gesture recognition based on dual-stream network |
CN110443309A (en) * | 2019-08-07 | 2019-11-12 | 浙江大学 | A kind of electromyography signal gesture identification method of combination cross-module state association relation model |
CN110618754B (en) * | 2019-08-30 | 2021-09-14 | 电子科技大学 | Surface electromyogram signal-based gesture recognition method and gesture recognition armband |
CN110537922B (en) * | 2019-09-09 | 2020-09-04 | 北京航空航天大学 | A method and system for lower limb motion recognition during human walking based on deep learning |
CN110598628B (en) * | 2019-09-11 | 2022-08-02 | 南京邮电大学 | An EMG hand motion recognition method based on integrated deep learning |
CN110610172B (en) * | 2019-09-25 | 2022-08-12 | 南京邮电大学 | An EMG gesture recognition method based on RNN-CNN architecture |
CN110598676B (en) * | 2019-09-25 | 2022-08-02 | 南京邮电大学 | Deep Learning Gesture EMG Recognition Method Based on Confidence Score Model |
CN111046731B (en) * | 2019-11-11 | 2023-07-25 | 中国科学院计算技术研究所 | Transfer learning method and recognition method for gesture recognition based on surface electromyographic signals |
CN110929243B (en) * | 2019-11-22 | 2022-07-22 | 武汉大学 | Pedestrian identity recognition method based on mobile phone inertial sensor |
CN111103976B (en) * | 2019-12-05 | 2023-05-02 | 深圳职业技术学院 | Gesture recognition method, device and electronic device |
CN111053549A (en) * | 2019-12-23 | 2020-04-24 | 威海北洋电气集团股份有限公司 | Intelligent biological signal abnormality detection method and system |
CN111144269B (en) * | 2019-12-23 | 2023-11-24 | 威海北洋电气集团股份有限公司 | Signal correlation behavior recognition method and system based on deep learning |
CN111184512B (en) * | 2019-12-30 | 2021-06-01 | 电子科技大学 | Method for recognizing rehabilitation training actions of upper limbs and hands of stroke patient |
CN111616706B (en) * | 2020-05-20 | 2022-07-22 | 山东中科先进技术有限公司 | Surface electromyogram signal classification method and system based on convolutional neural network |
CN111985327A (en) * | 2020-07-16 | 2020-11-24 | 浙江工业大学 | Signal deep learning classification method based on sliding trainable operator |
CN111920405A (en) * | 2020-09-15 | 2020-11-13 | 齐鲁工业大学 | Atrial fibrillation signal identification system and method |
CN112861604B (en) * | 2020-12-25 | 2022-09-06 | 中国科学技术大学 | Myoelectric action recognition and control method irrelevant to user |
CN112816122B (en) * | 2020-12-31 | 2023-04-07 | 武汉地震工程研究院有限公司 | Bolt tightness degree monitoring method based on deep learning and piezoelectric active sensing |
CN112783327B (en) * | 2021-01-29 | 2022-08-30 | 中国科学院计算技术研究所 | Method and system for gesture recognition based on surface electromyogram signals |
CN112906673A (en) * | 2021-04-09 | 2021-06-04 | 河北工业大学 | Lower limb movement intention prediction method based on attention mechanism |
CN113143261B (en) * | 2021-04-30 | 2023-05-09 | 中国科学院自动化研究所 | Identity recognition system, method and device based on electromyographic signal |
CN113312994A (en) * | 2021-05-18 | 2021-08-27 | 中国科学院深圳先进技术研究院 | Gesture classification recognition method and application thereof |
CN113205074B (en) * | 2021-05-29 | 2022-04-26 | 浙江大学 | A gesture recognition method based on multimodal signals of EMG and micro-inertial measurement unit |
CN113609923B (en) * | 2021-07-13 | 2022-05-13 | 中国矿业大学 | Attention-based continuous sign language sentence recognition method |
CN113729738B (en) * | 2021-09-13 | 2024-04-12 | 武汉科技大学 | Construction method of multichannel myoelectricity characteristic image |
CN113627401A (en) * | 2021-10-12 | 2021-11-09 | 四川大学 | EMG gesture recognition method with feature pyramid network fused with dual attention mechanism |
CN113934302B (en) * | 2021-10-21 | 2024-02-06 | 燕山大学 | Myoelectric gesture recognition method based on SeNet and gating time sequence convolution network |
CN113988135B (en) * | 2021-10-29 | 2025-01-10 | 南京邮电大学 | A gesture recognition method based on electromyographic signal based on dual-branch multi-stream network |
CN114343679A (en) * | 2021-12-24 | 2022-04-15 | 杭州电子科技大学 | Surface electromyogram signal upper limb action recognition method and system based on transfer learning |
CN114504333B (en) * | 2022-01-30 | 2023-10-27 | 天津大学 | Wearable vestibule monitoring system based on myoelectricity and application |
CN114569143A (en) * | 2022-03-03 | 2022-06-03 | 上海交通大学宁波人工智能研究院 | Myoelectric gesture recognition method based on attention mechanism and multi-feature fusion |
CN114931389B (en) * | 2022-04-27 | 2024-07-05 | 福州大学 | Myoelectric signal identification method based on residual error network and graph convolution network |
CN116738295B (en) * | 2023-08-10 | 2024-04-16 | 齐鲁工业大学(山东省科学院) | sEMG signal classification method, system, electronic device and storage medium |
CN117312985B (en) * | 2023-09-27 | 2025-03-11 | 中国地质大学(武汉) | Similarity gesture recognition method of surface electromyography signal based on interpretable deep learning |
CN117281528A (en) * | 2023-11-27 | 2023-12-26 | 山东锋士信息技术有限公司 | Multi-lead pulse signal intelligent identification method and system based on deep learning |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105446484A (en) * | 2015-11-19 | 2016-03-30 | 浙江大学 | Electromyographic signal gesture recognition method based on hidden markov model |
CN105654037A (en) * | 2015-12-21 | 2016-06-08 | 浙江大学 | Myoelectric signal gesture recognition method based on depth learning and feature images |
CN106980367A (en) * | 2017-02-27 | 2017-07-25 | 浙江工业大学 | A kind of gesture identification method based on myoelectricity topographic map |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9830709B2 (en) * | 2016-03-11 | 2017-11-28 | Qualcomm Incorporated | Video analysis with convolutional attention recurrent neural networks |
US10296793B2 (en) * | 2016-04-06 | 2019-05-21 | Nec Corporation | Deep 3D attention long short-term memory for video-based action recognition |
-
2018
- 2018-03-19 CN CN201810224699.8A patent/CN108388348B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105446484A (en) * | 2015-11-19 | 2016-03-30 | 浙江大学 | Electromyographic signal gesture recognition method based on hidden markov model |
CN105654037A (en) * | 2015-12-21 | 2016-06-08 | 浙江大学 | Myoelectric signal gesture recognition method based on depth learning and feature images |
CN106980367A (en) * | 2017-02-27 | 2017-07-25 | 浙江工业大学 | A kind of gesture identification method based on myoelectricity topographic map |
Non-Patent Citations (4)
Title |
---|
Deep Convolutional and LSTM Recurrent Neural Networks for Multimodal Wearable Activity Recognition;Ordonez FJ et al.;《Sensors》;20160118;全文 * |
Deep LSTM with Attention for Message-level and Topic-based Sentiment Analysis;Baziotis C et al.;《SemEcal-2017》;20170804;参见749-750页以及附图3 * |
Sequentially Supervised Long Short-Term Memory for Gesture Recognition;Wang P et al.;《Cognitive Computation》;20160310;全文 * |
深度强化学习综述;刘全 等;《计算机学报》;20170119;参见正文3-7页 * |
Also Published As
Publication number | Publication date |
---|---|
CN108388348A (en) | 2018-08-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108388348B (en) | An EMG gesture recognition method based on deep learning and attention mechanism | |
CN105446484B (en) | A kind of electromyography signal gesture identification method based on Hidden Markov Model | |
Zhao et al. | Noise rejection for wearable ECGs using modified frequency slice wavelet transform and convolutional neural networks | |
CN108491077B (en) | A multi-stream divide-and-conquer convolutional neural network based gesture recognition method for surface electromyography signals | |
CN109998525B (en) | Arrhythmia automatic classification method based on discriminant deep belief network | |
CN110658915A (en) | A method of EMG gesture recognition based on dual-stream network | |
CN111062250A (en) | Multi-subject motor imagery EEG recognition method based on deep feature learning | |
CN113807299B (en) | Sleep stage staging method and system based on parallel frequency domain electroencephalogram signals | |
CN108714026A (en) | The fine granularity electrocardiosignal sorting technique merged based on depth convolutional neural networks and on-line decision | |
CN113627401A (en) | EMG gesture recognition method with feature pyramid network fused with dual attention mechanism | |
CN113205074B (en) | A gesture recognition method based on multimodal signals of EMG and micro-inertial measurement unit | |
CN113158964A (en) | Sleep staging method based on residual learning and multi-granularity feature fusion | |
CN111202517A (en) | Sleep automatic staging method, system, medium and electronic equipment | |
CN114159079B (en) | Multi-type muscle fatigue detection method based on feature extraction and GRU deep learning model | |
CN115804602A (en) | EEG emotion signal detection method, device and medium based on multi-channel feature fusion of attention mechanism | |
CN108567418A (en) | A kind of pulse signal inferior health detection method and detecting system based on PCANet | |
CN110288028B (en) | ECG detection method, system, device and computer-readable storage medium | |
Deepthi et al. | An intelligent Alzheimer’s disease prediction using convolutional neural network (CNN) | |
CN110575141A (en) | A method for epilepsy detection based on generative adversarial networks | |
Shen et al. | A high-precision feature extraction network of fatigue speech from air traffic controller radiotelephony based on improved deep learning | |
Lan et al. | Arrhythmias classification using short-time Fourier transform and GAN based data augmentation | |
CN113768514A (en) | Arrhythmia classification method based on convolutional neural network and gated cyclic unit | |
CN116570284A (en) | Depression recognition method and system based on voice characterization | |
CN101840506B (en) | The Method of Extracting and Recognizing Characteristic Signals of Distance Education Students | |
CN113842151A (en) | A cross-subject EEG cognitive state detection method based on efficient multi-source capsule network |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20201124 |