A novel hybrid deep learning pipeline for precise segmentation of skin cancer lesions
Abstract
Introduction Skin cancer is among the most prevalent malignancies worldwide, and accurate segmentation of skin lesions plays a vital role in its early diagnosis and treatment. Traditional deep learning models face challenges in balancing local feature extraction with global contextual understanding. This study aims to develop a novel, robust, and efficient hybrid model that combines lightweight CNNs and ViTs to enhance the accuracy and reliability of automated skin lesion segmentation for use in diverse clinical settings. Methods The proposed framework is divided into several stages. The first stage is data preparation, which ensures consistency across datasets by standardizing input images. The second stage employs a lightweight CNN module to extract important local features from the input images. These features are then passed to a ViT module to capture long-range dependencies and global context. Finally, a segmentation head processes the combined features to produce the final lesion mask. Three publicly available datasets (ISIC 2020, PH2, HAM10000) were used for training, testing, and generalization evaluation. Results The proposed hybrid architecture achieved an accuracy of 95.89%, a Dice coefficient of 94.29%, and a Jaccard index of 96.91% using the SGD optimizer on the ISIC 2020 dataset, outperforming several baseline and state-of-the-art methods. Cross-dataset evaluation on PH2 and HAM10000 yielded accuracies of 94.61% and 95.68%, respectively. Discussion The proposed hybrid model presents a promising solution for accurate and efficient skin lesion segmentation, contributing to enhanced clinical decision-making in dermatological diagnostics.