|
| 1 | +Metadata-Version: 2.4 |
| 2 | +Name: eegdash |
| 3 | +Version: 0.0.8 |
| 4 | +Summary: EEG data for machine learning |
| 5 | +Author-email: Young Truong < [email protected]>, Arnaud Delorme < [email protected]> |
| 6 | +License: GNU General Public License |
| 7 | + |
| 8 | + Copyright (C) 2024-2025 |
| 9 | + |
| 10 | + Young Truong, UCSD, [email protected] |
| 11 | + Arnaud Delorme, UCSD, [email protected] |
| 12 | + |
| 13 | + This program is free software; you can redistribute it and/or modify |
| 14 | + it under the terms of the GNU General Public License as published by |
| 15 | + the Free Software Foundation; either version 2 of the License, or |
| 16 | + (at your option) any later version. |
| 17 | + |
| 18 | + This program is distributed in the hope that it will be useful, |
| 19 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 21 | + GNU General Public License for more details. |
| 22 | + |
| 23 | + You should have received a copy of the GNU General Public License |
| 24 | + along with this program; if not, write to the Free Software |
| 25 | + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1.07 USA |
| 26 | + |
| 27 | +Project-URL: Homepage, https://github.com/sccn/EEG-Dash-Data |
| 28 | +Project-URL: Issues, https://github.com/sccn/EEG-Dash-Data/issues |
| 29 | +Classifier: Programming Language :: Python :: 3 |
| 30 | +Classifier: License :: OSI Approved :: MIT License |
| 31 | +Classifier: Operating System :: OS Independent |
| 32 | +Requires-Python: >=3.8 |
| 33 | +Description-Content-Type: text/markdown |
| 34 | +License-File: LICENSE |
| 35 | +Requires-Dist: xarray |
| 36 | +Requires-Dist: python-dotenv |
| 37 | +Requires-Dist: s3fs |
| 38 | +Requires-Dist: mne |
| 39 | +Requires-Dist: pynwb |
| 40 | +Requires-Dist: h5py |
| 41 | +Requires-Dist: pymongo |
| 42 | +Requires-Dist: joblib |
| 43 | +Requires-Dist: braindecode |
| 44 | +Requires-Dist: mne-bids |
| 45 | +Requires-Dist: pybids |
| 46 | +Requires-Dist: pymatreader |
| 47 | +Requires-Dist: pyarrow |
| 48 | +Requires-Dist: tqdm |
| 49 | +Requires-Dist: numba |
| 50 | +Requires-Dist: pre-commit |
| 51 | +Dynamic: license-file |
| 52 | + |
| 53 | +# EEG-Dash |
| 54 | +To leverage recent and ongoing advancements in large-scale computational methods and to ensure the preservation of scientific data generated from publicly funded research, the EEG-DaSh data archive will create a data-sharing resource for MEEG (EEG, MEG) data contributed by collaborators for machine learning (ML) and deep learning (DL) applications. |
| 55 | + |
| 56 | +## Data source |
| 57 | +The data in EEG-DaSh originates from a collaboration involving 25 laboratories, encompassing 27,053 participants. This extensive collection includes MEEG data, which is a combination of EEG and MEG signals. The data is sourced from various studies conducted by these labs, involving both healthy subjects and clinical populations with conditions such as ADHD, depression, schizophrenia, dementia, autism, and psychosis. Additionally, data spans different mental states like sleep, meditation, and cognitive tasks. In addition, EEG-DaSh will incorporate a subset of the data converted from NEMAR, which includes 330 MEEG BIDS-formatted datasets, further expanding the archive with well-curated, standardized neuroelectromagnetic data. |
| 58 | + |
| 59 | +## Featured data |
| 60 | + |
| 61 | +The following HBN datasets are currently featured on EEGDash. Documentation about these datasets is available [here](https://neuromechanist.github.io/data/hbn/). |
| 62 | + |
| 63 | +| DatasetID | Participants | Files | Sessions | Population | Channels | Is 10-20? | Modality | Size | |
| 64 | +|---|---|---|---|---|---|---|---|---| |
| 65 | +| [ds005505](https://nemar.org/dataexplorer/detail?dataset_id=ds005505) | 136 | 5393 | 1 | Healthy | 129 | other | Visual | 103 GB | |
| 66 | +| [ds005506](https://nemar.org/dataexplorer/detail?dataset_id=ds005506) | 150 | 5645 | 1 | Healthy | 129 | other | Visual | 112 GB | |
| 67 | +| [ds005507](https://nemar.org/dataexplorer/detail?dataset_id=ds005507) | 184 | 7273 | 1 | Healthy | 129 | other | Visual | 140 GB | |
| 68 | +| [ds005508](https://nemar.org/dataexplorer/detail?dataset_id=ds005508) | 324 | 13393 | 1 | Healthy | 129 | other | Visual | 230 GB | |
| 69 | +| [ds005510](https://nemar.org/dataexplorer/detail?dataset_id=ds005510) | 135 | 4933 | 1 | Healthy | 129 | other | Visual | 91 GB | |
| 70 | +| [ds005512](https://nemar.org/dataexplorer/detail?dataset_id=ds005512) | 257 | 9305 | 1 | Healthy | 129 | other | Visual | 157 GB | |
| 71 | +| [ds005514](https://nemar.org/dataexplorer/detail?dataset_id=ds005514) | 295 | 11565 | 1 | Healthy | 129 | other | Visual | 185 GB | |
| 72 | + |
| 73 | +A total of [246 other datasets](datasets.md) are also available through EEGDash. |
| 74 | + |
| 75 | +## Data format |
| 76 | +EEGDash queries return a **Pytorch Dataset** formatted to facilitate machine learning (ML) and deep learning (DL) applications. PyTorch Datasets are the best format for EEGDash queries because they provide an efficient, scalable, and flexible structure for machine learning (ML) and deep learning (DL) applications. They allow seamless integration with PyTorch’s DataLoader, enabling efficient batching, shuffling, and parallel data loading, which is essential for training deep learning models on large EEG datasets. |
| 77 | + |
| 78 | +## Data preprocessing |
| 79 | +EEGDash datasets are processed using the popular [BrainDecode](https://braindecode.org/stable/index.html) library. In fact, EEGDash datasets are BrainDecode datasets, which are themselves PyTorch datasets. This means that any preprocessing possible on BrainDecode datasets is also possible on EEGDash datasets. Refer to [BrainDecode](https://braindecode.org/stable/index.html) tutorials for guidance on preprocessing EEG data. |
| 80 | + |
| 81 | +## EEG-Dash usage |
| 82 | + |
| 83 | +### Install |
| 84 | +Use your preferred Python environment manager with Python > 3.9 to install the package. |
| 85 | +* To install the eegdash package, use the following command: `pip install eegdash` |
| 86 | +* To verify the installation, start a Python session and type: `from eegdash import EEGDash` |
| 87 | + |
| 88 | +### Data access |
| 89 | + |
| 90 | +To use the data from a single subject, enter: |
| 91 | + |
| 92 | +```python |
| 93 | +from eegdash import EEGDashDataset |
| 94 | +ds_NDARDB033FW5 = EEGDashDataset({'dataset': 'ds005514', 'task': 'RestingState', 'subject': 'NDARDB033FW5'}) |
| 95 | +``` |
| 96 | + |
| 97 | +This will search and download the metadata for the task **RestingState** for subject **NDARDB033FW5** in BIDS dataset **ds005514**. The actual data will not be downloaded at this stage. Following standard practice, data is only downloaded once it is processed. The **ds_NDARDB033FW5** object is a fully functional BrainDecode dataset, which is itself a PyTorch dataset. This [tutorial](https://github.com/sccn/EEGDash/blob/develop/notebooks/tutorial_eoec.ipynb) shows how to preprocess the EEG data, extracting portions of the data containing eyes-open and eyes-closed segments, then perform eyes-open vs. eyes-closed classification using a (shallow) deep-learning model. |
| 98 | + |
| 99 | +To use the data from multiple subjects, enter: |
| 100 | + |
| 101 | +```python |
| 102 | +from eegdash import EEGDashDataset |
| 103 | +ds_ds005505rest = EEGDashDataset({'dataset': 'ds005505', 'task': 'RestingState'}, target_name='sex') |
| 104 | +``` |
| 105 | + |
| 106 | +This will search and download the metadata for the task 'RestingState' for all subjects in BIDS dataset 'ds005505' (a total of 136). As above, the actual data will not be downloaded at this stage so this command is quick to execute. Also, the target class for each subject is assigned using the target_name parameter. This means that this object is ready to be directly fed to a deep learning model, although the [tutorial script](https://github.com/sccn/EEGDash/blob/develop/notebooks/tutorial_sex_classification.ipynb) performs minimal processing on it, prior to training a deep-learning model. Because 14 gigabytes of data are downloaded, this tutorial takes about 10 minutes to execute. |
| 107 | + |
| 108 | +### Automatic caching |
| 109 | + |
| 110 | +EEGDash automatically caches the downloaded data in the .eegdash_cache folder of the current directory from which the script is called. This means that if you run the tutorial [scripts](https://github.com/sccn/EEGDash/tree/develop/notebooks), the data will only be downloaded the first time the script is executed. |
| 111 | + |
| 112 | +## Education -- Coming soon... |
| 113 | + |
| 114 | +We organize workshops and educational events to foster cross-cultural education and student training, offering both online and in-person opportunities in collaboration with US and Israeli partners. Events for 2025 will be announced via the EEGLABNEWS mailing list. Be sure to [subscribe](https://sccn.ucsd.edu/mailman/listinfo/eeglabnews). |
| 115 | + |
| 116 | +## About EEG-DaSh |
| 117 | + |
| 118 | +EEG-DaSh is a collaborative initiative between the United States and Israel, supported by the National Science Foundation (NSF). The partnership brings together experts from the Swartz Center for Computational Neuroscience (SCCN) at the University of California San Diego (UCSD) and Ben-Gurion University (BGU) in Israel. |
| 119 | + |
| 120 | + |
| 121 | + |
| 122 | + |
| 123 | + |
| 124 | + |
0 commit comments