Real-time EMG gesture classification for assistive human-computer interaction - with an open education platform built on top of the research.
myojam reads surface electromyographic (EMG) signals from forearm muscles and classifies hand gestures in real time, enabling people with motor impairments to control a computer through muscle signals alone.
6 gesture classes: index flex · middle flex · ring flex · pinky flex · thumb flex · fist
Each gesture maps to a computer action: cursor left/right, scroll up/down, left click, spacebar.
| Metric | Value |
|---|---|
| Cross-subject accuracy | 84.85% |
| Training subjects | 10 (Ninapro DB5) |
| EMG channels | 16 surface electrodes |
| Feature vector | 64-dimensional (MAV, RMS, ZC, WL x 16 ch) |
| Classifier | Random Forest (500 trees) |
| Inference latency | < 5 ms |
Evaluated under leave-one-subject-out (LOSO) cross-validation.
EMG Electrodes -> MyoWare 2.0 -> Arduino Uno -> USB Serial
|
FastAPI Backend (signal processing + inference)
|
React Web App <-> macOS Desktop App
| Layer | Technology |
|---|---|
| Signal processing | Python, SciPy, NumPy |
| ML model | scikit-learn Random Forest |
| Backend API | FastAPI (Render) |
| Web frontend | React, Vite, Three.js, OGL (WebGL) |
| Desktop app | PyQt6, Quartz (macOS) |
| Hardware | MyoWare 2.0, Arduino Uno R3 |
All demos run in the browser - no hardware or install required.
| Demo | Description |
|---|---|
| Live Signal | Real-time dataset playback with 3D hand model, confidence bars, and action log |
| Signal Guesser | 5-round game: identify a gesture from real EMG waveforms before the AI does |
| Signal Playground | Draw a waveform with your mouse and watch MAV, RMS, ZC, WL update live |
| Gesture Game | Match target gestures against the clock, three difficulty levels |
| Confusion Explorer | Interactive confusion matrix from the 10-subject test set |
| Frequency Analyzer | Explore the spectral properties of EMG signals |
| Pipeline Explorer | Walk through each stage of the signal processing pipeline with real data |
| MyoCode | A Scratch-like block coding environment triggered by EMG gestures |
11 articles, 3 structured lesson plans (NGSS/AP/IB aligned), and an interactive tool suite for classrooms. No hardware required to teach the concepts.
- EMG Explainer - from motor cortex to gesture prediction
- Why EMG is Hard - noise, placement variability, individual anatomy
- Build Your Own - $68 hardware setup, full wiring guide
- Educator Hub - lesson plans, rubrics, curriculum alignment
Four peer-structured papers published at myojam.com/research:
- Main paper - classifier design, dataset, evaluation methodology
- Classifier Analysis - Random Forest vs SVM vs KNN cross-subject comparison
- Variability Review - sources of cross-subject accuracy loss
- Windowing Analysis - window size vs accuracy vs latency trade-offs
macOS desktop app available from Releases.
Requirements: macOS 12+, Python 3.13, cliclick (brew install cliclick)
pip3 install PyQt6 scipy scikit-learn numpy pyserial
chmod +x run.sh && ./run.shGrant Accessibility permission when prompted (System Settings -> Privacy & Security -> Accessibility).
- Place bipolar EMG electrodes on the forearm flexor muscle belly
- Connect MyoWare 2.0 via Link Shield + TRS cable to Arduino Shield
- Connect Arduino Uno to Mac via USB (laptop on battery power)
- Upload
arduino_sketch/emg_stream.inovia Arduino IDE - Click "Connect sensor" in the app
python3 collect_data.py # record your gestures - 60 samples each
python3 train_my_model.py # trains and saves a personalized modelPer-user calibration improves accuracy significantly. Cross-subject baseline is ~85%; within-session can exceed 95%.
myojam/
|- frontend/ # React web app (Vite + React Router)
| |- src/
| | |- articles/ # long-form education articles
| | |- components/ # reusable UI components
| | \- educators/ # lesson plan pages
| \- public/
|
|- backend/ # FastAPI inference server (Render)
| |- main.py
| \- requirements.txt
|
|- desktop-app/ # PyQt6 macOS application
| |- myojam.py # main app
| |- keywatcher.py # global keyboard listener (Quartz)
| |- collect_data.py # personal EMG data collection
| |- train_my_model.py # model training pipeline
| |- emg_classifier.py # classifier logic
| |- arduino_sketch/ # Arduino firmware (emg_stream.ino)
| \- model/ # trained model files (.pkl)
|
|- data/ # Ninapro DB5 dataset (10 subjects)
| \- DB5_s*/
|
|- model/ # shared model files used by backend
|- scripts/ # development & validation scripts
|- docs/ # brand assets
\- vercel.json # SPA routing config for Vercel
Built by Jaden W. with contributions from Matthew T. and Darren N.
MIT - see LICENSE for details.
© 2025 myojam™

