Skin Cancer Detection

Overview

TPR=0.80 FPR TPR pAUC EfficientNetV2-S TIMM · PyTorch 401K samples HDF5 · ISIC 2024

A deep learning pipeline for binary skin lesion classification — benign vs. malignant — built for the ISIC 2024 Kaggle Competition (Skin Lesion Analysis Toward Melanoma Detection). The competition targets early detection of melanoma and other skin cancers from dermoscopic images paired with rich patient metadata, evaluated on partial AUC (pAUC) at a minimum true positive rate of 0.80 to ensure clinically relevant sensitivity.

The primary model is an EfficientNetV2-S CNN implemented via the TIMM library (PyTorch Image Models), trained on over 400,000 labeled samples. A parallel XGBoost baseline was developed using the 45+ patient metadata features to understand the signal available without image data.


Model Architecture

The image classification pipeline centers on EfficientNetV2-S loaded from the TIMM model registry with ImageNet pretrained weights. The model head is replaced with a binary output for benign/malignant classification.

A custom PyTorch Dataset class handles on-the-fly image decoding from HDF5, keeping memory footprint manageable at scale. Training is orchestrated with HuggingFace Accelerate for device abstraction across CPU and GPU environments.


XGBoost Metadata Baseline

Before training the CNN, an XGBoost classifier was trained on the structured metadata alone to establish a performance baseline and understand which features carry the most discriminative signal without any image data. Feature engineering included:

The metadata baseline provided meaningful pAUC signal and served as a reference point for evaluating the incremental contribution of image features. Ensemble approaches combining CNN predictions with XGBoost metadata scores were explored as a path to improved final performance.


Training Pipeline

The end-to-end training pipeline was implemented across multiple Jupyter notebooks with modular utilities:

The pAUC metric was implemented as a custom scoring function to enable evaluation during training, providing alignment between the optimization objective and the competition leaderboard metric throughout the experiment cycle.