This repository contains code for analyzing Electromyography (EMG) signals and other motion sensors to predict gait parameters to apply to the control of lower limb prostheses. The project includes several processing and machine learning techniques to filter and extract meaningful features from the signals, and then use these features to predict gait parameters.
- Clone this repository:
git clone https://github.com/intel-comp-saude-ufes/2024-1-P1-prediction-of-gait-parameters-for-lower-limb-prostheses-with-volitional-control cd 2024-1-P1-prediction-of-gait-parameters-for-lower-limb-prostheses-with-volitional-control
- Install the required Python packages:
pip install -r requirements.txt
The data used in this project consists of the folders Angles, EMG envelope, GRF and Torques, each containing 10 recordings of a 10 meter walk (T1.txt ~ T10.txt, in which each of these files can be seen as a gait cycle). A brief explanation of each data is given below:
Angles
: Angle of the pelvis, hip, knee and ankle, in all axesEMG Envelope
: Enveloped EMG signal from the vastus lateralis, biceps femoris, tibialis anterior and lateral gastrocnemius musclesGRF
: Ground reaction forces in all axesTorques
: Torque of the pelvis, hip, knee and ankle, in all axes
Also is a file for each participant:
Metadata.txt
: Describe some physical characteristics of the participant
These physical characteristics of each participant are summarized in the following table:
You can adjust the main program to train whatever model you want using any inputs and outputs. To run the main program, use the following command:
python main.py
The cross_val_files
and cross_val_participants
scripts processes the data dynamically. You can choose how many files between T1.txt ~ T10.txt (or participantes between P1 ~ P16) you want to use as test and it will cross-validate, generating an average of the metrics at the end. This preserves the temporal relationship between data, which is important for the model to learn the gait cycle. To run the scripts, use the following command:
python cross_val_files.py
python cross_val_participants.py
In this section, the performance of each of the presented models was evaluated when subjected to different types of input and output data, as well as the changes observed during the variations of the testing processes. These results can be seen in Tables below. The performance metric used to compare the models was
The results of the project are summarized in the following figures, where the graph on the right is the comparison between the value predicted by the model with the best result (highest
A video sumarizing the hole project can be found here.
The full article about this project can be found here.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Special thanks to the Andre Georghton Cardoso Pacheco for giving the opportunity to make this project happen.