A Deep Hybrid CNN–Transformer Framework Combining EfficientNet and Vision Transformer for Multiclass Skin Cancer Classification
Abstract
Skin cancer remains one of the most prevalent and life-threatening dermatological diseases worldwide. Early and precise detection plays a vital role in improving patient survival rates and reducing treatment costs. This paper presents a hybrid deep learning framework that integrates EfficientNetB0 and Vision Transformer (ViT) architectures to perform multiclass classification of dermoscopic skin lesions. The model is trained on the HAM10000 dataset, which includes eight types of skin cancer lesions, using transfer learning and data augmentation to improve generalization. EfficientNetB0 efficiently captures local spatial and texture features, while ViT models global contextual dependencies through self-attention mechanisms. Experimental evaluation demonstrates that the hybrid model achieves a validation accuracy of 82.73%, outperforming EfficientNetB0 (80.25%) and ViT (81.12%) by 2.48% and 1.61%, respectively. Additionally, the proposed framework achieves a macro precision of 0.7512, macro recall of 0.6158, and macro F1-score of 0.6505, confirming its superior classification capability. These results demonstrate that the hybrid Efficient Net–ViT architecture provides a robust, scalable, and reliable solution for automated skin cancer diagnosis and establishes a foundation for clinical AI applications.