Library for converting EEG datasets of people with epilepsy to EEG-BIDS compatible datasets. These datasets comply with the ILAE and IFCN minimum recording standards. They provide annotations that are HED-SCORE compatible. The datasets are formatted to be operated by the SzCORE seizure validation framework.
The library provides tools to:
- Convert EEG datasets to BIDS.
- Load and manipulate EDF files.
- Load and manipulate seizure annotation files.
Currently, the following datasets are supported:
- PhysioNet CHB-MIT Scalp EEG Database v1.0.0
- KULeuven SeizeIT1
- Siena Scalp EEG Database v1.0.0
- TUH EEG Seizure Corpus
The epilepsy2bids package is released for macOS, Windows, and Linux, on PyPI. It can be installed using pip:
python -m pip install -U pip
python -m pip install -U epilepsy2bids
It can also be installed from source with a modern build of pip
:
python -m pip install -U pip
git clone https://github.com/esl-epfl/epilepsy2bids.git
cd epilepsy2bids
python -m pip install -e .
The primary function of epilepsy2bids
is to convert EEG dataset to BIDS by calling the convert()
for a given dataset.
from epilepsy2bids.bids.chbmit.convert2bids import convert
convert(root: Path, outDir: Path)
In addition, the library provides the Eeg
and Annotation
classes that be used to manipulate EEG recordings.
All dataset converters should implement the convert()
method. To assist many helper functions and generic code is already available in src.epilepsy2bids.bids.convert2bids.py
. Examples of implementation are available in the supported datasets.