You need to agree to share your Hugging Face information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

Open-fMIND v1.0

Parcellated fMRI timeseries and functional connectivity matrices for 322 public OpenNeuro datasets (11,379 subjects, 45,731 runs), each computed with 50 brain atlases. Preprocessing was done with fMRIPrep 25.2.3; the BOLD signal was then averaged within each atlas region. The data is meant for pretraining and benchmarking models on ROI signals, and for connectivity analyses at scale.

Two versions of the same runs are provided:

  • quasiraw: raw parcellated timeseries (fMRIPrep output projected onto an atlas, nothing else), the fMRIPrep confounds, and connectivity matrices computed from the raw signal. Use it to apply your own denoising.
  • preproc: the same timeseries after a fixed denoising recipe (confound regression, scrubbing, detrending, band-pass filtering, z-scoring), and connectivity matrices computed from them.

At a glance

quasiraw preproc
Datasets 322 320
Subjects (counted per dataset) 11,379 11,320
Runs 45,731 45,019
Resting-state runs 8,756 8,704
Task runs 36,975 36,315
Atlases 50 50
Timeseries (runs x atlases) 2.29 M 2.25 M
Volumes (3D time points) 11.39 M 10.92 M

Run counts are per atlas; every run is available for every atlas, so the number of timeseries (4D files) is runs x 50 atlases, and the same number of connectivity matrices. Volumes are the 3D images (time points) inside the runs, counted once per run; preproc counts the volumes kept after scrubbing. Total size: 4.20 TB in 1,761 shards.

Repository layout

Files are packed into uncompressed tar shards (about 3 GB each) so that the repository stays at a few thousand files instead of millions. Inside a shard every file keeps its BIDS path (ds000001/sub-01/func/...), so extracting the shards of one atlas rebuilds a BIDS-style tree.

index/                                  one parquet file per tree, one row per file (see below)
  quasiraw_timeseries.parquet  quasiraw_connectivity.parquet  quasiraw_confounds.parquet
  preproc_timeseries.parquet   preproc_connectivity.parquet
quasiraw/
  timeseries/atlas-<atlas>/{rest,task}/shard-NNNN.tar     raw ROI timeseries (+ .json)
  connectivity/atlas-<atlas>/{rest,task}/shard-NNNN.tar   connectivity matrices (+ .json)
  confounds/{rest,task}/shard-NNNN.tar                    fMRIPrep confounds (.tsv + .json), shared by all atlases
preproc/
  timeseries/atlas-<atlas>/{rest,task}/shard-NNNN.tar     denoised ROI timeseries (+ .json)
  connectivity/atlas-<atlas>/{rest,task}/shard-NNNN.tar   connectivity matrices (+ .json)
LICENSES.tsv   atlases.tsv   task_type_mapping.tsv   qc.tsv

Each tree also has a dataset_description.json; quasiraw/timeseries/dataset_descriptions.json collects the description of each OpenNeuro dataset.

Folder Shards Size
preproc/connectivity/ 600 1.45 TB
preproc/timeseries/ 272 0.64 TB
quasiraw/confounds/ 17 45 GB
quasiraw/connectivity/ 601 1.45 TB
quasiraw/timeseries/ 271 0.62 TB

Files per run and atlas. Every run has two files per atlas and kind: the data file (.nii.gz) and its .json sidecar. Timeseries have shape (n_rois, 1, 1, n_timepoints) and connectivity matrices (n_rois, n_rois, 1, 1), both float32.

Per-run motion table. qc.tsv has one row per run of quasiraw (and preproc, which is a subset). The run is identified by dataset_id, subject_id, session_id, task, run_id and the other BIDS entities (acq, ce, dir, rec, echo, part), with none for an entity that is absent. The columns mean_fd, max_fd and frac_fd_above_threshold (share of frames above 0.5 mm) and n_volumes are computed from the framewise displacement of the fMRIPrep confounds over all frames, so they describe the motion of the run before scrubbing, and are the same for both versions. The number of volumes removed by scrubbing in preproc is in the sidecar.

