Investigating the Quality of DermaMNIST and Fitzpatrick17k Dermatological Image Datasets

Kumar Abhishek, Aditi Jain, Ghassan Hamarneh

Abstract

The remarkable progress of deep learning in dermatological tasks has brought us closer to achieving diagnostic accuracies comparable to those of human experts. However, while large datasets play a crucial role in the development of reliable deep neural network models, the quality of data therein and their correct usage are of paramount importance. Several factors can impact data quality, such as the presence of duplicates, data leakage across train-test partitions, mislabeled images, and the absence of a well-defined test partition. In this paper, we conduct meticulous analyses of three popular dermatological image datasets: DermaMNIST, its source HAM10000, and Fitzpatrick17k, uncovering these data quality issues, measure the effects of these problems on the benchmark results, and propose corrections to the datasets. Besides ensuring the reproducibility of our analysis, by making our analysis pipeline and the accompanying code publicly available, we aim to encourage similar explorations and to facilitate the identification and addressing of potential data quality issues in other large datasets.

Introduction

In the rapidly evolving field of medical AI, achieving "expert-level" diagnostic accuracy is often the primary goal. However, this pursuit frequently overlooks a fundamental principle of machine learning: "garbage in, garbage out." The reliability of deep neural networks is inextricably linked to the quality of the data used for training and evaluation. In dermatology, where datasets are expensive to curate and often rely on open-source benchmarks, data quality issues can lead to severely inflated performance metrics that fail to translate into clinical utility.

This study investigates critical flaws in three widely used datasets: DermaMNIST, its parent dataset HAM10000, and the Fitzpatrick17k dataset. We identify significant data leakage, where images of the same lesion are split across training and testing partitions, and uncover issues related to image resolution and metadata integrity. To address these, we introduce "cleaned" versions of these benchmarks and provide an open-source pipeline for future dataset auditing.

Methodology

To conduct a rigorous audit, we employed a multi-stage pipeline combining automated detection with human verification:

  • Duplicate and Similarity Detection: We utilized tools like fastdup and cleanvision to compute inter-image embedding similarity. This identified visually identical or near-identical images that might have different metadata.
  • Metadata Cross-Referencing: For DermaMNIST, we mapped images back to their original HAM10000 lesion IDs. This allowed us to track whether multiple photographs of the same lesion were improperly distributed across data splits.
  • Manual Review: Pairs flagged with high similarity were manually inspected to distinguish between true duplicates, different views of the same lesion, and distinct but similar-looking lesions.
  • Benchmarking: We established new baselines by training ResNet-18 and ResNet-50 architectures on both the original and our corrected datasets to quantify the impact of these quality issues.

Data Quality Issues in Dermatological Benchmarks

The most pervasive issue identified was data leakage. In dermatological practice, a single skin lesion is often photographed multiple times from different angles or under different lighting conditions. If these images are treated as independent samples and split randomly, a model may "memorize" the specific characteristics of a patient's skin rather than learning generalizable diagnostic features.

Figure 1: Visualizing data leakage where images of the same lesion appear in different partitions, and the distribution of images per lesion in HAM10000.

In DermaMNIST, we found that approximately 13.47% of unique lesions were present in more than one partition. Furthermore, we discovered a significant resolution issue: the standard 224×224 DermaMNIST benchmarks were actually 28×28 images upsampled using nearest-neighbor interpolation. This process introduces pixelation and destroys fine morphological details essential for diagnosis.

Fitzpatrick17k presented additional challenges. It lacked a strictly held-out test set, leading researchers to report final results on the validation set. Moreover, the dataset contained "medically irrelevant" images, including non-skin photos and even animals, which contaminate the learning process.

Proposed Dataset Corrections

To restore the integrity of these benchmarks, we propose three corrected versions:

  1. DermaMNIST-C (Corrected): This version eliminates data leakage by ensuring that all images associated with a specific lesion ID are confined to a single partition (train, validation, or test).
  2. DermaMNIST-E (Extended): This version utilizes the official ISIC 2018 Challenge validation and test sets, providing a more rigorous and standardized evaluation framework.
  3. Fitzpatrick17k-C: We removed duplicates and irrelevant images, and established a standardized 70:10:20 split to ensure a true held-out test partition.
Figure 2: Comparison of lesion ID distributions across partitions for the original DermaMNIST and the proposed DermaMNIST-C and DermaMNIST-E variants.

Results and Discussion

Our experiments demonstrate that cleaning the data significantly alters performance profiles. On DermaMNIST-C, while raw accuracy scores changed, the primary benefit is the elimination of "cheating" via leakage, providing a realistic measure of model generalization.

We also found that resolution plays a critical role. By downsampling directly from high-resolution originals to 224×224—rather than upsampling from 28×28—we observed that ResNet-50 finally outperformed ResNet-18. This confirms that the original upsampled benchmarks were bottlenecking the capacity of deeper models. For Fitzpatrick17k-C, our new standardized splits reveal that previously reported accuracies were likely inflated due to the lack of a disjoint test set.

Conclusion

Data quality is not a peripheral concern but a central pillar of reliable medical AI. By uncovering and correcting systemic issues in DermaMNIST and Fitzpatrick17k, we provide the community with more robust benchmarks. We encourage researchers to adopt these "C" versions and utilize our open-source pipeline to audit emerging datasets, ensuring that the progress we see in the lab translates safely to the clinic.

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