Skin lesion classifier

Model card. Machine learning course project, January 2026.

Task

QuestionIs a dermatoscopic image of a skin lesion malignant or benign?
DataHAM10000. Test set of 1,002 images.
ModelsA custom CNN against a fine-tuned EfficientNet-B0 (transfer learning), both in PyTorch.

Results on the test set

EfficientNet-B0AUC ≈ 0.93

Custom CNNAUC ≈ 0.755

0.95malignant recall for EfficientNet: it finds 95 of every 100 malignant lesions in the test set
1,002test images, kept apart from training

Missing a malignant lesion costs more than a false alarm, which is why malignant recall sits next to the AUC.

Training

Optuna searchFocal lossWeighted samplerMixUpTest-time augmentationGrad-CAM

The classes are unbalanced, so focal loss and a weighted sampler keep the rare malignant cases in view. Grad-CAM shows which part of the image drove each prediction.

Tooling

PyTorchMLflowStreamlitDocker Compose (GPU)

A course project, not a medical device.