Gereon Elvers
commited on
Commit
·
73a65af
1
Parent(s):
04e058a
Fix paper link and example usage in README
Browse files
README.md
CHANGED
|
@@ -8,14 +8,51 @@ task_categories:
|
|
| 8 |
|
| 9 |
# LibriBrain (Sherlock Holmes 1–7)
|
| 10 |
|
| 11 |
-
[Paper](https://huggingface.co/papers/
|
| 12 |
|
| 13 |
This repository contains the LibriBrain data organised by book: MEG recordings (`.h5`), event annotations (`.tsv`), and the audiobook stimulus audio (`.wav`).
|
| 14 |
|
| 15 |
-
LibriBrain
|
|
|
|
|
|
|
| 16 |
|
| 17 |
## Sample Usage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
To fine-tune the MEG-XL model on the LibriBrain dataset for word decoding, you can use the following command from the [official repository](https://github.com/neural-processing-lab/MEG-XL):
|
| 20 |
|
| 21 |
```bash
|
|
@@ -24,7 +61,8 @@ python -m brainstorm.evaluate_criss_cross_word_classification \
|
|
| 24 |
model.criss_cross_checkpoint=/path/to/your/checkpoint.ckpt
|
| 25 |
```
|
| 26 |
|
| 27 |
-
Note:
|
|
|
|
| 28 |
|
| 29 |
## Repository structure
|
| 30 |
|
|
|
|
| 8 |
|
| 9 |
# LibriBrain (Sherlock Holmes 1–7)
|
| 10 |
|
| 11 |
+
[Paper](https://huggingface.co/papers/2506.02098) | [Code](https://github.com/neural-processing-lab/pnpl)
|
| 12 |
|
| 13 |
This repository contains the LibriBrain data organised by book: MEG recordings (`.h5`), event annotations (`.tsv`), and the audiobook stimulus audio (`.wav`).
|
| 14 |
|
| 15 |
+
LibriBrain was first open-sourced as part of the [2025 PNPL Competition](https://libribrain.com/).
|
| 16 |
+
|
| 17 |
+
In addition, LibriBrain is used as a fine-tuning dataset in the paper ["MEG-XL: Data-Efficient Brain-to-Text via Long-Context Pre-Training"](https://huggingface.co/papers/2602.02494) to evaluate word decoding from brain data.
|
| 18 |
|
| 19 |
## Sample Usage
|
| 20 |
+
The easiest way to get started with the dataset is using the [pnpl Python library](https://github.com/neural-processing-lab/pnpl). There, the following two datasets are available:
|
| 21 |
+
|
| 22 |
+
### LibriBrainSpeech
|
| 23 |
+
This wraps the LibriBrain dataset for use in speech detection problems.
|
| 24 |
+
```python
|
| 25 |
+
from pnpl.datasets import LibriBrainSpeech
|
| 26 |
+
|
| 27 |
+
speech_example_data = LibriBrainSpeech(
|
| 28 |
+
data_path="./data/",
|
| 29 |
+
partition="train"
|
| 30 |
+
)
|
| 31 |
+
|
| 32 |
+
sample_data, label = speech_example_data[0]
|
| 33 |
+
|
| 34 |
+
# Print out some basic info about the sample
|
| 35 |
+
print("Sample data shape:", sample_data.shape)
|
| 36 |
+
print("Label shape:", label.shape)
|
| 37 |
+
```
|
| 38 |
|
| 39 |
+
### LibriBrainPhoneme
|
| 40 |
+
This wraps the LibriBrain dataset for use in phoneme classification problems.
|
| 41 |
+
```python
|
| 42 |
+
from pnpl.datasets import LibriBrainPhoneme
|
| 43 |
+
|
| 44 |
+
phoneme_example_data = LibriBrainPhoneme(
|
| 45 |
+
data_path="./data/",
|
| 46 |
+
partition="train"
|
| 47 |
+
)
|
| 48 |
+
sample_data, label = phoneme_example_data[0]
|
| 49 |
+
|
| 50 |
+
# Print out some basic info about the sample
|
| 51 |
+
print("Sample data shape:", sample_data.shape)
|
| 52 |
+
print("Label shape:", label.shape)
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
### Usage in MEG-XL
|
| 56 |
To fine-tune the MEG-XL model on the LibriBrain dataset for word decoding, you can use the following command from the [official repository](https://github.com/neural-processing-lab/MEG-XL):
|
| 57 |
|
| 58 |
```bash
|
|
|
|
| 61 |
model.criss_cross_checkpoint=/path/to/your/checkpoint.ckpt
|
| 62 |
```
|
| 63 |
|
| 64 |
+
Note: For the MEG-XL repo, you will need to adjust the dataset paths in the configuration files to point to your local download of the data. The pnpl library includes automatic downloads from HuggingFace.
|
| 65 |
+
|
| 66 |
|
| 67 |
## Repository structure
|
| 68 |
|