Update README.md
Browse files
README.md
CHANGED
|
@@ -6,6 +6,8 @@ tags:
|
|
| 6 |
- emg
|
| 7 |
- bio-signals
|
| 8 |
- foundation-model
|
|
|
|
|
|
|
| 9 |
---
|
| 10 |
|
| 11 |
# TinyMyo: Tiny Foundation Model for EMG Signal Processing
|
|
@@ -21,44 +23,51 @@ tags:
|
|
| 21 |
</p>
|
| 22 |
|
| 23 |
## ๐ Overview
|
| 24 |
-
**TinyMyo** is a lightweight
|
| 25 |
|
| 26 |
## ๐ Key Highlights
|
| 27 |
* **Generalist Foundation:** Pre-trained on a massive, heterogeneous corpus of >480 GB of EMG data (NinaPro DB6/7, EMG2Pose) using self-supervised masked reconstruction.
|
| 28 |
-
* **Edge-Ready:** The first EMG foundation model demonstrated on an ultra-low-power MCU (GAP9).
|
| 29 |
-
* **Highly Efficient:** Just 3.6M parameters, ensuring low latency and high energy efficiency (
|
| 30 |
* **Versatile:** Achieves state-of-the-art (SoA) performance across hand gesture classification, kinematic regression, and speech processing.
|
| 31 |
|
| 32 |
## ๐ง Model Architecture
|
| 33 |
-
* **Core:** 8-layer bidirectional Transformer encoder.
|
| 34 |
* **Embeddings:** 192-dimensional latent space with 3 attention heads.
|
| 35 |
-
* **Tokenization:** Channel-independent patching (20 samples per patch) utilizing Rotary Position Embeddings (RoPE) to preserve temporal alignment across channels.
|
| 36 |
-
* **Deployment:** Optimized via multi-level tiling and INT8 quantization for
|
| 37 |
|
| 38 |
## ๐ Performance Benchmarks
|
| 39 |
|
| 40 |
| Task | Dataset | Metric | TinyMyo Result |
|
| 41 |
| :--- | :--- | :--- | :--- |
|
| 42 |
-
| **Gesture Classification** | NinaPro DB5 | Accuracy | **
|
| 43 |
-
| **Gesture Classification** | EPN-612 | Accuracy | **96.
|
| 44 |
-
| **Gesture Classification** | UCI EMG | Accuracy | **97.
|
| 45 |
-
| **
|
|
|
|
| 46 |
| **Speech Synthesis** | Gaddy | WER | **33.54%** |
|
| 47 |
| **Speech Recognition** | Gaddy | WER | **33.95%** |
|
| 48 |
|
| 49 |
## โก Deployment (GAP9 MCU)
|
| 50 |
-
TinyMyo bridges the gap between high-performance deep learning and wearable constraints:
|
| 51 |
-
|
|
|
|
|
|
|
| 52 |
* **Energy Consumption:** 44.91 mJ
|
| 53 |
* **Power Envelope:** 57.18 mW
|
| 54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
## ๐ ๏ธ Getting Started
|
| 56 |
-
TinyMyo is part of the
|
| 57 |
|
| 58 |
### Prerequisites
|
| 59 |
Install the required dependencies from the [BioFoundation repository](https://github.com/pulp-bio/BioFoundation).
|
| 60 |
|
| 61 |
-
### Fine-tuning
|
| 62 |
You can easily fine-tune the pre-trained weights for your specific task:
|
| 63 |
|
| 64 |
```bash
|
|
@@ -77,4 +86,4 @@ This model is licensed under **CC BY-ND 4.0**. If you find TinyMyo useful in you
|
|
| 77 |
archivePrefix={arXiv},
|
| 78 |
primaryClass={eess.SP}
|
| 79 |
}
|
| 80 |
-
```
|
|
|
|
| 6 |
- emg
|
| 7 |
- bio-signals
|
| 8 |
- foundation-model
|
| 9 |
+
base_model:
|
| 10 |
+
- PulpBio/TinyMyo
|
| 11 |
---
|
| 12 |
|
| 13 |
# TinyMyo: Tiny Foundation Model for EMG Signal Processing
|
|
|
|
| 23 |
</p>
|
| 24 |
|
| 25 |
## ๐ Overview
|
| 26 |
+
**TinyMyo** is a lightweight, Transformer-based foundation model designed specifically for surface electromyography (sEMG) signal processing. Unlike large-scale models, the TinyMyo family (including the 3.6M parameter base model and the ultra-compact 1.9M parameter **TinyissimoMyo**) is purpose-built for **ultra-low-power edge deployment**. It enables real-time motor intent decoding, neuromuscular assessment, and human-machine interaction directly on microcontrollers like the GAP9.
|
| 27 |
|
| 28 |
## ๐ Key Highlights
|
| 29 |
* **Generalist Foundation:** Pre-trained on a massive, heterogeneous corpus of >480 GB of EMG data (NinaPro DB6/7, EMG2Pose) using self-supervised masked reconstruction.
|
| 30 |
+
* **Edge-Ready:** The first EMG foundation model demonstrated on an ultra-low-power MCU (GAP9), achieving sub-100ms inference for real-time applications.
|
| 31 |
+
* **Highly Efficient:** Just 3.6M parameters (1.9M for TinyissimoMyo), ensuring low latency and high energy efficiency (~45 mJ per inference).
|
| 32 |
* **Versatile:** Achieves state-of-the-art (SoA) performance across hand gesture classification, kinematic regression, and speech processing.
|
| 33 |
|
| 34 |
## ๐ง Model Architecture
|
| 35 |
+
* **Core:** 8-layer bidirectional Transformer encoder (4-layer for TinyissimoMyo).
|
| 36 |
* **Embeddings:** 192-dimensional latent space with 3 attention heads.
|
| 37 |
+
* **Tokenization:** Channel-independent patching (20 samples per patch) utilizing Rotary Position Embeddings (RoPE) to preserve temporal alignment across channels without spurious cross-channel ordering.
|
| 38 |
+
* **Deployment:** Optimized via offline liveness analysis, multi-level memory tiling, and INT8 fixed-point quantization for resource-constrained hardware execution.
|
| 39 |
|
| 40 |
## ๐ Performance Benchmarks
|
| 41 |
|
| 42 |
| Task | Dataset | Metric | TinyMyo Result |
|
| 43 |
| :--- | :--- | :--- | :--- |
|
| 44 |
+
| **Gesture Classification** | NinaPro DB5 | Accuracy | **87.98%** |
|
| 45 |
+
| **Gesture Classification** | EPN-612 | Accuracy | **96.57%** |
|
| 46 |
+
| **Gesture Classification** | UCI EMG | Accuracy | **97.10%** |
|
| 47 |
+
| **Gesture Classification** | Generic Neuromotor Interface | CLER | **0.142** |
|
| 48 |
+
| **Kinematic Regression** | NinaPro DB8 | MAE | **8.8ยฐ** |
|
| 49 |
| **Speech Synthesis** | Gaddy | WER | **33.54%** |
|
| 50 |
| **Speech Recognition** | Gaddy | WER | **33.95%** |
|
| 51 |
|
| 52 |
## โก Deployment (GAP9 MCU)
|
| 53 |
+
TinyMyo bridges the gap between high-performance deep learning and stringent wearable constraints. We provide two variants to balance the accuracy-latency trade-off:
|
| 54 |
+
|
| 55 |
+
### TinyMyo (3.6M Parameters)
|
| 56 |
+
* **Inference Time (5s window):** 0.785 s
|
| 57 |
* **Energy Consumption:** 44.91 mJ
|
| 58 |
* **Power Envelope:** 57.18 mW
|
| 59 |
|
| 60 |
+
### TinyissimoMyo (1.9M Parameters)
|
| 61 |
+
* **Inference Time (5s window):** 0.496 s
|
| 62 |
+
* **Inference Time (1s window):** **0.089 s** *(Sub-100ms regime, ideal for real-time prosthetic control)*
|
| 63 |
+
|
| 64 |
## ๐ ๏ธ Getting Started
|
| 65 |
+
TinyMyo is part of the[BioFoundation](https://github.com/pulp-bio/BioFoundation) ecosystem.
|
| 66 |
|
| 67 |
### Prerequisites
|
| 68 |
Install the required dependencies from the [BioFoundation repository](https://github.com/pulp-bio/BioFoundation).
|
| 69 |
|
| 70 |
+
### Loading & Fine-tuning
|
| 71 |
You can easily fine-tune the pre-trained weights for your specific task:
|
| 72 |
|
| 73 |
```bash
|
|
|
|
| 86 |
archivePrefix={arXiv},
|
| 87 |
primaryClass={eess.SP}
|
| 88 |
}
|
| 89 |
+
```
|