benoit-dufumier commited on
Commit
ed0af62
·
0 Parent(s):

OpenMind preprocessed: quasiraw-v2.1.1, cat12vbm-12.8.2, participants.tsv, val_split.csv

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +60 -0
  2. README.md +384 -0
  3. cat12vbm-12.8.2/ds000001/ds000001-000000.tar +3 -0
  4. cat12vbm-12.8.2/ds000002/ds000002-000000.tar +3 -0
  5. cat12vbm-12.8.2/ds000003/ds000003-000000.tar +3 -0
  6. cat12vbm-12.8.2/ds000005/ds000005-000000.tar +3 -0
  7. cat12vbm-12.8.2/ds000006/ds000006-000000.tar +3 -0
  8. cat12vbm-12.8.2/ds000007/ds000007-000000.tar +3 -0
  9. cat12vbm-12.8.2/ds000008/ds000008-000000.tar +3 -0
  10. cat12vbm-12.8.2/ds000009/ds000009-000000.tar +3 -0
  11. cat12vbm-12.8.2/ds000011/ds000011-000000.tar +3 -0
  12. cat12vbm-12.8.2/ds000017/ds000017-000000.tar +3 -0
  13. cat12vbm-12.8.2/ds000030/ds000030-000000.tar +3 -0
  14. cat12vbm-12.8.2/ds000031/ds000031-000000.tar +3 -0
  15. cat12vbm-12.8.2/ds000051/ds000051-000000.tar +3 -0
  16. cat12vbm-12.8.2/ds000052/ds000052-000000.tar +3 -0
  17. cat12vbm-12.8.2/ds000053/ds000053-000000.tar +3 -0
  18. cat12vbm-12.8.2/ds000101/ds000101-000000.tar +3 -0
  19. cat12vbm-12.8.2/ds000102/ds000102-000000.tar +3 -0
  20. cat12vbm-12.8.2/ds000105/ds000105-000000.tar +3 -0
  21. cat12vbm-12.8.2/ds000107/ds000107-000000.tar +3 -0
  22. cat12vbm-12.8.2/ds000108/ds000108-000000.tar +3 -0
  23. cat12vbm-12.8.2/ds000109/ds000109-000000.tar +3 -0
  24. cat12vbm-12.8.2/ds000110/ds000110-000000.tar +3 -0
  25. cat12vbm-12.8.2/ds000113/ds000113-000000.tar +3 -0
  26. cat12vbm-12.8.2/ds000114/ds000114-000000.tar +3 -0
  27. cat12vbm-12.8.2/ds000115/ds000115-000000.tar +3 -0
  28. cat12vbm-12.8.2/ds000116/ds000116-000000.tar +3 -0
  29. cat12vbm-12.8.2/ds000117/ds000117-000000.tar +3 -0
  30. cat12vbm-12.8.2/ds000119/ds000119-000000.tar +3 -0
  31. cat12vbm-12.8.2/ds000120/ds000120-000000.tar +3 -0
  32. cat12vbm-12.8.2/ds000121/ds000121-000000.tar +3 -0
  33. cat12vbm-12.8.2/ds000133/ds000133-000000.tar +3 -0
  34. cat12vbm-12.8.2/ds000140/ds000140-000000.tar +3 -0
  35. cat12vbm-12.8.2/ds000144/ds000144-000000.tar +3 -0
  36. cat12vbm-12.8.2/ds000148/ds000148-000000.tar +3 -0
  37. cat12vbm-12.8.2/ds000149/ds000149-000000.tar +3 -0
  38. cat12vbm-12.8.2/ds000157/ds000157-000000.tar +3 -0
  39. cat12vbm-12.8.2/ds000158/ds000158-000000.tar +3 -0
  40. cat12vbm-12.8.2/ds000164/ds000164-000000.tar +3 -0
  41. cat12vbm-12.8.2/ds000168/ds000168-000000.tar +3 -0
  42. cat12vbm-12.8.2/ds000170/ds000170-000000.tar +3 -0
  43. cat12vbm-12.8.2/ds000171/ds000171-000000.tar +3 -0
  44. cat12vbm-12.8.2/ds000172/ds000172-000000.tar +3 -0
  45. cat12vbm-12.8.2/ds000174/ds000174-000000.tar +3 -0
  46. cat12vbm-12.8.2/ds000200/ds000200-000000.tar +3 -0
  47. cat12vbm-12.8.2/ds000201/ds000201-000000.tar +3 -0
  48. cat12vbm-12.8.2/ds000202/ds000202-000000.tar +3 -0
  49. cat12vbm-12.8.2/ds000203/ds000203-000000.tar +3 -0
  50. cat12vbm-12.8.2/ds000204/ds000204-000000.tar +3 -0