rest and task. Shards are split by a coarse label so that resting-state data can be downloaded on its own. A run is rest if its BIDS task label is a resting-state label (rest, resting, restingstate and numbered or phase variants such as rest1 or restpre) and task otherwise. Task labels are not harmonized across OpenNeuro, so the original label stays in the filename and the index. task_type_mapping.tsv lists the label of every (dataset, task) pair. The label is also stored in each sidecar as TaskType.

Quick start

Everything below works from the index. Replace the repository name if you mirror the data.

1. Choose runs with the index (parquet filters keep memory small even for the 4.7M-row tables):

import pandas as pd

base = "https://huggingface.co/datasets/cbarbano/open-fmind/resolve/main"
idx = pd.read_parquet(
    f"{base}/index/preproc_timeseries.parquet",
    filters=[("atlas", "==", "schaefer400"), ("task_type", "==", "rest")],
)
idx.columns   # tree, kind, atlas, task_type, dataset, sub, ses, task, acq, ce, dir, rec, run, echo, part,
              # key, ext, member, shard, offset, size

2. Stream whole shards with WebDataset (the .nii.gz and .json of a run arrive as one sample):

import gzip, json
import nibabel as nib
import webdataset as wds

urls = [f"{base}/{s}" for s in sorted(idx.shard.unique())]
for sample in wds.WebDataset(urls, shardshuffle=False):
    img = nib.Nifti1Image.from_bytes(gzip.decompress(sample["nii.gz"]))
    ts = img.get_fdata().squeeze().T          # (n_timepoints, n_rois)
    meta = json.loads(sample["json"])          # RepetitionTime, ROILabels, TaskType, ...

3. Fetch a single run with an HTTP range request (offset and size locate the file inside its shard):

import requests

row = idx[idx.ext == "nii.gz"].iloc[0]
r = requests.get(f"{base}/{row.shard}",
                 headers={"Range": f"bytes={row.offset}-{row.offset + row['size'] - 1}"})
img = nib.Nifti1Image.from_bytes(gzip.decompress(r.content))

4. Download one atlas and rebuild the BIDS tree:

