This folder contains the code and data used in MDPI Technologies paper "Combining electro- and tactile myography to improve hand and wrist activity detection". **************************************************************************************** **************************************************************************************** Writing code takes time. Polishing it and making it available to others takes longer! If some parts of the code were useful for your research of for a better understanding of the algorithms, please cite the related publications. @article{Jaquier17MDPI, author="Jaquier, N. and Connan, M. and Castellini, C. and Calinon, S.", title="Combining Electromyography and Tactile Myography to Improve Hand and Wrist Activity Detection in Prostheses", year="2017", journal = "Technologies", volume = "5", number = "4", } Copyright (c) 2017 Idiap Research Institute, http://idiap.ch/ Written by Noemie Jaquier This code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation. This code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this code. If not, see . **************************************************************************************** **************************************************************************************** Experiment 1 is a real-time goal-reaching experiment. Tactile myography (TMG) was used to measure the muscles activations during finger and wrist movements. 54 tasks were administrated to 9 intact participants (6 movements used for training at 3 activation levels, repeated 3 times). Half of the participants began with Ridge regression (RR), while the other half began with Gaussian process regression (GPR). For each task, a virtual hand model would perform a movement to either one-third, two-third or full activation. The participant controlled a second hand model and were asked to have it mimic the action of the first one. In experiment 2, the participants were asked to imitate the movement of a hand model. They were presented three times the same sequence of six movements. The data consist in surface electromyography (sEMG) and TMG measurement. They were recorded during the whole cycle of each stimuli in order to obtain the whole range of activation from rest to complete finger and wrist movement. **************************************************************************************** Data experiment 1: Each result.txt file contains columns corresponding to: time - current task index - 9xdof activation (ground truth) - data ID - ML method - dT from beginning of task - total dT in goal - task success (2 if success, 1 otherwise) Each .mat file contains: - brac: data from the tactile bracelet in vector shape; - emg: data from the sEMG sensors; - Fs: acquisition frequency; - pred: predicted activations; - stim: ground truth activations. pred and stim variables content (9xdof activation): thumb rotation - thumb flexion - index flexion - middle flexion - ring flexion - little flexion - wrist flexion(-1)/extension(+1) - wrist abduction - wrist supination(-1)/pronation(+1) **************************************************************************************** Data experiment 1: Each .mat file contains: - brac: data from the tactile bracelet in vector shape; - emg: data from the sEMG sensors; - Fs: acquisition frequency; - stim: ground truth activations. stim variable content: 9xdof activation (see order above) - data ID - current repetition index+1 - 1 if state is capture **************************************************************************************** Files: resultsAnalysis_exp1.m: Analysis of the results of experiment 1 (success rate, time in the target, time to complete task, RMSE). MLmethods_{sEMG,TMG,multimodal}_exp2.m: Perform Ridge regression and Gaussian process regression using different kernels on data of experiment 2. Fingers and wrist activations are predicted sEMG, TMG or both as input. resultsAnalysis_exp2.m: Analysis of the results of experiment 2 obtained by running MLmethods_{sEMG,TMG,multimodal}_exp2.m. resultsVisualisation_exp2.m: Visualisation of data from TMG and sEMG for each finger and wrist movement. Animation to show the performance of the prediction using different inputs and different models. **************************************************************************************** Results of the different Matlab files are saved in results/ when the code are runs. Plots are saved in graphs/.