.gitattributes ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.avro filter=lfs diff=lfs merge=lfs -text
4
+ *.bin filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
7
+ *.ftz filter=lfs diff=lfs merge=lfs -text
8
+ *.gz filter=lfs diff=lfs merge=lfs -text
9
+ *.h5 filter=lfs diff=lfs merge=lfs -text
10
+ *.joblib filter=lfs diff=lfs merge=lfs -text
11
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
12
+ *.lz4 filter=lfs diff=lfs merge=lfs -text
13
+ *.mds filter=lfs diff=lfs merge=lfs -text
14
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
15
+ *.model filter=lfs diff=lfs merge=lfs -text
16
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
17
+ *.npy filter=lfs diff=lfs merge=lfs -text
18
+ *.npz filter=lfs diff=lfs merge=lfs -text
19
+ *.onnx filter=lfs diff=lfs merge=lfs -text
20
+ *.ot filter=lfs diff=lfs merge=lfs -text
21
+ *.parquet filter=lfs diff=lfs merge=lfs -text
22
+ *.pb filter=lfs diff=lfs merge=lfs -text
23
+ *.pickle filter=lfs diff=lfs merge=lfs -text
24
+ *.pkl filter=lfs diff=lfs merge=lfs -text
25
+ *.pt filter=lfs diff=lfs merge=lfs -text
26
+ *.pth filter=lfs diff=lfs merge=lfs -text
27
+ *.rar filter=lfs diff=lfs merge=lfs -text
28
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
29
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
30
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
31
+ *.tar filter=lfs diff=lfs merge=lfs -text
32
+ *.tflite filter=lfs diff=lfs merge=lfs -text
33
+ *.tgz filter=lfs diff=lfs merge=lfs -text
34
+ *.wasm filter=lfs diff=lfs merge=lfs -text
35
+ *.xz filter=lfs diff=lfs merge=lfs -text
36
+ *.zip filter=lfs diff=lfs merge=lfs -text
37
+ *.zst filter=lfs diff=lfs merge=lfs -text
38
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
39
+ # Audio files - uncompressed
40
+ *.pcm filter=lfs diff=lfs merge=lfs -text
41
+ *.sam filter=lfs diff=lfs merge=lfs -text
42
+ *.raw filter=lfs diff=lfs merge=lfs -text
43
+ # Audio files - compressed
44
+ *.aac filter=lfs diff=lfs merge=lfs -text
45
+ *.flac filter=lfs diff=lfs merge=lfs -text
46
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
47
+ *.ogg filter=lfs diff=lfs merge=lfs -text
48
+ *.wav filter=lfs diff=lfs merge=lfs -text
49
+ # Image files - uncompressed
50
+ *.bmp filter=lfs diff=lfs merge=lfs -text
51
+ *.gif filter=lfs diff=lfs merge=lfs -text
52
+ *.png filter=lfs diff=lfs merge=lfs -text
53
+ *.tiff filter=lfs diff=lfs merge=lfs -text
54
+ # Image files - compressed
55
+ *.jpg filter=lfs diff=lfs merge=lfs -text
56
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
57
+ *.webp filter=lfs diff=lfs merge=lfs -text
58
+ # Video files - compressed
59
+ *.mp4 filter=lfs diff=lfs merge=lfs -text
60
+ *.webm filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,384 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ pretty_name: OpenMind (preprocessed, NeuroSpin)
4
+ task_categories:
5
+ - image-feature-extraction
6
+ tags:
7
+ - 3d
8
+ - mri
9
+ - neuroimaging
10
+ - brain
11
+ - medical
12
+ - webdataset
13
+ - self-supervised-learning
14
+ - voxel-based-morphometry
15
+ - cat12
16
+ size_categories:
17
+ - 10K<n<100K
18
+ configs:
19
+ - config_name: quasiraw-v2.1.1
20
+ data_files:
21
+ - split: train
22
+ path: quasiraw-v2.1.1/*/*.tar
23
+ - config_name: cat12vbm-12.8.2
24
+ data_files:
25
+ - split: train
26
+ path: cat12vbm-12.8.2/*/*.tar
27
+ ---
28
+
29
+ # OpenMind: preprocessed brain MRI (NeuroSpin)
30
+
31
+ Preprocessed versions of the [OpenMind dataset](https://huggingface.co/datasets/MIC-DKFZ/OpenMind)
32
+ (Wald et al., 2025): head & neck 3D MRI pooled from ~800 [OpenNeuro](https://openneuro.org)
33
+ datasets. Here the brain T1w, T2w and FLAIR images were preprocessed at
34
+ [NeuroSpin](https://joliot.cea.fr/drf/joliot/en/Pages/research_entities/NeuroSpin.aspx)
35
+ using [brainprep](https://github.com/brainprepdesk/brainprep) and packed as
36
+ [WebDataset](https://github.com/webdataset/webdataset) shards, ready for large-scale
37
+ (e.g. self-supervised) deep learning.
38
+
39
+ | Folder | Pipeline | Status |
40
+ |---|---|---|
41
+ | `quasiraw-v2.1.1/` | brainprep quasi-raw v2.1.1 (T1w, T2w, FLAIR) | available |
42
+ | `cat12vbm-12.8.2/` | CAT12 12.8.2 VBM via brainprep v2.1.0 (T1w): grey matter maps + ROI morphometry | available |
43
+
44
+ All folders share the same sample identifiers: (`dataset_id`, `subject`, `session`, `run`),
45
+ with `dataset_id` the shard folder name, so derivatives of the same scan can be joined
46
+ across folders.
47
+
48
+ ## Repository layout
49
+
50
+ ```
51
+ README.md
52
+ val_split.csv # recommended validation split, for all folders (see below)
53
+ participants.tsv # per scan: age, sex, bmi, race, handedness, health_status
54
+ quasiraw-v2.1.1/ # see below
55
+ cat12vbm-12.8.2/ # see below
56
+ ```
57
+
58
+ Each preprocessing folder holds one folder of WebDataset shards per OpenNeuro dataset and an
59
+ `index.json.gz` with the byte offsets of every file of the shards, used by
60
+ [nidl](#usage-with-nidl) for random access.
61
+
62
+ ## Validation split
63
+
64
+ `val_split.csv` (columns `dataset_id, participant_id, session, run`) defines a held-out
65
+ validation set made of **whole datasets** (no subject or dataset is shared with training),
66
+ stratified on age, sex and BMI. It holds ~10% of the images. Only the rows listed in the
67
+ csv belong to validation. The others belong to training.
68
+
69
+ The split is given by scan identifiers, shared by all folders: it applies to
70
+ `quasiraw-v2.1.1` and `cat12vbm-12.8.2` alike.
71
+
72
+ ## Usage with nidl
73
+
74
+ [nidl](https://github.com/neurospin-deepinsight/nidl) provides an `OpenMind`
75
+ PyTorch `Dataset` that reads the shards by byte offset (from `index.json.gz`): random access,
76
+ any sampler and any number of `DataLoader` workers, modality pairing and the subject-level
77
+ train / val split. By default the images are streamed from this repository with HTTP range
78
+ requests (nothing is written to disk but the index and the split); `streaming=False`
79
+ downloads the needed shards first.
80
+
81
+ ```bash
82
+ pip install "git+https://github.com/neurospin-deepinsight/nidl"
83
+ ```
84
+
85
+ ```python
86
+ from torch.utils.data import DataLoader
87
+ from nidl.datasets import OpenMind
88
+
89
+ root = "openmind" # local mirror of this repository, files are fetched on demand
90
+
91
+ # Quasi-raw: one T1w image per item, subject-level split from <root>/val_split.csv
92
+ train = OpenMind(root, preprocessing="quasiraw", modality="t1", split="train", apply_mask=True)
93
+ val = OpenMind(root, preprocessing="quasiraw", modality="t1", split="val", apply_mask=True)
94
+ print(train[0].shape) # (1, 182, 218, 182)
95
+
96
+ # Quasi-raw: paired T1w / T2w acquired in the same session
97
+ paired = OpenMind(root, modality=("t1", "t2"), group_by="session", split="train")
98
+ sample = paired[0] # {"t1": array, "t2": array}
99
+
100
+ # CAT12 VBM: grey matter map and ROI morphometry
101
+ vbm = OpenMind(root, preprocessing="cat12vbm", split="train", return_morphometry=True)
102
+ gm, morphometry = vbm[0]
103
+ print(gm.shape, morphometry["total_volumes"]["TIV"]) # (1, 113, 137, 113) ...
104
+
105
+ loader = DataLoader(train, batch_size=8, shuffle=True, num_workers=8)
106
+ ```
107
+
108
+ `nidl` does not read the CAT12 quality ratings (`qc.json`): use the webdataset example of the
109
+ `cat12vbm-12.8.2` section to get them.
110
+
111
+ ## `quasiraw-v2.1.1`
112
+
113
+ ### Content
114
+
115
+ | | |
116
+ |---|---|
117
+ | Images | 71,490 (T1w 42,941 · T2w 23,935 · FLAIR 4,614) |
118
+ | Subjects | 33,738 |
119
+ | Source datasets | 787 OpenNeuro datasets |
120
+ | Size | 462 GB, 849 shards |
121
+ | Image grid | 182 × 218 × 182, 1 mm isotropic, MNI152 space, float32 |
122
+
123
+ ### Preprocessing
124
+
125
+ [brainprep](https://github.com/brainprepdesk/brainprep) `subject-level-quasiraw` (v2.1.1
126
+ container), applied per modality, with the matching MNI152 template (T1 template for T1w,
127
+ T2 template for T2w / FLAIR):
128
+
129
+ 1. Reorientation to the MNI152 orientation.
130
+ 2. Brain mask with FreeSurfer [SynthStrip](https://surfer.nmr.mgh.harvard.edu/docs/synthstrip/).
131
+ 3. N4 bias field correction.
132
+ 4. Resampling to 1 mm isotropic.
133
+ 5. Linear (affine, 9 DOF) registration to the MNI152 1 mm template.
134
+ 6. The registration is applied to the bias-corrected image and the brain mask; the image
135
+ is then multiplied by the mask (skull-stripped).
136
+
137
+ "Quasi-raw" means minimal preprocessing: no non-linear warp, no tissue segmentation, no
138
+ intensity standardization across scans. Intensities are those of the bias-corrected scan.
139
+
140
+ ### Layout
141
+
142
+ ```
143
+ quasiraw-v2.1.1/
144
+ ├── index.json.gz # byte offsets for random access (nidl)
145
+ └── <dataset_id>/ # one folder per OpenNeuro dataset, e.g. ds000001
146
+ └── <dataset_id>-NNNNNN.tar # WebDataset shard(s), ≤ ~3 GB each
147
+ ```
148
+
149
+ Each sample is one image of one (subject, session, run, modality). Its key is
150
+ `sub-<label>_ses-<label>_mod-<t1|t2|flair>_run-<id>` (`ses-DEFAULT` when the source has no
151
+ session) and it holds three files:
152
+
153
+ | Extension | Content |
154
+ |---|---|
155
+ | `<mod>.nii.gz` | skull-stripped image in MNI space (`<mod>` = `t1`, `t2` or `flair`) |
156
+ | `<mod>_mask.nii.gz` | binary brain mask, same grid |
157
+ | `meta.json` | `subject`, `session`, `modality`, `run`, BIDS `entities` |
158
+
159
+ Different subjects can have the same subject's id across different OpenNeuro datasets: a
160
+ subject is thus uniquely identified by the pair (`dataset_id`, `subject`), with `dataset_id` given
161
+ by the shard folder name.
162
+
163
+ The `run` is the BIDS `run-` index of the source file when it is unambiguous, otherwise a
164
+ hash of the source file name (brainprep convention).
165
+
166
+ ### Streaming with webdataset
167
+
168
+ Without downloading (`pip install webdataset nibabel huggingface_hub`):
169
+
170
+ ```python
171
+ import gzip, io, json
172
+ import nibabel as nib
173
+ import webdataset as wds
174
+ from huggingface_hub import HfFileSystem, hf_hub_url
175
+
176
+ repo = "neurospin/openmind"
177
+ fs = HfFileSystem()
178
+ shards = sorted(fs.glob(f"datasets/{repo}/quasiraw-v2.1.1/*/*.tar"))
179
+ urls = [hf_hub_url(repo, s.split(f"{repo}/", 1)[1], repo_type="dataset") for s in shards]
180
+
181
+ def load_nifti(b):
182
+ fh = nib.FileHolder(fileobj=io.BytesIO(gzip.decompress(b)))
183
+ return nib.Nifti1Image.from_file_map({"header": fh, "image": fh})
184
+
185
+ def decode(s):
186
+ meta = json.loads(s["meta.json"])
187
+ mod = meta["modality"]
188
+ return {
189
+ "dataset_id": s["__url__"].rsplit("/", 2)[-2],
190
+ "meta": meta,
191
+ "image": load_nifti(s[f"{mod}.nii.gz"]).get_fdata(dtype="float32"),
192
+ "mask": load_nifti(s[f"{mod}_mask.nii.gz"]).get_fdata(dtype="float32") > 0,
193
+ }
194
+
195
+ ds = wds.WebDataset([f"pipe:curl -s -L {u}" for u in urls], shardshuffle=True).map(decode)
196
+ sample = next(iter(ds))
197
+ print(sample["dataset_id"], sample["meta"], sample["image"].shape)
198
+ ```
199
+
200
+ ### Quality control
201
+
202
+ No manual QC beyond the source curation was applied to this release: a small fraction of
203
+ images may have failed skull-stripping or registration. The source OpenMind metadata
204
+ includes a per-modality, per-dataset image quality score (1–5) that can be used to filter.
205
+
206
+ ## `cat12vbm-12.8.2`
207
+
208
+ ### Content
209
+
210
+ | | |
211
+ |---|---|
212
+ | Images | 42,951 T1w (41,353 pass the CAT12 quality check, see below) |
213
+ | Subjects | 32,995 |
214
+ | Sessions | 38,047 |
215
+ | Source datasets | 780 OpenNeuro datasets |
216
+ | Size | 121 GB, 784 shards |
217
+ | Image grid | 113 × 137 × 113, 1.5 mm isotropic, MNI152NLin2009cAsym space, float32 |
218
+ | Morphometry | 15 atlases (ROI grey / white matter / CSF volumes) + total volumes |
219
+
220
+ 43,076 T1w images were processed: 125 are missing from this release because CAT12 failed
221
+ on them or their group-level measures could not be computed.
222
+
223
+ ### Preprocessing
224
+
225
+ [brainprep](https://github.com/brainprepdesk/brainprep) `subject-level-vbm` and
226
+ `group-level-vbm` (v2.1.0 container) running
227
+ [CAT12](https://neuro-jena.github.io/cat/) 12.8.2 (r2166, SPM12 standalone), with the
228
+ brainprep CAT12 batch (cross-sectional, DARTEL registration):
229
+
230
+ 1. Bias correction, affine registration to MNI and tissue segmentation (grey matter, white
231
+ matter, CSF) with CAT12.
232
+ 2. Non-linear registration (DARTEL) to the CAT12 MNI152NLin2009cAsym template, resampled at
233
+ 1.5 mm.
234
+ 3. The released image is the **modulated normalized grey matter map** (`mwp1`): GM tissue
235
+ probability multiplied by the Jacobian of the warp, so that voxel values sum to the
236
+ subject's GM volume.
237
+ 4. ROI volumes are computed by CAT12 in native space for each atlas; total intracranial
238
+ (TIV), grey matter, white matter and CSF volumes come from the CAT12 report.
239
+
240
+ ### Layout
241
+
242
+ ```
243
+ cat12vbm-12.8.2/
244
+ ├── index.json.gz # byte offsets for random access (nidl)
245
+ └── <dataset_id>/ # one folder per OpenNeuro dataset, e.g. ds000001
246
+ └── <dataset_id>-NNNNNN.tar # WebDataset shard(s), ≤ ~3 GB each
247
+ ```
248
+
249
+ Each sample is one T1w image of one (subject, session, run). Its key is
250
+ `sub-<label>_ses-<label>_mod-mwp1_run-<id>` and it holds four files:
251
+
252
+ | Extension | Content |
253
+ |---|---|
254
+ | `mwp1.nii.gz` | modulated grey matter map in MNI space |
255
+ | `morphometry.json` | `{<atlas>: {<feature>: value}}`, volumes in cm³ (see below) |
256
+ | `qc.json` | `{"group_stats": {"NCR", "ICR", "IQR", "qc"}}` (see Quality control) |
257
+ | `meta.json` | `dataset`, `subject`, `session`, `run` |
258
+
259
+ `run` follows the same convention as `quasiraw-v2.1.1`: the BIDS `run-` index of the source
260
+ file when it is unambiguous, otherwise a hash of the source file name (brainprep
261
+ convention). A sample of this folder and the `quasiraw-v2.1.1` T1w sample of the same scan
262
+ thus share (`dataset_id`, `subject`, `session`, `run`) in `meta.json`: 42,850 of the 42,951
263
+ samples have such a quasi-raw counterpart (the other 101 scans failed quasi-raw
264
+ preprocessing, mostly because their raw image contains NaN voxels).
265
+
266
+ #### Morphometry
267
+
268
+ `morphometry.json` holds one entry per atlas. Features are named `<tissue>_<ROI name>` with
269
+ `<tissue>` in `Vgm` (grey matter), `Vwm` (white matter) and `Vcsf` (CSF) volumes, in cm³:
270
+
271
+ | Atlas | Tissues | Features |
272
+ |---|---|---|
273
+ | `neuromorphometrics` | Vgm, Vwm, Vcsf | 408 |
274
+ | `hammers` | Vgm, Vwm, Vcsf | 285 |
275
+ | `ibsr` | Vgm, Vwm, Vcsf | 96 |
276
+ | `lpba40` | Vgm, Vwm | 112 |
277
+ | `cobra` | Vgm, Vwm | 104 |
278
+ | `mori` | Vgm, Vwm | 256 |
279
+ | `julichbrain` | Vgm, Vwm | 496 |
280
+ | `suit` | Vgm, Vwm | 56 |
281
+ | `aal3` | Vgm | 170 |
282
+ | `thalamus` | Vgm | 14 |
283
+ | `thalamic_nuclei` | Vgm | 22 |
284
+ | `Schaefer2018_{100,200,400,600}Parcels_17Networks_order` | Vgm, Vwm | 200, 400, 800, 1200 |
285
+ | `total_volumes` | | `TIV`, `GM_Vol`, `WM_Vol`, `CSF_Vol` |
286
+
287
+ ### Streaming with webdataset
288
+
289
+ See [Usage with nidl](#usage-with-nidl) for random access. Streaming without downloading
290
+ (`pip install webdataset nibabel huggingface_hub`):
291
+
292
+ ```python
293
+ import gzip, io, json
294
+ import nibabel as nib
295
+ import webdataset as wds
296
+ from huggingface_hub import HfFileSystem, hf_hub_url
297
+
298
+ repo = "neurospin/openmind"
299
+ fs = HfFileSystem()
300
+ shards = sorted(fs.glob(f"datasets/{repo}/cat12vbm-12.8.2/*/*.tar"))
301
+ urls = [hf_hub_url(repo, s.split(f"{repo}/", 1)[1], repo_type="dataset") for s in shards]
302
+
303
+ def load_nifti(b):
304
+ fh = nib.FileHolder(fileobj=io.BytesIO(gzip.decompress(b)))
305
+ return nib.Nifti1Image.from_file_map({"header": fh, "image": fh})
306
+
307
+ def decode(s):
308
+ return {
309
+ "dataset_id": s["__url__"].rsplit("/", 2)[-2],
310
+ "meta": json.loads(s["meta.json"]),
311
+ "gm": load_nifti(s["mwp1.nii.gz"]).get_fdata(dtype="float32"),
312
+ "morphometry": json.loads(s["morphometry.json"]),
313
+ "qc": json.loads(s["qc.json"])["group_stats"],
314
+ }
315
+
316
+ ds = (wds.WebDataset([f"pipe:curl -s -L {u}" for u in urls], shardshuffle=True)
317
+ .map(decode)
318
+ .select(lambda s: s["qc"]["qc"] == 1)) # keep scans passing the CAT12 QC
319
+ sample = next(iter(ds))
320
+ print(sample["dataset_id"], sample["meta"], sample["gm"].shape,
321
+ sample["morphometry"]["total_volumes"]["TIV"])
322
+ ```
323
+
324
+ ### Quality control
325
+
326
+ `qc.json` holds the CAT12 image quality ratings of the scan: noise to contrast ratio (`NCR`),
327
+ inhomogeneity to contrast ratio (`ICR`) and the overall image quality rating (`IQR`), on the
328
+ CAT12 grading scale (lower is better). `qc` is 1 when `NCR < 4.5` and `IQR < 4.5`, the
329
+ thresholds of [OpenBHB](https://baobablab.github.io/bhb/) (Dufumier et al., 2022), and 0
330
+ otherwise; 41,353 of the 42,951 images pass. No visual QC was applied.
331
+
332
+ ## Phenotypes / metadata
333
+
334
+ `participants.tsv` (tab-separated) gives the phenotypes of every scan of this repository, one
335
+ row per scan (66,661 rows, 33,827 subjects, 790 datasets), identified by `dataset_id`,
336
+ `participant_id`, `session` and `run`: it joins with the `meta.json` of any folder on
337
+ (`dataset_id`, `subject`, `session`, `run`). Missing values are `n/a`.
338
+
339
+ | Column | Values | Available for |
340
+ |---|---|---|
341
+ | `age` | years (2–100) | 36,299 scans |
342
+ | `sex` | `female`, `male` | 40,670 scans |
343
+ | `bmi` | kg/m² | 6,107 scans |
344
+ | `race` | e.g. `white/caucasian`, `african american/black`, `asian`, `multiracial/mixed` | 5,018 scans |
345
+ | `handedness` | `right`, `left`, `ambidextrous` | 13,585 scans |
346
+ | `health_status` | `healthy`, `ill` | 14,166 scans |
347
+
348
+ Scanner information and the per-dataset image quality scores are in the original OpenMind
349
+ release: see [MIC-DKFZ/OpenMind](https://huggingface.co/datasets/MIC-DKFZ/OpenMind).
350
+
351
+ ## License and citation
352
+
353
+ The original OpenMind dataset is released under CC-BY 4.0 and is built from OpenNeuro
354
+ datasets, most of which are released under CC0. This derivative is released under
355
+ **CC-BY 4.0**. If you use it, please cite OpenMind, the OpenNeuro datasets you use,
356
+ brainprep and, for `cat12vbm-12.8.2`, CAT12:
357
+
358
+ ```bibtex
359
+ @article{wald2025openmind,
360
+ title = {An OpenMind for 3D medical vision self-supervised learning},
361
+ author = {Wald, Tassilo and others},
362
+ journal = {arXiv preprint arXiv:2412.17041},
363
+ year = {2025}
364
+ }
365
+
366
+ @misc{brainprep,
367
+ title = {{BrainPrep source code}},
368
+ author = {Grigis, Antoine and Victor, Julie and Dorval, Loic and Duchesnay, Edouard},
369
+ url = {https://github.com/brainprepdesk/brainprep}
370
+ }
371
+
372
+ @article{gaser2024cat,
373
+ title = {{CAT}: a computational anatomy toolbox for the analysis of structural {MRI} data},
374
+ author = {Gaser, Christian and Dahnke, Robert and Thompson, Paul M. and Kurth, Florian
375
+ and Luders, Eileen and {the Alzheimer's Disease Neuroimaging Initiative}},
376
+ journal = {GigaScience},
377
+ volume = {13},
378
+ year = {2024}
379
+ }
380
+ ```
381
+
382
+ ## Contact
383
+
384
+ Benoit Dufumier, NeuroSpin (CEA, Université Paris-Saclay).
cat12vbm-12.8.2/ds000001/ds000001-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:af5a5e4c7bf7f063828098ae98707507e84aaa69514d2078d753221ea3f07440
3
+ size 44963840
cat12vbm-12.8.2/ds000002/ds000002-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:25e8bee44a1452121f3baf84cfab2a7fcc58fe00cdb15c0a119fea30c4d8069f
3
+ size 47728640
cat12vbm-12.8.2/ds000003/ds000003-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7cbe2d6d21bc991ff08d5bdcfa609d9c77eb4db83f668cefdb626ee980246d17
3
+ size 36608000
cat12vbm-12.8.2/ds000005/ds000005-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:084d5a98888f55da6bd136de96e31915598868564d39c90416e10a27b9d44457
3
+ size 35850240
cat12vbm-12.8.2/ds000006/ds000006-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ce0cc1da11a1304f10e8ae198c7a9e46a8250cd450eb2fd1e2d7881854d2b038
3
+ size 79646720
cat12vbm-12.8.2/ds000007/ds000007-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5c8320bfe7209c786167ef1637522bb4fa2d385772ea6c841d7d0294050f2950
3
+ size 56299520
cat12vbm-12.8.2/ds000008/ds000008-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ec7627a09688a05cec797dd401d161d26d32c70119b6f8548073e25f9f8b3944
3
+ size 39280640
cat12vbm-12.8.2/ds000009/ds000009-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:de029c95ff5b2a2f448bdb447df4d143c18a0e5950bec510a0d4fe6e7b3c1f42
3
+ size 67256320
cat12vbm-12.8.2/ds000011/ds000011-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ff3497d127279b8015620dca376580e08d25d04e2b0aca61a07ef3629ecfd28b
3
+ size 39290880
cat12vbm-12.8.2/ds000017/ds000017-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ed3e20f8b0f31f46a94e8cd4bd029a756b4842b3702d9c8a6be780eef83604ee
3
+ size 90388480
cat12vbm-12.8.2/ds000030/ds000030-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8084bb60aff0a3128128b7f9c6ad637a612f558668f2f5f2b5221351110a2b0b
3
+ size 737925120
cat12vbm-12.8.2/ds000031/ds000031-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:85f2e0b682f885f4eebddb7b492b5de5c8c5ba983d8aef8e6170cbe0d68670d7
3
+ size 69120000
cat12vbm-12.8.2/ds000051/ds000051-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e96474cfaea2e2e79c6d8bece3af049ef2ea18f2465c5369aae252ad9e4ab772
3
+ size 76011520
cat12vbm-12.8.2/ds000052/ds000052-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8cb5d3b303250e4d90af72f72a6cd677675cd75c5dab55bd338d2732a489d28a
3
+ size 70246400
cat12vbm-12.8.2/ds000053/ds000053-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0cd64b18ef4f455701c1485d6449658d1ccfd1e2c4be7c2be3d2be63f0323604
3
+ size 163112960
cat12vbm-12.8.2/ds000101/ds000101-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d35272bf0534597f499892e3026634a846e41fbac905e7c061fbafe52e56e0ed
3
+ size 58880000
cat12vbm-12.8.2/ds000102/ds000102-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1665dfa886cf8106eb8e49919bd565e005c5f069d0b64d6d51a6947daa108e3d
3
+ size 73912320
cat12vbm-12.8.2/ds000105/ds000105-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8ab70e5190a43c02afe80ac8b2a5626cc379885f578ceae50241ba69debe6fa4
3
+ size 17039360
cat12vbm-12.8.2/ds000107/ds000107-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7e7b903038ee08f64be400e811db252ffb98171e7e6a73e62e56da444d442103
3
+ size 136509440
cat12vbm-12.8.2/ds000108/ds000108-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8bb9f2c858d08f7a561a635cb48a1a4373eab8b549b00c2c493a5748d9a5a5ee
3
+ size 96348160
cat12vbm-12.8.2/ds000109/ds000109-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dc41accb45bef6bedd5ac02880c39f54a2768d4c6148f7202dafa67e869ae793
3
+ size 102420480
cat12vbm-12.8.2/ds000110/ds000110-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:459f97aa2aaec736e4f7f3a7e6beaaf9fc1516a82615804404af09bd2b8fecf3
3
+ size 50575360
cat12vbm-12.8.2/ds000113/ds000113-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ea95216366f881be0351363ea1ec629d9c434f29225292dca8cbffeea9bc5f58
3
+ size 54814720
cat12vbm-12.8.2/ds000114/ds000114-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fbf97f0cdd0f2999cd804dcc089e89398042935502184e1021d188fc7a37ada5
3
+ size 57262080
cat12vbm-12.8.2/ds000115/ds000115-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:546842a9e5c3ddd417ea4b36b601ed479a86334528857b035f29963b8ee4cad2
3
+ size 276787200
cat12vbm-12.8.2/ds000116/ds000116-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f89768a2725688b8a4a90c843049bbb9af01ac9feee5df9e88f1ed441d46af21
3
+ size 48281600
cat12vbm-12.8.2/ds000117/ds000117-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:02ebbef8f4c338026d73259d9b9791fe3128ed5b02de348136308dea1963b922
3
+ size 44728320
cat12vbm-12.8.2/ds000119/ds000119-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c0866519206e6002fb3a956c2f882fec28bac55573c1dfc5b4180fa4da7ce10b
3
+ size 202475520
cat12vbm-12.8.2/ds000120/ds000120-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7a02f48d991da66d9d3f8f00a2b69db45e64a0f452c6724882c0ade94070cd12
3
+ size 73062400
cat12vbm-12.8.2/ds000121/ds000121-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1a945374240f5fc2ba3a46287cc80a9543d015974da8b20a1a5e6f06d1f7cea3
3
+ size 77516800
cat12vbm-12.8.2/ds000133/ds000133-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0c257807fa5c427fb7f9630b7181e6e55701589ad99a9e9c8498c6b0dd3963a2
3
+ size 142735360
cat12vbm-12.8.2/ds000140/ds000140-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f19fb24e787fbb5bdda75313334eb474c6ebbbadde8bf656678d1cec3a23415c
3
+ size 93798400
cat12vbm-12.8.2/ds000144/ds000144-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fe5ad3a8f53a53f436a431e84fb2f4ec28bb0e01d98235f9117244239387caa5
3
+ size 127488000
cat12vbm-12.8.2/ds000148/ds000148-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ddd756e6e6a154285c1f04a05b6f5ef44e33e7876a7c55b097ffd1b3678be339
3
+ size 271718400
cat12vbm-12.8.2/ds000149/ds000149-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c2b2f6601821f72bfa9aed2ed503c027851cf4d0ae06a6bf24ac4c5bb8840593
3
+ size 42096640
cat12vbm-12.8.2/ds000157/ds000157-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2b0f9325d10d2d008f5edeb7213f321530c7cc457f56a0f49763c5ec92e888fa
3
+ size 84346880
cat12vbm-12.8.2/ds000158/ds000158-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:81bd71cf225e1d47c26190375a6c4ad6687b9daae6213cf192c2e6edc8ceb86b
3
+ size 616192000
cat12vbm-12.8.2/ds000164/ds000164-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:213e783af7ac0a3202ff928d448bb7d15d425af0055ba6a013200aa6e2105cc9
3
+ size 79421440
cat12vbm-12.8.2/ds000168/ds000168-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e60c5deab8d9aca85894d1e0f633c0c749e328782c54e0b2615abeddaf1cb4d2
3
+ size 98252800
cat12vbm-12.8.2/ds000170/ds000170-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:92b9179e0c86e03cef0472effca74b4e534552bc0058dca2d1b43228f03056cf
3
+ size 42188800
cat12vbm-12.8.2/ds000171/ds000171-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b43027b74c81a28d853d60a43d0112d13316536943d8725b8080b87aa2a331c1
3
+ size 111257600
cat12vbm-12.8.2/ds000172/ds000172-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:02747f28ea45025e10fceb400643eb9402e75fab516938b3ea90075bbc391e53
3
+ size 69683200
cat12vbm-12.8.2/ds000174/ds000174-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b1301484a9031658c8805afd75450ae307b54db61d828fc588fb3b4f9854157
3
+ size 239247360
cat12vbm-12.8.2/ds000200/ds000200-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ea91a9de78e97468d15a3c2e3faca671b2557271a8f69e483e40c735c2ed84ab
3
+ size 36618240
cat12vbm-12.8.2/ds000201/ds000201-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4cb3a288434acc7854bb411b61164e290bd38e8cc5e931ee88e51a99e70833b4
3
+ size 461004800
cat12vbm-12.8.2/ds000202/ds000202-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:00cadb2e28a8f146571fa0b05725004468f05dd4b7c7956aa11dd8b2ee848bc2
3
+ size 270571520
cat12vbm-12.8.2/ds000203/ds000203-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:05176008bb26cf91caddef2e8c521fa14b6e95e1cfd46b4a4c09bebbc3d1be27
3
+ size 74137600
cat12vbm-12.8.2/ds000204/ds000204-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ca7002c8faee21c8ea98537b4bc299c789e6b592b16c9f71a0d32868725d3601
3
+ size 5703680