File size: 10,883 Bytes
a79b5c8
1caf759
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a79b5c8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1caf759
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c3e45f5
1caf759
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c3e45f5
1caf759
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
---
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
---

<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>
  &nbsp;
  <img src="https://img.shields.io/badge/license-CC%20BY--NC--SA%203.0-blue.svg" alt="License"/>
  &nbsp;
  <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"`. 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

```python
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

```python
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

```python
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:

```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).