Fitzpatrick17k / README.md
AbdullahRidwan's picture
Note that DermaAmin source URLs no longer resolve
c3e45f5 verified
|
Raw History Blame Contribute Delete
10.9 kB
metadata
language:
  - en
license: cc-by-nc-sa-3.0
pretty_name: Fitzpatrick17k
tags:
  - medical
  - dermatology
  - skin-tone
  - fitzpatrick
  - fairness
  - image-classification
  - computer-vision
task_categories:
  - image-classification
size_categories:
  - 10K<n<100K
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*
dataset_info:
  features:
    - name: image
      dtype: image
    - name: md5hash
      dtype: string
    - name: label
      dtype: string
    - name: nine_partition_label
      dtype: string
    - name: three_partition_label
      dtype: string
    - name: fitzpatrick_scale
      dtype: int32
    - name: fitzpatrick_centaur
      dtype: int32
    - name: qc
      dtype: string
    - name: source
      dtype: string
    - name: url
      dtype: string
    - name: in_fitzpatrick17k_c
      dtype: bool
    - name: split
      dtype: string
  splits:
    - name: train
      num_bytes: 1461181992
      num_examples: 16577
  download_size: 1459269914
  dataset_size: 1461181992

Fitzpatrick17k

16,577 clinical dermatology images across 114 skin conditions, each labeled with a Fitzpatrick skin type, rebuilt as a single ready-to-load dataset with images embedded and the leakage-free Fitzpatrick17k-C split included.

Dataset on HuggingFace   License   Source

Fitzpatrick17k


Overview

This dataset packages the full Fitzpatrick17k corpus, 16,577 clinical photographs of 114 skin conditions, as a single Hugging Face dataset. Every image is embedded directly in the parquet files next to its labels: the condition, the original 3-way (malignant, benign, non-neoplastic) and 9-way groupings, both Fitzpatrick skin type annotations shipped with the original release, and the image's source atlas.

The labels are the official annotations from mattgroh/fitzpatrick17k, joined to the images by MD5 hash. Every image file was checked: its content hash matches its MD5 name in all 16,577 cases. Nothing was re-labeled.

The dataset also includes the cleaned subset and split from Fitzpatrick17k-C (Abhishek, Jain and Hamarneh, 2025). That work found duplicates, train/test leakage and erroneous images in the original release and published a corrected subset of 11,394 images with fixed train, validation and test partitions. Here every row carries in_fitzpatrick17k_c and split, so you can use the full corpus or the clean subset from the same table.

Statement of Need

Fitzpatrick17k is distributed as a CSV of annotations plus image URLs on two external atlas websites, and the original README notes that some links are broken. Getting the images means scraping those sites or requesting a download link from the authors, then joining by hash. The original release also has no standard split, and later work showed that random splits leak near-duplicate images between training and test sets. This dataset fixes both: all 16,577 images in one table, and the published leakage-free Fitzpatrick17k-C split attached to each row.

Intended Use

Intended for research on skin condition classification and on how model performance varies across Fitzpatrick skin types: benchmarking image classifiers, vision-language models and decision models by skin type, training models that perform consistently across skin types, and auditing dermatology AI for bias. Suitable for non-commercial academic research only, as required by the source license. Not intended for clinical deployment or diagnosis, and models trained on it should not be used to inform patient care.

Limitations

The images come from two online dermatology atlases (DermaAmin and Atlas Dermatologico), not from standardized clinical capture, so lighting, framing, resolution and image quality vary widely. The original paper reports that Fitzpatrick labels were annotated by Scale AI and Centaur Labs; they are estimates made from images, not patient-reported skin types, and the two annotations (fitzpatrick_scale, fitzpatrick_centaur) disagree on some images. Darker skin types are underrepresented: types 5 and 6 together make up 13% of images. Condition labels come from the source atlases and were not re-adjudicated here. The full corpus contains the duplicates and erroneous images documented by Abhishek et al.; use rows where split is not excluded for leakage-free evaluation. 41 rows have no source URL in the official CSV and are marked source = "unknown". The url column is kept as a record of where each image came from, but most links no longer work: in a check on November 29, 2026, 20 of 20 sampled DermaAmin URLs (the source of 12,631 images) returned "404 Not Found", while 20 of 20 sampled Atlas Dermatologico URLs still returned the image. This does not affect the dataset, since every image is embedded in the image column.

Dataset Structure

Splits

All rows are in one Hugging Face split (train). The split column holds the Fitzpatrick17k-C partition.

