CoolFace
Datasetpublic

faizan711/VinDR-CXR-VQA

VinDr-CXR-VQA Dataset Dataset Description VinDr-CXR-VQA is a large-scale chest X-ray Visual Question Answering (VQA) dataset designed for explainable medical AI with spatial grounding capabilities. The dataset combines natural language question-answer pairs with bounding box annotations and clinical reasoning explanations. Key Features πŸ₯ 4,394 chest X-ray images from VinDr-CXR πŸ’¬ 17,597 question-answer pairs across 6 question types πŸ“ Spatial… See the full description on the dataset page: https://huggingface.co/datasets/faizan711/VinDR-CXR-VQA.

sourceHugging Facecc-by-4.0updated 8mo agoView on Hugging Face
3likes79downloads
Dataset Card

VinDr-CXR-VQA Dataset

Dataset Description

VinDr-CXR-VQA is a large-scale chest X-ray Visual Question Answering (VQA) dataset designed for explainable medical AI with spatial grounding capabilities. The dataset combines natural language question-answer pairs with bounding box annotations and clinical reasoning explanations.

Key Features

  • β€”πŸ₯ 4,394 chest X-ray images from VinDr-CXR
  • β€”πŸ’¬ 17,597 question-answer pairs across 6 question types
  • β€”πŸ“ Spatial grounding with expert-validated bounding boxes
  • β€”πŸ§  Clinical reasoning explanations (150-250 words per sample)
  • β€”βœ… Expert validation by board-certified radiologists
  • β€”πŸŽ― 14 thoracic pathology classes

Dataset Statistics

AttributeValue
Total Images4,394
Q&A Pairs17,597
Avg Q&A per Image4.0
Pathology Classes14
Question Types6 (Where, What, Isthere, Howmany, Which, Yes_No)
Training Split3,735 images (85%)
Validation Split659 images (15%)
Test Split300 images

Question Type Distribution

All question types are balanced (16.4–17.0% each):

  • β€”Where: Spatial localization questions
  • β€”What: Pathology identification
  • β€”Is_there: Existence verification
  • β€”How_many: Lesion counting
  • β€”Which: Anatomical classification
  • β€”Yes_No: Binary confirmation

Pathology Classes (14)

The dataset covers 14 thoracic pathology classes with natural clinical imbalance:

  1. 1.Cardiomegaly (28.0%)
  2. 2.Pulmonary fibrosis (14.0%)
  3. 3.Lung Opacity (13.3%)
  4. 4.Pleural effusion (13.2%)
  5. 5.Aortic enlargement (10.4%)
  6. 6.Calcification (8.1%)
  7. 7.Other lesion (3.7%)
  8. 8.Pleural thickening (2.9%)
  9. 9.Infiltration (1.8%)
  10. 10.Pneumothorax (1.7%)
  11. 11.Nodule/Mass (1.2%)
  12. 12.ILD (1.1%)
  13. 13.Consolidation (0.3%)
  14. 14.Atelectasis (0.1%)

Dataset Structure

Data Format

The dataset is provided in JSON format (data_v1.json) with the following structure:

json
{
  "image_id": "unique_image_identifier",
  "num_questions": 4,
  "vqa": [
    {
      "question": "Where is the Cardiomegaly?",
      "answer": "The Cardiomegaly finding refers to an enlargement of the cardiac silhouette, centrally located in the chest <loc_691_1375_1653_1831>.",
      "reason": "Cardiomegaly is a nonspecific finding often indicative of chronic cardiac stress...",
      "type": "Where",
      "difficulty": "Medium",
      "gt_finding": "Cardiomegaly",
      "gt_location": "<loc_691_1375_1653_1831>"
    }
  ]
}

Field Descriptions

FieldSourceDescription
image_idVinDr-CXRUnique image identifier
num_questionsGeneratedNumber of Q&A pairs for this image
questionAPI GeneratedNatural language question
answerAPI GeneratedAnswer with spatial reference in <loc> format
reasonAPI GeneratedClinical reasoning (150-250 words)
typeAPI GeneratedQuestion category (6 types)
difficultyAPI GeneratedEasy/Medium
gt_findingVinDr-CXRExpert-annotated pathology label (unchanged)
gt_locationVinDr-CXRExpert-annotated bounding box (unchanged)

Bounding Box Format

Bounding boxes are encoded as: <loc_xmin_ymin_xmax_ymax>

Example: <loc_691_1375_1653_1831> represents:

  • β€”x_min: 691
  • β€”y_min: 1375
  • β€”x_max: 1653
  • β€”y_max: 1831

Dataset Construction

Source Data

VinDr-CXR-VQA is built upon the VinDr-CXR dataset, which provides expert-validated bounding box annotations for chest X-ray pathologies.

Generation Process

  1. 1.Annotation Preservation: All pathology labels and bounding boxes are directly copied from VinDr-CXR without modification, ensuring evaluation against verified clinical ground truth.
  1. 1.Question-Answer Generation: Using Google's Gemini 2.5 Pro API, we generate natural language question-answer pairs with clinical reasoning based on existing VinDr-CXR annotations.
  1. 1.Quality Control:
  2. 2.Automated validation: 100% of samples verified against VinDr-CXR source files (zero mismatches)
  3. 3.Clinical review: 100 samples (0.57%) independently evaluated by 2 board-certified radiologists
  4. 4.Inter-rater agreement: Cohen's ΞΊ = 0.89 (95% CI: [0.84, 0.93])
  5. 5.Acceptance rate: 100% after consensus resolution

Usage

Loading the Dataset

python
import json

# Load dataset
with open('data_v1.json', 'r') as f:
    data = json.load(f)

# Access a sample
sample = data[0]
print(f"Image ID: {sample['image_id']}")
print(f"Number of Q&A pairs: {sample['num_questions']}")

# Access first Q&A pair
vqa = sample['vqa'][0]
print(f"Question: {vqa['question']}")
print(f"Answer: {vqa['answer']}")
print(f"Ground truth: {vqa['gt_finding']} at {vqa['gt_location']}")

Using with Hugging Face Datasets

python
from datasets import load_dataset

dataset = load_dataset("Dangindev/vindr-cxr-vqa")

Extracting Bounding Box Coordinates

python
def parse_bbox(loc_string):
    """Extract bounding box coordinates from <loc_x_y_x_y> format"""
    coords = loc_string.strip('<>').replace('loc_', '').split('_')
    return [int(c) for c in coords]  # [xmin, ymin, xmax, ymax]

# Example
bbox = parse_bbox("<loc_691_1375_1653_1831>")
print(bbox)  # [691, 1375, 1653, 1831]

Citation

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

bibtex
@article{vindr-cxr-vqa2025,
  title={VinDr-CXR-VQA: A Visual Question Answering Dataset for Explainable Chest X-ray Analysis with Multi-task Learning},
  author={Nguyen, Hai-Dang and Pham, Ha-Hieu and Pham, Huy-Hieu},
  journal={IEEE International Symposium on Biomedical Imaging (ISBI)},
  year={2025}
}

Please also cite the original VinDr-CXR dataset:

bibtex
@misc{nguyen2025vindrcxrvqavisualquestionanswering,
      title={VinDr-CXR-VQA: A Visual Question Answering Dataset for Explainable Chest X-Ray Analysis with Multi-Task Learning}, 
      author={Dang H. Nguyen and Hieu H. Pham and Hao T. Nguyen and Hieu H. Pham},
      year={2025},
      eprint={2511.00504},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2511.00504}, 
}

License

This dataset is released under the Creative Commons Attribution 4.0 International License (CC BY 4.0).

Contact

For questions or issues, please open an issue on the GitHub repository or contact:

  • β€”Huy-Hieu Pham: hieu.ph@vinuni.edu.vn
  • β€”VinUniversity, Hanoi, Vietnam

Acknowledgments

This work is based on the VinDr-CXR dataset. We thank the original authors for making their data publicly available. Dataset generation used Google's Gemini 2.5 Pro API for natural language generation.