Efficientnet-B3 Dual-Task U-Net for Explainable and Generalizable Skin Lesion Segmentation and Classification
Abstract
Skin cancer, especially melanoma, is one of the most problematic malignancies to diagnose because of great inter-class visual similarity between lesion forms and because of the subjectivity of the manual examination with a dermoscope. Although deep learning-based dermatology is increasingly being adopted, the current automated systems often exhibit deficiencies in lesion boundary detection, a lack of generalizability on heterogeneous data, an inability to handle severe class distribution, and low model transparency, all of which negatively affect the uptake of automated dermatology. In the current paper, an improved dual-task deep learning architecture that incorporates a combined EfficientNet-B3 encoder and U-Net decoder to perform segmentation and classification of seven skin lesion types simultaneously on the HAM10000 data is proposed. The framework includes WeightedRandomSampler to balance the classes according to their inverse frequency, a composite loss with Dice, Binary Cross-Entropy, and Cross-Entropy losses, a cosine annealing learning rate schedule, early stopping, and mixed-precision training. Grad-CAM provides explainability where segmentation-alignment Intersection over Union (IoU) is quantified. The cross-dataset generalizability is tested on ISIC 2018 (7,496 images). The model has a classification accuracy of 90.01, a Dice coefficient of 0.9382, and an IoU of 0.8913 on HAM10000. The range of per-class Area Under the Curve (AUC) is 0.955 to 0.998, regardless of the category of lesion. The ISIC 2018 external validation has accuracy, AUC, and specificity of 86.82, 0.879, and 90.65, respectively. The research presented has high segmentation accuracy, good multi-class discrimination, and cross-dataset generalizability, proving its prospects to become a high-specificity screening aid tool to support clinical decision-making with dermoscopy.