Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed because of a cast error
Error code:   DatasetGenerationCastError
Exception:    DatasetGenerationCastError
Message:      An error occurred while generating the dataset

All the data files must have the same columns, but at some point there are 12 new columns ({'notes', 'age_years', 'golden_path', 'brain_age', 'healthy', 'split', 'file_path', 'dataset', 'sex', 'chronological_age', 'age_label_type', 'modality'}) and 7 missing columns ({'runtime_sec', 'site', 'worker_id', 'status', 'error', 'native_brain_mm3', 'timestamp'}).

This happened while the csv dataset builder was generating data using

hf://datasets/bilalahmad176176/BrainAge-Golden-Preprocessed/manifests/Golden-0-to-25_manifest.csv (at revision 131c39a43455c3dd35a7f88479f423871a5ddfb7), ['hf://datasets/bilalahmad176176/BrainAge-Golden-Preprocessed@131c39a43455c3dd35a7f88479f423871a5ddfb7/logs/preprocess_status.csv', 'hf://datasets/bilalahmad176176/BrainAge-Golden-Preprocessed@131c39a43455c3dd35a7f88479f423871a5ddfb7/manifests/Golden-0-to-25_manifest.csv', 'hf://datasets/bilalahmad176176/BrainAge-Golden-Preprocessed@131c39a43455c3dd35a7f88479f423871a5ddfb7/manifests/Golden-25plus_manifest.csv']

Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback:    Traceback (most recent call last):
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1800, in _prepare_split_single
                  writer.write_table(table)
                File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 765, in write_table
                  self._write_table(pa_table, writer_batch_size=writer_batch_size)
                File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 773, in _write_table
                  pa_table = table_cast(pa_table, self._schema)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2281, in table_cast
                  return cast_table_to_schema(table, schema)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2227, in cast_table_to_schema
                  raise CastError(
              datasets.table.CastError: Couldn't cast
              dataset: string
              subject_id: string
              split: string
              age_years: double
              age_label_type: string
              chronological_age: double
              brain_age: double
              sex: string
              healthy: bool
              modality: string
              notes: string
              file_path: string
              golden_path: string
              -- schema metadata --
              pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 1788
              to
              {'timestamp': Value('string'), 'worker_id': Value('int64'), 'subject_id': Value('string'), 'site': Value('string'), 'status': Value('string'), 'runtime_sec': Value('float64'), 'native_brain_mm3': Value('float64'), 'error': Value('string')}
              because column names don't match
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1342, in compute_config_parquet_and_info_response
                  parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
                                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 907, in stream_convert_to_parquet
                  builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1646, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1802, in _prepare_split_single
                  raise DatasetGenerationCastError.from_cast_error(
              datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
              
              All the data files must have the same columns, but at some point there are 12 new columns ({'notes', 'age_years', 'golden_path', 'brain_age', 'healthy', 'split', 'file_path', 'dataset', 'sex', 'chronological_age', 'age_label_type', 'modality'}) and 7 missing columns ({'runtime_sec', 'site', 'worker_id', 'status', 'error', 'native_brain_mm3', 'timestamp'}).
              
              This happened while the csv dataset builder was generating data using
              
              hf://datasets/bilalahmad176176/BrainAge-Golden-Preprocessed/manifests/Golden-0-to-25_manifest.csv (at revision 131c39a43455c3dd35a7f88479f423871a5ddfb7), ['hf://datasets/bilalahmad176176/BrainAge-Golden-Preprocessed@131c39a43455c3dd35a7f88479f423871a5ddfb7/logs/preprocess_status.csv', 'hf://datasets/bilalahmad176176/BrainAge-Golden-Preprocessed@131c39a43455c3dd35a7f88479f423871a5ddfb7/manifests/Golden-0-to-25_manifest.csv', 'hf://datasets/bilalahmad176176/BrainAge-Golden-Preprocessed@131c39a43455c3dd35a7f88479f423871a5ddfb7/manifests/Golden-25plus_manifest.csv']
              
              Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

timestamp
string
worker_id
int64
subject_id
string
site
string
status
string
runtime_sec
float64
native_brain_mm3
float64
error
string
2026-04-24T12:30:10
1
PEDS031
DataSet-5_PTBP
failed
117.3
0
RuntimeError: skull_strip failed after 3 attempts: Command '['/home/MRI-DataSet/.venv/bin/hd-bet', '-i', '/home/MRI-DataSet/Golden-0-to-25/DataSet-5_PTBP/PEDS031_20101116_mprage_t1.nii.gz', '-o', '/ho
2026-04-24T12:30:10
0
PEDS031
DataSet-5_PTBP
failed
117.3
0
FileNotFoundError: [Errno 2] No such file or directory: '/home/MRI-DataSet/_train/scratch/proc_PEDS031/brain.nii.gz'
2026-04-24T12:30:46
1
PEDS031
DataSet-5_PTBP
failed
35.4
0
ValueError: File /home/MRI-DataSet/_train/scratch/proc_PEDS031/brain.nii.gz does not exist!
2026-04-24T12:32:23
1
PEDS038
DataSet-5_PTBP
ok
96.9
1,364,774
null
2026-04-24T12:32:23
1
PEDS038
DataSet-5_PTBP
skipped_done
0
0
null
2026-04-24T12:32:23
1
PEDS038
DataSet-5_PTBP
skipped_done
0
0
null
2026-04-24T12:32:23
0
PEDS031
DataSet-5_PTBP
ok
132.5
1,408,118
null
2026-04-24T12:33:01
0
PEDS082
DataSet-5_PTBP
failed
38.1
0
FileNotFoundError: [Errno 2] No such file or directory: '/home/MRI-DataSet/_train/scratch/proc_PEDS082/brain_bet.nii.gz'
2026-04-24T12:33:39
0
PEDS082
DataSet-5_PTBP
failed
37.2
0
ValueError: File /home/MRI-DataSet/_train/scratch/proc_PEDS082/brain.nii.gz does not exist!
2026-04-24T12:35:22
1
PEDS082
DataSet-5_PTBP
ok
178.7
1,321,196
null
2026-04-24T12:35:23
0
PEDS059
DataSet-5_PTBP
failed
104.1
0
ValueError: File /home/MRI-DataSet/_train/scratch/proc_PEDS059/brain_bet.nii.gz does not exist!
2026-04-24T12:36:59
1
PEDS059
DataSet-5_PTBP
ok
97.3
1,620,885
null
2026-04-24T12:37:00
0
PEDS010
DataSet-5_PTBP
failed
96.6
0
FileNotFoundError: No such file or no access: '/home/MRI-DataSet/_train/scratch/proc_PEDS010/brain_mni_znorm.nii.gz'
2026-04-24T12:38:35
1
PEDS010
DataSet-5_PTBP
ok
95.4
1,438,380
null
2026-04-24T12:38:36
0
PEDS089
DataSet-5_PTBP
failed
95.9
0
FileNotFoundError: No such file or no access: '/home/MRI-DataSet/_train/scratch/proc_PEDS089/brain_mni_znorm.nii.gz'
2026-04-24T12:40:11
0
PEDS093
DataSet-5_PTBP
ok
95.4
1,335,821
null
2026-04-24T12:40:11
0
PEDS093
DataSet-5_PTBP
skipped_done
0
0
null
2026-04-24T12:40:11
1
PEDS089
DataSet-5_PTBP
ok
96.4
1,160,219
null
2026-04-24T12:41:29
1
PEDS044
DataSet-5_PTBP
failed
78.1
0
FileNotFoundError: [Errno 2] No such file or directory: '/home/MRI-DataSet/_train/scratch/proc_PEDS044/brain_bet.nii.gz'
2026-04-24T12:43:03
1
sub-0007
DataSet-8_AOMIC-ID1000
ok
93
1,577,336
null
2026-04-24T12:43:03
1
sub-0007
DataSet-8_AOMIC-ID1000
skipped_done
0
0
null
2026-04-24T12:43:03
1
sub-0007
DataSet-8_AOMIC-ID1000
skipped_done
0
0
null
2026-04-24T12:43:06
0
PEDS044
DataSet-5_PTBP
ok
174.6
1,290,744
null
2026-04-24T12:43:41
1
sub-0008
DataSet-8_AOMIC-ID1000
failed
38.3
0
FileNotFoundError: [Errno 2] No such file or directory: '/home/MRI-DataSet/_train/scratch/proc_sub-0008/brain_bet.nii.gz'
2026-04-24T12:45:06
1
sub-0008
DataSet-8_AOMIC-ID1000
ok
84.5
1,426,460
null
2026-04-24T12:45:37
0
sub-0008
DataSet-8_AOMIC-ID1000
failed
150.6
0
ValueError: File /home/MRI-DataSet/_train/scratch/proc_sub-0008/brain_bet.nii.gz does not exist!
2026-04-24T12:46:28
1
sub-0005
DataSet-8_AOMIC-ID1000
ok
82
1,680,146
null
2026-04-24T12:46:28
1
sub-0005
DataSet-8_AOMIC-ID1000
skipped_done
0
0
null
2026-04-24T12:46:56
0
sub-0005
DataSet-8_AOMIC-ID1000
failed
79.7
0
ValueError: File /home/MRI-DataSet/_train/scratch/proc_sub-0005/brain_bet.nii.gz does not exist!
2026-04-24T12:47:38
1
sub-0050049
DataSet-10_ABIDE-I
failed
70.1
0
RuntimeError: skull_strip failed after 3 attempts: Command '['/home/MRI-DataSet/.venv/bin/hd-bet', '-i', '/home/MRI-DataSet/Golden-0-to-25/DataSet-10_ABIDE-I/sub-0050049_T1w.nii.gz', '-o', '/home/MRI-
2026-04-24T12:48:27
0
sub-28879
DataSet-11_ABIDE-II
ok
90.1
1,528,771
null
2026-04-24T12:48:58
1
sub-28871
DataSet-11_ABIDE-II
ok
79.8
1,218,393
null
2026-04-24T12:49:49
0
sub-28873
DataSet-11_ABIDE-II
ok
82.3
1,320,850
null
2026-04-24T12:50:22
1
sub-28875
DataSet-11_ABIDE-II
ok
83.8
1,394,402
null
2026-04-24T12:51:12
0
sub-28867
DataSet-11_ABIDE-II
ok
82.7
1,502,787
null
2026-04-24T12:51:46
1
sub-28855
DataSet-11_ABIDE-II
ok
83.8
1,407,360
null
2026-04-24T12:52:39
0
sub-28869
DataSet-11_ABIDE-II
ok
87.2
1,451,751
null
2026-04-24T12:53:04
1
sub-28889
DataSet-11_ABIDE-II
ok
78.6
1,524,575
null
2026-04-24T12:54:03
0
sub-28853
DataSet-11_ABIDE-II
ok
83.3
1,414,566
null
2026-04-24T12:54:28
1
sub-28891
DataSet-11_ABIDE-II
ok
83.1
1,509,338
null
2026-04-24T12:55:21
0
sub-28883
DataSet-11_ABIDE-II
ok
77.7
1,302,962
null
2026-04-24T12:55:51
1
sub-28881
DataSet-11_ABIDE-II
ok
83.3
1,501,899
null
2026-04-24T12:56:50
0
sub-29620
DataSet-11_ABIDE-II
ok
89.5
1,473,597.3
null
2026-04-24T12:57:20
1
sub-29632
DataSet-11_ABIDE-II
ok
89.1
1,326,778.8
null
2026-04-24T12:58:10
0
sub-29621
DataSet-11_ABIDE-II
ok
80.1
1,431,842.5
null
2026-04-24T12:58:49
1
sub-29623
DataSet-11_ABIDE-II
ok
83
1,125,698.4
null
2026-04-24T12:59:42
0
sub-29580
DataSet-11_ABIDE-II
ok
90.9
1,517,003.7
null
2026-04-24T13:00:21
1
sub-29594
DataSet-11_ABIDE-II
ok
92.2
1,571,255.8
null
2026-04-24T13:01:07
0
sub-29596
DataSet-11_ABIDE-II
ok
85.7
1,343,976.8
null
2026-04-24T13:01:47
1
sub-29588
DataSet-11_ABIDE-II
ok
85.4
1,547,950.6
null
2026-04-24T13:02:30
0
sub-29617
DataSet-11_ABIDE-II
ok
82.5
1,552,389.1
null
2026-04-24T13:03:11
1
sub-29584
DataSet-11_ABIDE-II
ok
84.5
1,310,350.1
null
2026-04-24T13:03:55
0
sub-29606
DataSet-11_ABIDE-II
ok
84.9
1,552,330.2
null
2026-04-24T13:04:30
1
sub-29628
DataSet-11_ABIDE-II
ok
79
1,153,103.3
null
2026-04-24T13:05:15
0
sub-29605
DataSet-11_ABIDE-II
ok
79.4
1,454,844.4
null
2026-04-24T13:05:55
1
sub-29630
DataSet-11_ABIDE-II
ok
84.3
1,361,047.3
null
2026-04-24T13:06:43
0
sub-29612
DataSet-11_ABIDE-II
ok
84.2
1,317,627.4
null
2026-04-24T13:07:19
1
sub-29593
DataSet-11_ABIDE-II
ok
83.9
1,300,268
null
2026-04-24T13:08:12
0
sub-29613
DataSet-11_ABIDE-II
ok
88.3
1,268,623.7
null
2026-04-24T13:08:45
1
sub-29634
DataSet-11_ABIDE-II
ok
86
1,318,048.4
null
2026-04-24T13:09:36
0
sub-29610
DataSet-11_ABIDE-II
ok
83.6
1,382,535.4
null
2026-04-24T13:10:11
1
sub-29597
DataSet-11_ABIDE-II
ok
86.3
1,373,223.1
null
2026-04-24T13:11:00
0
sub-29583
DataSet-11_ABIDE-II
ok
84.3
1,504,552.9
null
2026-04-24T13:11:39
1
sub-29601
DataSet-11_ABIDE-II
ok
87.4
1,411,365.8
null
2026-04-24T13:12:27
0
sub-29607
DataSet-11_ABIDE-II
ok
86.9
1,454,534.5
null
2026-04-24T13:13:04
1
sub-29592
DataSet-11_ABIDE-II
ok
85
1,561,620.4
null
2026-04-24T13:13:54
0
sub-29622
DataSet-11_ABIDE-II
ok
86.6
1,319,878.7
null
2026-04-24T13:14:31
1
sub-29616
DataSet-11_ABIDE-II
ok
87.1
1,280,060.3
null
2026-04-24T13:15:18
0
sub-29627
DataSet-11_ABIDE-II
ok
83.8
1,587,379.4
null
2026-04-24T13:15:56
1
sub-29609
DataSet-11_ABIDE-II
ok
84.2
1,665,093.4
null
2026-04-24T13:16:46
0
sub-29587
DataSet-11_ABIDE-II
ok
87.9
1,373,682.5
null
2026-04-24T13:17:24
1
sub-29599
DataSet-11_ABIDE-II
ok
88.7
1,601,740
null
2026-04-24T13:18:12
0
sub-29614
DataSet-11_ABIDE-II
ok
85.8
1,564,040.2
null
2026-04-24T13:18:49
1
sub-29608
DataSet-11_ABIDE-II
ok
84.3
1,442,036.5
null
2026-04-24T13:19:36
0
sub-29591
DataSet-11_ABIDE-II
ok
84.6
1,192,084.3
null
2026-04-24T13:20:17
1
sub-29590
DataSet-11_ABIDE-II
ok
88
1,397,010.3
null
2026-04-24T13:20:56
0
sub-29624
DataSet-11_ABIDE-II
ok
79.5
1,286,430.5
null
2026-04-24T13:21:41
1
sub-29619
DataSet-11_ABIDE-II
ok
83.9
1,267,639
null
2026-04-24T13:22:22
0
sub-29603
DataSet-11_ABIDE-II
ok
86.1
1,427,587.2
null
2026-04-24T13:23:03
1
sub-29604
DataSet-11_ABIDE-II
ok
81.9
1,190,700
null
2026-04-24T13:23:47
0
sub-29629
DataSet-11_ABIDE-II
ok
84.3
1,397,768.9
null
2026-04-24T13:24:27
1
sub-29626
DataSet-11_ABIDE-II
ok
83.4
1,404,841.3
null
2026-04-24T13:25:16
0
sub-29633
DataSet-11_ABIDE-II
ok
89.4
1,431,361.7
null
2026-04-24T13:25:56
1
sub-29615
DataSet-11_ABIDE-II
ok
89
1,578,661.5
null
2026-04-24T13:27:12
0
sub-29568
DataSet-11_ABIDE-II
ok
115.4
1,462,690.3
null
2026-04-24T13:27:49
1
sub-29564
DataSet-11_ABIDE-II
ok
113.1
1,514,947.6
null
2026-04-24T13:29:12
0
sub-29547
DataSet-11_ABIDE-II
ok
120.1
1,674,361.3
null
2026-04-24T13:29:50
1
sub-29557
DataSet-11_ABIDE-II
ok
120.9
1,732,623.7
null
2026-04-24T13:31:04
0
sub-29565
DataSet-11_ABIDE-II
ok
112
1,444,448.8
null
2026-04-24T13:31:49
1
sub-29558
DataSet-11_ABIDE-II
ok
118.9
1,696,007.7
null
2026-04-24T13:32:54
0
sub-29543
DataSet-11_ABIDE-II
ok
109.2
1,301,483.6
null
2026-04-24T13:33:44
1
sub-29559
DataSet-11_ABIDE-II
ok
115.1
1,458,909.3
null
2026-04-24T13:34:48
0
sub-29551
DataSet-11_ABIDE-II
ok
113.9
1,513,336.9
null
2026-04-24T13:35:39
1
sub-29545
DataSet-11_ABIDE-II
ok
114.5
1,605,411.1
null
2026-04-24T13:36:38
0
sub-29561
DataSet-11_ABIDE-II
ok
110
1,673,106
null
2026-04-24T13:37:42
1
sub-29541
DataSet-11_ABIDE-II
ok
117.3
1,534,393.3
null
2026-04-24T13:38:33
0
sub-29546
DataSet-11_ABIDE-II
ok
115.5
1,740,851.2
null
2026-04-24T13:39:38
1
sub-29556
DataSet-11_ABIDE-II
ok
116
1,403,232.5
null
2026-04-24T13:40:29
0
sub-29576
DataSet-11_ABIDE-II
ok
115.2
1,603,854.3
null
2026-04-24T13:41:28
1
sub-29538
DataSet-11_ABIDE-II
ok
110.5
1,491,048.1
null
End of preview.

BrainAge Golden Preprocessed Cache

6,050 preprocessed brain MRI tensors ready for training a brain-age prediction model. Skip the 40+ hour preprocessing step and jump straight to model training.

What's inside

Each .pt file (one per subject) contains:

Key Type Shape Description
volume float16 (128, 144, 112) Z-normed T1w brain in MNI space, trilinear-resized
tab float32 (86,) 70 regional volumes (log1p/12) + 3 sex one-hot + 13 site one-hot
age float32 scalar Chronological age in years
meta dict subject_id, site, sex, age, split

Stats

Metric Value
Total subjects 6,050
Age range 0 – 86 years
Source datasets 12 (BCP, Calgary, ds002726, ds000248, PTBP, IXI, MPI-Leipzig, AOMIC, NKI-Rockland, ABIDE-I, ABIDE-II, ADHD-200)
Volume shape 128 × 144 × 112 (D × H × W)
Tabular dim 86 (70 regions + 3 sex + 13 site)
File size ~4 MB each
Total size ~24 GB

Preprocessing pipeline applied

Raw T1w NIfTI
  → HD-BET skull-strip (GPU)
  → N4 bias correction (ANTs)
  → Affine registration to MNI152 1mm
  → Z-score intensity normalization
  → Harvard-Oxford atlas segmentation (69 regions)
  → Volume measurement + rescaling to native space
  → Tensor packaging (.pt)

Quick start

from huggingface_hub import snapshot_download
import torch

# Download (~24 GB)
snapshot_download(
    "bilalahmad176176/BrainAge-Golden-Preprocessed",
    repo_type="dataset",
    local_dir="cache/"
)

# Load one subject
data = torch.load("cache/cache/IXI002.pt", weights_only=False)
print(data["volume"].shape)  # (128, 144, 112) float16
print(data["tab"].shape)     # (86,) float32
print(data["age"])            # e.g. 36.2
print(data["meta"])           # {'subject_id': 'IXI002', 'site': 'DataSet-6_IXI', ...}

Train a model

# Generate split
python -m pipeline_v2.data_split \
    --manifests Golden-0-to-25/manifest.csv Golden-25plus/manifest.csv \
    --out cache/split.csv

# Train
python -m pipeline_v2.train \
    --cache_dir cache/cache \
    --split_csv cache/split.csv \
    --out_ckpt brainage_sfcn.pt \
    --epochs 60 --batch 4

Related

Citation

Please cite the original source studies listed in the raw dataset manifests.

Downloads last month
3,564

Space using bilalahmad176176/BrainAge-Golden-Preprocessed 1