Dataset Viewer
Auto-converted to Parquet Duplicate
The dataset viewer is not available for this split.
Parquet error: Scan size limit exceeded: attempted to read 6401390661 bytes, limit is 300000000 bytes Make sure that 1. the Parquet files contain a page index to enable random access without loading entire row groups2. otherwise use smaller row-group sizes when serializing the Parquet files
Error code:   TooBigContentError

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.

SCIN-Dermatology-Gemma4-VQA

This dataset contains conversational visual question answering (VQA) dialogues structured specifically for fine-tuning on-device multimodal Vision-Language Models (VLMs), such as Gemma 4 E4B Vision/Audio.

The dataset is compiled from the Skin Condition Image Network (SCIN) cohort, cleansing conflicts and joining raw patient-reported demographics, symptoms, and Fitzpatrick/Monk skin tones.

Dataset Structure

The dataset contains two compressed Apache Parquet files containing binary image bytes and the conversation dictionaries:

.
├── README.md
├── train.parquet      # 60/20 train/val splits mapped to VLM dialogues
└── test.parquet       # Heldout test split mapped to VLM dialogues

Clinical Annotation & Labeling Logic

To handle cases where a patient case has multiple disease labels suggested by different dermatologists, the following two clinical rules were applied:

1. Handling Multiple Categories for the Primary Consensus Diagnosis

The original SCIN metadata contains weighted probabilities for each skin condition proposed by dermatologists (weighted_skin_condition_label), e.g., {'Inflicted skin lesions': 0.41, 'Eczema': 0.41, 'Irritant Contact Dermatitis': 0.18}.

  • Consensus Rule: The primary diagnosis (primary_diagnosis) is selected as the condition with the highest weighted probability proposed by the grading dermatologists.
  • Cases lacking a reliable weighted diagnosis were excluded to maintain data cleanliness.

2. Handling Multiple Categories for the Binary Triage Label

For the binary triage project (infectious vs. non-infectious screening), a safety-first "Union-Safety" rule was applied:

  • First, all 211 unique conditions found across the cohort were clinically classified as either "Infectious" or "Non-infectious" based on NIH, Mayo Clinic, Cleveland Clinic, and DermNet NZ sources.
  • Triage Rule: A case is classified as Infectious (1) if ANY of the disease categories suggested by the dermatologists for that case is infectious. It is labeled Non-Infectious (0) only if ALL suggested diagnoses are non-infectious.
  • Clinical Significance: This prioritizes patient safety: if a clinical case is ambiguous and has multiple potential diagnoses, flagging it as Infectious if even one suspect diagnosis is infectious ensures the patient is triaged with appropriate urgency, preventing missed cases of contagious or acute conditions.

Schema Structure

Each Parquet file follows this schema:

  • image: Binary PNG image bytes (encodes directly to PIL Image objects).
  • messages: Dialogue dictionary list matching the Hugging Face VLM standard chat template format:
    [
      {
        "role": "user",
        "content": [
          {"type": "image"},
          {"type": "text", "text": "Analyze this dermatology image and describe the diagnosis, clinical triage classification, skin characteristics, and symptoms."}
        ]
      },
      {
        "role": "assistant",
        "content": [
          {"type": "text", "text": "Consensus Diagnosis: Eczema\nTriage Classification: Non-infectious\nFitzpatrick Skin Type: FST4\nMonk Skin Tone: 3 (US), 4 (India)\nPatient Age Group: AGE_18_TO_29\nPatient Sex: MALE\nItching: Yes\nPain: No\nCondition Duration: ONE_TO_FOUR_WEEKS"}
        ]
      }
    ]
    
  • case_id: Unique patient case ID.
  • image_id: Unique image ID.

Loading the Dataset (Python)

To load and use the dataset directly using the Hugging Face datasets library:

from datasets import load_dataset, Image

# Load the dataset
dataset = load_dataset("HawkFranklin-Research/SCIN-Dermatology-Gemma4-VQA")

# Ensure the 'image' column is cast to PIL Image format
dataset = dataset.cast_column("image", Image())

# Inspect a dialogue sample
sample = dataset["train"][0]
print(sample["messages"])
sample["image"].show()

Integrating with Unsloth / TRL for Fine-Tuning

To format this dataset directly for the Unsloth Gemma 4 vision fine-tuning notebook:

from datasets import load_dataset, Image

dataset = load_dataset("HawkFranklin-Research/SCIN-Dermatology-Gemma4-VQA", split="train")
dataset = dataset.cast_column("image", Image())

def format_dialogue(sample):
    # Map the dataset placeholders to raw PIL images for Unsloth
    messages = sample["messages"]
    # Replace the user content image dict with the raw PIL image object
    messages[0]["content"][0]["image"] = sample["image"]
    return {"messages": messages}

formatted_dataset = dataset.map(format_dialogue)

Citation & License

This dataset is distributed under the MIT License. The underlying images and medical records are derived from the Google SCIN repository. Please cite the primary work if you use these files:

@article{Ward2024_SCIN_JAMANetworkOpen,
  author    = {Ward, Edwin and others},
  title     = {Skin Condition Image Network (SCIN): A diverse dataset of patient-submitted skin photographs},
  journal   = {JAMA Network Open},
  year      = {2026},
  volume    = {7},
  number    = {5},
  pages     = {e2410389}
}
Downloads last month
122