SAVRN
Search Contact SAVRN

Open-weight model

semg-intent-restoration-pipeline

by Jorge Ortiz Ceballos ocjorge/semg-intent-restoration-pipeline

semg-intent-restoration-pipeline is an open-weight model from Jorge Ortiz Ceballos, released under Creative Commons Attribution 4.0. Its published files total 465.2 KB.

Three chained PyTorch models (plus one exploratory variant) implementing the Each 200 ms / 400-sample sEMG window (2000 Hz, single channel, MyoWare-compatible) is routed through: intent detection → quality assessment → (optional) restoration.

Parameters
Context
Weights454.9 KB
Licensecc-by-4.0
AccessOpen weights
Monthly Downloads

Model Card

By Jorge Ortiz Ceballos, published under cc-by-4.0, revision 9461cc139ff8.

Three chained PyTorch models (plus one exploratory variant) implementing the Each 200 ms / 400-sample sEMG window (2000 Hz, single channel, MyoWare-compatible) is routed through: intent detection → quality assessment → (optional) restoration. Operating thresholds (τintent = 0.40, τquality = 0.50) were selected via grid search on the validation split only, and evaluated once on a held-out test split. If you want to reproduce the pipeline exactly as described in Section 4.7 and Figure 1 of the paper, use only the first three files. The task-aware variant is a separate experiment reported transparently as a limitation, not a replacement for restorerbest.pt — see the "Downstream Motor-Intent…

Read Jorge Ortiz Ceballos's full model card

sEMG Adaptive Intent Detection & Restoration Pipeline

Three chained PyTorch models (plus one exploratory variant) implementing the sEMG processing pipeline described in:

Ortiz Ceballos, J.; Abundez Barrera, I.M.; Rendón-Lara, E. Gestural Intent Detection and Adaptive Restoration of Degraded sEMG Signals Using Temporal Convolutional Networks and an Autoencoder. Symmetry 2026, 18, 1540. https://doi.org/10.3390/sym18091540

Each 200 ms / 400-sample sEMG window (2000 Hz, single channel, MyoWare-compatible) is routed through: intent detection → quality assessment → (optional) restoration.

Pipeline overview

raw sEMG window (1, 400)
        │
        ▼
 Intent Classifier ──► p_intent < 0.40? ──► DISCARD
        │ (≥ 0.40)
        ▼
 Quality Assessor ──► quality ≥ 0.50? ──► DIRECT PASS
        │ (< 0.50)
        ▼
 Convolutional Autoencoder ──► RESTORED WINDOW

Operating thresholds (τ_intent = 0.40, τ_quality = 0.50) were selected via grid search on the validation split only, and evaluated once on a held-out test split.

Models in this repository

File Role Used for
intent_binary_best.pt Motor-intent classifier (dilated TCN) Main pipeline — all reported results
quality_judge_best.pt Dual-output signal-quality assessor Main pipeline — all reported results
restorer_best.pt Convolutional autoencoder (restoration) Main pipeline — Table 3, Figures 4–7, latency (Sec. 4.9), and the "Restored (original autoencoder)" row of Table 4
restorer_taskaware_best.pt Convolutional autoencoder, retrained with a task-aware loss term Exploratory, post hoc only — the "Restored (task-aware retraining)" row of Table 4, added in response to a downstream-evaluation request during peer review. Not part of the main reported pipeline.

If you want to reproduce the pipeline exactly as described in Section 4.7 and Figure 1 of the paper, use only the first three files. The task-aware variant is a separate experiment reported transparently as a limitation, not a replacement for restorer_best.pt — see the "Downstream Motor-Intent Classification" section and Table 4 of the paper for full context (restoration, including the task-aware variant, did not outperform using the degraded signal directly for downstream intent classification).

Architectures

1. Intent Classifier — intent_binary_best.pt

  • Input: (1, 400) normalized window
  • Conv1D (16 filters, kernel 7) → 3× TCN blocks with dilations 1, 2, 4 (residual connections; channel progression 16→16→32→32)
  • Global average pooling → 2 dense layers with dropout → sigmoid
  • Output: scalar intent probability ∈ [0, 1]
  • Loss: binary cross-entropy with positive-class weighting
  • Optimizer: Adam, lr = 1e-3, L2 = 1e-4
  • Early stopping: 5 epochs without improvement in 0.6·F1 + 0.4·AUROC

2. Signal-Quality Assessor — quality_judge_best.pt

  • Input: (1, 400) normalized window
  • 3× (Conv + BatchNorm + ReLU + MaxPool) → global average pooling → dense(32)
  • Two output branches: continuous quality score ∈ [0, 1] (sigmoid) and a binary acceptability label (auxiliary task, not used at inference)
  • Loss: 0.7 · MSE (score) + 0.3 · BCE (label)

3. Convolutional Autoencoder (restoration) — restorer_best.pt

  • Encoder: 3× strided Conv (stride 2), 400 → 200 → 100 → 50
  • Bottleneck: Conv(64, kernel 3)
  • Decoder: 3× transposed Conv (expansion factor 2), 50 → 100 → 200 → 400
  • Loss: 0.7 · MAE + 0.3 · MSE
  • Trained only on windows with intent = 1

4. Convolutional Autoencoder, task-aware — restorer_taskaware_best.pt

  • Identical architecture to restorer_best.pt
  • Additional frozen intent-classifier term during training: total loss = reconstruction loss + 2.0 × task_loss, where task_loss penalizes divergence between the frozen intent classifier's prediction on the restored signal vs. on the clean signal

