English
tinymyo
emg
bio-signals
foundation-model

TinyMyo: Tiny Foundation Model for EMG Signal Processing

TinyMyo Logo

Github License Paper

πŸ“– Overview

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.

βš™οΈ Model Configuration

  • Base model: 8-layer bidirectional Transformer encoder.
  • TinyssimoMyo: 4-layer compact variant.
  • Embedding dimension: 192.
  • Attention heads: 3.
  • Temporal patch size: 20 samples.
  • Default input: 16 channels Γ— 1000 samples.
  • Maximum channels: 16.
  • Tokenization: Channel-independent patching with 50 temporal patches per channel and 800 tokens for the default input.
  • Position encoding: Rotary Position Embeddings (RoPE), with temporal positions reset for each channel.
  • Training objective: Self-supervised masked patch reconstruction.

🧠 Model Architecture

TinyMyo uses channel-independent patch embeddings followed by a bidirectional Transformer encoder. Tokens are ordered channel-major, while RoPE positions reset for each channel so flattening does not introduce a false temporal distance between channels. The learned channel embedding identifies a channel slot; it does not encode physical electrode coordinates.

For deployment, the family can be paired with offline liveness analysis, multi-level memory tiling, and INT8 fixed-point execution. See the paper and model card for deployment measurements.

⚑ Deployment (GAP9 MCU)

TinyMyo is designed for resource-constrained deployment on platforms such as the GAP9 MCU. The repository does not treat deployment measurements as model configuration; see the paper and the Hugging Face model card for current results.

TinyMyo (3.6M Parameters)

  • 8-layer encoder configuration.

TinyssimoMyo (1.9M Parameters)

  • 4-layer compact configuration.

πŸ› οΈ Getting Started

TinyMyo is part of the BioFoundation ecosystem.

Prerequisites

Install the required dependencies from the BioFoundation repository.

Loading & Fine-tuning

Fine-tune a pretrained checkpoint using the BioFoundation training entry point:

python run_train.py +experiment=TinyMyo_finetune pretrained_safetensors_path={*.safetensors}

Available checkpoint groups include pretraining, DB5, EPN-612, UCI EMG, and DB8. Use the matching configuration and checkpoint for each task. The released classification labels are:

Dataset Input channels Classes Label convention Checkpoint
NinaPro DB5 16 53 52 gestures + resting DB5/DB5_finetune_5sec.safetensors
EPN-612 8 6 5 gestures + hand relaxed EPN612/EPN_finetune_5sec.safetensors
UCI EMG 8 6 Dataset-specific six-class gesture labels UCI_EMG/UCI_finetune_5sec.safetensors
NinaPro DB8 16 5 Regression outputs DB8/DB8_finetune_500ms.safetensors

The model configuration must match the checkpoint, especially in_chans, num_classes, and task. The built-in BioFoundation TinyMyo_finetune experiment currently points to UCI EMG data and can be launched from a BioFoundation checkout with:

python -u run_train.py +experiment=TinyMyo_finetune \
  model.in_chans=8 \
  pretrained_safetensors_path=/absolute/path/to/TinyMyo/UCI_EMG/UCI_finetune_5sec.safetensors

DB5, EPN-612, and DB8 require matching dataset-specific data-module settings in BioFoundation before training. Benchmark results and the latest experimental protocols are maintained in the paper and model card.

πŸ“œ License & Citation

This model is licensed under CC BY-ND 4.0. If you find TinyMyo useful in your research, please cite our paper:

@misc{fasulo2026tinymyotinyfoundationmodel,
      title={TinyMyo: a Tiny Foundation Model for Flexible EMG Signal Processing at the Edge},
      author={Matteo Fasulo and Giusy Spacone and Thorir Mar Ingolfsson and Yawei Li and Luca Benini and Andrea Cossettini},
      year={2026},
      eprint={2512.15729},
      archivePrefix={arXiv},
      primaryClass={eess.SP},
      url={https://arxiv.org/abs/2512.15729},
}
Downloads last month
39
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for PulpBio/TinyMyo

Unable to build the model tree, the base model loops to the model itself. Learn more.

Collection including PulpBio/TinyMyo

Paper for PulpBio/TinyMyo