split value Images Meaning
train 7,975 Fitzpatrick17k-C training partition
val 1,139 Fitzpatrick17k-C validation partition
test 2,280 Fitzpatrick17k-C test partition
excluded 5,183 Removed by Fitzpatrick17k-C (duplicates, erroneous images and related cleaning)
Total 16,577

Fitzpatrick skin type (fitzpatrick_scale) by diagnostic group

Fitzpatrick type Malignant Benign Non-neoplastic Total
1 453 444 2,050 2,947
2 742 671 3,395 4,808
3 456 475 2,377 3,308
4 301 367 2,113 2,781
5 147 159 1,227 1,533
6 61 44 530 635
Not determined (-1) 103 74 388 565
Total 2,263 2,234 12,080 16,577

Features

Column Type Description
image Image The clinical photograph.
md5hash string MD5 hash of the image file, the key used in the original release.
label string Skin condition, one of 114.
nine_partition_label string Original 9-way grouping (for example inflammatory, malignant melanoma, benign melanocyte).
three_partition_label string Original 3-way grouping: malignant, benign or non-neoplastic.
fitzpatrick_scale int32 Fitzpatrick skin type 1 to 6 from the original fitzpatrick_scale column, -1 if not determined.
fitzpatrick_centaur int32 Second Fitzpatrick annotation from the original fitzpatrick_centaur column, -1 if not determined.
qc string Quality-control note from the original release, present for 504 images (for example 1 Diagnostic, 3 Wrongly labelled), otherwise null.
source string Source atlas: dermaamin, atlas_dermatologico, or unknown when the URL is blank.
url string Original image URL, kept for provenance. DermaAmin links returned "404 Not Found" as of November 29, 2026; Atlas Dermatologico links still work. Use the image column for the image.
in_fitzpatrick17k_c bool Whether the image is in the cleaned Fitzpatrick17k-C subset.
split string Fitzpatrick17k-C partition (train, val, test), or excluded.

Usage

from datasets import load_dataset

ds = load_dataset("Layered-Labs/Fitzpatrick17k")
print(ds)

example = ds["train"][0]
example["image"].show()
print("condition:", example["label"], "(", example["three_partition_label"], ")")
print("Fitzpatrick type:", example["fitzpatrick_scale"])

Example: leakage-free train, validation and test sets

train = ds["train"].filter(lambda r: r["split"] == "train")
val = ds["train"].filter(lambda r: r["split"] == "val")
test = ds["train"].filter(lambda r: r["split"] == "test")
print(len(train), len(val), len(test))

Example: malignant vs benign, by skin type

lesions = ds["train"].filter(lambda r: r["three_partition_label"] in ("malignant", "benign"))
for fst in range(1, 7):
    subset = lesions.filter(lambda r: r["fitzpatrick_scale"] == fst)
    print(fst, len(subset))

Citation

If you use this dataset, please cite this release, the original Fitzpatrick17k paper, and Fitzpatrick17k-C if you use the split column:

@dataset{layeredlabs2026fitzpatrick17k,
  title     = {Fitzpatrick17k},
  author    = {Ridwan, Abdullah and Hossain, Radhyyah and Noor, Saniya},
  year      = {2026},
  publisher = {Hugging Face},
  url       = {https://huggingface.co/datasets/Layered-Labs/Fitzpatrick17k},
  note      = {Images and labels rebuilt from the original Fitzpatrick17k release, with the Fitzpatrick17k-C split}
}

@inproceedings{groh2021evaluating,
  title     = {Evaluating Deep Neural Networks Trained on Clinical Images in Dermatology with the Fitzpatrick 17k Dataset},
  author    = {Groh, Matthew and Harris, Caleb and Soenksen, Luis and Lau, Felix and Han, Rachel and Kim, Aerin and Koochek, Arash and Badri, Omar},
  booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW)},
  pages     = {1820--1828},
  year      = {2021},
  doi       = {10.1109/CVPRW53098.2021.00201}
}

@article{abhishek2025investigating,
  title   = {Investigating the Quality of DermaMNIST and Fitzpatrick17k Dermatological Image Datasets},
  author  = {Abhishek, Kumar and Jain, Aditi and Hamarneh, Ghassan},
  journal = {Scientific Data},
  volume  = {12},
  number  = {1},
  pages   = {196},
  year    = {2025},
  doi     = {10.1038/s41597-025-04382-5}
}

License

The original Fitzpatrick17k release is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License, as stated in the official repository. This repackaging is released under the same CC-BY-NC-SA-3.0 License: non-commercial use only, with attribution, and derivatives shared under the same terms. The images originate from the DermaAmin and Atlas Dermatologico websites. The Fitzpatrick17k-C partition information comes from the authors' Zenodo record, released under the CC-BY-4.0 License.

Maintained by Layered Labs.