File size: 6,015 Bytes
dc9d5f6 22f30b1 dc9d5f6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | ---
license: other
library_name: pytorch
tags:
- eeg
- brain-signal
- biosignal
- time-series
- classification
- biomedical-signal-processing
- epilepsy
- interictal-epileptiform-discharge
- neuroscience
- eegpt
- eeg-dino
- braindecode
datasets:
- vEpiSet
base_model:
- braindecode/eegpt-pretrained
- braindecode/eegdino-medium-pretrained
---
# SenuaLab EEG IED Detection
Five patient-independent binary IED checkpoints, aggregate benchmark artifacts,
and an app-ready model pack for
[SenuaLab EEG Annotation Tool](https://github.com/SenuaLab/EEGAnnotationTool).
Training and evaluation use only the public
[vEpiSet](https://doi.org/10.6084/m9.figshare.28069568) dataset.
> **Research use only.** These models are not medical devices and must not be
> used as the sole basis for diagnosis or treatment. Every candidate requires
> review by a qualified EEG professional against the original recording.
> **Privacy.** No private hospital recording, patient identifier, physician
> annotation, local path, or hospital-derived patient result is included. The
> model parameters, public configuration metadata, and aggregate vEpiSet
> results were reviewed before upload.
Source, methodology, and reproducibility documentation:
[github.com/SenuaLab/EEG-IED-Detection](https://github.com/SenuaLab/EEG-IED-Detection)
## Models
| Folder | Model | Params | Rate | Window | Test AUROC | Test AUPRC | Test F1 |
|---|---|---:|---:|---:|---:|---:|---:|
| `iednet_lite` | IEDNet-Lite | 0.25M | 250 Hz | 4 s | 0.8793 | 0.6848 | 0.6372 |
| `resnet_attention` | ResNet-Attention | 4.99M | 250 Hz | 4 s | 0.8998 | 0.7018 | 0.6667 |
| `eegpt` | EEGPT + temporal head | 25.59M | 250 Hz | 4 s | 0.8641 | 0.6532 | 0.6139 |
| `eegpt_linear_probe` | EEGPT linear probe | 25.32M | 250 Hz | 4 s | 0.7519 | 0.3722 | 0.3227 |
| `eegdino_medium` | EEG-DINO Medium | 34.45M | 200 Hz | 4 s | **0.9363** | **0.8020** | **0.7415** |
All test thresholds were selected on validation subjects and then frozen. The
test split contains 3,908 windows from 13 held-out vEpiSet subjects. Results are
single-dataset, four-second window metrics, not prospective clinical claims.
## Files
```text
models/<name>/
βββ model.safetensors # tensor-only weights (preferred)
βββ config.json # reviewed input/provenance/metric contract
pytorch/<name>/
βββ model.pth # sanitized checkpoint for the Python runner
βββ config.json
eegannotationtool/senua_<name>/
βββ model.py # executable architecture adapter
βββ preprocessing.py # released preprocessing contract
βββ model.pth # app-compatible sanitized checkpoint
βββ manifest.json
ensembles/ # validation-selected ensemble definitions
results/ # aggregate benchmark table and figure
MANIFEST.json # SHA-256 and byte size for every release file
```
PyTorch `.pth` is included because the current EEG Annotation Tool model
discovery contract supports `.pth/.pt/.ckpt`. Prefer `safetensors` elsewhere and
load executable/model files only from this official repository.
## Input contract
- 19 standard 10-20 channels in this order:
`Fp1, Fp2, F3, F4, C3, C4, P3, P4, O1, O2, F7, F8, T3, T4, T5, T6, Fz, Cz, Pz`.
- Four-second full windows.
- Fourth-order zero-phase 1-45 Hz Butterworth band-pass.
- Common-average reference across the 19 channels.
- Resampling to the rate listed in the table.
- One global z-score over the complete channel-time window, clipped to `[-8,8]`.
- Binary output order: `[Non-IED, IED]`.
Legacy temporal aliases T7/T8/P7/P8 map to T3/T4/T5/T6.
## Download
```bash
hf download SenuaLab/EEG-IED-Detection \
pytorch/iednet_lite/model.pth \
--local-dir ./weights
```
Or from Python:
```python
from huggingface_hub import hf_hub_download
path = hf_hub_download(
repo_id="SenuaLab/EEG-IED-Detection",
filename="pytorch/iednet_lite/model.pth",
)
```
The source repository runner accepts model short names and handles the download:
```bash
python -m eeg_ied_detector.robust_predict \
--data-dir /path/to/brainvision-recordings \
--model-paths iednet_lite resnet_attention \
--output-dir ./predictions \
--no-label-comparison
```
EEGPT and EEG-DINO require `braindecode[hub]==1.6.1`.
## EEG Annotation Tool
Use the installer from the source repository:
```bash
python scripts/install_eeg_annotation_models.py \
--models iednet_lite resnet_attention
```
IED Finder discovers the installed folders, validates channels and the declared
input contract, and uses the validation-selected threshold as its starting
point. Foundation-model adapters are included but need Braindecode in the
application's Python environment.
## Evaluation limitations
- One public dataset and one fixed internal held-out split.
- No prospective, external multi-center, or medical-device validation.
- Four-second window metrics do not equal continuous event-level sensitivity.
- Performance can shift with montage, hardware, preprocessing, age, disease
mix, artifacts, prevalence, and annotation policy.
- Threshold changes require a prospectively defined validation protocol and
must not use the final evaluation cohort.
- Automated output is a review candidate, never a diagnosis.
## Model and data provenance
- vEpiSet: Lin et al., Scientific Data 12, 229 (2025),
https://doi.org/10.1038/s41597-025-04523-8, CC BY 4.0.
- EEGPT: NeurIPS 2024, upstream code
[BINE022/EEGPT](https://github.com/BINE022/EEGPT), encoder checkpoint
[braindecode/eegpt-pretrained](https://huggingface.co/braindecode/eegpt-pretrained).
- EEG-DINO: MICCAI 2025,
[paper](https://papers.miccai.org/miccai-2025/paper/3347_paper.pdf), encoder
checkpoint
[braindecode/eegdino-medium-pretrained](https://huggingface.co/braindecode/eegdino-medium-pretrained)
at revision `191f73eb50d68a184b4cabb623938df914235d3c`.
See `MODEL_LICENSE.md` for the per-artifact licensing boundary and upstream
conditions.
|