Dataset Preview
Full Screen
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 4 new columns ({'processing time', 'sub_id', 'status', 'message'}) and 5 missing columns ({'subject_id', 'laterality', 'visit', 't2map_nifti_path', 'dicom_mese_path'}).

This happened while the csv dataset builder was generating data using

hf://datasets/barma7/oai-t2maps-epgfit/00m/processing_log_EPG_dictionary.csv (at revision 95b92709031199d01ee2a36f689308be1de4a1db)

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 "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1870, in _prepare_split_single
                  writer.write_table(table)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 622, in write_table
                  pa_table = table_cast(pa_table, self._schema)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2292, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2240, in cast_table_to_schema
                  raise CastError(
              datasets.table.CastError: Couldn't cast
              sub_id: int64
              status: int64
              processing time: double
              message: string
              -- schema metadata --
              pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 725
              to
              {'subject_id': Value(dtype='int64', id=None), 'visit': Value(dtype='int64', id=None), 'laterality': Value(dtype='string', id=None), 'dicom_mese_path': Value(dtype='string', id=None), 't2map_nifti_path': Value(dtype='string', id=None)}
              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 1400, 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 983, in stream_convert_to_parquet
                  builder._prepare_split(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1741, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1872, 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 4 new columns ({'processing time', 'sub_id', 'status', 'message'}) and 5 missing columns ({'subject_id', 'laterality', 'visit', 't2map_nifti_path', 'dicom_mese_path'}).
              
              This happened while the csv dataset builder was generating data using
              
              hf://datasets/barma7/oai-t2maps-epgfit/00m/processing_log_EPG_dictionary.csv (at revision 95b92709031199d01ee2a36f689308be1de4a1db)
              
              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.

subject_id
int64
visit
int64
laterality
string
dicom_mese_path
string
t2map_nifti_path
string
9,000,099
0
RIGHT
00m/0.E.1/9000099/20050712/10424416
00m/9000099
9,000,296
0
RIGHT
00m/0.C.2/9000296/20040909/10693717
00m/9000296
9,000,622
0
RIGHT
00m/0.E.1/9000622/20050707/10574215
00m/9000622
9,000,798
0
RIGHT
00m/0.C.2/9000798/20040924/10249517
00m/9000798
9,001,104
0
RIGHT
00m/0.E.1/9001104/20050825/10498215
00m/9001104
9,001,400
0
RIGHT
00m/0.C.2/9001400/20050107/10322417
00m/9001400
9,001,695
0
RIGHT
00m/0.C.2/9001695/20050104/10098617
00m/9001695
9,001,897
0
RIGHT
00m/0.C.2/9001897/20050203/10350434
00m/9001897
9,002,116
0
RIGHT
00m/0.E.1/9002116/20050715/10423914
00m/9002116
9,002,316
0
LEFT
00m/0.C.2/9002316/20040831/10119608
00m/9002316
9,002,411
0
RIGHT
00m/0.C.2/9002411/20041227/10136717
00m/9002411
9,002,430
0
RIGHT
00m/0.E.1/9002430/20050620/10934817
00m/9002430
9,002,663
0
RIGHT
00m/0.E.1/9002663/20050602/10541717
00m/9002663
9,002,817
0
RIGHT
00m/0.C.2/9002817/20050330/10756617
00m/9002817
9,003,126
0
RIGHT
00m/0.E.1/9003126/20050705/10574517
00m/9003126
9,003,175
0
RIGHT
00m/0.E.1/9003175/20050616/10927415
00m/9003175
9,003,316
0
RIGHT
00m/0.C.2/9003316/20040921/10252017
00m/9003316
9,003,380
0
RIGHT
00m/0.C.2/9003380/20050110/10323515
00m/9003380
9,003,406
0
RIGHT
00m/0.C.2/9003406/20041118/10296220
00m/9003406
9,003,430
0
RIGHT
00m/0.E.1/9003430/20050613/10557217
00m/9003430
9,003,658
0
RIGHT
00m/0.E.1/9003658/20050609/10548817
00m/9003658
9,003,815
0
RIGHT
00m/0.C.2/9003815/20040910/10698851
00m/9003815
9,003,895
0
RIGHT
00m/0.C.2/9003895/20050118/10134419
00m/9003895
9,004,175
0
RIGHT
00m/0.E.1/9004175/20050602/10541517
00m/9004175
9,004,184
0
RIGHT
00m/0.C.2/9004184/20041217/10313214
00m/9004184
9,004,315
0
RIGHT
00m/0.C.2/9004315/20040831/10119817
00m/9004315
9,004,462
0
RIGHT
00m/0.C.2/9004462/20040812/10680114
00m/9004462
9,004,669
0
RIGHT
00m/0.E.1/9004669/20050714/10420418
00m/9004669
9,004,905
0
RIGHT
00m/0.C.2/9004905/20041026/10129117
00m/9004905
9,005,075
0
RIGHT
00m/0.E.1/9005075/20050926/10593817
00m/9005075
9,005,132
0
RIGHT
00m/0.E.1/9005132/20050719/10427015
00m/9005132
9,005,321
0
RIGHT
00m/0.C.2/9005321/20040908/10694717
00m/9005321
9,005,413
0
RIGHT
00m/0.C.2/9005413/20041202/10300117
00m/9005413
9,005,656
0
RIGHT
00m/0.E.1/9005656/20050719/10427217
00m/9005656
9,005,905
0
RIGHT
00m/0.C.2/9005905/20050110/10137517
00m/9005905
9,005,942
0
RIGHT
00m/0.E.1/9005942/20050624/10565717
00m/9005942
9,006,140
0
RIGHT
00m/0.E.1/9006140/20050630/10407717
00m/9006140
9,006,407
0
RIGHT
00m/0.C.2/9006407/20050107/10322617
00m/9006407
9,006,723
0
RIGHT
00m/0.C.2/9006723/20050113/10326811
00m/9006723
9,007,422
0
RIGHT
00m/0.C.2/9007422/20050103/10524818
00m/9007422
9,007,827
0
RIGHT
00m/0.C.2/9007827/20041006/10263614
00m/9007827
9,007,904
0
RIGHT
00m/0.C.2/9007904/20050104/10097117
00m/9007904
9,008,322
0
RIGHT
00m/0.C.2/9008322/20040903/10123509
00m/9008322
9,008,561
0
RIGHT
00m/0.C.2/9008561/20041028/10280111
00m/9008561
9,008,820
0
RIGHT
00m/0.C.2/9008820/20040930/10072417
00m/9008820
9,008,884
0
RIGHT
00m/0.C.2/9008884/20050204/10173408
00m/9008884
9,008,934
0
RIGHT
00m/0.E.1/9008934/20050627/10564717
00m/9008934
9,009,067
0
RIGHT
00m/0.C.2/9009067/20041108/10287117
00m/9009067
9,009,623
0
RIGHT
00m/0.E.1/9009623/20050525/10741216
00m/9009623
9,009,716
0
RIGHT
00m/0.C.2/9009716/20041214/10308317
00m/9009716
9,009,927
0
RIGHT
00m/0.E.1/9009927/20050711/10414117
00m/9009927
9,009,957
0
RIGHT
00m/0.C.2/9009957/20050110/10137918
00m/9009957
9,010,060
0
RIGHT
00m/0.C.2/9010060/20041027/10279517
00m/9010060
9,010,308
0
RIGHT
00m/0.C.2/9010308/20040915/10243217
00m/9010308
9,010,370
0
RIGHT
00m/0.C.2/9010370/20050104/10321317
00m/9010370
9,010,952
0
RIGHT
00m/0.C.2/9010952/20050105/10313517
00m/9010952
9,011,053
0
RIGHT
00m/0.C.2/9011053/20050317/10736917
00m/9011053
9,011,115
0
RIGHT
00m/0.E.1/9011115/20050801/10450915
00m/9011115
9,011,420
0
RIGHT
00m/0.E.1/9011420/20050618/10932721
00m/9011420
9,011,641
0
RIGHT
00m/0.E.1/9011641/20050712/10417715
00m/9011641
9,011,661
0
RIGHT
00m/0.E.1/9011661/20051006/10536517
00m/9011661
9,011,918
0
RIGHT
00m/0.E.1/9011918/20050614/10928817
00m/9011918
9,011,949
0
RIGHT
00m/0.C.2/9011949/20050106/10321217
00m/9011949
9,012,435
0
RIGHT
00m/0.C.2/9012435/20050128/10347015
00m/9012435
9,012,867
0
RIGHT
00m/0.C.2/9012867/20050105/10321712
00m/9012867
9,013,161
0
RIGHT
00m/0.E.1/9013161/20060617/11191217
00m/9013161
9,013,634
0
RIGHT
00m/0.E.1/9013634/20050721/10436817
00m/9013634
9,013,798
0
RIGHT
00m/0.C.2/9013798/20040920/10252217
00m/9013798
9,013,941
0
RIGHT
00m/0.C.2/9013941/20050114/10325914
00m/9013941
9,014,209
0
RIGHT
00m/0.E.1/9014209/20050606/10547517
00m/9014209
9,014,797
0
RIGHT
00m/0.C.2/9014797/20041007/10261714
00m/9014797
9,014,883
0
RIGHT
00m/0.C.2/9014883/20050124/10156517
00m/9014883
9,015,363
0
RIGHT
00m/0.C.2/9015363/20041220/10311515
00m/9015363
9,015,402
0
RIGHT
00m/0.C.2/9015402/20050112/10323217
00m/9015402
9,015,718
0
RIGHT
00m/0.E.1/9015718/20050526/10532917
00m/9015718
9,015,798
0
RIGHT
00m/0.C.2/9015798/20040915/10243417
00m/9015798
9,016,121
0
RIGHT
00m/0.E.1/9016121/20050617/10936017
00m/9016121
9,016,179
0
RIGHT
00m/0.C.2/9016179/20041215/10314208
00m/9016179
9,016,304
0
RIGHT
00m/0.C.2/9016304/20040917/10242117
00m/9016304
9,016,403
0
RIGHT
00m/0.C.2/9016403/20050121/10329014
00m/9016403
9,016,886
0
RIGHT
00m/0.C.2/9016886/20050112/10323617
00m/9016886
9,016,918
0
RIGHT
00m/0.E.1/9016918/20050623/10564617
00m/9016918
9,017,252
0
RIGHT
00m/0.C.2/9017252/20041209/10306517
00m/9017252
9,017,419
0
RIGHT
00m/0.C.2/9017419/20050624/10565935
00m/9017419
9,017,876
0
RIGHT
00m/0.C.2/9017876/20050111/10136817
00m/9017876
9,017,909
0
RIGHT
00m/0.E.1/9017909/20050729/10451817
00m/9017909
9,018,291
0
RIGHT
00m/0.C.2/9018291/20040917/10242417
00m/9018291
9,018,389
0
RIGHT
00m/0.C.2/9018389/20050113/10324834
00m/9018389
9,018,489
0
RIGHT
00m/0.C.2/9018489/20040809/10675910
00m/9018489
9,019,287
0
RIGHT
00m/0.C.2/9019287/20040913/10698114
00m/9019287
9,019,406
0
RIGHT
00m/0.E.1/9019406/20050617/10934217
00m/9019406
9,019,907
0
RIGHT
00m/0.E.1/9019907/20050706/10575617
00m/9019907
9,020,404
0
RIGHT
00m/0.E.1/9020404/20050706/10575417
00m/9020404
9,020,714
0
RIGHT
00m/0.C.2/9020714/20050203/10350818
00m/9020714
9,020,856
0
RIGHT
00m/0.C.2/9020856/20050103/10320117
00m/9020856
9,020,999
0
RIGHT
00m/0.C.2/9020999/20040803/10236910
00m/9020999
9,021,102
0
RIGHT
00m/0.E.1/9021102/20050726/10439915
00m/9021102
9,021,195
0
RIGHT
00m/0.E.1/9021195/20050531/10534711
00m/9021195
9,021,428
0
RIGHT
00m/0.C.2/9021428/20050118/10134617
00m/9021428
9,021,791
0
RIGHT
00m/0.C.2/9021791/20040922/10250914
00m/9021791
End of preview.

Osteoarthritis Initiative (OAI) T2 Maps – EPG Fit Dataset

This dataset repository contains T2 maps derived from the Multi-Echo Spin-Echo (MESE) MRI data in the Osteoarthritis Initiative (OAI). The maps were generated specifically for cartilage regions using the Extended Phase Graph (EPG) formalism, which improves the accuracy and reproducibility of cartilage T2 mapping, as detailed in the work of Marco Barbieri, Anthony A. Gatti, and Feliks Kogan (2024) https://doi.org/10.1002/jmri.29646.

The graphical abstract of the work is reported below, showing that EPG modeling improved reproducibility in cartilage T2 in a cohort of healthy subjects from the OAI dataset.

Dataset Structure

Dataset Structure

Files and Folders

The dataset is organized by acquisition timepoints. Each main folder represents a timepoint in the OAI dataset and contains subfolders for individual subjects.

  • Timepoints: 00m, 12m, 24m, 36m, 48m, 72m, 96m.
  • Subject folders: Each folder name is the unique OAI subject ID (e.g., 9000099).

Within each subject folder:

  • t2.nii.gz: The T2 map computed using the EPG dictionary fitting method, specific to cartilage regions.
  • r2.nii.gz: The r-squared value of the fit (goodness of fit).

MESE Data Location Files

For each acquisition timepoint (e.g., 00_month_mese_locations.csv, 12_month_mese_locations.csv, etc), a CSV file provides a mapping to the original MESE data within the OAI dataset. Each CSV file includes the following columns:

  • subject_id: The unique identifier for each OAI subject.
  • visit: The month corresponding to the acquisition timepoint (e.g., 36 for 36m).
  • laterality: Indicates whether the MESE data is from the RIGHT or LEFT knee.
  • dicom_mese_path: The relative path to the original DICOM MESE data within the OAI dataset.
  • t2map_nifti_path: The relative path to the computed T2 map for that subject, located in this dataset.

These CSV files help researchers locate the original MESE DICOM data within the OAI dataset, which may be useful for referencing or aligning with other imaging modalities.

Features

  • Subject ID (str): Unique identifier for each subject in the OAI study.
  • T2 Map (t2.nii.gz): Computed T2 map for cartilage using the EPG fitting method.
  • R-Squared Map (r2.nii.gz): Fit accuracy metric for the T2 computation.

Cartilage-Specific T2 Mapping

The T2 map in this dataset is provided only for cartilage regions, as the EPG model used in the computation is specifically designed for cartilage MR properties. To speed up computation, we have exploited segmented cartilage regions from the femoral, tibial, and patellar regions. Here’s the complete mapping process:

  1. Cartilage Segmentation: For each subject, the femoral, tibial, and patellar cartilage were segmented from the corresponding Double Echo Steady State (DESS) image using the ShapeMedKneeModel.

  2. Registration to MESE Images: The segmented cartilage masks were then registered to the MESE images using Elastix, ensuring anatomical alignment across sequences.

  3. Dilated Mask for T2 Mapping: A dilated version of the cartilage mask was used during the T2 mapping process to allow researchers the flexibility to apply their segmentations if desired. This ensures that cartilage boundaries are fully captured while also accounting for anatomical variations.

The cartilage segmentations used for the OAI dataset are available in the public repository ShapeMedKnee and will be regularly maintained and updated there.

Dataset Creation

The T2 maps in this dataset were generated from the MESE data in the OAI dataset using the Extended Phase Graph (EPG) fitting method as described in the work by Barbieri, Gatti, and Kogan, published in Journal of Magnetic Resonance Imaging (2024). The code used to perform this fitting is open-source and accessible on GitHub at EPGfit_for_cartilage_T2_mapping.

Getting Started

Installation

You can install and access the dataset using the datasets library:

pip install datasets

Usage

Load and interact with the dataset in Python:

from datasets import load_dataset

dataset = load_dataset("barma7/oai-t2maps-epgfit")

# Accessing a specific timepoint and subject data
print(dataset["00m"]["9000099"]["t2"])
print(dataset["00m"]["9000099"]["r2"])

Dataset Details

  • File Size: Each T2 map file (t2.nii.gz) and r-squared file (r2.nii.gz) are stored in compressed .nii.gz format, with sizes varying per subject and time point.
  • Number of Samples: Covers subjects across seven OAI acquisition timepoints for which MESE was available.
  • File Format: .nii.gz files.

License

This dataset is licensed under the MIT License, which allows for free use, modification, and distribution with attribution. For full license details, please see the LICENSE file in this repository.


Acknowledgments

This dataset was created based on the Osteoarthritis Initiative (OAI) dataset. The authors of this repository acknowledge the original OAI study and the contributions of all OAI collaborators.

Citation

If you use this dataset in your research, please cite:

Barbieri, M., Gatti, A.A. and Kogan, F. (2024), Improving Accuracy and Reproducibility of Cartilage T2 Mapping in the OAI Dataset Through Extended Phase Graph Modeling. J Magn Reson Imaging. https://doi.org/10.1002/jmri.29646

Downloads last month
63