Vision Transformer-Based Model for Early Detection of Skin Cancer from Dermoscopic Images
摘要
Skin cancer is one of the most common and life-threatening cancers globally, and early detection is vital to ensure effective treatment and enhanced survival rates. In this paper, a novel early and precise skin cancer classification method based on dermoscopic images using the Vision Transformer (ViT) model and deep learning is proposed. 33,126 dermoscopic images comprised a full dataset that was retrieved from the International Skin Imaging Collaboration (ISIC) database consisting of different skin lesion types such as melanoma, basal cell carcinoma, benign nevus, and actinic keratosis. Preprocessing included resizing, normalization, augmentation, and class balancing to deliver quality and homogeneity in the training pipeline. Four state-of-the-art deep learning models Vision Transformer (ViT), ResNet-50, DenseNet-121, and EfficientNet-B0 were tested and fine-tuned with precision, recall, F1-score, accuracy, and AUC-ROC metrics. Vision Transformer yielded the best accuracy of 94.5% and the best AUC-ROC of 0.978, outperforming others in classification performance as well as generalizability. DenseNet-121 also performed good results, while ResNet-50 and EfficientNet-B0 provided consistent but relatively lower accuracy. Confusion matrices also confirmed the improved classification of ViT for all types of lesions. The results highlight the capability of transformer models in medical image analysis, particularly in learning global image features relevant in distinguishing morphologically similar skin lesions.