docs: update README to enhance model overview, configuration, and deployment details
Browse files
README.md
CHANGED
|
@@ -23,57 +23,82 @@ base_model:
|
|
| 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 **
|
| 27 |
-
|
| 28 |
-
##
|
| 29 |
-
* **
|
| 30 |
-
* **
|
| 31 |
-
* **
|
| 32 |
-
* **
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
## ๐ง Model Architecture
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 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
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
### TinyMyo (3.6M Parameters)
|
| 56 |
-
*
|
| 57 |
-
* **Energy Consumption:** 44.91 mJ
|
| 58 |
-
* **Power Envelope:** 57.18 mW
|
| 59 |
|
| 60 |
-
###
|
| 61 |
-
*
|
| 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 |
-
|
| 72 |
|
| 73 |
```bash
|
| 74 |
python run_train.py +experiment=TinyMyo_finetune pretrained_safetensors_path={*.safetensors}
|
| 75 |
```
|
| 76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
## ๐ License & Citation
|
| 78 |
This model is licensed under **CC BY-ND 4.0**. If you find TinyMyo useful in your research, please cite our paper:
|
| 79 |
|
|
@@ -84,6 +109,7 @@ This model is licensed under **CC BY-ND 4.0**. If you find TinyMyo useful in you
|
|
| 84 |
year={2026},
|
| 85 |
eprint={2512.15729},
|
| 86 |
archivePrefix={arXiv},
|
| 87 |
-
primaryClass={eess.SP}
|
|
|
|
| 88 |
}
|
| 89 |
-
```
|
|
|
|
| 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 **TinyssimoMyo**) 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 |
+
## โ๏ธ Model Configuration
|
| 29 |
+
* **Base model:** 8-layer bidirectional Transformer encoder.
|
| 30 |
+
* **TinyssimoMyo:** 4-layer compact variant.
|
| 31 |
+
* **Embedding dimension:** 192.
|
| 32 |
+
* **Attention heads:** 3.
|
| 33 |
+
* **Temporal patch size:** 20 samples.
|
| 34 |
+
* **Default input:** 16 channels ร 1000 samples.
|
| 35 |
+
* **Maximum channels:** 16.
|
| 36 |
+
* **Tokenization:** Channel-independent patching with 50 temporal patches per channel and 800 tokens for the default input.
|
| 37 |
+
* **Position encoding:** Rotary Position Embeddings (RoPE), with temporal positions reset for each channel.
|
| 38 |
+
* **Training objective:** Self-supervised masked patch reconstruction.
|
| 39 |
|
| 40 |
## ๐ง Model Architecture
|
| 41 |
+
TinyMyo uses channel-independent patch embeddings followed by a bidirectional
|
| 42 |
+
Transformer encoder. Tokens are ordered channel-major, while RoPE positions reset
|
| 43 |
+
for each channel so flattening does not introduce a false temporal distance between
|
| 44 |
+
channels. The learned channel embedding identifies a channel slot; it does not
|
| 45 |
+
encode physical electrode coordinates.
|
| 46 |
+
|
| 47 |
+
For deployment, the family can be paired with offline liveness analysis,
|
| 48 |
+
multi-level memory tiling, and INT8 fixed-point execution. See the paper and model
|
| 49 |
+
card for deployment measurements.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
## โก Deployment (GAP9 MCU)
|
| 52 |
+
TinyMyo is designed for resource-constrained deployment on platforms such as the
|
| 53 |
+
GAP9 MCU. The repository does not treat deployment measurements as model
|
| 54 |
+
configuration; see the [paper](https://arxiv.org/abs/2512.15729) and the
|
| 55 |
+
[Hugging Face model card](https://huggingface.co/PulpBio/TinyMyo) for current results.
|
| 56 |
|
| 57 |
### TinyMyo (3.6M Parameters)
|
| 58 |
+
* 8-layer encoder configuration.
|
|
|
|
|
|
|
| 59 |
|
| 60 |
+
### TinyssimoMyo (1.9M Parameters)
|
| 61 |
+
* 4-layer compact configuration.
|
|
|
|
| 62 |
|
| 63 |
## ๐ ๏ธ Getting Started
|
| 64 |
+
TinyMyo is part of the [BioFoundation](https://github.com/pulp-bio/BioFoundation) ecosystem.
|
| 65 |
|
| 66 |
### Prerequisites
|
| 67 |
Install the required dependencies from the [BioFoundation repository](https://github.com/pulp-bio/BioFoundation).
|
| 68 |
|
| 69 |
### Loading & Fine-tuning
|
| 70 |
+
Fine-tune a pretrained checkpoint using the BioFoundation training entry point:
|
| 71 |
|
| 72 |
```bash
|
| 73 |
python run_train.py +experiment=TinyMyo_finetune pretrained_safetensors_path={*.safetensors}
|
| 74 |
```
|
| 75 |
|
| 76 |
+
Available checkpoint groups include pretraining, DB5, EPN-612, UCI EMG, and DB8.
|
| 77 |
+
Use the matching configuration and checkpoint for each task. The released
|
| 78 |
+
classification labels are:
|
| 79 |
+
|
| 80 |
+
| Dataset | Input channels | Classes | Label convention | Checkpoint |
|
| 81 |
+
| :--- | ---: | ---: | :--- | :--- |
|
| 82 |
+
| NinaPro DB5 | 16 | 53 | 52 gestures + resting | `DB5/DB5_finetune_5sec.safetensors` |
|
| 83 |
+
| EPN-612 | 8 | 6 | 5 gestures + hand relaxed | `EPN612/EPN_finetune_5sec.safetensors` |
|
| 84 |
+
| UCI EMG | 8 | 6 | Dataset-specific six-class gesture labels | `UCI_EMG/UCI_finetune_5sec.safetensors` |
|
| 85 |
+
| NinaPro DB8 | 16 | 5 | Regression outputs | `DB8/DB8_finetune_500ms.safetensors` |
|
| 86 |
+
|
| 87 |
+
The model configuration must match the checkpoint, especially `in_chans`,
|
| 88 |
+
`num_classes`, and `task`. The built-in BioFoundation `TinyMyo_finetune`
|
| 89 |
+
experiment currently points to UCI EMG data and can be launched from a
|
| 90 |
+
BioFoundation checkout with:
|
| 91 |
+
|
| 92 |
+
```bash
|
| 93 |
+
python -u run_train.py +experiment=TinyMyo_finetune \
|
| 94 |
+
model.in_chans=8 \
|
| 95 |
+
pretrained_safetensors_path=/absolute/path/to/TinyMyo/UCI_EMG/UCI_finetune_5sec.safetensors
|
| 96 |
+
```
|
| 97 |
+
|
| 98 |
+
DB5, EPN-612, and DB8 require matching dataset-specific data-module settings
|
| 99 |
+
in BioFoundation before training. Benchmark results
|
| 100 |
+
and the latest experimental protocols are maintained in the paper and model card.
|
| 101 |
+
|
| 102 |
## ๐ License & Citation
|
| 103 |
This model is licensed under **CC BY-ND 4.0**. If you find TinyMyo useful in your research, please cite our paper:
|
| 104 |
|
|
|
|
| 109 |
year={2026},
|
| 110 |
eprint={2512.15729},
|
| 111 |
archivePrefix={arXiv},
|
| 112 |
+
primaryClass={eess.SP},
|
| 113 |
+
url={https://arxiv.org/abs/2512.15729},
|
| 114 |
}
|
| 115 |
+
```
|