braindecode 1.8.0.dev183527593__tar.gz → 1.8.1.dev168679286__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-1.8.1.dev168679286/NOTICE.txt +66 -0
- {braindecode-1.8.0.dev183527593/braindecode.egg-info → braindecode-1.8.1.dev168679286}/PKG-INFO +12 -8
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/README.rst +6 -3
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/augmentation/functional.py +1 -1
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/augmentation/transforms.py +4 -2
- braindecode-1.8.1.dev168679286/braindecode/datasets/_notebook_viewer.py +255 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datasets/base.py +18 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datasets/tuh.py +7 -2
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/functional/functions.py +4 -3
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/__init__.py +6 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/atcnet.py +2 -2
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/attn_sleep.py +0 -4
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/base.py +28 -3
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/brainmodule.py +1 -1
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/ctnet.py +10 -7
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/dance.py +2 -10
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/dgcnn.py +4 -1
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/eegconformer.py +1 -1
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/eegminer.py +2 -1
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/eegpt.py +3 -2
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/eegsimpleconv.py +9 -7
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/emg2qwerty.py +9 -133
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/ifnet.py +10 -6
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/interpolated.py +5 -2
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/luna.py +31 -5
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/medformer.py +1 -1
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/meta_neuromotor.py +1 -1
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/mvpformer.py +1 -1
- braindecode-1.8.1.dev168679286/braindecode/models/neuropose.py +440 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/reve.py +14 -75
- braindecode-1.8.1.dev168679286/braindecode/models/sensingdynamics.py +461 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/sleep_stager_blanco_2020.py +5 -9
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/sleep_stager_chambon_2018.py +1 -7
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/sparcnet.py +2 -2
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/sstdpn.py +1 -1
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/summary.csv +4 -1
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/tcformer.py +1 -1
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/tidnet.py +1 -7
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/usleep.py +3 -7
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/util.py +37 -0
- braindecode-1.8.1.dev168679286/braindecode/models/vemg2pose.py +655 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/zuna.py +37 -39
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/modules/__init__.py +16 -2
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/modules/activation.py +14 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/modules/blocks.py +213 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/modules/convolution.py +4 -2
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/preprocessing/windowers.py +37 -5
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/util.py +44 -0
- braindecode-1.8.1.dev168679286/braindecode/version.py +1 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/visualization/__init__.py +6 -0
- braindecode-1.8.1.dev168679286/braindecode/visualization/activations.py +77 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286/braindecode.egg-info}/PKG-INFO +12 -8
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode.egg-info/SOURCES.txt +5 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode.egg-info/requires.txt +5 -4
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/api.rst +13 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/conf.py +6 -1
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/install/install.rst +4 -1
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/whats_new.rst +112 -3
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/pyproject.toml +5 -5
- braindecode-1.8.0.dev183527593/NOTICE.txt +0 -25
- braindecode-1.8.0.dev183527593/braindecode/version.py +0 -1
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/LICENSE.txt +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/MANIFEST.in +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/__init__.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/augmentation/__init__.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/augmentation/base.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/classifier.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datasets/__init__.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datasets/bbci.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datasets/bcicomp.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datasets/bids/__init__.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datasets/bids/datasets.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datasets/bids/format.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datasets/bids/hub.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datasets/bids/hub_format.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datasets/bids/hub_io.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datasets/bids/hub_validation.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datasets/bids/iterable.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datasets/chb_mit.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datasets/collate.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datasets/mne.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datasets/moabb.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datasets/nmt.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datasets/registry.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datasets/siena.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datasets/sleep_physio_challe_18.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datasets/sleep_physionet.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datasets/utils.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datasets/xy.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datautil/__init__.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datautil/channel_utils.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datautil/hub_formats.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datautil/serialization.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datautil/util.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/eegneuralnet.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/functional/__init__.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/functional/initialization.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/attentionbasenet.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/bendr.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/biot.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/cbramod.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/codebrain.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/config.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/contrawr.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/deep4.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/deepsleepnet.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/eegdino.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/eeginception_erp.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/eeginception_mi.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/eegitnet.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/eegnet.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/eegnex.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/eegsym.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/eegtcnet.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/fbcnet.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/fblightconvnet.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/fbmsnet.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/hybrid.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/labram.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/msvtnet.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/patchedtransformer.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/sccnet.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/shallow_fbcsp.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/signal_jepa.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/sinc_shallow.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/steegformer.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/syncnet.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/tcn.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/tsinception.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/modules/attention.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/modules/dance_modules.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/modules/filter.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/modules/interpolation.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/modules/layers.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/modules/linear.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/modules/parametrization.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/modules/stats.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/modules/util.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/modules/wrapper.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/preprocessing/__init__.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/preprocessing/eegprep_preprocess.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/preprocessing/mne_preprocess.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/preprocessing/preprocess.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/preprocessing/util.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/regressor.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/samplers/__init__.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/samplers/base.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/samplers/ssl.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/training/__init__.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/training/callbacks.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/training/losses.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/training/scoring.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/visualization/attribution.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/visualization/confusion_matrices.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/visualization/frequency.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/visualization/metrics.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/visualization/sanity.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/visualization/topology.py +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode.egg-info/dependency_links.txt +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode.egg-info/top_level.txt +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/Makefile +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/_templates/autosummary/class.rst +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/_templates/autosummary/class_in_subdir.rst +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/_templates/autosummary/function.rst +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/_templates/autosummary/function_in_subdir.rst +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/cite.rst +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/help.rst +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/index.rst +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/install/install_pip.rst +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/install/install_source.rst +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/models/categorization/attention.rst +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/models/categorization/channel.rst +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/models/categorization/convolution.rst +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/models/categorization/filterbank.rst +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/models/categorization/gnn.rst +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/models/categorization/interpretable.rst +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/models/categorization/lbm.rst +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/models/categorization/recurrent.rst +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/models/categorization/spd.rst +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/models/models.rst +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/models/models_categorization.rst +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/models/models_table.rst +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/models/models_visualization.rst +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/docs/sg_execution_times.rst +0 -0
- {braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/setup.cfg +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# BRAINDECODE Notice
|
|
2
|
+
|
|
3
|
+
## Licensed Components
|
|
4
|
+
|
|
5
|
+
### BSD-3-Clause Licensed Files
|
|
6
|
+
|
|
7
|
+
All files within the `braindecode/` package are licensed under the BSD-3-Clause
|
|
8
|
+
License, except for those listed in the sections below.
|
|
9
|
+
|
|
10
|
+
### CC BY-NC 4.0 Licensed Files
|
|
11
|
+
|
|
12
|
+
The following components are licensed under the Creative Commons Attribution-NonCommercial 4.0 International License:
|
|
13
|
+
|
|
14
|
+
- `braindecode/models/eegminer.py`
|
|
15
|
+
- `braindecode/models/meta_neuromotor.py`
|
|
16
|
+
- `braindecode/models/brainmodule.py`
|
|
17
|
+
|
|
18
|
+
As well as class later imported into the `braindecode.models.module` named as GeneralizedGaussianFilter.
|
|
19
|
+
|
|
20
|
+
The `meta_neuromotor.py` file is a derivative of
|
|
21
|
+
`facebookresearch/generic-neuromotor-interface`, released by Meta Platforms,
|
|
22
|
+
Inc. under CC BY-NC 4.0, and inherits the same noncommercial terms.
|
|
23
|
+
|
|
24
|
+
### CC BY-NC-SA 4.0 Licensed Files
|
|
25
|
+
|
|
26
|
+
The following components are licensed under the Creative Commons
|
|
27
|
+
Attribution-NonCommercial-ShareAlike 4.0 International License:
|
|
28
|
+
|
|
29
|
+
- `braindecode/models/emg2qwerty.py`
|
|
30
|
+
- `braindecode/models/vemg2pose.py`
|
|
31
|
+
|
|
32
|
+
The `emg2qwerty.py` file is a derivative of `facebookresearch/emg2qwerty`,
|
|
33
|
+
released by Meta Platforms, Inc. under CC BY-NC-SA 4.0, and inherits the
|
|
34
|
+
same noncommercial ShareAlike terms.
|
|
35
|
+
|
|
36
|
+
### MIT Licensed Files
|
|
37
|
+
|
|
38
|
+
The following components are licensed under the MIT License:
|
|
39
|
+
|
|
40
|
+
- `braindecode/models/ctnet.py`
|
|
41
|
+
- `braindecode/models/dance.py`
|
|
42
|
+
- `braindecode/models/medformer.py`
|
|
43
|
+
- `braindecode/models/tcformer.py`
|
|
44
|
+
- `braindecode/models/ifnet.py`
|
|
45
|
+
|
|
46
|
+
### Apache-2.0 Licensed Files
|
|
47
|
+
|
|
48
|
+
The following components are licensed under the Apache License 2.0:
|
|
49
|
+
|
|
50
|
+
- `braindecode/models/mvpformer.py`
|
|
51
|
+
- `braindecode/models/zuna.py`
|
|
52
|
+
- `braindecode/models/luna.py`
|
|
53
|
+
|
|
54
|
+
## License Links
|
|
55
|
+
|
|
56
|
+
- [BSD-3-Clause License](https://opensource.org/licenses/BSD-3-Clause)
|
|
57
|
+
- [CC BY-NC 4.0 License](https://creativecommons.org/licenses/by-nc/4.0/)
|
|
58
|
+
- [CC BY-NC-SA 4.0 License](https://creativecommons.org/licenses/by-nc-sa/4.0/)
|
|
59
|
+
- [MIT License](https://opensource.org/licenses/MIT)
|
|
60
|
+
- [Apache-2.0 License](https://www.apache.org/licenses/LICENSE-2.0)
|
|
61
|
+
|
|
62
|
+
## Note
|
|
63
|
+
|
|
64
|
+
This list covers files whose own headers declare a license other than
|
|
65
|
+
BSD-3-Clause. Per-file provenance review of the remaining models is
|
|
66
|
+
tracked separately.
|
{braindecode-1.8.0.dev183527593/braindecode.egg-info → braindecode-1.8.1.dev168679286}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: braindecode
|
|
3
|
-
Version: 1.8.
|
|
3
|
+
Version: 1.8.1.dev168679286
|
|
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>
|
|
@@ -22,8 +22,8 @@ Requires-Python: >=3.11
|
|
|
22
22
|
Description-Content-Type: text/x-rst
|
|
23
23
|
License-File: LICENSE.txt
|
|
24
24
|
License-File: NOTICE.txt
|
|
25
|
-
Requires-Dist: torch>=2.
|
|
26
|
-
Requires-Dist: torchaudio>=2.
|
|
25
|
+
Requires-Dist: torch>=2.4
|
|
26
|
+
Requires-Dist: torchaudio>=2.4
|
|
27
27
|
Requires-Dist: mne>=1.11.0
|
|
28
28
|
Requires-Dist: mne_bids>=0.18
|
|
29
29
|
Requires-Dist: h5py
|
|
@@ -34,7 +34,6 @@ Requires-Dist: pandas
|
|
|
34
34
|
Requires-Dist: wfdb>=4.3.1
|
|
35
35
|
Requires-Dist: linear_attention_transformer
|
|
36
36
|
Requires-Dist: docstring_inheritance
|
|
37
|
-
Requires-Dist: rotary_embedding_torch
|
|
38
37
|
Requires-Dist: pydantic>=2.0
|
|
39
38
|
Provides-Extra: moabb
|
|
40
39
|
Requires-Dist: moabb>=1.4.3; extra == "moabb"
|
|
@@ -48,16 +47,18 @@ Requires-Dist: captum>=0.7.0; extra == "viz"
|
|
|
48
47
|
Provides-Extra: tests
|
|
49
48
|
Requires-Dist: pytest<9.1; extra == "tests"
|
|
50
49
|
Requires-Dist: pytest-cov; extra == "tests"
|
|
50
|
+
Requires-Dist: pytest-xdist>=3.8.0; extra == "tests"
|
|
51
51
|
Requires-Dist: codecov; extra == "tests"
|
|
52
52
|
Requires-Dist: pytest_cases; extra == "tests"
|
|
53
53
|
Requires-Dist: mypy; extra == "tests"
|
|
54
|
+
Requires-Dist: ipython; extra == "tests"
|
|
54
55
|
Requires-Dist: transformers>=4.57.0; extra == "tests"
|
|
55
56
|
Requires-Dist: bids_validator; extra == "tests"
|
|
56
57
|
Provides-Extra: typing
|
|
57
58
|
Requires-Dist: exca>=0.5.10; extra == "typing"
|
|
58
59
|
Requires-Dist: numpydantic>=1.7; extra == "typing"
|
|
59
60
|
Provides-Extra: docs
|
|
60
|
-
Requires-Dist: sphinx_gallery; extra == "docs"
|
|
61
|
+
Requires-Dist: sphinx_gallery>=0.17; extra == "docs"
|
|
61
62
|
Requires-Dist: sphinx_rtd_theme; extra == "docs"
|
|
62
63
|
Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
|
|
63
64
|
Requires-Dist: sphinx-autobuild; extra == "docs"
|
|
@@ -260,7 +261,10 @@ This project is primarily licensed under the BSD-3-Clause License.
|
|
|
260
261
|
Additional Components
|
|
261
262
|
=====================
|
|
262
263
|
|
|
263
|
-
Some components within this repository are licensed under
|
|
264
|
-
Attribution-NonCommercial 4.0 International
|
|
264
|
+
Some components within this repository are licensed under other licenses, including
|
|
265
|
+
Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0), Creative
|
|
266
|
+
Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0), MIT
|
|
267
|
+
and Apache-2.0.
|
|
265
268
|
|
|
266
|
-
Please refer to the ``LICENSE`` and ``NOTICE`` files for
|
|
269
|
+
Please refer to the ``LICENSE`` and ``NOTICE`` files for the per-file list and more
|
|
270
|
+
detailed information.
|
|
@@ -170,7 +170,10 @@ This project is primarily licensed under the BSD-3-Clause License.
|
|
|
170
170
|
Additional Components
|
|
171
171
|
=====================
|
|
172
172
|
|
|
173
|
-
Some components within this repository are licensed under
|
|
174
|
-
Attribution-NonCommercial 4.0 International
|
|
173
|
+
Some components within this repository are licensed under other licenses, including
|
|
174
|
+
Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0), Creative
|
|
175
|
+
Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0), MIT
|
|
176
|
+
and Apache-2.0.
|
|
175
177
|
|
|
176
|
-
Please refer to the ``LICENSE`` and ``NOTICE`` files for
|
|
178
|
+
Please refer to the ``LICENSE`` and ``NOTICE`` files for the per-file list and more
|
|
179
|
+
detailed information.
|
|
@@ -1002,7 +1002,7 @@ def sensors_rotation(
|
|
|
1002
1002
|
``mne`` through::
|
|
1003
1003
|
|
|
1004
1004
|
>>> ten_twenty_montage = mne.channels.make_standard_montage(
|
|
1005
|
-
... 'standard_1020'
|
|
1005
|
+
... 'standard_1020' # 'colin27_1020' on MNE >= 1.13
|
|
1006
1006
|
... ).get_positions()['ch_pos']
|
|
1007
1007
|
axis : 'x' | 'y' | 'z'
|
|
1008
1008
|
Axis around which to rotate.
|
|
@@ -13,6 +13,8 @@ import numpy as np
|
|
|
13
13
|
import torch
|
|
14
14
|
from mne.channels import make_standard_montage
|
|
15
15
|
|
|
16
|
+
from braindecode.util import resolve_montage_name
|
|
17
|
+
|
|
16
18
|
from .base import Transform
|
|
17
19
|
from .functional import (
|
|
18
20
|
amplitude_scale,
|
|
@@ -703,7 +705,7 @@ def _get_standard_10_20_positions(raw_or_epoch=None, ordered_ch_names=None):
|
|
|
703
705
|
)
|
|
704
706
|
if ordered_ch_names is None:
|
|
705
707
|
ordered_ch_names = raw_or_epoch.info["ch_names"]
|
|
706
|
-
ten_twenty_montage = make_standard_montage("standard_1020")
|
|
708
|
+
ten_twenty_montage = make_standard_montage(resolve_montage_name("standard_1020"))
|
|
707
709
|
positions_dict = ten_twenty_montage.get_positions()["ch_pos"]
|
|
708
710
|
positions_subdict = {
|
|
709
711
|
k: positions_dict[k] for k in ordered_ch_names if k in positions_dict
|
|
@@ -729,7 +731,7 @@ class SensorsRotation(Transform):
|
|
|
729
731
|
`mne` through::
|
|
730
732
|
|
|
731
733
|
>>> ten_twenty_montage = mne.channels.make_standard_montage(
|
|
732
|
-
... 'standard_1020'
|
|
734
|
+
... 'standard_1020' # 'colin27_1020' on MNE >= 1.13
|
|
733
735
|
... ).get_positions()['ch_pos']
|
|
734
736
|
|
|
735
737
|
axis : 'x' | 'y' | 'z', optional
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
# Authors: Bruno Aristimunha <b.aristimunha@gmail.com>
|
|
2
|
+
#
|
|
3
|
+
# License: BSD (3-clause)
|
|
4
|
+
"""Serverless in-notebook viewer for file-backed recordings.
|
|
5
|
+
|
|
6
|
+
The bytes on disk behind a dataset element are inlined in the cell output
|
|
7
|
+
as base64 and handed to the deployed eegdash-viewer over its ``postMessage``
|
|
8
|
+
bridge (``docs/embedding.md`` in https://github.com/eegdash/eegdash-viewer):
|
|
9
|
+
no server, no CORS. The output is an iframe plus an inline script, so it
|
|
10
|
+
renders when the cell ran in your session or the saved notebook is trusted
|
|
11
|
+
(``jupyter trust``).
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import base64
|
|
17
|
+
import json
|
|
18
|
+
import os
|
|
19
|
+
import uuid
|
|
20
|
+
from pathlib import Path
|
|
21
|
+
from urllib.parse import urlsplit
|
|
22
|
+
|
|
23
|
+
import mne_bids
|
|
24
|
+
from mne.utils import _soft_import
|
|
25
|
+
|
|
26
|
+
CDN = "https://eegdash.github.io/eegdash-viewer"
|
|
27
|
+
MAX_BYTES = 64 * 2**20 # base64 output per call; it is saved with the notebook
|
|
28
|
+
EXTENSIONS = {
|
|
29
|
+
".set",
|
|
30
|
+
".edf",
|
|
31
|
+
".bdf",
|
|
32
|
+
".vhdr",
|
|
33
|
+
".fif",
|
|
34
|
+
".snirf",
|
|
35
|
+
".nwb",
|
|
36
|
+
} # viewer readers
|
|
37
|
+
_BIDS = {"eeg", "ieeg", "emg", "meg", "nirs"}
|
|
38
|
+
_SIBLINGS = {".vhdr": (".eeg", ".vmrk"), ".set": (".fdt",)} # travel with the header
|
|
39
|
+
_HEADER = {s: h for h, ss in _SIBLINGS.items() for s in ss} # data file -> header
|
|
40
|
+
|
|
41
|
+
_SCRIPT = """<iframe id=%(id)s title="eegdash trace viewer" style="width:100%%;height:%(height)spx;
|
|
42
|
+
border:1px solid var(--jp-border-color1,#d9dce1);border-radius:6px;background:transparent"></iframe>
|
|
43
|
+
<script>
|
|
44
|
+
(function () {
|
|
45
|
+
var self = document.currentScript, id = %(id)s; // Lab re-runs scripts in place; VS Code/nbclassic elsewhere
|
|
46
|
+
var frame = (self && self.previousElementSibling && self.previousElementSibling.tagName === "IFRAME")
|
|
47
|
+
? self.previousElementSibling : document.getElementById(id);
|
|
48
|
+
if (!frame) { console.error("eegdash viewer: output iframe " + id + " not found"); return; }
|
|
49
|
+
var payload = %(payload)s, origin = %(origin)s, files = null, pose = null;
|
|
50
|
+
function decode(b64) {
|
|
51
|
+
if (Uint8Array.fromBase64) return Uint8Array.fromBase64(b64);
|
|
52
|
+
var bin = atob(b64), out = new Uint8Array(bin.length);
|
|
53
|
+
for (var i = 0; i < bin.length; i++) out[i] = bin.charCodeAt(i);
|
|
54
|
+
return out;
|
|
55
|
+
}
|
|
56
|
+
function send(target) {
|
|
57
|
+
try {
|
|
58
|
+
if (!files) {
|
|
59
|
+
files = payload.files.map(function (f) { return new File([decode(f.b64)], f.name); });
|
|
60
|
+
pose = payload.pose ? "data:application/json;base64," + payload.pose : null;
|
|
61
|
+
payload = null;
|
|
62
|
+
}
|
|
63
|
+
frame.contentWindow.postMessage({ type: "eegdash-viewer:open", files: files, pose: pose }, target || origin);
|
|
64
|
+
} catch (err) {
|
|
65
|
+
frame.insertAdjacentHTML("afterend", '<div style="font:12px system-ui;color:#b3261e">eegdash viewer: '
|
|
66
|
+
+ String(err.message).replace(/</g, "<") + "</div>");
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
window.addEventListener("message", function onMessage(e) {
|
|
70
|
+
if (e.source === frame.contentWindow && e.data && e.data.type === "eegdash-viewer:ready") send(e.origin);
|
|
71
|
+
else if (!frame.isConnected) window.removeEventListener("message", onMessage);
|
|
72
|
+
});
|
|
73
|
+
frame.src = %(src)s; // after the listener, so "ready" can never precede it
|
|
74
|
+
})();
|
|
75
|
+
</script>"""
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def recording_files(recording: Path) -> tuple[list[Path], Path | None]:
|
|
79
|
+
"""``(files, pose)`` to inline for a recording: the header first, then the
|
|
80
|
+
split-format siblings, the BIDS-inherited ``_channels.tsv``/``_events.tsv``
|
|
81
|
+
(``mne_bids`` parses the name; plain names get none) and, separately, the
|
|
82
|
+
``<prefix>_desc-pose.json`` hand-pose sidecar next to it. Symlinks keep
|
|
83
|
+
their name (git-annex/datalad)."""
|
|
84
|
+
rec = Path(recording)
|
|
85
|
+
if not rec.exists():
|
|
86
|
+
raise ValueError(
|
|
87
|
+
f"{rec.name}: file not found (a datalad symlink may need `datalad get`)"
|
|
88
|
+
)
|
|
89
|
+
if (
|
|
90
|
+
rec.is_dir()
|
|
91
|
+
or rec.suffix.lower() not in EXTENSIONS
|
|
92
|
+
or rec.stem.endswith("_epo")
|
|
93
|
+
):
|
|
94
|
+
raise ValueError(
|
|
95
|
+
f"{rec.name}: the viewer opens raw recordings in {' '.join(sorted(EXTENSIONS))}"
|
|
96
|
+
)
|
|
97
|
+
sidecars: list[Path | None] = []
|
|
98
|
+
try:
|
|
99
|
+
bids = mne_bids.get_bids_path_from_fname(rec, check=False)
|
|
100
|
+
if bids.subject is not None: # hyphen-free names parse, but are not BIDS
|
|
101
|
+
sidecars = [
|
|
102
|
+
bids.find_matching_sidecar(
|
|
103
|
+
suffix=s, extension=".tsv", on_error="ignore"
|
|
104
|
+
)
|
|
105
|
+
for s in ("channels", "events")
|
|
106
|
+
]
|
|
107
|
+
except (
|
|
108
|
+
KeyError,
|
|
109
|
+
ValueError,
|
|
110
|
+
): # not a BIDS name / unknown entity somewhere in the tree
|
|
111
|
+
pass
|
|
112
|
+
files = [rec]
|
|
113
|
+
for p in [
|
|
114
|
+
rec.with_suffix(e) for e in _SIBLINGS.get(rec.suffix.lower(), ())
|
|
115
|
+
] + sidecars:
|
|
116
|
+
if p and p.is_file():
|
|
117
|
+
if p not in files:
|
|
118
|
+
files.append(p)
|
|
119
|
+
elif p and p.is_symlink(): # dangling: git-annex/datalad content not fetched
|
|
120
|
+
raise ValueError(f"{p.name}: dangling symlink (try `datalad get`)")
|
|
121
|
+
stem, _, token = rec.stem.rpartition("_")
|
|
122
|
+
pose = rec.with_name((stem if token in _BIDS else rec.stem) + "_desc-pose.json")
|
|
123
|
+
return files, pose if pose.is_file() else None
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def build_viewer_html(
|
|
127
|
+
recording: Path,
|
|
128
|
+
*,
|
|
129
|
+
height: int = 520,
|
|
130
|
+
cdn_url: str = CDN,
|
|
131
|
+
max_bytes: int = MAX_BYTES,
|
|
132
|
+
) -> str:
|
|
133
|
+
"""Viewer iframe + inlined bytes + bridge script for one recording."""
|
|
134
|
+
url = urlsplit(cdn_url)
|
|
135
|
+
if (
|
|
136
|
+
url.scheme not in ("http", "https")
|
|
137
|
+
or not url.netloc
|
|
138
|
+
or url.username
|
|
139
|
+
or url.query
|
|
140
|
+
or url.fragment
|
|
141
|
+
or url.path.endswith(("index.html", "index.htm"))
|
|
142
|
+
):
|
|
143
|
+
raise ValueError(
|
|
144
|
+
f"cdn_url must be the viewer's base http(s) URL, got {cdn_url!r}"
|
|
145
|
+
)
|
|
146
|
+
files, pose = recording_files(recording)
|
|
147
|
+
encoded = sum(
|
|
148
|
+
4 * -(-p.stat().st_size // 3) for p in files + ([pose] if pose else [])
|
|
149
|
+
)
|
|
150
|
+
if encoded > max_bytes:
|
|
151
|
+
raise ValueError(
|
|
152
|
+
f"{files[0].name}: {encoded / 2**20:.1f} MiB of base64 would be inlined into the "
|
|
153
|
+
f"notebook output (max_bytes={max_bytes / 2**20:.1f} MiB); crop/downsample or raise it"
|
|
154
|
+
)
|
|
155
|
+
rec = files[0]
|
|
156
|
+
# The viewer picks the recording by its *_<datatype>.<ext> name: plain names
|
|
157
|
+
# are posted as <stem>_eeg<ext>, an EEGLAB .fdt next to the posted .set name.
|
|
158
|
+
head = (
|
|
159
|
+
rec.name
|
|
160
|
+
if rec.stem.rpartition("_")[2] in _BIDS
|
|
161
|
+
else f"{rec.stem}_eeg{rec.suffix.lower()}"
|
|
162
|
+
)
|
|
163
|
+
names = [head] + [
|
|
164
|
+
head.rsplit("_", 1)[0] + "_eeg.fdt" if p.suffix.lower() == ".fdt" else p.name
|
|
165
|
+
for p in files[1:]
|
|
166
|
+
]
|
|
167
|
+
b64 = [base64.b64encode(p.read_bytes()).decode() for p in files]
|
|
168
|
+
literals = {
|
|
169
|
+
"id": f"eegdash-viewer-{uuid.uuid4().hex[:8]}",
|
|
170
|
+
"height": int(height),
|
|
171
|
+
"payload": {
|
|
172
|
+
"files": [{"name": n, "b64": b} for n, b in zip(names, b64)],
|
|
173
|
+
"pose": base64.b64encode(pose.read_bytes()).decode() if pose else None,
|
|
174
|
+
},
|
|
175
|
+
"origin": f"{url.scheme}://{url.netloc}",
|
|
176
|
+
"src": f"{url.geturl().rstrip('/')}/index.html?embed=1",
|
|
177
|
+
}
|
|
178
|
+
return _SCRIPT % {
|
|
179
|
+
k: json.dumps(v).replace("<", "\\u003c") for k, v in literals.items()
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
def _recording(dataset, index: int) -> Path:
|
|
184
|
+
"""File behind ``dataset.datasets[index]``: the one its mne ``raw`` reads (a
|
|
185
|
+
data file maps back to its header; lazily downloading datasets fetch it when
|
|
186
|
+
``raw`` is accessed) or the recorded ``description["path"]``."""
|
|
187
|
+
ds = dataset.datasets[index]
|
|
188
|
+
names = [
|
|
189
|
+
Path(f)
|
|
190
|
+
for f in getattr(getattr(ds, "raw", None), "filenames", None) or ()
|
|
191
|
+
if isinstance(f, (str, os.PathLike))
|
|
192
|
+
]
|
|
193
|
+
if len(names) > 1:
|
|
194
|
+
raise ValueError(
|
|
195
|
+
f"{type(dataset).__name__}[{index}]: split recordings are not supported"
|
|
196
|
+
)
|
|
197
|
+
desc = getattr(ds, "description", None) # dict or pandas Series
|
|
198
|
+
recorded = desc.get("path") if desc is not None else None
|
|
199
|
+
path = (
|
|
200
|
+
names[0]
|
|
201
|
+
if names
|
|
202
|
+
else Path(recorded)
|
|
203
|
+
if isinstance(recorded, (str, os.PathLike))
|
|
204
|
+
else None
|
|
205
|
+
)
|
|
206
|
+
if path is None:
|
|
207
|
+
raise ValueError(
|
|
208
|
+
f"{type(dataset).__name__}[{index}] is not backed by a recording file"
|
|
209
|
+
)
|
|
210
|
+
header = path.with_suffix(_HEADER.get(path.suffix.lower(), path.suffix))
|
|
211
|
+
return header if header.is_file() else path
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
def plot(
|
|
215
|
+
dataset,
|
|
216
|
+
index: int = 0,
|
|
217
|
+
*,
|
|
218
|
+
height: int = 520,
|
|
219
|
+
cdn_url: str = CDN,
|
|
220
|
+
max_bytes: int = MAX_BYTES,
|
|
221
|
+
):
|
|
222
|
+
"""Show one recording in the eegdash-viewer inside a Jupyter cell.
|
|
223
|
+
|
|
224
|
+
Serverless: the recording bytes (as on disk) are inlined in the output and
|
|
225
|
+
pushed to the viewer at ``cdn_url`` over ``postMessage``; the output renders
|
|
226
|
+
when the cell ran in your session or the notebook is trusted. A
|
|
227
|
+
``*_desc-pose.json`` sidecar next to the recording adds the synchronized
|
|
228
|
+
hand-pose panel. Needs IPython (soft dependency).
|
|
229
|
+
|
|
230
|
+
Parameters
|
|
231
|
+
----------
|
|
232
|
+
index : int
|
|
233
|
+
Recording to display.
|
|
234
|
+
height : int
|
|
235
|
+
Viewer height in pixels.
|
|
236
|
+
cdn_url : str
|
|
237
|
+
Base URL of a deployed eegdash-viewer.
|
|
238
|
+
max_bytes : int
|
|
239
|
+
Refuse to inline more than this much base64 (default 64 MiB); the
|
|
240
|
+
payload is saved with the notebook and, like any cell output, stays
|
|
241
|
+
referenced by IPython's ``Out`` history for the session.
|
|
242
|
+
|
|
243
|
+
Returns
|
|
244
|
+
-------
|
|
245
|
+
IPython.display.HTML
|
|
246
|
+
"""
|
|
247
|
+
ipython = _soft_import("IPython", purpose=f"{type(dataset).__name__}.plot()")
|
|
248
|
+
return ipython.display.HTML(
|
|
249
|
+
build_viewer_html(
|
|
250
|
+
_recording(dataset, index),
|
|
251
|
+
height=height,
|
|
252
|
+
cdn_url=cdn_url,
|
|
253
|
+
max_bytes=max_bytes,
|
|
254
|
+
)
|
|
255
|
+
)
|
{braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datasets/base.py
RENAMED
|
@@ -32,6 +32,7 @@ from mne.utils.docs import deprecated
|
|
|
32
32
|
from torch.utils.data import ConcatDataset, Dataset, IterableDataset
|
|
33
33
|
from typing_extensions import TypeVar
|
|
34
34
|
|
|
35
|
+
from ._notebook_viewer import plot as _viewer_plot
|
|
35
36
|
from .bids.hub import HubDatasetMixin
|
|
36
37
|
from .bids.hub_io import _restore_nan_from_json
|
|
37
38
|
from .registry import register_dataset
|
|
@@ -59,6 +60,7 @@ def _html_row(label, value):
|
|
|
59
60
|
|
|
60
61
|
_METADATA_INTERNAL_COLS = {
|
|
61
62
|
"i_window_in_trial",
|
|
63
|
+
"i_trial_in_dataset",
|
|
62
64
|
"i_start_in_trial",
|
|
63
65
|
"i_stop_in_trial",
|
|
64
66
|
"target",
|
|
@@ -1173,6 +1175,8 @@ class BaseConcatDataset(ConcatDataset, HubDatasetMixin, Generic[T]):
|
|
|
1173
1175
|
If True, defer computing cumulative sizes until length or item access.
|
|
1174
1176
|
"""
|
|
1175
1177
|
|
|
1178
|
+
plot = _viewer_plot # eegdash-viewer embed; a direct member so the API docs list it
|
|
1179
|
+
|
|
1176
1180
|
datasets: list[T]
|
|
1177
1181
|
|
|
1178
1182
|
def __init__(
|
|
@@ -1374,6 +1378,20 @@ class BaseConcatDataset(ConcatDataset, HubDatasetMixin, Generic[T]):
|
|
|
1374
1378
|
"datasets are WindowsDataset."
|
|
1375
1379
|
)
|
|
1376
1380
|
|
|
1381
|
+
for ds in self.datasets:
|
|
1382
|
+
if hasattr(ds, "_windows") and ds._windows is not None:
|
|
1383
|
+
df = ds._windows.metadata
|
|
1384
|
+
else:
|
|
1385
|
+
df = ds.metadata
|
|
1386
|
+
if (
|
|
1387
|
+
"i_trial_in_dataset" in df.columns
|
|
1388
|
+
and "i_trial_in_dataset" in ds.description
|
|
1389
|
+
):
|
|
1390
|
+
raise ValueError(
|
|
1391
|
+
"Dataset descriptions cannot contain the reserved window "
|
|
1392
|
+
"metadata key 'i_trial_in_dataset'."
|
|
1393
|
+
)
|
|
1394
|
+
|
|
1377
1395
|
all_dfs = list()
|
|
1378
1396
|
for ds in self.datasets:
|
|
1379
1397
|
if hasattr(ds, "_windows") and ds._windows is not None:
|
{braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/datasets/tuh.py
RENAMED
|
@@ -25,6 +25,7 @@ import pandas as pd
|
|
|
25
25
|
from joblib import Parallel, delayed
|
|
26
26
|
|
|
27
27
|
from braindecode.datasets.base import BaseConcatDataset, RawDataset
|
|
28
|
+
from braindecode.util import resolve_montage_name
|
|
28
29
|
|
|
29
30
|
|
|
30
31
|
class TUH(BaseConcatDataset):
|
|
@@ -182,7 +183,9 @@ class TUH(BaseConcatDataset):
|
|
|
182
183
|
}
|
|
183
184
|
raw.rename_channels(mapping_strip)
|
|
184
185
|
|
|
185
|
-
montage1005 = mne.channels.make_standard_montage(
|
|
186
|
+
montage1005 = mne.channels.make_standard_montage(
|
|
187
|
+
resolve_montage_name("standard_1005")
|
|
188
|
+
)
|
|
186
189
|
mapping_eeg_names = {
|
|
187
190
|
c.upper(): c for c in montage1005.ch_names if c.upper() in raw.ch_names
|
|
188
191
|
}
|
|
@@ -207,7 +210,9 @@ class TUH(BaseConcatDataset):
|
|
|
207
210
|
|
|
208
211
|
@staticmethod
|
|
209
212
|
def _set_montage(raw):
|
|
210
|
-
montage = mne.channels.make_standard_montage(
|
|
213
|
+
montage = mne.channels.make_standard_montage(
|
|
214
|
+
resolve_montage_name("standard_1005")
|
|
215
|
+
)
|
|
211
216
|
raw.set_montage(montage, on_missing="ignore")
|
|
212
217
|
|
|
213
218
|
@staticmethod
|
|
@@ -40,7 +40,7 @@ def drop_path(
|
|
|
40
40
|
x : torch.Tensor
|
|
41
41
|
input tensor
|
|
42
42
|
drop_prob : float, optional
|
|
43
|
-
|
|
43
|
+
probability of dropping a path, by default 0.0
|
|
44
44
|
training : bool, optional
|
|
45
45
|
whether the model is in training mode, by default False
|
|
46
46
|
scale_by_keep : bool, optional
|
|
@@ -68,9 +68,10 @@ def drop_path(
|
|
|
68
68
|
shape = (x.shape[0],) + (1,) * (
|
|
69
69
|
x.ndim - 1
|
|
70
70
|
) # work with diff dim tensors, not just 2D ConvNets
|
|
71
|
-
|
|
71
|
+
probabilities = torch.full(shape, keep_prob, dtype=torch.float32, device=x.device)
|
|
72
|
+
random_tensor = torch.bernoulli(probabilities).to(dtype=x.dtype)
|
|
72
73
|
if keep_prob > 0.0 and scale_by_keep:
|
|
73
|
-
random_tensor
|
|
74
|
+
random_tensor = random_tensor / keep_prob
|
|
74
75
|
return x * random_tensor
|
|
75
76
|
|
|
76
77
|
|
{braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/__init__.py
RENAMED
|
@@ -40,9 +40,11 @@ from .medformer import MEDFormer
|
|
|
40
40
|
from .meta_neuromotor import MetaNeuromotorHand
|
|
41
41
|
from .msvtnet import MSVTNet
|
|
42
42
|
from .mvpformer import MVPFormer
|
|
43
|
+
from .neuropose import NeuroPose
|
|
43
44
|
from .patchedtransformer import PBT
|
|
44
45
|
from .reve import REVE
|
|
45
46
|
from .sccnet import SCCNet
|
|
47
|
+
from .sensingdynamics import SensingDynamics
|
|
46
48
|
from .shallow_fbcsp import ShallowFBCSPNet
|
|
47
49
|
from .signal_jepa import (
|
|
48
50
|
InterpolatedSignalJEPA,
|
|
@@ -71,6 +73,7 @@ from .util import (
|
|
|
71
73
|
models_mandatory_parameters,
|
|
72
74
|
positions_from_chs_info,
|
|
73
75
|
)
|
|
76
|
+
from .vemg2pose import VEMG2Pose
|
|
74
77
|
from .zuna import ZUNA
|
|
75
78
|
|
|
76
79
|
# Call this last in order to make sure the dataset list is populated with
|
|
@@ -107,6 +110,9 @@ __all__ = [
|
|
|
107
110
|
"EEGTCNet",
|
|
108
111
|
"DGCNN",
|
|
109
112
|
"EMG2QwertyNet",
|
|
113
|
+
"NeuroPose",
|
|
114
|
+
"SensingDynamics",
|
|
115
|
+
"VEMG2Pose",
|
|
110
116
|
"FBCNet",
|
|
111
117
|
"FBLightConvNet",
|
|
112
118
|
"FBMSNet",
|
{braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/atcnet.py
RENAMED
|
@@ -196,7 +196,7 @@ class ATCNet(EEGModuleMixin, nn.Module):
|
|
|
196
196
|
num_heads : int
|
|
197
197
|
Number of attention heads, denoted H in table 1 of the paper [1]_.
|
|
198
198
|
Defaults to 2 as in [1]_.
|
|
199
|
-
|
|
199
|
+
att_drop_prob : float
|
|
200
200
|
Dropout probability used in the attention block, denoted pa in table 1
|
|
201
201
|
of the paper [1]_. Defaults to 0.5 as in [1]_.
|
|
202
202
|
tcn_depth : int
|
|
@@ -206,7 +206,7 @@ class ATCNet(EEGModuleMixin, nn.Module):
|
|
|
206
206
|
tcn_kernel_size : int
|
|
207
207
|
Temporal kernel size used in TCN block, denoted Kt in table 1 of the
|
|
208
208
|
paper [1]_. Defaults to 4 as in [1]_.
|
|
209
|
-
|
|
209
|
+
tcn_drop_prob : float
|
|
210
210
|
Dropout probability used in the TCN block, denoted pt in table 1
|
|
211
211
|
of the paper [1]_. Defaults to 0.3 as in [1]_.
|
|
212
212
|
tcn_activation : torch.nn.Module
|
{braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/attn_sleep.py
RENAMED
|
@@ -88,10 +88,6 @@ class AttnSleep(EEGModuleMixin, nn.Module):
|
|
|
88
88
|
If True, return the features, i.e. the output of the feature extractor
|
|
89
89
|
(before the final linear layer). If False, pass the features through
|
|
90
90
|
the final linear layer.
|
|
91
|
-
n_classes : int
|
|
92
|
-
Alias for `n_outputs`.
|
|
93
|
-
input_size_s : float
|
|
94
|
-
Alias for `input_window_seconds`.
|
|
95
91
|
activation : nn.Module, default=nn.ReLU
|
|
96
92
|
Activation function class to apply in the AFR block and the TCE
|
|
97
93
|
feed-forward block. Should be a PyTorch activation
|
{braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/base.py
RENAMED
|
@@ -80,7 +80,7 @@ class _BraindecodeDocstringMeta(NumpyDocstringInheritanceInitMeta):
|
|
|
80
80
|
unwrapped function and correctly inherits ``cls.__doc__``.
|
|
81
81
|
"""
|
|
82
82
|
|
|
83
|
-
def __init__(cls, class_name, class_bases, class_dict):
|
|
83
|
+
def __init__(cls, class_name, class_bases, class_dict, **kwargs):
|
|
84
84
|
super().__init__(class_name, class_bases, class_dict)
|
|
85
85
|
# Only wrap subclass __init__s, not EEGModuleMixin itself.
|
|
86
86
|
# Wrapping the mixin would cause super().__init__() calls to
|
|
@@ -214,6 +214,8 @@ class EEGModuleMixin(_BaseHubMixin, metaclass=_BraindecodeDocstringMeta):
|
|
|
214
214
|
__jit_unused_properties__ = ["chs_info"]
|
|
215
215
|
|
|
216
216
|
def __init_subclass__(cls, **kwargs):
|
|
217
|
+
license = kwargs.pop("license", "bsd-3-clause")
|
|
218
|
+
|
|
217
219
|
# TorchScript only honours ``__jit_ignored_attributes__`` for
|
|
218
220
|
# properties defined directly on the concrete class: it collects them
|
|
219
221
|
# with ``vars(type(module))``, which skips inherited ones. Rebinding
|
|
@@ -253,8 +255,6 @@ class EEGModuleMixin(_BaseHubMixin, metaclass=_BraindecodeDocstringMeta):
|
|
|
253
255
|
)
|
|
254
256
|
repo_url = kwargs.pop("repo_url", "https://braindecode.org")
|
|
255
257
|
library_name = kwargs.pop("library_name", "braindecode")
|
|
256
|
-
license = kwargs.pop("license", "bsd-3-clause")
|
|
257
|
-
|
|
258
258
|
# Register a coder so that type[nn.Module] parameters
|
|
259
259
|
# (e.g. activation=nn.ELU) are serialized as importable
|
|
260
260
|
# strings in config.json and decoded back on load.
|
|
@@ -519,6 +519,31 @@ class EEGModuleMixin(_BaseHubMixin, metaclass=_BraindecodeDocstringMeta):
|
|
|
519
519
|
resolve_type_kwargs(cls, config)
|
|
520
520
|
return cls(**config)
|
|
521
521
|
|
|
522
|
+
def _set_n_outputs(self, n_outputs: int) -> None:
|
|
523
|
+
"""Record a new ``n_outputs`` on the model and its saved configs.
|
|
524
|
+
|
|
525
|
+
Helper for :meth:`reset_head` implementations: validates the value,
|
|
526
|
+
then keeps the ``n_outputs`` property, the braindecode init kwargs
|
|
527
|
+
and the Hugging Face hub config in sync, so a re-serialized model
|
|
528
|
+
reports the head it actually has.
|
|
529
|
+
|
|
530
|
+
Parameters
|
|
531
|
+
----------
|
|
532
|
+
n_outputs : int
|
|
533
|
+
New number of outputs. Must be positive.
|
|
534
|
+
|
|
535
|
+
.. versionadded:: 1.8
|
|
536
|
+
"""
|
|
537
|
+
if n_outputs <= 0:
|
|
538
|
+
raise ValueError(f"n_outputs must be positive; got {n_outputs}.")
|
|
539
|
+
self._n_outputs = n_outputs
|
|
540
|
+
for config in (
|
|
541
|
+
getattr(self, "_braindecode_init_kwargs", None),
|
|
542
|
+
getattr(self, "_hub_mixin_config", None),
|
|
543
|
+
):
|
|
544
|
+
if config is not None and "n_outputs" in config:
|
|
545
|
+
config["n_outputs"] = n_outputs
|
|
546
|
+
|
|
522
547
|
def reset_head(self, n_outputs):
|
|
523
548
|
"""Replace the classification head for a new number of outputs.
|
|
524
549
|
|
{braindecode-1.8.0.dev183527593 → braindecode-1.8.1.dev168679286}/braindecode/models/brainmodule.py
RENAMED
|
@@ -25,7 +25,7 @@ from braindecode.modules.layers import SubjectLayers
|
|
|
25
25
|
__all__ = ["BrainModule"]
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
class BrainModule(EEGModuleMixin, nn.Module):
|
|
28
|
+
class BrainModule(EEGModuleMixin, nn.Module, license="cc-by-nc-4.0"):
|
|
29
29
|
r"""BrainModule from [brainmagick]_, also known as SimpleConv.
|
|
30
30
|
|
|
31
31
|
A dilated convolutional encoder for EEG decoding, using residual
|