braindecode 2.1.0.dev4294968728__tar.gz → 2.1.0.dev4294968729__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {braindecode-2.1.0.dev4294968728/braindecode.egg-info → braindecode-2.1.0.dev4294968729}/PKG-INFO +1 -1
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/__init__.py +1 -0
- braindecode-2.1.0.dev4294968729/braindecode/models/deepsoz.py +320 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/summary.csv +1 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/util.py +6 -0
- braindecode-2.1.0.dev4294968729/braindecode/version.py +1 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729/braindecode.egg-info}/PKG-INFO +1 -1
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode.egg-info/SOURCES.txt +1 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/api.rst +1 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/whats_new.rst +3 -0
- braindecode-2.1.0.dev4294968728/braindecode/version.py +0 -1
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/LICENSE.txt +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/MANIFEST.in +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/NOTICE.txt +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/README.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/__init__.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/augmentation/__init__.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/augmentation/base.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/augmentation/functional.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/augmentation/transforms.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/classifier.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/__init__.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/_notebook_viewer.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/base.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/bbci.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/bcicomp.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/bids/__init__.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/bids/datasets.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/bids/hub.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/bids/hub_format.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/bids/hub_io.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/bids/hub_validation.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/bids/iterable.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/chb_mit.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/collate.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/mne.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/moabb.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/nmt.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/registry.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/siena.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/sleep_physio_challe_18.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/sleep_physionet.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/tuh.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/utils.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/xy.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datautil/__init__.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datautil/channel_utils.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datautil/hub_formats.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datautil/serialization.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datautil/util.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/eegneuralnet.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/functional/__init__.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/functional/_lfilter.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/functional/_real_dft.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/functional/attention.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/functional/channel_mask.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/functional/channels.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/functional/functions.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/functional/initialization.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/functional/patches.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/atcnet.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/attentionbasenet.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/attn_sleep.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/axon.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/barista.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/base.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/bbl.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/bendr.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/biot.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/brainbert.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/brainmodule.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/brainomni.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/brant.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/caresleepnet.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/cbramod.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/codebrain.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/config.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/contrawr.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/corteg.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/csbrain.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/ctnet.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/dance.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/deep4.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/deepsleepnet.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/dgcnn.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/diver1.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/duin.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/eeg_clip.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/eegconformer.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/eegdino.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/eeginception_erp.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/eeginception_mi.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/eegitnet.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/eegminer.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/eegnet.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/eegnex.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/eegpt.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/eegsimpleconv.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/eegsym.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/eegtcnet.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/emg2qwerty.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/epint.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/fbcnet.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/fblightconvnet.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/fbmsnet.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/fnirs4d.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/fnirs_cnn1d.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/fnirs_t.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/fnirsnet.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/gcnsnet.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/geonirs.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/guetschel2026.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/hybrid.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/ifnet.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/jung_mae.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/labram.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/luna.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/mapa.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/medformer.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/meggpt.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/megxl.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/meta_neuromotor.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/mirepnet.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/model.html.jinja +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/mscformer.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/msvtnet.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/mtrenirs.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/mvpformer.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/neuropose.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/neurorvq.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/neurorvq_tokenizer.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/nice.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/patchedtransformer.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/popt.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/pratibha2.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/reve.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/samba.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/sccnet.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/seizure_transformer.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/sensingdynamics.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/shallow_fbcsp.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/signal_jepa.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/sinc_shallow.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/sleep_stager_blanco_2020.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/sleep_stager_chambon_2018.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/sleepfm.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/sparcnet.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/sstdpn.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/steegformer.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/syncnet.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/tccnet.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/tcformer.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/tcn.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/tfm_tokenizer.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/tidnet.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/tinymyo.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/tmsanet.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/tsinception.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/usleep.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/vemg2pose.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/zuna.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/modules/__init__.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/modules/activation.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/modules/attention.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/modules/blocks.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/modules/channels.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/modules/convolution.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/modules/dance_modules.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/modules/filter.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/modules/layers.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/modules/linear.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/modules/linear_attention.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/modules/parametrization.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/modules/quantization.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/modules/seanet.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/modules/spatial_temporal.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/modules/stats.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/modules/util.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/modules/wrapper.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/preprocessing/__init__.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/preprocessing/eegprep_preprocess.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/preprocessing/mne_preprocess.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/preprocessing/preprocess.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/preprocessing/util.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/preprocessing/windowers.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/regressor.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/samplers/__init__.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/samplers/base.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/samplers/ssl.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/training/__init__.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/training/_trial_aggregation.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/training/callbacks.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/training/losses.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/training/scoring.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/util.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/visualization/__init__.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/visualization/activations.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/visualization/attribution.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/visualization/confusion_matrices.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/visualization/frequency.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/visualization/metrics.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/visualization/sanity.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/visualization/topology.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode.egg-info/dependency_links.txt +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode.egg-info/requires.txt +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode.egg-info/top_level.txt +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/Makefile +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/_templates/autosummary/class.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/_templates/autosummary/class_in_subdir.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/_templates/autosummary/function.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/_templates/autosummary/function_in_subdir.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/agent_docs.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/cite.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/conf.py +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/help.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/index.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/install/gaudi.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/install/install.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/install/install_pip.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/install/install_source.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/models/categorization/attention.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/models/categorization/channel.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/models/categorization/convolution.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/models/categorization/filterbank.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/models/categorization/gnn.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/models/categorization/interpretable.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/models/categorization/lbm.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/models/categorization/recurrent.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/models/categorization/spd.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/models/channel_strategies.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/models/models.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/models/models_categorization.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/models/models_table.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/models/models_visualization.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/docs/sg_execution_times.rst +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/pyproject.toml +0 -0
- {braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/setup.cfg +0 -0
{braindecode-2.1.0.dev4294968728/braindecode.egg-info → braindecode-2.1.0.dev4294968729}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: braindecode
|
|
3
|
-
Version: 2.1.0.
|
|
3
|
+
Version: 2.1.0.dev4294968729
|
|
4
4
|
Summary: Deep learning software to decode EEG, ECG or MEG signals
|
|
5
5
|
Author-email: Robin Tibor Schirrmeister <robintibor@gmail.com>, Bruno Aristimunha Pinto <b.aristimunha@gmail.com>, Alexandre Gramfort <agramfort@meta.com>
|
|
6
6
|
Maintainer-email: Alexandre Gramfort <agramfort@meta.com>, Bruno Aristimunha Pinto <b.aristimunha@gmail.com>, Robin Tibor Schirrmeister <robintibor@gmail.com>
|
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
# Authors: Raghav Rathi <44058192+raghav-rathi@users.noreply.github.com>
|
|
2
|
+
#
|
|
3
|
+
# License: BSD (3-clause)
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
import torch
|
|
8
|
+
import torch.nn as nn
|
|
9
|
+
|
|
10
|
+
from braindecode.functional import check_n_chans, pad_or_crop_to_patches, patch_count
|
|
11
|
+
from braindecode.models.base import EEGModuleMixin
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class DeepSOZ(EEGModuleMixin, nn.Module):
|
|
15
|
+
r"""DeepSOZ from Shama et al. (2023) [Shama2023]_.
|
|
16
|
+
|
|
17
|
+
:bdg-info:`Attention/Transformer` :bdg-secondary:`Recurrent`
|
|
18
|
+
|
|
19
|
+
.. versionadded:: 2.1
|
|
20
|
+
|
|
21
|
+
DeepSOZ detects seizures second by second in multichannel scalp EEG and
|
|
22
|
+
localizes their onset zone (SOZ) channel by channel [Shama2023]_.
|
|
23
|
+
DeepSOZ-HEM [Niranjan2025]_, the same network retrained with hard example
|
|
24
|
+
mining, came fourth in the 2025 seizure detection challenge, which was
|
|
25
|
+
scored with the SzCORE framework [Dan2025]_. This class is written from the
|
|
26
|
+
paper; with the DeepSOZ-HEM weights it gives the outputs of the authors'
|
|
27
|
+
code.
|
|
28
|
+
|
|
29
|
+
.. rubric:: Architecture Overview
|
|
30
|
+
|
|
31
|
+
The one-second segments of each channel are the tokens, without a
|
|
32
|
+
convolutional front end. One Transformer encoder layer mixes the channel
|
|
33
|
+
tokens of each second with a learned global token, a bidirectional LSTM
|
|
34
|
+
follows the global tokens over the seconds, and a linear layer gives the
|
|
35
|
+
seizure logits of every second::
|
|
36
|
+
|
|
37
|
+
(batch, n_chans, n_times)
|
|
38
|
+
-> tokens + channel embedding (batch, n_patches, n_chans, patch_size)
|
|
39
|
+
-> + global token (batch, n_patches, n_chans + 1, patch_size)
|
|
40
|
+
-> encoder, each second alone (batch, n_patches, n_chans + 1, patch_size)
|
|
41
|
+
-> lstm over the global tokens (batch, n_patches, 2 * lstm_hidden_size)
|
|
42
|
+
-> final_layer (batch, n_outputs, n_patches)
|
|
43
|
+
|
|
44
|
+
With ``return_soz=True``, the channel tokens are also scored and pooled
|
|
45
|
+
over time into one logit per channel::
|
|
46
|
+
|
|
47
|
+
encoded channel tokens (batch, n_patches, n_chans, patch_size)
|
|
48
|
+
-> soz_layer (batch, n_patches, n_chans)
|
|
49
|
+
-> mean over time weighted by the seizure logit (batch, n_chans)
|
|
50
|
+
|
|
51
|
+
``n_patches`` is ``n_times / patch_size``, rounded as ``on_non_divisible``
|
|
52
|
+
says.
|
|
53
|
+
|
|
54
|
+
.. rubric:: Macro Components
|
|
55
|
+
|
|
56
|
+
``DeepSOZ.channel_embedding``
|
|
57
|
+
**Operations.** An :class:`~torch.nn.Embedding` with one row per
|
|
58
|
+
channel, added to that channel's tokens, and a last row that is the
|
|
59
|
+
global token of every second (``detector.pos_encoder`` in the
|
|
60
|
+
reference). The paper writes it as a linear map of one-hot channel
|
|
61
|
+
indices.
|
|
62
|
+
|
|
63
|
+
**Role.** Tells the encoder which electrode a token comes from.
|
|
64
|
+
|
|
65
|
+
``DeepSOZ.encoder``
|
|
66
|
+
**Operations.** A post-norm :class:`~torch.nn.TransformerEncoderLayer`
|
|
67
|
+
of width ``patch_size``, with ``num_heads`` heads and a feed-forward
|
|
68
|
+
block of width ``dim_feedforward``, applied to the ``n_chans + 1``
|
|
69
|
+
tokens of each second (``detector.tx_encoder``).
|
|
70
|
+
|
|
71
|
+
**Role.** Mixes the channels of each second into a global encoding and
|
|
72
|
+
channel encodings.
|
|
73
|
+
|
|
74
|
+
``DeepSOZ.lstm``
|
|
75
|
+
**Operations.** A one-layer bidirectional :class:`~torch.nn.LSTM` with
|
|
76
|
+
``lstm_hidden_size`` units per direction, over the sequence of global
|
|
77
|
+
encodings (``detector.multi_lstm``).
|
|
78
|
+
|
|
79
|
+
**Role.** Follows how the activity evolves from second to second.
|
|
80
|
+
|
|
81
|
+
``DeepSOZ.soz_layer``
|
|
82
|
+
**Operations.** A :class:`~torch.nn.Linear` layer, shared by the
|
|
83
|
+
channels, from each channel encoding to a score (``hc_linear``).
|
|
84
|
+
|
|
85
|
+
**Role.** Scores each channel and second for the onset zone; used only
|
|
86
|
+
with ``return_soz=True``.
|
|
87
|
+
|
|
88
|
+
``DeepSOZ.final_layer``
|
|
89
|
+
**Operations.** A :class:`~torch.nn.Linear` layer from the LSTM outputs
|
|
90
|
+
to ``n_outputs`` logits for every second (``detector.multi_linear``).
|
|
91
|
+
|
|
92
|
+
**Role.** The seizure detection head, without the softmax of the
|
|
93
|
+
reference.
|
|
94
|
+
|
|
95
|
+
.. rubric:: Temporal, Spatial, and Spectral Encoding
|
|
96
|
+
|
|
97
|
+
- **Temporal:** the raw samples of a channel within one second form its
|
|
98
|
+
token; across seconds, the bidirectional LSTM reads the whole window in
|
|
99
|
+
both directions, so the logit of a second also depends on the seconds
|
|
100
|
+
after it.
|
|
101
|
+
- **Spatial:** the encoder's self-attention mixes the channels of each
|
|
102
|
+
second; the channel embedding fixes the channel order of training.
|
|
103
|
+
- **Spectral:** not modelled; the authors band-pass the EEG between 1.6
|
|
104
|
+
and 30 Hz before the model.
|
|
105
|
+
|
|
106
|
+
.. rubric:: Additional Mechanisms
|
|
107
|
+
|
|
108
|
+
- **Onset zone pooling.** The SOZ logit of channel :math:`c` is
|
|
109
|
+
:math:`\sum_t w_t s_{t,c}`, with :math:`s_{t,c}` the ``soz_layer`` score
|
|
110
|
+
of second :math:`t` and :math:`w = \mathrm{softmax}_t(z_t)` the softmax
|
|
111
|
+
over time of the seizure logit :math:`z_t` (the last output). The
|
|
112
|
+
reference code computes it this way; Equation 3 of the paper normalizes
|
|
113
|
+
the seizure probabilities instead.
|
|
114
|
+
- **Reference parity.** With the DeepSOZ-HEM weights, the logits, the SOZ
|
|
115
|
+
probabilities and the input gradients equal those of the reference
|
|
116
|
+
``txlstm_szpool`` in float64 and float32 on CPU, and the parameter
|
|
117
|
+
gradients differ by at most 2e-15 relative in float64. The differences
|
|
118
|
+
are in the interface: logits with a channel axis instead of
|
|
119
|
+
``(batch, n_patches, 2)`` probabilities, SOZ logits instead of
|
|
120
|
+
probabilities and only on request, sizes as parameters, and
|
|
121
|
+
``on_non_divisible`` for inputs that are not a whole number of tokens.
|
|
122
|
+
|
|
123
|
+
.. rubric:: Pretrained Weights
|
|
124
|
+
|
|
125
|
+
The authors released one trained model, DeepSOZ-HEM (GPL-3.0), as
|
|
126
|
+
``deepsoz-hem/src/deepsoz/deepsoz_fold4.pth_4.tar`` in [Niranjan2025]_. It
|
|
127
|
+
uses the defaults with ``n_chans=19`` and ``n_outputs=2`` (the second
|
|
128
|
+
output is the seizure class), was trained with a cross-entropy weighted
|
|
129
|
+
0.185 and 0.815, and expects this input, which the model does not prepare:
|
|
130
|
+
|
|
131
|
+
- 19 channels in the order Fp1, Fp2, F7, F3, Fz, F4, F8, T3, C3, Cz, C4,
|
|
132
|
+
T4, T5, P3, Pz, P4, T6, O1, O2, average reference, sampled at 256 Hz,
|
|
133
|
+
as in the SzCORE BIDS datasets such as
|
|
134
|
+
:class:`~braindecode.datasets.SIENA`;
|
|
135
|
+
- in microvolts (braindecode datasets hold volts), each channel filtered
|
|
136
|
+
over the whole recording by a zero-phase fourth-order Butterworth
|
|
137
|
+
low-pass at 30 Hz then high-pass at 1.6 Hz, and clipped to its mean plus
|
|
138
|
+
or minus two standard deviations;
|
|
139
|
+
- 10 min windows (``n_times=153600``) every 8 min, the last one padded
|
|
140
|
+
with zeros.
|
|
141
|
+
|
|
142
|
+
The authors keep the larger softmax seizure probability where two windows
|
|
143
|
+
overlap, smooth it with a 25 s moving average and mark the seconds above
|
|
144
|
+
0.65 as seizure. On :class:`~braindecode.datasets.SIENA`, which was part of
|
|
145
|
+
its training data, this gives the eight SzCORE scores the challenge
|
|
146
|
+
published for the model (event F1 0.820), in
|
|
147
|
+
``results/amruth1234-deepsoz-hem-v0-1-3`` of
|
|
148
|
+
https://github.com/esl-epfl/szcore.
|
|
149
|
+
|
|
150
|
+
The released model was trained for detection only: its ``soz_layer`` was
|
|
151
|
+
not trained, and on the 47 seizures of Siena its top channel is in the
|
|
152
|
+
annotated onset zone less often than a random channel. Train that layer
|
|
153
|
+
before using the SOZ output, as in the paper's second stage: freeze the
|
|
154
|
+
LSTM and minimize a binary cross-entropy on the sigmoid of the SOZ logits,
|
|
155
|
+
plus 0.1 times the detection loss and an L1 penalty on the SOZ
|
|
156
|
+
probabilities [Shama2023]_.
|
|
157
|
+
|
|
158
|
+
Parameters
|
|
159
|
+
----------
|
|
160
|
+
patch_size : int, default=256
|
|
161
|
+
Samples per token, one second: the sampling rate (200 Hz in the paper,
|
|
162
|
+
256 Hz for DeepSOZ-HEM). It is also the width of the Transformer.
|
|
163
|
+
num_heads : int, default=8
|
|
164
|
+
Attention heads of the encoder. Must divide ``patch_size``.
|
|
165
|
+
dim_feedforward : int, default=256
|
|
166
|
+
Width of the encoder's feed-forward block. With ``patch_size=200`` the
|
|
167
|
+
defaults give the 510K parameters of the paper's model.
|
|
168
|
+
lstm_hidden_size : int, default=100
|
|
169
|
+
Units of each direction of the LSTM.
|
|
170
|
+
drop_prob : float, default=0.25
|
|
171
|
+
Dropout of the encoder (0.25 in DeepSOZ-HEM, 0.15 in the paper).
|
|
172
|
+
on_non_divisible : {"pad", "crop", "error"}, default="pad"
|
|
173
|
+
How an input that is not a whole number of tokens is handled: right
|
|
174
|
+
zero-padding, cropping, or a ``ValueError``.
|
|
175
|
+
activation : type[nn.Module], default=nn.ReLU
|
|
176
|
+
Non-linearity of the encoder's feed-forward block.
|
|
177
|
+
|
|
178
|
+
References
|
|
179
|
+
----------
|
|
180
|
+
.. [Shama2023] Shama, D. M., Jing, J., & Venkataraman, A. (2023). DeepSOZ:
|
|
181
|
+
A robust deep model for joint temporal and spatial seizure onset
|
|
182
|
+
localization from multichannel EEG data. In Medical Image Computing and
|
|
183
|
+
Computer Assisted Intervention (MICCAI 2023), LNCS 14222, 184-194.
|
|
184
|
+
https://doi.org/10.1007/978-3-031-43993-3_18
|
|
185
|
+
.. [Niranjan2025] Niranjan, A., Shama, D. M., & Venkataraman, A. (2025).
|
|
186
|
+
DeepSOZ-HEM. Submission to the 2025 seizure detection challenge.
|
|
187
|
+
https://github.com/amruth-sn/deepsoz-hem
|
|
188
|
+
.. [Dan2025] Dan, J., Pale, U., Amirshahi, A., Cappelletti, W., Ingolfsson,
|
|
189
|
+
T. M., Wang, X., Cossettini, A., Bernini, A., Benini, L., Beniczky, S.,
|
|
190
|
+
Atienza, D., & Ryvlin, P. (2025). SzCORE: Seizure Community Open-Source
|
|
191
|
+
Research Evaluation framework for the validation of
|
|
192
|
+
electroencephalography-based automated seizure detection algorithms.
|
|
193
|
+
Epilepsia, 66(S3), 14-24. https://doi.org/10.1111/epi.18113
|
|
194
|
+
"""
|
|
195
|
+
|
|
196
|
+
def __init__(
|
|
197
|
+
self,
|
|
198
|
+
# braindecode parameters
|
|
199
|
+
n_outputs=None,
|
|
200
|
+
n_chans=None,
|
|
201
|
+
chs_info=None,
|
|
202
|
+
n_times=None,
|
|
203
|
+
input_window_seconds=None,
|
|
204
|
+
sfreq=None,
|
|
205
|
+
*,
|
|
206
|
+
# model-specific parameters
|
|
207
|
+
patch_size: int = 256,
|
|
208
|
+
num_heads: int = 8,
|
|
209
|
+
dim_feedforward: int = 256,
|
|
210
|
+
lstm_hidden_size: int = 100,
|
|
211
|
+
drop_prob: float = 0.25,
|
|
212
|
+
on_non_divisible: str = "pad",
|
|
213
|
+
activation: type[nn.Module] = nn.ReLU,
|
|
214
|
+
):
|
|
215
|
+
super().__init__(
|
|
216
|
+
n_outputs=n_outputs,
|
|
217
|
+
n_chans=n_chans,
|
|
218
|
+
chs_info=chs_info,
|
|
219
|
+
n_times=n_times,
|
|
220
|
+
input_window_seconds=input_window_seconds,
|
|
221
|
+
sfreq=sfreq,
|
|
222
|
+
)
|
|
223
|
+
del n_outputs, n_chans, chs_info, n_times, input_window_seconds, sfreq
|
|
224
|
+
|
|
225
|
+
for name, value in (
|
|
226
|
+
("patch_size", patch_size),
|
|
227
|
+
("dim_feedforward", dim_feedforward),
|
|
228
|
+
("lstm_hidden_size", lstm_hidden_size),
|
|
229
|
+
):
|
|
230
|
+
if value < 1:
|
|
231
|
+
raise ValueError(f"{name} must be positive, got {value}.")
|
|
232
|
+
if num_heads < 1 or patch_size % num_heads:
|
|
233
|
+
raise ValueError(
|
|
234
|
+
"num_heads must be a positive divisor of patch_size "
|
|
235
|
+
f"({patch_size}), the width of the Transformer; got {num_heads}."
|
|
236
|
+
)
|
|
237
|
+
# Validates on_non_divisible, and that n_times, when given, can be cut
|
|
238
|
+
# into tokens ("crop" needs one token, "error" a multiple of patch_size).
|
|
239
|
+
patch_count(
|
|
240
|
+
patch_size if self._n_times is None else self._n_times,
|
|
241
|
+
patch_size,
|
|
242
|
+
on_non_divisible,
|
|
243
|
+
)
|
|
244
|
+
self.patch_size = patch_size
|
|
245
|
+
self.on_non_divisible = on_non_divisible
|
|
246
|
+
|
|
247
|
+
self.channel_embedding = nn.Embedding(self.n_chans + 1, patch_size)
|
|
248
|
+
self.encoder = nn.TransformerEncoderLayer(
|
|
249
|
+
d_model=patch_size,
|
|
250
|
+
nhead=num_heads,
|
|
251
|
+
dim_feedforward=dim_feedforward,
|
|
252
|
+
dropout=drop_prob,
|
|
253
|
+
activation=activation(),
|
|
254
|
+
batch_first=True,
|
|
255
|
+
)
|
|
256
|
+
self.lstm = nn.LSTM(
|
|
257
|
+
patch_size, lstm_hidden_size, batch_first=True, bidirectional=True
|
|
258
|
+
)
|
|
259
|
+
self.soz_layer = nn.Linear(patch_size, 1)
|
|
260
|
+
self.final_layer = nn.Linear(2 * lstm_hidden_size, self.n_outputs)
|
|
261
|
+
|
|
262
|
+
def reset_head(self, n_outputs: int) -> None:
|
|
263
|
+
"""Replace the detection head for a new number of outputs."""
|
|
264
|
+
self._set_n_outputs(n_outputs)
|
|
265
|
+
old_head = self.final_layer
|
|
266
|
+
self.final_layer = nn.Linear(old_head.in_features, n_outputs).to(
|
|
267
|
+
old_head.weight
|
|
268
|
+
)
|
|
269
|
+
|
|
270
|
+
def forward(self, x: torch.Tensor, return_soz: bool = False):
|
|
271
|
+
"""Predict seizure logits for every segment of ``patch_size`` samples.
|
|
272
|
+
|
|
273
|
+
Parameters
|
|
274
|
+
----------
|
|
275
|
+
x : torch.Tensor
|
|
276
|
+
Input of shape ``(batch, n_chans, n_times)``.
|
|
277
|
+
return_soz : bool, default=False
|
|
278
|
+
Also return the seizure onset zone logits, pooled over time with a
|
|
279
|
+
softmax of the last output (the seizure logit of the released
|
|
280
|
+
model). A scripted model ignores this flag.
|
|
281
|
+
|
|
282
|
+
Returns
|
|
283
|
+
-------
|
|
284
|
+
torch.Tensor or tuple of torch.Tensor
|
|
285
|
+
Logits of shape ``(batch, n_outputs, n_patches)``, and with
|
|
286
|
+
``return_soz=True`` also the SOZ logits of shape
|
|
287
|
+
``(batch, n_chans)``.
|
|
288
|
+
"""
|
|
289
|
+
check_n_chans(
|
|
290
|
+
x, self.n_chans, "DeepSOZ", hint="build it with that many n_chans."
|
|
291
|
+
)
|
|
292
|
+
# x: (batch, n_chans, n_patches * patch_size), whole tokens
|
|
293
|
+
x = pad_or_crop_to_patches(x, self.patch_size, self.on_non_divisible)
|
|
294
|
+
batch, n_chans, n_times = x.shape
|
|
295
|
+
n_patches = n_times // self.patch_size
|
|
296
|
+
# tokens: (batch, n_patches, n_chans, patch_size), one per channel and second
|
|
297
|
+
tokens = x.reshape(batch, n_chans, n_patches, self.patch_size).transpose(1, 2)
|
|
298
|
+
embedding = self.channel_embedding.weight
|
|
299
|
+
# each channel's embedding added to its tokens, same shape
|
|
300
|
+
tokens = tokens + embedding[:n_chans]
|
|
301
|
+
# global token, the last embedding row: (batch, n_patches, 1, patch_size)
|
|
302
|
+
global_token = embedding[n_chans].expand(batch, n_patches, 1, self.patch_size)
|
|
303
|
+
# tokens: (batch, n_patches, n_chans + 1, patch_size)
|
|
304
|
+
tokens = torch.cat([tokens, global_token], dim=2)
|
|
305
|
+
# encoded: (batch, n_patches, n_chans + 1, patch_size), each second alone
|
|
306
|
+
encoded = self.encoder(tokens.flatten(0, 1)).unflatten(0, (batch, n_patches))
|
|
307
|
+
# features: (batch, n_patches, 2 * lstm_hidden_size), over the global tokens
|
|
308
|
+
features, _ = self.lstm(encoded[:, :, n_chans])
|
|
309
|
+
# logits: (batch, n_outputs, n_patches)
|
|
310
|
+
logits = self.final_layer(features).transpose(1, 2)
|
|
311
|
+
|
|
312
|
+
if return_soz and not torch.jit.is_scripting():
|
|
313
|
+
# channel_scores: (batch, n_patches, n_chans)
|
|
314
|
+
channel_scores = self.soz_layer(encoded[:, :, :n_chans]).squeeze(-1)
|
|
315
|
+
# weights: (batch, n_patches), softmax over time of the seizure logit
|
|
316
|
+
weights = torch.softmax(logits[:, -1], dim=-1)
|
|
317
|
+
# soz_logits: (batch, n_chans), the scores averaged with these weights
|
|
318
|
+
soz_logits = (weights.unsqueeze(-1) * channel_scores).sum(dim=1)
|
|
319
|
+
return logits, soz_logits
|
|
320
|
+
return logits
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/summary.csv
RENAMED
|
@@ -89,6 +89,7 @@ ZUNA,General,"Classification,Embedding",256,"chs_info, n_outputs, n_times",17210
|
|
|
89
89
|
MIRepNet,Motor Imagery,"Prediction, Embedding",250,"n_chans, n_outputs",5143300,"MIRepNet(n_chans=45, n_outputs=4, n_times=1000)","Convolution,Attention/Transformer,Foundation Model",EEG
|
|
90
90
|
NeuroRVQ,General,"Prediction, Embedding",200,"n_chans, n_outputs, n_times, sfreq, channel_names",7097892,"NeuroRVQ(n_chans=64, n_outputs=4, n_times=800, sfreq=200)","Convolution,Attention/Transformer,Foundation Model,Channel",EEG
|
|
91
91
|
SeizureTransformer,Epilepsy,Event Detection,256,"n_chans, n_outputs, n_times",37848897,"SeizureTransformer(n_chans=19, n_outputs=1, n_times=15360)","Convolution,Attention/Transformer",EEG
|
|
92
|
+
DeepSOZ,Epilepsy,Event Detection,256,"n_chans, n_outputs",687955,"DeepSOZ(n_chans=19, n_outputs=2, n_times=153600)","Attention/Transformer,Recurrent",EEG
|
|
92
93
|
NeuroRVQTokenizer,General,Embedding,200,"n_chans, n_times, sfreq, chs_info",75726448,"NeuroRVQTokenizer(n_chans=3, n_times=200, sfreq=200)","Convolution,Attention/Transformer,Foundation Model,Channel",EEG
|
|
93
94
|
Guetschel2026,General,"Prediction, Embedding",200,"chs_info, n_outputs, n_times",12882436,"Guetschel2026(chs_info=<user>, n_outputs=4, n_times=1000, sfreq=200)","Foundation Model,Attention/Transformer,Channel",EEG
|
|
94
95
|
GCNsNet,Motor Imagery,Prediction,160,"n_chans, n_outputs, n_times",359428,"GCNsNet(n_chans=64, n_outputs=4, n_times=640)","Graph Neural Network,Channel",EEG
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/util.py
RENAMED
|
@@ -922,6 +922,12 @@ models_mandatory_parameters: list[
|
|
|
922
922
|
"num_layers": 2, # 2 of 8 Transformer layers
|
|
923
923
|
},
|
|
924
924
|
),
|
|
925
|
+
(
|
|
926
|
+
"DeepSOZ",
|
|
927
|
+
["n_chans", "n_outputs"],
|
|
928
|
+
# 10 one-second tokens of the released model's 19 channels at 256 Hz
|
|
929
|
+
{"n_chans": 19, "n_times": 2560, "sfreq": 256.0},
|
|
930
|
+
),
|
|
925
931
|
("Guetschel2026", ["chs_info", "n_outputs", "n_times"], {"sfreq": 200.0}),
|
|
926
932
|
(
|
|
927
933
|
"FNIRSNet",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.1.0.dev4294968729"
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729/braindecode.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: braindecode
|
|
3
|
-
Version: 2.1.0.
|
|
3
|
+
Version: 2.1.0.dev4294968729
|
|
4
4
|
Summary: Deep learning software to decode EEG, ECG or MEG signals
|
|
5
5
|
Author-email: Robin Tibor Schirrmeister <robintibor@gmail.com>, Bruno Aristimunha Pinto <b.aristimunha@gmail.com>, Alexandre Gramfort <agramfort@meta.com>
|
|
6
6
|
Maintainer-email: Alexandre Gramfort <agramfort@meta.com>, Bruno Aristimunha Pinto <b.aristimunha@gmail.com>, Robin Tibor Schirrmeister <robintibor@gmail.com>
|
|
@@ -28,6 +28,9 @@ Current 2.1.0 (GitHub)
|
|
|
28
28
|
Enhancements
|
|
29
29
|
============
|
|
30
30
|
|
|
31
|
+
- Add :class:`braindecode.models.DeepSOZ` (Shama et al., 2023), which detects seizures second by second and,
|
|
32
|
+
with ``return_soz=True``, gives one seizure onset zone logit per channel; it reproduces the outputs of the
|
|
33
|
+
DeepSOZ-HEM challenge model exactly (:gh:`1771` by `Raghav Rathi`_).
|
|
31
34
|
- Linearize the landing-page architecture and modality bar charts, add live
|
|
32
35
|
dark/light theme synchronization to the Plotly models visualization, align and
|
|
33
36
|
format the interactive models summary DataTable, and resolve WCAG 2.2 AA
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.1.0.dev4294968728"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/augmentation/base.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/classifier.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/base.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/bbci.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/bcicomp.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/bids/hub.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/chb_mit.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/collate.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/mne.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/moabb.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/nmt.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/registry.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/siena.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/tuh.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/utils.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datasets/xy.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datautil/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/datautil/util.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/eegneuralnet.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/atcnet.py
RENAMED
|
File without changes
|
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/attn_sleep.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/axon.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/barista.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/base.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/bbl.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/bendr.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/biot.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/brainbert.py
RENAMED
|
File without changes
|
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/brainomni.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/brant.py
RENAMED
|
File without changes
|
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/cbramod.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/codebrain.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/config.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/contrawr.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/corteg.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/csbrain.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/ctnet.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/dance.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/deep4.py
RENAMED
|
File without changes
|
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/dgcnn.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/diver1.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/duin.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/eeg_clip.py
RENAMED
|
File without changes
|
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/eegdino.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/eegitnet.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/eegminer.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/eegnet.py
RENAMED
|
File without changes
|
{braindecode-2.1.0.dev4294968728 → braindecode-2.1.0.dev4294968729}/braindecode/models/eegnex.py
RENAMED
|
File without changes
|