A classifier that listens to a stream of EMG data through PyLSL, and publishes classifications back to that stream. It is designed for left-right movements with EMG recorded on the lower arms.
First install Python using the Microsoft store.
Then, run pip install pipenv to install Pipenv.
After this, pipenv should be added to the path. Where pipenv has been installed will be shown in the output during installation.
Restart cmd and check that pipenv is available by running pipenv
First clone the repository or download as a zip if git is not installed. Then install the dependencies with:
pip install pipenv
pipenv install
pipenv shell
After installation, the system expects a filename with a .gdf file containing EMG collected with OpenVibe. It also expects an available stream of EEG / EMG data.
- Turn on the Biosemi amplified with the battery
- Run OpenVibe and the Acquisition Server
- Select the motor_imagery_acquisiton_Ivo.xdf file in the OpenVibe designer
- Change the path in the GDF File Writer to a location you can access
- Set up the acquisition server to collect 1 EEG channel. Also set the preferences to allow drift correction.
- Run a recording with OpenVibe to collect EMG data. This will take about 2.5 minutes
- Stop the OpenVibe acquisition server
- Run biosemi.exe (search in windows menu)
- Set the subset in biosemi.exe to 32. Don't worry too much about the other settings. Click LINK to start
- Run LabRecorder.exe to see the EEG stream from Biosemi. It will look something like
Biosemi (SOME_CODE) - Copy
.env.templateto.env, there set the file path and setHOST=SOME_CODE - Run
python main.py - Select both the EEG stream and the Prediction stream in LabRecorder and click start.