radiology-dataset / README.md
ZhangNy's picture
Add comprehensive README with dataset documentation
9cf194c verified
metadata
language:
  - en
task_categories:
  - question-answering
  - text-generation
  - image-to-text
  - text-classification
multilinguality:
  - monolingual
size_categories:
  - 10K<n<100K
tags:
  - medical
  - radiology
  - multimodal
  - healthcare
  - medical-imaging
  - clinical-cases
pretty_name: Radiology Multimodal Dataset
license: cc-by-nc-4.0

Radiology Multimodal Dataset

Dataset Description

This is a comprehensive multimodal radiology dataset containing 43,014 documents sourced from medical radiology resources. The dataset includes articles, clinical cases, and educational tutorials with associated medical images, designed for training and evaluating AI models in the medical imaging domain.

Dataset Summary

  • Total Documents: 43,014

    • Articles: 17,218 educational articles about various radiological conditions
    • Cases: 25,771 clinical cases with patient presentations and findings
    • Tutorials: 25 comprehensive educational tutorials
  • Content Types: Text content, medical images, image captions, URLs, and metadata

  • Domain: Medical radiology and diagnostic imaging

  • Languages: English

  • License: CC BY-NC 4.0 (for non-commercial use)

Supported Tasks

  • Medical Question Answering: Use the rich clinical content for medical Q&A systems
  • Image-Text Retrieval: Match medical images with textual descriptions
  • Clinical Case Analysis: Train models to analyze and understand clinical presentations
  • Medical Report Generation: Generate radiological reports from images and patient data
  • Educational Content Generation: Create educational materials about radiological conditions

Dataset Structure

Data Instances

Each document in the dataset contains:

{
    'doc_id': 'article_brain-ct-angiography',
    'source_type': 'article',  # 'article', 'case', or 'tutorial'
    'title': 'Brain CT Angiography',
    'content': 'Full text content of the article/case/tutorial...',
    'url': 'https://radiopaedia.org/articles/brain-ct-angiography',
    'image_urls': ['https://...', 'https://...'],
    'image_captions': ['Caption for image 1', 'Caption for image 2'],
    'images': [<PIL.Image>, <PIL.Image>],  # Actual image data
    'local_image_paths': [],  # Empty for HF version
    'metadata': {
        'priority': 'high',
        'base_name': 'brain-ct-angiography',
        'table_of_contents': '...',  # For tutorials
        'relevant_articles': [...]  # For cases
    }
}

Data Fields

  • doc_id (string): Unique identifier for each document
  • source_type (string): Type of document - 'article', 'case', or 'tutorial'
  • title (string): Title of the document
  • content (string): Full text content, including clinical descriptions, findings, and conclusions
  • url (string): Original source URL
  • image_urls (list[string]): URLs of associated images from the original source
  • image_captions (list[string]): Captions for the images
  • images (list[Image]): Actual PIL Image objects (resized to max 1024x1024)
  • local_image_paths (list[string]): Empty in the HF version (used for local processing)
  • metadata (dict): Additional metadata including:
    • priority: Priority level of the content
    • base_name: Base name for the document
    • table_of_contents: Table of contents (for tutorials)
    • relevant_articles: Related articles (for cases)

Data Splits

Currently, the dataset is provided as a single split. Users can create their own train/validation/test splits as needed:

from datasets import load_dataset

dataset = load_dataset("ZhangNy/radiology-dataset")

# Create custom splits
train_test = dataset['train'].train_test_split(test_size=0.2, seed=42)
test_valid = train_test['test'].train_test_split(test_size=0.5, seed=42)

final_dataset = {
    'train': train_test['train'],
    'validation': test_valid['train'],
    'test': test_valid['test']
}

Dataset Creation

Source Data

The data is sourced from:

  • Radiopaedia: High-quality radiology reference articles and clinical cases
  • Radiology Assistant: Comprehensive educational tutorials

Data Collection and Processing

  1. Web Scraping: Content was collected from public medical radiology resources
  2. Image Processing: Images were resized to a maximum of 1024x1024 pixels while maintaining aspect ratio
  3. Text Processing: Content was structured and cleaned to maintain medical accuracy
  4. Metadata Extraction: Relevant metadata including image captions, URLs, and relationships were preserved

Annotations

The dataset includes naturally occurring annotations in the form of:

  • Image captions from radiologists
  • Clinical findings and diagnoses
  • Educational descriptions
  • Patient presentations

Usage

Loading the Dataset

from datasets import load_dataset

