aleks-wordcab commited on
Commit
8fbc5e5
·
verified ·
1 Parent(s): 1b9161f

Upload ./README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +159 -0
README.md ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LibriBrain MEG Preprocessed Dataset
2
+
3
+ Preprocessed magnetoencephalography (MEG) recordings with phoneme labels from the LibriBrain dataset, optimized for fast loading during machine learning model training.
4
+
5
+ This dataset was created for the [LibriBrain 2025 Competition](https://neural-processing-lab.github.io/2025-libribrain-competition/) (now concluded).
6
+
7
+ ## Dataset Overview
8
+
9
+ ### MEG Recording Specifications
10
+ - **Channels**: 306 total (102 magnetometers + 204 gradiometers)
11
+ - **Sampling Rate**: 250 Hz
12
+ - **Duration**: ~52 hours of recordings
13
+ - **Subject**: Single English speaker listening to Sherlock Holmes audiobooks
14
+ - **Phoneme Instances**: ~1.5 million
15
+
16
+ ### Phoneme Inventory
17
+ 39 ARPAbet phonemes with position encoding:
18
+ - **Vowels** (15): aa, ae, ah, ao, aw, ay, eh, er, ey, ih, iy, ow, oy, uh, uw
19
+ - **Consonants** (24): b, ch, d, dh, f, g, hh, jh, k, l, m, n, ng, p, r, s, sh, t, th, v, w, y, z, zh
20
+ - **Special**: oov (out-of-vocabulary)
21
+
22
+ Position markers: B (beginning), I (inside), E (end), S (singleton)
23
+
24
+ ### Signal Processing
25
+ All MEG data has been preprocessed through the following pipeline:
26
+ 1. Bad channel removal
27
+ 2. Signal Space Separation (SSS) for noise reduction
28
+ 3. Notch filtering for powerline noise removal
29
+ 4. Bandpass filtering (0.1-125 Hz)
30
+ 5. Downsampling to 250 Hz
31
+
32
+ ## Preprocessing and Grouping
33
+
34
+ This dataset contains pre-grouped and averaged MEG samples for significantly faster data loading during training. Instead of grouping samples on-the-fly (which is computationally expensive), samples have been pre-grouped at various levels.
35
+
36
+ ### Available Grouping Configurations
37
+ - `grouped_5`: 5 samples averaged together
38
+ - `grouped_10`: 10 samples averaged together
39
+ - `grouped_15`: 15 samples averaged together
40
+ - `grouped_20`: 20 samples averaged together
41
+ - `grouped_25`: 25 samples averaged together
42
+ - `grouped_30`: 30 samples averaged together
43
+ - `grouped_35`: 35 samples averaged together (partial - train only)
44
+ - `grouped_45`: 45 samples averaged together
45
+ - `grouped_50`: 50 samples averaged together
46
+ - `grouped_55`: 55 samples averaged together
47
+ - `grouped_60`: 60 samples averaged together
48
+ - `grouped_100`: 100 samples averaged together
49
+
50
+ Each configuration contains:
51
+ - `train_grouped.h5`: Training data
52
+ - `validation_grouped.h5`: Validation data
53
+ - `test_grouped.h5`: Test data
54
+ - `paths.yaml`: File path references
55
+
56
+ ### Why Use Grouped Data?
57
+ - **Faster Loading**: Pre-computed grouping eliminates runtime averaging overhead
58
+ - **Memory Efficient**: Smaller file sizes for higher grouping levels
59
+ - **Flexible**: Choose grouping level based on your accuracy vs. speed requirements
60
+ - **Standardized**: Consistent preprocessing across all configurations
61
+
62
+ ## Installation
63
+
64
+ This dataset requires the modified pnpl library for loading:
65
+
66
+ ```bash
67
+ pip install git+https://github.com/September-Labs/pnpl.git
68
+ ```
69
+
70
+ ## Usage
71
+
72
+ ```python
73
+ from pnpl.datasets import GroupedDataset
74
+
75
+ # Load preprocessed data with 100-sample grouping
76
+ train_dataset = GroupedDataset(
77
+ preprocessed_path="data/grouped_100/train_grouped.h5",
78
+ load_to_memory=True # Optional: load entire dataset to memory for faster access
79
+ )
80
+
81
+ val_dataset = GroupedDataset(
82
+ preprocessed_path="data/grouped_100/validation_grouped.h5",
83
+ load_to_memory=True
84
+ )
85
+
86
+ # Get a sample
87
+ sample = train_dataset[0]
88
+ meg_data = sample['meg'] # Shape: (306, time_points)
89
+ phoneme_label = sample['phoneme'] # Phoneme class index
90
+
91
+ # Use with PyTorch DataLoader
92
+ from torch.utils.data import DataLoader
93
+
94
+ dataloader = DataLoader(
95
+ train_dataset,
96
+ batch_size=32,
97
+ shuffle=True,
98
+ num_workers=4
99
+ )
100
+ ```
101
+
102
+ ## Data Structure
103
+
104
+ ```
105
+ data/
106
+ ├── grouped_5/
107
+ │ ├── train_grouped.h5
108
+ │ ├── validation_grouped.h5
109
+ │ ├── test_grouped.h5
110
+ │ └── paths.yaml
111
+ ├── grouped_10/
112
+ │ ├── train_grouped.h5
113
+ │ ├── validation_grouped.h5
114
+ │ ├── test_grouped.h5
115
+ │ └── paths.yaml
116
+ ├── ...
117
+ └── grouped_100/
118
+ ├── train_grouped.h5
119
+ ├── validation_grouped.h5
120
+ ├── test_grouped.h5
121
+ └── paths.yaml
122
+ ```
123
+
124
+ ## File Sizes
125
+
126
+ | Grouping | Train | Validation | Test | Total |
127
+ |----------|-------|------------|------|-------|
128
+ | grouped_5 | 45.6 GB | 425 MB | 456 MB | ~47 GB |
129
+ | grouped_10 | 22.8 GB | 213 MB | 228 MB | ~24 GB |
130
+ | grouped_20 | 11.4 GB | 106 MB | 114 MB | ~12 GB |
131
+ | grouped_50 | 4.6 GB | 37 MB | 42 MB | ~4.7 GB |
132
+ | grouped_100 | 2.3 GB | 19 MB | 21 MB | ~2.4 GB |
133
+
134
+ ## Dataset Splits
135
+
136
+ - **Train**: 88 sessions (~51 hours)
137
+ - **Validation**: 1 session (~0.36 hours)
138
+ - **Test**: 1 session (~0.38 hours)
139
+
140
+ ## Citation
141
+
142
+ If you use this dataset, please cite the LibriBrain competition:
143
+
144
+ ```bibtex
145
+ @misc{libribrain2025,
146
+ title={LibriBrain: A Dataset for Speech Decoding from Brain Signals},
147
+ author={Neural Processing Lab},
148
+ year={2025},
149
+ url={https://neural-processing-lab.github.io/2025-libribrain-competition/}
150
+ }
151
+ ```
152
+
153
+ ## License
154
+
155
+ Please refer to the original LibriBrain dataset license terms.
156
+
157
+ ## Acknowledgments
158
+
159
+ This preprocessed version was created to facilitate faster training for the LibriBrain 2025 Competition. The original dataset and competition were organized by the Neural Processing Lab.