Investigating the Quality of DermaMNIST and Fitzpatrick17k Dermatological Image Datasets

Kumar Abhishek, Aditi Jain, Ghassan Hamarneh · DOI

Abstract

As deep learning models for skin disease diagnosis approach human-expert accuracy, the integrity of the underlying training data becomes paramount. This study, recently published in Nature Scientific Data, performs a rigorous "health check" on the DermaMNIST and Fitzpatrick17k datasets. The authors identify pervasive data leakage, labeling noise, and image quality issues that lead to over-optimistic performance metrics. By introducing corrected versions—DermaMNIST-C/E and Fitzpatrick17k-C—the researchers provide a more reliable foundation for benchmarking dermatological AI, ensuring that model performance reflects true generalizability rather than dataset artifacts.

Introduction

The "reproducibility crisis" in medical AI often stems from poorly curated datasets. In dermatology, researchers frequently rely on a few public repositories like HAM10000 (the source for DermaMNIST) and Fitzpatrick17k. However, these datasets are often plagued by three critical issues: data leakage (where the same lesion appears in both training and test sets), duplicates/outliers (irrelevant images), and label noise (conflicting diagnoses or skin tone labels). This paper audits these benchmarks and provides standardized, cleaned alternatives to support more robust model development.

Methodology

The researchers employed a multi-stage pipeline to audit and fix these datasets:

  • Algorithmic Detection: Tools like fastdup and cleanvision were used to identify visually similar pairs across 10,015 HAM10000 images and 16,577 Fitzpatrick17k images.
  • Metadata Cross-Referencing: Image IDs were mapped back to lesion IDs to detect "patient-level" leakage that simple filename checks miss.
  • Expert Review: Detected duplicates were manually reviewed to distinguish between true duplicates and visually similar but distinct lesions.
  • Standardized Partitioning: The authors implemented lesion-level stratification to ensure training, validation, and test sets are strictly disjoint.

Dataset Audits and Corrections

The study introduces several "corrected" benchmarks to replace the flawed originals:

  • DermaMNIST-C: Corrected for data leakage by ensuring unique lesions do not span multiple partitions.
  • DermaMNIST-E: An extended version utilizing the more challenging ISIC 2018 validation and testing partitions.
  • Fitzpatrick17k-C: A cleaned version of the clinical dataset with duplicates, outliers (e.g., photos of plants or insects), and erroneous labels removed.
Figure 3: Overview of data leakage examples, lesion distribution, and partition statistics for DermaMNIST and its corrected versions.

Key Findings

Pervasive Data Leakage

A primary finding was the extent of data leakage in the original DermaMNIST. Approximately 13.5% of unique lesions were found in more than one partition, allowing models to "cheat" by memorizing specific cases rather than learning generalizable features. Figure 3 illustrates this leakage through Venn diagrams of lesion IDs and provides examples of the same lesion appearing across train, validation, and test sets.

Image Quality and the "Upsampling Trap"

The authors discovered that the standard 224x224 resolution version of DermaMNIST was upsampled from 28x28 images using nearest-neighbor interpolation, resulting in blurry images that lost diagnostic detail. Their corrected version uses direct downsampling from high-resolution originals, which restored the expected performance trend where larger models (like ResNet-50) outperform smaller ones.

Labeling Subjectivity and Outliers

In the Fitzpatrick17k dataset, the authors found duplicate image pairs where the assigned Fitzpatrick Skin Tone (FST) differed by up to four tones, highlighting significant subjectivity. Furthermore, the dataset contained non-dermatological "Easter eggs," including images of plants, insects, and X-rays, which were removed in the cleaned version.

Results and Impact

Cleaning Fitzpatrick17k reduced the usable dataset from ~16,500 to ~11,400 images. Despite this reduction, the resulting Fitzpatrick17k-C dataset enables the first fair head-to-head comparisons between research groups thanks to its standardized 70:10:20 split. On DermaMNIST-C, the removal of leakage and the use of high-quality downsampling led to more consistent and reliable benchmarking results.

Conclusion

This work serves as a critical call for more rigorous data auditing in medical AI. By providing an open-source pipeline and corrected datasets, the authors offer a path toward more transparent and reliable dermatological AI development. They suggest that future datasets should adopt international metadata standards like ICD-11 to further reduce diagnostic ambiguity.

Summary updated

BibTeX
@inproceedings{abhishek2025investigating,
  author = {Kumar Abhishek and Aditi Jain and Ghassan Hamarneh},
  title = {{Investigating the Quality of DermaMNIST and Fitzpatrick17k Dermatological Image Datasets}},
  booktitle = {Scientific},
  year = {2025},
  doi = {10.1038/s41597-025-04382-5},
}
Figure