This is the code explanation for the paper "Explainable deep learning model for EMG based finger angle estimation using attention"

The codes are developed under the following conditions :

  1. Environment: python 3.8.8
  2. Deep learning software: Pytorch 1.8.1

The below explanation covers ALL codes from preparing train,test data to model training and its evaluation

If you want to check whether the codes completely work or not, download the sample data in section [1]Sample data and scrap the following codes.

[1] Preparing data

"[1] preparing data" extract 14 finger angles from a recorded video from an experiment and do data process of EMG raw data obtained from Trigo EMG sensor

[2] Data process Code

"[2]Data process code" takes finger data and EMG data which are obtained from the process [1] and synchronize the start time of finger angle data and EMG data and resample it to 100 HZ

After process[2], the dataset (EMG data, finger data) is fully prepared for training session following section "[3] Define model and train"

[3] Define model and train

"[3]Define model and train" defines three different neural network models (simple neural network, naive encoder+decoder, encoder+decoder with attention)