SAM-GAN Synthesis for Equitable Skin Cancer Diagnosis: A Deep Learning Approach to Address Class Imbalance in Dermoscopy

Abstract

Recent advances in deep learning have significantly improved skin cancer classification, yet persistent issues such as extreme class imbalance and limited intra-class diversity hinder clinical generalization. This study builds upon the Naturalize framework by proposing a robust augmentation pipeline targeting rare lesion types in the ISIC 2019 dataset. Leveraging SAM-based segmentation and StyleGAN2-ADA synthesis, we construct two fully balanced datasets with $text2, 4 0 0$ and $text7, 2 0 0$ images per class. The method enhances representation of underrepresented classes (DF, VASC, SCC) while preserving contextual realism through background blending and geometric transformations. Across eight pre-trained CNN and ViT models, Xception trained on the 7.2 k dataset achieved the best generalization with 66% test accuracy and macro F1-score of $text0. 6 4$. Despite challenges in synthetic fidelity (e.g., FID scores of 62 for VASC, 58 for DF), the proposed pipeline marks a significant step toward equitable, high-performing AI diagnostics. Our framework offers a reproducible, end-to-end strategy for scalable skin lesion classification under real-world data constraints.

Publication
2025 Eighth International Conference on Advances in Biomedical Engineering (ICABME)
Mohamad Abou Ali
Mohamad Abou Ali
Postdoctoral Researcher

I develop generalizable deep learning methods for biomedical imaging, advancing diagnostic accuracy, data augmentation, and intelligent healthcare systems.

Fadi Dornaika
Fadi Dornaika
Ikerbasque Research Professor

Ikerbasque Research Professor with expertise in computer vision, machine learning, and pattern recognition.

Ignacio Arganda-Carreras
Ignacio Arganda-Carreras
Ikerbasque Research Associate Professor

My research interests include image processing, computer vision, and deep learning for biomedical applications.