# Load the full dataset
dataset = load_dataset("ZhangNy/radiology-dataset")

# Access a sample
sample = dataset['train'][0]
print(f"Title: {sample['title']}")
print(f"Type: {sample['source_type']}")
print(f"Number of images: {len(sample['images'])}")

Working with Images

from datasets import load_dataset
import matplotlib.pyplot as plt

dataset = load_dataset("ZhangNy/radiology-dataset")

# Get a sample with images
for sample in dataset['train']:
    if len(sample['images']) > 0:
        # Display the first image
        img = sample['images'][0]
        plt.imshow(img)
        plt.title(sample['title'])
        plt.axis('off')
        plt.show()
        break

Filtering by Source Type

# Get only articles
articles = dataset['train'].filter(lambda x: x['source_type'] == 'article')

# Get only clinical cases
cases = dataset['train'].filter(lambda x: x['source_type'] == 'case')

# Get only tutorials
tutorials = dataset['train'].filter(lambda x: x['source_type'] == 'tutorial')

Example Use Cases

1. Medical Question Answering System

from datasets import load_dataset

dataset = load_dataset("ZhangNy/radiology-dataset")

# Use as knowledge base for RAG (Retrieval-Augmented Generation)
documents = [
    {
        'id': item['doc_id'],
        'text': f"{item['title']} {item['content']}",
        'metadata': item['metadata']
    }
    for item in dataset['train']
]

2. Vision-Language Model Training

# Prepare image-text pairs for multimodal training
image_text_pairs = []

for sample in dataset['train']:
    for i, img in enumerate(sample['images']):
        caption = sample['image_captions'][i] if i < len(sample['image_captions']) else ""
        image_text_pairs.append({
            'image': img,
            'text': f"{sample['title']} {caption}",
            'context': sample['content']
        })

3. Clinical Case Retrieval

# Build a retrieval system for similar cases
cases = dataset['train'].filter(lambda x: x['source_type'] == 'case')

# Index cases for semantic search
case_corpus = [
    f"{case['title']} {case['content']}"
    for case in cases
]

Considerations for Using the Data

Medical Disclaimer

⚠️ IMPORTANT: This dataset is for research and educational purposes only. It should NOT be used for:

  • Clinical diagnosis or treatment decisions
  • Patient care without proper medical professional oversight
  • Any application that could impact patient health without appropriate validation

Ethical Considerations

  • Privacy: While the data is sourced from public educational resources, ensure compliance with medical data regulations in your jurisdiction
  • Bias: Medical datasets may contain biases related to patient demographics, imaging equipment, and diagnostic practices
  • Accuracy: Medical information should be verified by qualified healthcare professionals
  • Intended Use: This dataset is designed for AI research, model training, and educational purposes

Limitations

  • Images are resized to max 1024x1024, which may affect fine detail visibility
  • Not all documents have associated images
  • Content is in English only
  • May not represent the full diversity of clinical presentations
  • Information is from specific time periods and may not reflect current medical practices

License and Citation

License

This dataset is released under CC BY-NC 4.0 (Creative Commons Attribution-NonCommercial 4.0 International).

  • ✅ You can: Use for research, modify, and share
  • ❌ You cannot: Use for commercial purposes
  • 📝 You must: Give appropriate credit and indicate if changes were made

Citation

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

@dataset{radiology_multimodal_dataset_2025,
  title={Radiology Multimodal Dataset},
  author={ZhangNy},
  year={2025},
  publisher={Hugging Face},
  howpublished={\url{https://huggingface.co/datasets/ZhangNy/radiology-dataset}}
}

Source Attribution

The original content is sourced from:

  • Radiopaedia.org - A collaborative radiology resource
  • Radiology Assistant - Educational radiology tutorials

Please refer to these sources for their respective terms of use.

Dataset Statistics

Overall Statistics

  • Total documents: 43,014
  • Total images: Varies by document
  • Average content length: ~2,000 tokens

Distribution by Type

  • Articles: 17,218 (40%)
  • Cases: 25,771 (60%)
  • Tutorials: 25 (<1%)

Content Characteristics

  • Rich clinical descriptions
  • Multimodal (text + images)
  • Structured metadata
  • Educational focus

Contact and Contributions

For questions, issues, or contributions related to this dataset:

Changelog

Version 1.0 (December 2025)

  • Initial release
  • 43,014 documents (17,218 articles, 25,771 cases, 25 tutorials)
  • Multimodal content with images resized to 1024x1024
  • Comprehensive metadata and structured fields