Request access to the EEGDash corpus (prototype)
This repository is publicly accessible, but you have to accept the conditions to access its files and content.
This corpus has no single licence: each dataset keeps its own licence (column license of datasets.parquet, texts in LICENSES/). Datasets in data/noncommercial/ may only be used for non-commercial purposes; datasets in data/sharealike/ require adaptations to be shared under the same licence. Cite the corpus and every dataset you use (CITATION.bib).
Log in or Sign Up to review the conditions and access this dataset content.
EEGDash corpus, preprocessed
Ghazal Mostofi1, Justus Meyer zu Bexten1,2, Aljoscha Geier1, Bogdan Franczyk2,3, Nico Scherf1,2
1 Neural Data Science and Statistical Computing, Max Planck Institute for Human Cognitive and Brain Sciences (MPI CBS), Leipzig
2 Center for Scalable Data Analytics and Artificial Intelligence (ScaDS.AI) Dresden/Leipzig, Leipzig University
3 Faculty of Economics, Leipzig University
DRAFT. TODO (decision): final name, organisation and version; TODO (check): spelling of the affiliations. Items marked TODO need a decision before publishing.
PROTOTYPE. A small subset of the full corpus (551 datasets, 137,812 recordings, 30,766.9 hours), chosen so that it holds every edge case the full corpus has: every licence and licence group, partial datasets, upsampled recordings, unit corrections and doubtful units, duplicates, missing metadata, citation gaps and a dataset split over several shards.
on004395holds only shard-00015.tar, shard-00016.tar of its 17 shards; its row indatasets.parquetcounts these.excluded.csvlists the exclusions of the full corpus.
25 EEG datasets, 9,105 recordings, 1,766.7 hours, converted with one preprocessing recipe from public OpenNeuro and NEMAR datasets listed in the EEGDash catalogue. Whole recordings are stored; cut windows at load time.
Datasets were selected automatically from the EEGDash catalogue by licence and metadata, and checked through automated webscraping. Their resulting metadata was inspected manually, and the pipeline was scrutinised repeatedly with LLM agents from several providers (among others, Claude Opus 5.5, DeepSeek v4.1 Flash, GLM 5.2 Flash). Automated checks (units, duplicates, flat channels, upsampling) mark doubtful recordings in recordings.parquet.
Contents
| file / folder | what |
|---|---|
datasets.parquet |
one row per dataset: licence, citation, DOI, tags, hours, status |
recordings.parquet |
one row per recording: subject, task, channels, quality, shard, checksum |
data/<group>/<dataset>/shard-*.tar |
the data, as a tarball (one per dataset, several for the largest), grouped by licence |
LICENSES/ |
full text of every licence used, and which dataset has which |
CITATION.bib |
BibTeX for the corpus and every dataset |
excluded.csv |
datasets left out, with the reason |
excluded_recordings.csv |
recordings left out because the same signal is already included |
Licences
There is no single licence for this corpus. Each dataset keeps its own licence, as deposited by its authors (column license of datasets.parquet; full texts in LICENSES/). By using a dataset you accept its licence.
| group (folder) | datasets | hours | licences |
|---|---|---|---|
open |
20 | 1,366.3 | CC-BY-1.0, CC-BY-3.0, CC-BY-4.0, CC0-1.0, ODC-By-1.0 |
sharealike |
2 | 279.5 | CC-BY-SA-4.0, GPL-3.0 |
noncommercial |
3 | 121.0 | CC-BY-NC-4.0, CC-BY-NC-SA-3.0, CC-BY-NC-SA-4.0 |
open: may be used for any purpose, including commercial; attribution required except for CC0.sharealike: likeopen, but adaptations must be shared under the same licence (CC BY-SA, GPL).noncommercial: non-commercial use only (CC BY-NC, CC BY-NC-SA).- The converted copies are adaptations (filtered, resampled, channels without positions dropped). Licences that forbid adaptations (no-derivatives) are excluded.
Datasets per licence
| licence | datasets | hours |
|---|---|---|
| CC0-1.0 | 16 | 1,247.2 |
| CC-BY-1.0 | 1 | 20.6 |
| CC-BY-3.0 | 1 | 8.8 |
| CC-BY-4.0 | 1 | 49.7 |
| CC-BY-NC-4.0 | 1 | 14.2 |
| CC-BY-NC-SA-3.0 | 1 | 93.4 |
| CC-BY-NC-SA-4.0 | 1 | 13.4 |
| CC-BY-SA-4.0 | 1 | 250.4 |
| GPL-3.0 | 1 | 29.0 |
| ODC-By-1.0 | 1 | 40.0 |
When an archive copy states a different licence than the original deposit, the original applies; license_as_deposited keeps the archive's licence and license_note explains it:
| dataset | name | licence | note |
|---|---|---|---|
| nm000323 | Lee et al. 2019 (ERP) — EEG dataset and OpenBMI toolbox for three BCI paradigms: an investigation into BCI illiteracy | CC0-1.0 | Licence of the original GigaDB deposit (CC0); NEMAR lists GPL-3.0 |
Citation
Cite this corpus and every dataset you use. CITATION.bib has one entry per dataset; its key is the bibtex_key column of datasets.parquet, so you can select the entries for exactly the datasets you used:
keys = set(ds[ds.dataset.isin(used)].bibtex_key)
The corpus itself (first entry of CITATION.bib):
@misc{eegdash_preprocessed_corpus,
title = {EEGDash corpus, preprocessed (TODO: final name)},
author = {Mostofi, Ghazal and {Meyer zu Bexten}, Justus and Geier, Aljoscha and Franczyk, Bogdan and Scherf, Nico},
year = {TODO},
publisher = {Hugging Face},
url = {https://huggingface.co/datasets/mpi-cbs-neurodslab/eegdash-corpus-prototype}
}
Format
Hugging Face limits the number of files per repository, so the files of each dataset are packed into a plain tar (no compression; several for the largest datasets). The tars are not WebDataset shards and cannot be loaded or streamed with datasets: download the ones you need and extract them. Each holds three files per recording, named by the column key of recordings.parquet (the recording name with dots replaced by _):
| member | content |
|---|---|
<key>.signal.npy |
EEG, shape (channels, samples), float32, volts, 200 Hz |
<key>.positions.npy |
electrode positions, one row per channel (same order as ch_names) |
<key>.json |
metadata: channel names, per-channel mean and std, flat channels, position sources, licence |
The unit is volts, not microvolts (multiply by 1e6 for µV). Event annotations of the sources are not included.
Preprocessing
One recipe for every recording (config hash d8b60b215b7d, column config_hash):
- EEG channels with a known electrode position (REVE position bank); datasets need at least 7 such channels
- band-pass 0.5-99.5 Hz (FIR, zero phase), capped 1 Hz below Nyquist for recordings slower than 200 Hz; no notch filter
- resampled to 200 Hz with MNE's FFT-based
resample - flat channels kept (listed per recording in
flat_channels) - not re-referenced, not cropped: time stamps of the source recordings still apply
Unit corrections
Some source files declare the wrong unit, or one the reader does not recognise, so their signal came out 10^3 or 10^6 off. These recordings were multiplied by a factor to volts (unit_factor in recordings.parquet; unit_factor and unit_source in each recording's JSON). The factor is taken from the dataset's own channels.tsv or header where it gives the unit, otherwise estimated from the amplitude: the factor is applied only when one unit step (10^3 or 10^6) brings the recording to 2-200 µV median channel std.
| dataset | recordings | factor | source |
|---|---|---|---|
| on003810 | 50 of 50 | 1e-06 | channels.tsv (Microv); EDF header has no unit |
| on007169 | 17 of 18 | 1e-06 | estimated from amplitude |
| on007629 | 5 of 5 | 1e+06 | estimated from amplitude |
Recordings with a doubtful unit
Recordings whose median channel std (channels with signal; column median_channel_std) lies outside 0.1 µV to 1 V have unit_known = False. Their data is left as converted. Where a power of ten brings them to about 20 µV, it is given in suggested_unit_factor (not applied; an estimate from the amplitude only); where none does, the column is empty and the recording is probably damaged. Keep only recordings in volts with rec[rec.unit_known].
| dataset | recordings | median channel std | suggested factor(s) |
|---|---|---|---|
| nm000263 | 5 of 10 | 6.4e-08-9.7e-08 V | 100 |
| on003739 | 1 of 120 | 2.9e+27-2.9e+27 V | none |
| on007169 | 1 of 18 | 3e+02-3e+02 V | 1e-07 |
Using the corpus
Download
The whole corpus, or one licence group, with the Hugging Face CLI (pip install -U huggingface_hub):
hf download mpi-cbs-neurodslab/eegdash-corpus-prototype --repo-type dataset --local-dir eegdash --max-workers 16
hf download mpi-cbs-neurodslab/eegdash-corpus-prototype --repo-type dataset --local-dir eegdash --include 'data/open/*' '*.parquet' # open group only
Extract
Extract every tar into its own folder; the tars are independent, so this runs in parallel. Extraction is bound by the file system rather than the CPU; 16-32 parallel jobs suit most parallel file systems. The extracted files take as much space as the tars; append && rm "$1" to delete each tar once it is extracted.
cd eegdash
find data -name '*.tar' -print0 | xargs -0 -P 16 -I{} sh -c 'tar -xf "$1" -C "$(dirname "$1")"' _ {}
On a cluster with Slurm, the same as a job (add --partition/--account as your cluster requires):
#!/bin/bash
#SBATCH --job-name=eegdash-untar
#SBATCH --cpus-per-task=32
#SBATCH --time=12:00:00
cd /path/to/eegdash
find data -name '*.tar' -print0 |
xargs -0 -P "$SLURM_CPUS_PER_TASK" -I{} sh -c 'tar -xf "$1" -C "$(dirname "$1")"' _ {}
Load
After extraction, every recording is in data/<group>/<dataset>/, named by the column key of recordings.parquet:
import json
import numpy as np
import pandas as pd
rec = pd.read_parquet('eegdash/recordings.parquet')
r = rec.iloc[0]
base = f'eegdash/data/{r.license_group}/{r.dataset}/{r.key}'
signal = np.load(base + '.signal.npy') # (channels, samples), float32, volts
positions = np.load(base + '.positions.npy') # one row per channel
meta = json.load(open(base + '.json'))
There are no train/test splits; choose your own, e.g. by subject.
Training with PyTorch Lightning
The companion code includes data-loading logic for the PyTorch Lightning ecosystem, to use as it is or as a starting point.
Only part of the corpus
Filter the two small parquet files first, then download only the tars you need:
import pandas as pd
from huggingface_hub import snapshot_download
ds = pd.read_parquet('datasets.parquet')
rec = pd.read_parquet('recordings.parquet').merge(ds, on='dataset')
sel = rec[~rec.non_commercial & (rec.n_chans >= 32) & (rec.n_flat_channels == 0)
& rec.paradigm.map(lambda tags: 'Motor' in tags)]
tars = sorted(sel.shard.unique()) # then extract them as above
snapshot_download('mpi-cbs-neurodslab/eegdash-corpus-prototype', repo_type='dataset', local_dir='eegdash', allow_patterns=tars)
Or without downloading anything, with DuckDB:
SELECT dataset, count(*) FROM 'hf://datasets/mpi-cbs-neurodslab/eegdash-corpus-prototype/recordings.parquet'
WHERE n_chans >= 32 GROUP BY dataset;
Evaluation and contamination
This corpus includes standard benchmark test sets (e.g. the OpenEEGBench tasks CHB-MIT, FACED, Mumtaz, PhysioNet Motor Imagery) and competition test data. 1 included datasets are known to be used for evaluation (column evaluation_use); leave them out of pretraining if you evaluate on them, otherwise the model has seen the test data. The column is not a complete list of every benchmark that uses a dataset: check before evaluating on any public dataset.
Excluded datasets
69 datasets were considered and left out (excluded.csv has each with its reason):
| reason | datasets |
|---|---|
| no-derivatives licence | 21 |
| never converted | 19 |
| its only recording is identical to sub-001 of on004661 | 6 |
| not human | 2 |
| withdrawn from OpenNeuro; re-published as ds008940 | 1 |
| conversion fails for every recording | 1 |
| duplicate or subset of nm000260 | 1 |
| holds the same files as nm000267 | 1 |
| I-CARE | 1 |
| duplicate or subset of nm000280 | 1 |
| duplicate or subset of nm000246 | 1 |
| converted, but left out by the manifest builder | 1 |
| re-upload of on002791 | 1 |
| re-upload of on002833 | 1 |
| duplicate or subset of on004367 | 1 |
| duplicate or subset of ds005697 | 1 |
| duplicate or subset of on005863 | 1 |
| duplicate or subset of on007314 | 1 |
| duplicate or subset of on005872 | 1 |
| re-upload of on006222 | 1 |
| largely a re-upload of on007558 | 1 |
| duplicate or subset of on007666 | 1 |
| not publicly accessible on OpenNeuro | 1 |
| duplicate or subset of on008082 | 1 |
| re-upload of part of on007558 | 1 |
Duplicates
Some recordings were uploaded to the archives more than once, under different datasets or twice within one dataset. Every recording whose signal is byte-identical to one already included is left out (93 recordings, 0.3 h; excluded_recordings.csv names the copy that is included, column n_duplicates_removed of datasets.parquet counts them per dataset). Datasets that are complete copies of another one are left out as a whole (excluded.csv). Only byte-identical copies are found this way; re-cut or re-channelled copies are not.
Known issues
- Partial datasets: 5 datasets have fewer recordings than the source (column
status), because some source files could not be read or are not published. - Upsampled data: 90 recordings (17.0 h) in 3 datasets were recorded below 200 Hz and upsampled. The band-pass is capped 1 Hz below their own Nyquist frequency, so they hold nothing above it (e.g. above 63 Hz for 128 Hz data). They are marked in
recordings.parquet(upsampled,source_sfreq) and counted per dataset (n_upsampled_recordings); leave them out withrec[rec.upsampled == False]. - Flat channels: 3,776 recordings have at least one flat channel (
n_flat_channels); 0 have channels with NaN (n_nan_channels). - Tags:
paradigm,stimulusandpopulationare EEGDash's tags, assigned by a model, not curated; 1 datasets have none. - Demographics:
age,sexandhandednesscome from each dataset'sparticipants.tsvand are empty where it has none.
Reproducing
Companion code: github.com/GhazalMst/eegdash-hf-release. The corpus is built in four steps: scripts/build_eegdash_manifest.py lists the datasets of the EEGDash catalogue, scripts/preprocess_eegdash.py converts them, scripts/build_release_lists.py decides which are released (licence, duplicates) and why the others are left out, and scripts/build_hf_release.py writes this release.
TODO (check): make the repository public before publishing; until then the link is not reachable for readers.
Contributions
Roles after the CRediT taxonomy:
| roles | |
|---|---|
| Ghazal Mostofi | Software (major share), Data curation, Validation (inspection of datasets and outputs) |
| Justus Meyer zu Bexten | Conceptualization, Investigation, Software, Validation (inspection), Supervision, Project administration |
| Aljoscha Geier | Conceptualization, Investigation, Software |
| Bogdan Franczyk | Supervision, Funding acquisition |
| Nico Scherf | Supervision, Resources, Funding acquisition |
Acknowledgements
Justus Meyer zu Bexten, Bogdan Franczyk and Nico Scherf are supported by the Federal Ministry of Research, Technology and Space of Germany and by the Sächsische Staatsministerium für Wissenschaft, Kultur und Tourismus in the programme Center of Excellence for AI-research "Center for Scalable Data Analytics and Artificial Intelligence Dresden/Leipzig", project identification number: ScaDS.AI.
Computations were performed on the HPC system Viper at the Max Planck Computing and Data Facility.
Contact and takedown
Contact: bexten@cbs.mpg.de. If you are an author of an included dataset, and notice a misinterpretation of licensing conditions, write to this address and we will act on it.
Changelog
- TODO (decision): v1.0 - first release.
Relation to eegdash-corpus-v0
The EEGDash team published eegdash-corpus-v0 (Shahi, Aristimunha & Delorme), the redistributable part of REVE's pretraining corpus. It sticks as close to the REVE corpus specifications as possible, while this corpus extracts all redistributable datasets from the entirety of the EEGDash catalogue to achieve maximal data volume and diversity. Both use REVE's preprocessing recipe and keep each dataset's licence.
TODO (check): the author list of eegdash-corpus-v0 against their paper.
- Downloads last month
- 71