Datasets:
Add dataset card
Browse files1234567891011121314151617181920212223242526 unmodified lines5253543435363738555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212---language:- enlicense: cc-by-nc-sa-3.0pretty_name: Fitzpatrick17ktags:- medical- dermatology- skin-tone- fitzpatrick- fairness- image-classification- computer-visiontask_categories:- image-classificationsize_categories:- 10K<n<100Kconfigs:- config_name: default data_files: - split: train path: data/train-*dataset_info: features: - name: image26 unmodified lines num_examples: 16577 download_size: 1459269914 dataset_size: 1461181992configs:- config_name: default data_files: - split: train path: data/train-*---
<h1 align="center">Fitzpatrick17k</h1>
<h3 align="center">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.</h3>
<p align="center"> <a href="https://huggingface.co/datasets/Layered-Labs/Fitzpatrick17k"> <img src="https://huggingface.co/datasets/huggingface/badges/resolve/main/dataset-on-hf-md.svg" alt="Dataset on HuggingFace"/> </a> <img src="https://img.shields.io/badge/license-CC%20BY--NC--SA%203.0-blue.svg" alt="License"/> <img src="https://img.shields.io/badge/source-Fitzpatrick17k%20(CVPRW%202021)-38BDF8.svg" alt="Source"/></p>
<p align="center"> <img src="https://huggingface.co/datasets/Layered-Labs/Fitzpatrick17k/resolve/main/banner.svg" alt="Fitzpatrick17k" width="100%"/></p>
---
## 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](https://github.com/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](https://doi.org/10.1038/s41597-025-04382-5)). 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"`.
## 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. || `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
```pythonfrom 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
```pythontrain = 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
```pythonlesions = 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:
```bibtex@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](http://creativecommons.org/licenses/by-nc-sa/3.0/), as stated in the [official repository](https://github.com/mattgroh/fitzpatrick17k). 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](https://zenodo.org/records/12739457), released under the CC-BY-4.0 License.
Maintained by [Layered Labs](https://layeredlabs.ai).README.md+178-5