This repository contains two evaluation scripts designed to assess the performance of deep learning models (CNN and CNN-LSTM) for hand gesture recognition (HGR) using electromyographic (EMG) signals over multiple months of data.
Expected dataset organization:
EMG-EPN-612 dataset/
├── Mes0/
│ └── trainingJSON/
│ └── userX.json
├── Mes1/
│ └── trainingJSON/
│ └── userY.json
...
This script evaluates a trained CNN model on all Mes*/trainingJSON folders. For each month and each user, it computes:
- Classification accuracy
- Recognition accuracy
- Overlapping factor
- Average processing time per frame
It generates:
- Per-user performance evolution plots (average of training and validation).
- Global plots across all users.
- Summary tables exported to Excel.
Shared.m– constants and preprocessing functionsevalRecognition.m– metric evaluation- Trained CNN model (
.matfile), e.g.,Models/model_cnn_final.mat
This script evaluates a trained CNN-LSTM model following the same logic as the CNN version. It performs:
- Per-month evaluation (train/validation)
- Per-user performance plots
- Global performance plots
- Excel export of all aggregated metrics
Shared.mevalRecognition.m- Trained CNN-LSTM model (
.matfile), e.g.,ModelsLSTM/model_cnn-lstm_final.mat
For each user and each month:
- Classification Accuracy: correct gesture type prediction
- Recognition Accuracy: correct gesture recognition (including timing)
- Overlapping Factor: alignment accuracy between prediction and ground truth
- Processing Time: average time per spectrogram prediction
-
Console: average + standard deviation metrics per month
-
Figures:
- Per-user evolution of metrics across months
- Global evolution of averages across users
-
Excel file:
Resumen-Metricas-AVG-CNN.xlsx(for CNN)Resultados_CNN-LSTM.xlsx(for CNN-LSTM)
Each file contains four sheets:
ClassificationRecognitionOverlapProcessing_Time
-
Ensure all required files (
Shared.m,evalRecognition.m, model.mat) are on your MATLAB path. -
Set the
baseDataDirandmodelFilevariables if needed. -
Run the corresponding script:
multiFolderEvaluation() % For CNN model multiFolderEvaluation_LSTM() % For CNN-LSTM model
Developed as part of a research project at the Alan Turing Artificial Intelligence Laboratory – Escuela Politécnica Nacional.
This project is for academic and research purposes only. Contact the authors for use in other contexts.