hf download cbarbano/open-fmind --repo-type dataset --include "preproc/timeseries/atlas-schaefer400/*" --local-dir open-fmind
cat open-fmind/preproc/timeseries/atlas-schaefer400/*/shard-*.tar | tar -xf - -i   # -i: read past the end of each concatenated shard

5. Denoise the raw timeseries yourself. Join a quasiraw run with its confounds on the run key (the file key without _atlas-...):

ts_idx = pd.read_parquet(f"{base}/index/quasiraw_timeseries.parquet", filters=[("atlas", "==", "aal")])
cf_idx = pd.read_parquet(f"{base}/index/quasiraw_confounds.parquet")
ts_idx["run_key"] = ts_idx.key.str.replace(r"_atlas-.*", "", regex=True)
cf_idx["run_key"] = cf_idx.key.str.replace("_desc-confounds_timeseries", "", regex=False)
pairs = ts_idx[ts_idx.ext == "nii.gz"].merge(cf_idx[cf_idx.ext == "tsv"], on="run_key", suffixes=("_ts", "_cf"))

Raw timeseries and confounds are frame-aligned (same number of rows), so any confound regression or scrubbing can be applied directly on the parcellated signal. One run (ds006193, sub-24053) has an extra part-mag entity in its confounds filename and does not pair on the exact run key.

How the data was made

  1. Source data. Brain BOLD datasets from OpenNeuro, in the snapshot recorded in each dataset description (for 17 datasets the snapshot was not recorded and the latest one at download time is assumed; see snapshot_source in LICENSES.tsv).

  2. fMRIPrep 25.2.3, one job per subject, without FreeSurfer surface reconstruction (--fs-no-reconall), output space MNI152NLin2009cAsym at 2 mm. The exact command is recorded in each sidecar; for some older runs it is reconstructed from the flag set and marked as such.

  3. Parcellation (quasiraw). The preprocessed BOLD is projected onto each atlas with nilearn: NiftiLabelsMasker (mean signal per region) for label atlases and NiftiMapsMasker for probabilistic atlases. No confound regression, scrubbing, detrending, filtering or standardization is applied, so each timeseries is frame-aligned with its fMRIPrep confounds file.

  4. Denoising (preproc). Applied on the parcellated signal with a single nilearn.signal.clean call, which is equivalent to denoising before parcellation because every step is linear in time:

    • regression of 26 confounds: 6 motion parameters with their derivatives, squares and squared derivatives (24 parameters), plus white-matter and CSF signals;
    • scrubbing: frames with framewise displacement above 0.5 mm are removed (censored before filtering), so denoised timeseries can be shorter than the raw ones (NVolumesRemoved in the sidecar);
    • linear detrending, Butterworth band-pass 0.01 to 0.1 Hz, per-region z-scoring (sample standard deviation);
    • runs with fewer than 50 volumes left after scrubbing are not released in preproc.

    The parameters used for each run are recorded in its sidecar (ConfoundRegressors, FramewiseDisplacementThreshold, HighPassFilter, LowPassFilter, NVolumesTotal, NVolumesRemoved, mean and maximum framewise displacement).

  5. Connectivity. Functional connectivity is computed with nilearn's default settings: nilearn.connectome.ConnectivityMeasure(kind="correlation") on each run, without extra standardization. Matrices are stored as float32.

Atlases

50 atlases; atlases.tsv has the full references. The labels of each atlas are in the ROILabels field of every sidecar.

Atlas Regions Type Reference
aal 166 deterministic AAL (Tzourio-Mazoyer 2002)
basc064 64 deterministic BASC (Bellec 2010)
basc122 122 deterministic BASC (Bellec 2010)
basc197 197 deterministic BASC (Bellec 2010)
basc325 325 deterministic BASC (Bellec 2010)
basc444 444 deterministic BASC (Bellec 2010)
destrieux 150 deterministic Destrieux 2010
difumo1024 1024 probabilistic (soft parcels) DiFuMo (Dadi 2020)
difumo128 128 probabilistic (soft parcels) DiFuMo (Dadi 2020)
difumo256 256 probabilistic (soft parcels) DiFuMo (Dadi 2020)
difumo512 512 probabilistic (soft parcels) DiFuMo (Dadi 2020)
difumo64 64 probabilistic (soft parcels) DiFuMo (Dadi 2020)
harvardoxfordcort 48 deterministic Harvard-Oxford
harvardoxfordsub 21 deterministic Harvard-Oxford
msdl 39 probabilistic MSDL (Varoquaux 2011)
pauli 16 deterministic Pauli 2018
schaefer100 100 deterministic Schaefer 2018
schaefer1000 1000 deterministic Schaefer 2018
schaefer100017n 1000 deterministic Schaefer 2018
schaefer10017n 100 deterministic Schaefer 2018
schaefer200 200 deterministic Schaefer 2018
schaefer20017n 200 deterministic Schaefer 2018
schaefer300 300 deterministic Schaefer 2018
schaefer400 400 deterministic Schaefer 2018
schaefer40017n 400 deterministic Schaefer 2018
schaefer400tians2 432 deterministic Schaefer 2018 + Tian 2020
schaefer400tians3 450 deterministic Schaefer 2018 + Tian 2020
schaefer500 500 deterministic Schaefer 2018
schaefer600 600 deterministic Schaefer 2018
schaefer800 800 deterministic Schaefer 2018
smith10 10 probabilistic (ICA maps) Smith 2009 ICA
smith20 20 probabilistic (ICA maps) Smith 2009 ICA
smith70 70 probabilistic (ICA maps) Smith 2009 ICA
tians1 16 deterministic Tian 2020
tians2 32 deterministic Tian 2020
tians3 50 deterministic Tian 2020
yan100_kong17 100 deterministic Yan 2023
yan100_yeo17 100 deterministic Yan 2023
yan100_yeo7 100 deterministic Yan 2023
yan200_kong17 200 deterministic Yan 2023
yan200_yeo17 200 deterministic Yan 2023
yan200_yeo7 200 deterministic Yan 2023
yan400_kong17 400 deterministic Yan 2023
yan400_yeo17 400 deterministic Yan 2023
yan400_yeo7 400 deterministic Yan 2023
yan800_kong17 800 deterministic Yan 2023
yan800_yeo17 800 deterministic Yan 2023
yan800_yeo7 800 deterministic Yan 2023
yeo17 17 deterministic Yeo 2011
yeo7 7 deterministic Yeo 2011

Sidecars and provenance

Each .json sidecar records the full processing chain (OpenNeuro download, fMRIPrep, parcellation, denoising, connectivity) in a BIDS GeneratedBy list, with versions, parameters and command lines. Absolute paths of the computing clusters were replaced by placeholders. Script paths are relative to the code repository, and links to the authors' own repository were removed.

Placeholder Stands for
{fmriprep_dir}, {openneuro_dir} fMRIPrep outputs, downloaded OpenNeuro data
{quasiraw_parcellated_dir}, {quasiraw_connectivity_dir} the quasiraw timeseries and connectivity trees
{preproc_parcellated_dir}, {preproc_connectivity_dir} the preproc timeseries and connectivity trees
{work_dir}, {container_dir}, {templateflow_dir}, {freesurfer_license} fMRIPrep work directory, container image folder, TemplateFlow cache, FreeSurfer license file
{project_dir}, {home_dir}, {data_dir}, {release_dir} other locations on the clusters

Licenses and attribution

The data is derived from public OpenNeuro datasets, each released by its authors under its own license. The license of every dataset, with authors, DOI and requested acknowledgement, is in LICENSES.tsv. Using this dataset means respecting those licenses and citing the source datasets you use.

License (normalized) Datasets
CC0-1.0 251
PDDL-1.0 34
not_stated 30
CC-BY-SA-4.0 3
CC-BY-4.0 2
CC-BY-NC-4.0 1
other 1

not_stated means the OpenNeuro metadata has no license field; those datasets are public on OpenNeuro under its terms. Datasets with a license other than CC0 or PDDL:

Dataset License Name
ds001338 CC-BY-NC-4.0 ParanoiaStory
ds001439 CC-BY-SA-4.0 A role for the medial temporal lobe subsystem in guiding prosociality: the effect of...
ds001634 CC-BY-4.0 Visual working memory: Study one Task fMRI and Behavioural response
ds001635 CC-BY-4.0 Visual working memory: Study two Task fMRI and Behavioural response
ds001722 CC-BY-SA-4.0 A role for the medial temporal lobe subsystem in guiding prosociality: the effect of...
ds001748 CC-BY-SA-4.0 Differentiation of functional networks during long-term memory retrieval in children and...
ds002011 other (stated as "PD") Locus coeruleus activity strengthens prioritized memories under arousal

The derivatives of each dataset keep the license of their source. All licenses listed above permit the redistribution of derivatives. The CC-BY-SA-4.0 datasets require derivatives to be shared under the same license, and the CC-BY-NC-4.0 dataset restricts its derivatives to non-commercial use. Datasets with not_stated are treated as CC0, following the terms under which datasets are uploaded to OpenNeuro. We will remove any dataset at the request of its authors.

Please also cite the tools and atlases you rely on. This dataset builds on OpenNeuro (Markiewicz et al., 2021, eLife 10:e71774), fMRIPrep (Esteban et al., 2019, Nature Methods 16:111-116) and nilearn (Abraham et al., 2014, Frontiers in Neuroinformatics 8:14).

Citation

Barbano, C. A., Marraffini, G., Wassermann, D. Open-fMIND: A Large-Scale Open-Access fMRI Corpus for Pretraining Brain Foundation Models. Preprint.

@article{barbano2026openfmind,
  title   = {Open-fMIND: A Large-Scale Open-Access fMRI Corpus for Pretraining Brain Foundation Models},
  author  = {Barbano, Carlo Alberto and Marraffini, Giovanni and Wassermann, Demian},
  journal = {Preprint},
  year    = {2026}
}
Downloads last month
70