When the hospital changes: cross-dataset accuracy, calibration and data leakage in lightweight skin lesion classifiers

Skin lesion classifiers are usually evaluated on a held-out split of the dataset they were trained on, and the numbers reported this way are often high. Whether those numbers survive a change of hospital, country or camera is a different question, and one that matters before any such model is used outside the lab. We trained three ImageNet-pretrained architectures of different size and design (EfficientNet-B0, ResNet-50 and DeiT-Small) on ISIC 2019 for a binary malignant-versus-benign task and tested them, without retraining, on HAM10000 (dermoscopy, Austria) and PAD-UFES-20 (smartphone clinical photographs, Brazil). Because ISIC 2019 contains the HAM10000 images, we first removed 9,885 overlapping images from the training pool. Each model was trained with no colour fix, with strong colour augmentation, or with Shades-of-Gray colour normalisation, using two random seeds per setting. All nine settings reached an AUC of 0.88–0.91 on the in-domain test set, but only 0.73–0.85 on the smartphone photographs. The smallest model, EfficientNet-B0, lost the most (up to 0.16 AUC). Colour augmentation reduced its drop but did not help consistently across architectures, and colour normalisation lowered performance on HAM10000 for all three. Results on the external sets varied by up to 0.08 AUC between two seeds of the same setting. Leaving the HAM10000 overlap in the training data made the model score higher on HAM10000 than on its own test set, a clear sign of leakage. Finally, models were most over-confident on the smartphone photographs (mean expected calibration error 0.19), and temperature scaling fitted on the source hospital reduced but did not remove this error. We argue that external testing, leakage checks, multiple seeds and calibration should be reported routinely for this task, and we release all code.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-12-01
DOI
https://doi.org/10.5281/zenodo.24711802
Primary Topic
Cutaneous Melanoma Detection and Management
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

When the hospital changes: cross-dataset accuracy, calibration and data leakage in lightweight skin lesion classifiers

Muhammad Mozzam
Zenodo (CERN European Organization for Nuclear Research)
Cutaneous Melanoma Detection and Management
preprint

When the hospital changes: cross-dataset accuracy, calibration and data leakage in lightweight skin lesion classifiers

Muhammad Mozzam
preprint en

Abstract

Skin lesion classifiers are usually evaluated on a held-out split of the dataset they were trained on, and the numbers reported this way are often high. Whether those numbers survive a change of hospital, country or camera is a different question, and one that matters before any such model is used outside the lab. We trained three ImageNet-pretrained architectures of different size and design (EfficientNet-B0, ResNet-50 and DeiT-Small) on ISIC 2019 for a binary malignant-versus-benign task and tested them, without retraining, on HAM10000 (dermoscopy, Austria) and PAD-UFES-20 (smartphone clinical photographs, Brazil). Because ISIC 2019 contains the HAM10000 images, we first removed 9,885 overlapping images from the training pool. Each model was trained with no colour fix, with strong colour augmentation, or with Shades-of-Gray colour normalisation, using two random seeds per setting. All nine settings reached an AUC of 0.88–0.91 on the in-domain test set, but only 0.73–0.85 on the smartphone photographs. The smallest model, EfficientNet-B0, lost the most (up to 0.16 AUC). Colour augmentation reduced its drop but did not help consistently across architectures, and colour normalisation lowered performance on HAM10000 for all three. Results on the external sets varied by up to 0.08 AUC between two seeds of the same setting. Leaving the HAM10000 overlap in the training data made the model score higher on HAM10000 than on its own test set, a clear sign of leakage. Finally, models were most over-confident on the smartphone photographs (mean expected calibration error 0.19), and temperature scaling fitted on the source hospital reduced but did not remove this error. We argue that external testing, leakage checks, multiple seeds and calibration should be reported routinely for this task, and we release all code.

Zenodo (CERN European Organization for Nuclear Research)
Cutaneous Melanoma Detection and Management
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon