Datasets:

Modalities:
Text
Formats:
json
Languages:
English
ArXiv:
Libraries:
Datasets
Dask
License:
3DReasonKnee / README.md
XiaomanZhang's picture
Update README.md
b639951 verified
metadata
license: cc-by-4.0
language:
  - en
tags:
  - medical
size_categories:
  - 10K<n<100K

3D ReasonKnee: 3D Grouned Reasoning Dataset

This repository contains code for preprocessing, generating, and analyzing 3D knee MRI data for osteoarthritis assessment.

Repository Structure

Data Organization

  • /data/
    • /OAI/ - Raw DICOM files from OAI dataset
    • /labels/ - Contains taxonomymatch csv files with MOAKS scores
    • /images/ - Contains the preprocessed images
    • /masks.zip - Contains the segmentation masks of all subregions and lesions given by nnU-Net, please use cat masks_aa masks_ab > masks.zip and unzip masks.zip
    • /split_files/ - Contains patient_id,time,study_folder,series_folder,knee_side,path,image_filepath,label_filepath infomation of all studies with random train/val/test split files
    • /question_files/ - Contains mapping files for subregions and grades
      • questions.json - Queries created based on the MOAKS framework
      • cot_question_mapping.json - Expert Chain of Thought of each question
      • labels.json - label subregion/lesion mapping of the masks
      • grade_dict.json - Example structure of all possible scores
      • question_subregion_mapping.json - Corresponding subregion of each question
    • /generate_data/ - Contains final generated data with image paths (image), prompts (prompt), chain-of-thought reasoning (cot), and final diagnoses including bounding boxes of subregions and grade assessments (final_diagnosis).

Code Organization

  • /code/
    • /data_preprocessing/ - Scripts for initial data preparation of raw DICOM files
      • dcm2nifti.py - Converts DICOM files to NIfTI format and save to ./data/images/

How to Use

  1. OAI Download: Please download the original raw DICOM files from https://nda.nih.gov/oai/query-download
  2. DICOM to NIfTI Conversion: Use /code/data_preprocessing/dcm2nifti.py to convert DICOM files to NIfTI format
  3. Data Example: data file can be found in /generate_data/

Example Data Format

Below is an example of the data format in our generated data files:

  {
    "image": "/data/images/9021195/48M/20090518_12801512_1.nii.gz",
    "prompt": "### Question:\nIn this DESS MRI, can you diagnose cartilage lesions in the femur medial central subregion? Cartilage lesions are scored using two MOAKS components: Size (Grade 0: None, Grade 1: <10% of surface area, Grade 2: 10-75% of surface area, Grade 3: >75% of surface area) and Percent of full-thickness loss (Grade 0: No full-thickness loss, Grade 1: <10% of cartilage defect shows full-thickness loss, Grade 2: 10-75% of cartilage defect shows full-thickness loss, Grade 3: >75% of cartilage defect shows full-thickness loss). Provide your reasoning, the bounding box of the femur medial central subregion, and the MOAKS scores for size and depth. The output format should be a JSON object with the bounding box coordinates and the MOAKS scores: {\"bounding_box\": [start_slice, end_slice, x_min, x_max, y_min, y_max], \"final_diagnosis\": {\"femur medial central cartilage lesion\": {\"Size of lesion\": (grade from 0-3), \"Depth of lesion\": (grade from 0-3)}}}\n### Answer (think step by step):\n",
    "answer": "The cartilage looks gray in the DESS image. It covers the articular surfaces of the bones. I need to see whether the patient's cartilage has a smooth surface, evenly distributed thickness. If there is an abrupt thinning of cartilage, disruption of contour, it implies a cartilage lesion. There is no abrupt change in cartilage contour or any absence of cartilage in this subregion.\n Final diagnosis: {\"bounding_box\": [83, 141, 117, 261, 154, 258], \"final_diagnosis\": {\"femur medial central cartilage lesion\": {\"size\": 0, \"depth\": 0}}}",
    "cot": "The cartilage looks gray in the DESS image. It covers the articular surfaces of the bones. I need to see whether the patient's cartilage has a smooth surface, evenly distributed thickness. If there is an abrupt thinning of cartilage, disruption of contour, it implies a cartilage lesion. There is no abrupt change in cartilage contour or any absence of cartilage in this subregion.",
    "final_diagnosis": {
      "bounding_box": [
        83,
        141,
        117,
        261,
        154,
        258
      ],
      "final_diagnosis": {
        "femur medial central cartilage lesion": {
          "size": 0,
          "depth": 0
        }
      }
    }
  }

Citation

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

@misc{sambara20253dreasonkneeadvancinggroundedreasoning,
      title={3DReasonKnee: Advancing Grounded Reasoning in Medical Vision Language Models}, 
      author={Sraavya Sambara and Sung Eun Kim and Xiaoman Zhang and Luyang Luo and Shreya Johri and Mohammed Baharoon and Du Hyun Ro and Pranav Rajpurkar},
      year={2025},
      eprint={2510.20967},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2510.20967}, 
}

License and Access Restrictions

The Osteoarthritis Initiative (OAI) is a multi-center, ten-year observational study of men and women, sponsored by the National Institutes of Health (part of the Department of Health and Human Services). To obtain access to OAI data you will need an NDA user account. Account can be requested directly from the NIMH Data Archive (NDA) website https://nda.nih.gov/oai/query-download.

Our 3DReasonKnee dataset is released under the Creative Commons Attribution 4.0 International (CC BY 4.0) license. This allows for:

  • Sharing and adaptation of the material
  • Commercial use
  • With the requirement to provide appropriate attribution