Training data

  • NinaPro DB1, DB3, DB10 (public dataset, http://ninapro.hevs.ch/)
  • 410 source recordings reduced to a single channel (per-sample median, emulating a MyoWare sensor), normalized with median/MAD
  • Participant-level split (no window-level leakage): 278 recordings / 59 participants (train), 67 recordings / 13 participants (validation), 65 recordings / 13 participants (test)
  • Synthetic corruption (Gaussian noise, sinusoidal drift, saturation, transient spikes) used to train the quality assessor and the restorer

Reported metrics (held-out test split)

Downstream motor-intent classification (frozen intent classifier evaluated on 4 signal versions, n = 198,348 windows, 120,418 positive):

Signal version Sensitivity Precision F1 AUROC
Degraded (no restoration) 0.7896 0.8817 0.8331 0.8860
Restored (restorer_best.pt) 0.6723 0.8639 0.7561 0.8215
Restored (restorer_taskaware_best.pt) 0.6884 0.8666 0.7673 0.8316
Clean reference 0.7041 0.8692 0.7780 0.8354

Inference latency (host CPU, per 400-sample window): 3.71 ms (p50), 5.29 ms (p90), 10.79 ms (p95), 15.18 ms (p99) — all well under the 200 ms window period.

Usage

import torch

# Define the same architectures used in training (see paper Sec. 4.7 / Fig. 3)
# from your_module import IntentTCN, QualityNet, ConvAE1D

device = "cuda" if torch.cuda.is_available() else "cpu"

intent_model = IntentTCN().to(device)
intent_model.load_state_dict(torch.load("intent_binary_best.pt", map_location=device))
intent_model.eval()

quality_model = QualityNet().to(device)
quality_model.load_state_dict(torch.load("quality_judge_best.pt", map_location=device))
quality_model.eval()

restorer_model = ConvAE1D().to(device)
restorer_model.load_state_dict(torch.load("restorer_best.pt", map_location=device))
restorer_model.eval()

# x: torch.Tensor of shape (batch, 1, 400), median/MAD-normalized sEMG window
p_intent = torch.sigmoid(intent_model(x))
quality_score = quality_model(x)["quality_score"]  # adjust to your actual output signature
x_restored = restorer_model(x)

Note: the class definitions (IntentTCN, QualityNet, ConvAE1D) are not included as a package in this repository — only the trained weights. See the accompanying source code: https://github.com/ocjorge/SignalReconstructionFilter

Limitations

  • Signal-level fidelity improvements from restoration (SNR, MAE, correlation) did not translate into improved downstream motor-intent classification; restoration reduced sensitivity relative to using the degraded signal directly, and task-aware retraining only partially recovered this gap.
  • The task-aware evaluation (Table 4) is a post hoc, exploratory analysis reusing the same held-out test split after observing the initial downstream degradation — it does not constitute an independent evaluation of the task-aware approach.
  • Real-participant (amputee) evaluation is pilot-scale (n = 2); results should not be read as statistically generalizable.
  • For real (non-synthetic) recordings, no independent clean reference exists, so reconstruction metrics on those recordings measure how much restoration changes the signal, not verified improvement toward ground truth.

License

Model weights released under CC BY 4.0, matching the paper's license. Change this if you'd prefer a different license (e.g. MIT, Apache-2.0) — just make sure the license file/tag in this repo matches what you actually intend.

Citation

@article{ortizceballos2026gestural,
  title   = {Gestural Intent Detection and Adaptive Restoration of Degraded sEMG Signals Using Temporal Convolutional Networks and an Autoencoder},
  author  = {Ortiz Ceballos, Jorge and Abundez Barrera, Itzel Mar{\'i}a and Rend{\'o}n-Lara, Er{\'e}ndira},
  journal = {Symmetry},
  volume  = {18},
  number  = {9},
  pages   = {1540},
  year    = {2026},
  publisher = {MDPI},
  doi     = {10.3390/sym18091540},
  url     = {https://doi.org/10.3390/sym18091540}
}

Identity and Version

Repository
ocjorge/semg-intent-restoration-pipeline
Publisher
Jorge Ortiz Ceballos
Task
Not stated by the source
Modality
Other
Library
Not stated by the source
Parameters
Not stated by the source
Languages
Not stated by the source
Revision
9461cc139ff8cb078556d7a6b21ed81eeaf3c0f9
First published
2026-09-20
Last updated
2026-09-20

Files and Weights

7 files, 465.2 KB in total. The weights are 4 files totalling 454.9 KB in pt.

Weights4 files · 454.9 KB
Documentation1 file · 8.3 KB
Other1 file · 500 B
Repository1 file · 1.5 KB
Every file
FileTypeSizeSHA-256
intent_binary_best.ptWeights99.1 KB 447fff5f8ba3
quality_judge_best.ptWeights65.3 KB b3e41288e866
restorer_best.ptWeights144.4 KB dab61d5d2f39
restorer_taskaware_best.ptWeights146.1 KB 04973e36f7ef
README.mdDocumentation8.3 KB
CITATION.bibOther500 B
.gitattributesRepository1.5 KB

License and Download

License
cc-by-4.0
Access
Open weights, no gate
Download size
454.9 KB
Download from Jorge Ortiz Ceballos

Released by Jorge Ortiz Ceballos through its official repository on Hugging Face. Read the license.

Built From

  • Trained on (disclosed) ninapro

Memory Requirements

PrecisionWeights in memory
As published454.9 KB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About semg-intent-restoration-pipeline

Can I use semg-intent-restoration-pipeline commercially?

Yes. semg-intent-restoration-pipeline is released under Creative Commons Attribution 4.0. CC BY 4.0 permits sharing and adapting the work, including commercially, provided the creator is credited and changes are indicated.