This repository provides a set of tools and demonstrations for working with electromyography (EMG) data collected using Intan systems. It includes scripts for data preprocessing, feature extraction, machine learning (ML) model training, and real-time classification. These tools are designed to facilitate gesture recognition from sEMG signals, which can be applied in prosthetics, robotics, and neuromuscular research.
Code was written and tested using Windows 11, Python 3.10.
3D_printed_arm_control
- Hardware and software resources for robot arm control using microcontroller supporting CircuitPython.realtime_decoder
- Perform inference on an EMG signal in real-time using a trained model.gesture_classifier
- Scripts for training and testing machine learning models for gesture classification.utilities
- Helper functions for data preprocessing, feature extraction, and model evaluation.
-
It is recommended to use a virtual environment to manage dependencies. To create a new virtual environment with anaconda, use the following command:
conda create -n intan python=3.10 conda activate intan
-
Download the repository using git:
git clone https://github.com/Neuro-Mechatronics-Interfaces/Python_Intan.git cd Intan_EMG_Python
-
To install dependencies, use the provided requirements file:
pip install -r requirements.txt
A demo script in the main directory shows a quick example of opening and plotting EMG waveforms from a .rhd file. Run the following command:
python load_rhd_demo.py
- Add support for other classifiers
- Expand feature extraction to support CNN architectures.
- Add support for real-time classification using the trained models.
- Integrate with the Intan RHX system via TCP for real-time data streaming.
- Integrate support for sending serial commands to operate robot arm in realtime.
- Refine realtime classification to include a GUI for visualizing the data.
- Allow downloading of dataset to perform actual training and testing.
- Allow data analysis methods to be used on the dataset.