bruAristimunha's picture
Upload folder using huggingface_hub
5f96d69 verified
|
Raw
History Blame Contribute Delete
3.67 kB
---
license: bsd-3-clause
library_name: braindecode
pipeline_tag: feature-extraction
tags:
- eeg
- biosignal
- pytorch
- neuroscience
- eeg-dino
- foundation-model
- self-supervised
- self-distillation
- braindecode
- model_hub_mixin
- pytorch_model_hub_mixin
---
# EEG-DINO Medium — Self-Distillation EEG Foundation Model
EEG-DINO-Medium encoder (~33M parameters) pretrained with DINO-v2 hierarchical self-distillation (Wang et al., MICCAI 2025).
This is the **eegdino-medium-pretrained** checkpoint for `braindecode.models.EEGDINO`,
curated and re-uploaded as part of the
[OpenEEG-Bench](https://huggingface.co/spaces/braindecode/OpenEEGBench) effort.
## Quick start
```bash
pip install braindecode[hub]
```
```python
from braindecode.models import EEGDINO
model = EEGDINO.from_pretrained(
"braindecode/eegdino-medium-pretrained",
n_outputs=2, # set to your downstream task
n_chans=19,
sfreq=200,
)
```
`from_pretrained` reads both the architecture configuration (`config.json`)
and the weights (`model.safetensors` or `pytorch_model.bin`) and returns a
ready-to-fine-tune `nn.Module`.
## Model details
| | |
|---|---|
| Architecture | `braindecode.models.EEGDINO` |
| Expected channels | 19 |
| Expected sampling frequency | 200 Hz |
| Library | [braindecode](https://github.com/braindecode/braindecode) ≥ 1.5 |
| Loaded via | `huggingface_hub.PyTorchModelHubMixin` (free with `braindecode[hub]`) |
For the full architecture description, parameter table, and references,
see the rendered docstring at
<https://braindecode.org/stable/generated/braindecode.models.EEGDINO.html>
or in the interactive
[Model Explorer Space](https://huggingface.co/spaces/braindecode/model-explorer).
## Training data
Temple University Hospital EEG Corpus (TUEG), 19 common 10-20 channels resampled to 200 Hz (>9000 hours), following CBraMod's preprocessing. Pretrained by hierarchical self-distillation.
## Intended use
Larger EEG-DINO encoder for feature extraction or fine-tuning; the architecture is restored from config.json on load. The classification head is re-initialized on load.
## Limitations
- **Channel layout matters.** Performance degrades when the input montage
differs from the pretraining montage. Use the `Interpolated*` variant
(where available) or resample channels with MNE before fine-tuning.
- **Sampling rate matters.** Resample your data to 200 Hz before
inference; the positional / patch embeddings assume this rate.
- **Inherited license restrictions.** Downstream weights derived from
this checkpoint inherit the license of the original training corpus
(some braindecode pretraining corpora are CC-BY-NC). Verify the
upstream dataset licence before commercial use.
## Citation
If you use this checkpoint, please cite both the original architecture
paper and braindecode.
```bibtex
@inproceedings{wang2025eegdino,
title = {{EEG-DINO}: Learning {EEG} Foundation Models via Hierarchical
Self-Distillation},
author = {Wang, Xujia and Liu, Xuhui and Liu, Xi and Si, Qian and Xu,
Zhaoliang and Li, Yang and Zhen, Xiantong},
booktitle = {Medical Image Computing and Computer Assisted Intervention (MICCAI)},
year = {2025},
}
@article{aristimunha2025braindecode,
title = {Braindecode: a deep learning library for raw electrophysiological data},
author = {Aristimunha, Bruno and others},
journal = {Zenodo},
year = {2025},
doi = {10.5281/zenodo.17699192},
}
```
## License
BSD-3-Clause for the model code (matching braindecode).
The pretraining data may impose additional restrictions — see *Limitations*.