Next Article in Journal
Transarterial Embolization for Malignancy-Related Gastrointestinal Bleeding: Outcomes with and Without CT Extravasation
Previous Article in Journal
Longitudinal Breast MRI for Early Treatment-Response Modeling: A Comparative Study of Handcrafted Radiomics and Frozen Deep Image Embeddings for pCR Prediction
Previous Article in Special Issue
ABMA: An Attention-Based Morphology-Aware Framework for Automated 12-Lead ECG Arrhythmia Classification
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Hybrid Vision Transformer–CNN Architecture with Optimized Feature Selection for Skin Cancer Classification

1
Information Technology Department, College of Computer and Information Sciences, Imam Mohammad Ibn Saud Islamic University (IMSIU), Riyadh 13318, Saudi Arabia
2
Department of Biomedical Engineering, Riphah International University, I-14, Islamabad 44000, Pakistan
3
Department of Electrical Engineering, Bahria University, H-11, Islamabad 44000, Pakistan
4
Information Systems Department, College of Computer and Information Sciences, Imam Mohammad Ibn Saud Islamic University (IMSIU), Riyadh 13318, Saudi Arabia
5
Disability Research Institute, Health Sector, King Abdulaziz City for Science and Technology Riyadh, Riyadh 11442, Saudi Arabia
6
Department of Software Engineering, College of Computer Engineering and Sciences, Prince Sattam Bin Abdulaziz University, Al-Kharj 16273, Saudi Arabia
7
Department of Computer Science, Air University, E-9, Islamabad 44000, Pakistan
8
Department of Computer Science and Engineering, College of Informatics, Korea University, Seoul 02841, Republic of Korea
*
Author to whom correspondence should be addressed.
Diagnostics 2026, 16(15), 2351; https://doi.org/10.3390/diagnostics16152351
Submission received: 10 June 2026 / Revised: 13 July 2026 / Accepted: 21 July 2026 / Published: 27 July 2026
(This article belongs to the Special Issue 3rd Edition: AI/ML-Based Medical Image Processing and Analysis)

Abstract

Background/Objectives: Melanoma is a life-threatening skin cancer characterized by aggressive progression and high metastatic potential, making early diagnosis essential for improving patient survival and treatment outcomes. However, accurate automated skin lesion classification remains challenging due to variations in lesion appearance, illumination, image quality, and the presence of artifacts. This study proposes a unified framework for robust multi-class skin cancer classification by integrating preprocessing, lesion segmentation, feature extraction, optimization, and classification within a single end-to-end architecture. Methods: The proposed framework employs an iterative hair artifact removal strategy based on the fusion of Frangi vesselness filtering, Gabor texture filtering, morphological refinement, and Telea inpainting to preserve lesion integrity. A novel dermoscopic lesion segmentation network (CutisNet) is introduced to accurately delineate lesion boundaries. Hybrid representation learning combines deep features extracted using MobileNetV2 with uniquely selected handcrafted descriptors to capture complementary texture, structural, and contextual information. Gray Wolf Optimization is utilized for feature fusion and refinement, while a hybrid GNN–CNN classifier performs robust multi-class skin lesion classification. Results: Extensive experiments conducted on multiple benchmark dermoscopic datasets demonstrate the effectiveness and generalization capability of the proposed framework. The proposed model consistently outperformed existing state-of-the-art methods, achieving a maximum classification accuracy of 96.7% on the PH2 dataset while maintaining competitive performance across other benchmark datasets. Conclusions: The proposed framework effectively integrates novel preprocessing, segmentation, hybrid feature representation, feature optimization, and classification strategies to improve the robustness and accuracy of automated skin cancer classification. These results demonstrate its potential to support reliable computer-aided diagnosis and assist clinicians in the early detection of skin cancer.

1. Introduction

Skin cancer detection is a focal point in modern medical research due to the growing increase in dermatological disorders, especially malignant skin lesions. Melanoma is the most serious type of skin cancer because it grows rapidly and can spread to other parts of the body. An upsurge in incidence over the last decade has been reported in recent epidemiology studies, which are associated with factors including extended exposure to the ultraviolet rays of the sun, environmental changes, and aging populations [1]. Early diagnosis is crucial as the prognosis and treatment options are limited if the lesions are diagnosed late, whereas prognosis is improved and treatment options are broader in the early stages of diagnosis [2].
The current diagnostic methods, such as visual inspection and dermoscopic assessment, are highly dependent on the clinician’s experience and image interpretation. This frequently leads to intra- and inter-observer variability, particularly when diagnosing early-stage lesions with subtle visual features [2]. Artificial Intelligence (AI)-based computer-aided diagnostic systems help reduce this subjectivity by providing objective and reproducible image analysis that is independent of the clinician’s level of experience. Moreover, deep learning, particularly hybrid feature fusion frameworks that integrate deep and handcrafted representations, can capture subtle texture, shape, and morphological variations that may not be readily distinguishable through visual assessment alone. Although AI systems remain challenged by difficult cases and should not replace clinical expertise, they can serve as valuable decision-support tools that improve diagnostic consistency and assist clinicians in skin cancer screening.
In addition to conventional dermoscopic imaging, emerging technologies such as Raster-Scan Optoacoustic Mesoscopy (RSOM), photoacoustic tomography, and Raman spectroscopy have shown promise for skin cancer diagnosis by providing vascular, structural, and biochemical tissue information [3]. However, these modalities require specialized imaging equipment and clinical infrastructure, limiting their widespread adoption. In contrast, AI-based analysis of conventional RGB dermoscopic and clinical images offers a more practical, accessible, and cost-effective solution for routine computer-aided skin cancer screening and diagnosis.
Large-scale annotated datasets have played a vital role in recent times, in the field of automated skin cancer detection in this context. There is a vast amount of publicly available material, like the ISIC archive, which contains a wide range of dermoscopic images for a large number of different categories of lesions, which have greatly helped research by providing a wide variety of images to use for benchmarking and comparative analysis [4]. Annotated high-quality images with well-defined classes of lesions have been provided by other datasets (PH2, HAM10000), which allow for both segmentation and classification [4]. Moreover, datasets such as PAD UFES 20 also contain clinical metadata, enabling multimodal analysis and enhancing a model’s generalization. However, these datasets are especially prone to class imbalance and have limited representation of rare malignancies and variations in imaging conditions, making the development of robust models difficult.
Initial computational methods relied on manually engineered features from these datasets, such as color, texture, and shape descriptors, as well as classic machine learning classifiers. Those methods offered a set of rules with a comprehensible interpretation, but were these constrained by the human work of feature engineering and by their sensitivity to changes in illumination and image quality [4]. Deep learning, especially deep convolutional neural networks, has revolutionized the field of skin cancer detection, allowing for automatic feature learning directly from image data. These models have been shown to have high accuracy and, in some instances, performance similar to dermatologists [5]. However, they are highly dependent on the availability of extensive and diverse datasets, and are prone to overfitting and bias if they are trained on small or imbalanced sets of data.
In this work, a unified skin lesion analysis framework is proposed that integrates preprocessing, deep learning, segmentation, feature extraction, optimization, and classification. Dermoscopic RGB images are first preprocessed, followed by iterative Frangi- and Gabor-based hair removal and Telea inpainting to enhance lesion visibility. The refined images are then used for deep feature extraction using a ViT-based DINO and MobileNetV2 to capture complementary global and local representations. In parallel, a novel segmentation model, CutisNet, generates precise RGB lesion masks, which are further used to extract handcrafted features, including SIFT keypoints, superpixel centroid and contour points, texture descriptors using Tamura features, GLRLM, and Gabor filters, along with structural features based on symmetry analysis, Hu moments, and ellipse fitting. Finally, all deep, texture, keypoint, and structural features are fused, optimized using Gray Wolf Optimization, and then classified using a hybrid GNN-CNN architecture for final skin cancer classification.
The key contributions of the proposed model are summarized as follows:
  • A unified hybrid framework for automated skin cancer classification is proposed, integrating preprocessing, novel lesion segmentation, hybrid deep and handcrafted feature representation, feature optimization, and hybrid classification within a single end-to-end architecture. Unlike conventional pipelines that treat these stages independently, the proposed framework enables complementary interaction among all modules, resulting in improved robustness, generalization, and multi-class classification performance.
  • A novel dermoscopic lesion segmentation network, termed CutisNet, is introduced to accurately delineate lesion boundaries through hierarchical feature encoding, multi-scale contextual aggregation, and coarse-to-fine decoding. By effectively preserving lesion morphology and boundary details under challenging imaging conditions, CutisNet achieves superior segmentation performance compared with established architectures, including U-Net, U-Net++, and DeepLabV3+.
  • A novel iterative hair artifact removal strategy is developed by integrating Frangi vesselness filtering, Gabor texture filtering, morphological refinement, and Telea inpainting. The complementary strengths of vessel enhancement and texture analysis enable effective suppression of both linear and curved hair artifacts while preserving lesion integrity and minimizing the loss of diagnostically relevant structures.
  • A unique hybrid representation learning strategy is proposed by integrating deep features extracted from MobileNetV2 and a self-supervised ViT-based DINO with uniquely selected handcrafted descriptors, including textural, geometric, symmetric, and keypoint-based features. The complementary fusion of local texture information, global contextual dependencies, structural characteristics, and clinically relevant handcrafted descriptors produces a more discriminative and robust feature representation than any individual feature extraction approach.
  • A novel hybrid GNN–CNN classification framework is proposed to jointly exploit graph-based relational learning and convolutional feature learning for multi-class skin lesion classification. The CNN effectively captures discriminative local lesion patterns, while the GNN models structural relationships among the optimized feature representations, enabling improved feature interaction, enhanced classifier generalization, and more accurate discrimination of visually similar skin lesion categories. Extensive experiments, comparative evaluations, and ablation studies on benchmark datasets, including International Skin Imaging Collaboration—ISIC, PAD-UFES-20, Derm7pt, BCN20000, and PH2, demonstrate the superior effectiveness, generalization capability, and contribution of the proposed framework over existing state-of-the-art methods.

2. Literature Review

Skin cancer has become one of the fastest growing cancers globally, with melanoma responsible for a large proportion of skin cancer related mortality due to its aggressive and metastatic nature. Epidemiological studies have reported a steady rise in incidence, particularly in populations with high ultraviolet exposure and aging demographics, emphasizing the increasing disease burden [1]. The prevalence of late-stage diagnoses further underscore the necessity of early detection, as survival rates decrease significantly with disease progression [2]. Consequently, automated diagnostic systems are being increasingly developed to assist clinicians, reduce subjectivity, and enable scalable screening.
Conventional diagnostic methods, such as dermoscopy and visual inspection, are highly dependent on clinician expertise, leading to variability in diagnosis. Early computational approaches addressed this by extracting handcrafted features including color distribution, asymmetry, border irregularity, texture, and shape descriptors, followed by classification using machine learning algorithms, such as support vector machines, k-nearest neighbors, and random forests. Although these methods provided interpretability and a structured framework, they were limited by low feature discriminative power, sensitivity to imaging conditions, and reliance on expert-designed features [6].
Deep learning, particularly convolutional neural networks, significantly improved skin cancer detection by enabling automatic hierarchical feature learning from raw images. These models demonstrated high accuracy by capturing complex spatial and contextual patterns and have achieved performance comparable to dermatologists in certain tasks [5]. Architectures such as ResNet and DenseNet further enhanced performance through improved gradient flow and feature reuse [7]. However, their dependence on large, annotated datasets and susceptibility to overfitting in limited data scenarios remain key limitations.
Segmentation based methods have been employed to improve lesion localization prior to classification, reducing background noise and enhancing feature extraction. Encoder–decoder architectures, such as U Net and fully convolutional networks, have shown strong performance in delineating lesion boundaries under challenging conditions [8]. Despite their effectiveness, segmentation errors due to low contrast, artifacts, or irregular lesion shapes can propagate and degrade classification accuracy. Hybrid and ensemble approaches have been proposed to improve robustness by combining multiple models or integrating handcrafted and deep features. Attention mechanisms and multi-scale feature fusion further enhance the focus on clinically relevant regions and improve feature representation across scales [9]. While these methods achieve higher accuracies, they introduce increased computational complexity and reduced interpretability, limiting their practicality in real-world clinical settings.
Transformer-based architectures have recently gained attention due to their ability to model global dependencies and contextual relationships within images. Vision Transformers and hybrid CNN transformer models show promising performance in capturing global lesion characteristics [10]. However, their high computational requirements and reliance on large-scale annotated datasets restrict their widespread application in medical imaging. Transfer learning has been widely adopted to mitigate data scarcity by leveraging pretrained models, improving convergence speed and classification performance [11]. Nevertheless, domain mismatch between natural and medical images can limit feature relevance, requiring careful fine tuning for reliable results.
Despite these advancements, several challenges persist. Dataset imbalance, where malignant cases are underrepresented, leads to biased predictions and reduced sensitivity [6]. Variations in imaging conditions, acquisition devices, and annotation standards hinder generalization across clinical settings [12]. Additionally, limited interpretability of deep learning models raises concerns regarding trust and clinical adoption [13]. In summary, while deep learning and advanced hybrid models have substantially improved skin cancer detection, the increasing disease burden highlights the need for robust, generalizable, and interpretable systems that can effectively operate in real-world clinical environments.

3. Materials and Methods

The proposed methodology presents a unified framework for skin lesion analysis by integrating preprocessing, segmentation, feature extraction, optimization, and classification into a single pipeline. It leverages both deep and handcrafted features to capture comprehensive lesion characteristics. The overall architecture of the proposed system is illustrated in Figure 1.

3.1. Image Preprocessing and Enhancement

A multi-stage preprocessing pipeline was employed to enhance dermoscopic image quality and consistency, including color normalization, illumination correction, contrast enhancement, and noise reduction. Initially, gray world color normalization corrected color imbalance. We let I ( x , y , c ) denote the RGB image, displayed in Figure 2a, where c { R , G , B } . The mean intensity of each channel is μ c = 1 N x , y I ( x , y , c ) , and the global gray average is μ gray . Each channel is scaled to enforce color constancy, as expressed by Equation (1), producing Figure 2b.
μ gray = μ R + μ G + μ B 3 ,           I norm ( x , y , c ) = I ( x , y , c ) μ gray μ c
The normalized image was converted to grayscale I g ( x , y ) , as shown in Figure 2c, followed by illumination correction to suppress uneven lighting effects. A smoothed illumination estimate L x , y was obtained using Gaussian filtering as L ( x , y ) = G σ ( x , y ) I g ( x , y ) , and the corrected image was computed using homomorphic normalization with Equation (2)
I corr ( x , y ) = I g ( x , y ) L ( x , y ) 255
Contrast was enhanced using CLAHE, yielding Figure 2d. Finally, bilateral filtering performed edge-preserving smoothing. The filtered image I f ( x , y ) , as shown in Figure 2e, is defined as Equation (3).
I f x , y = 1 W x , y i , j I clahe i , j exp x i ) 2 + ( y j ) 2 2 σ s 2 . exp ( I clahe ( x , y ) I clahe ( i , j ) ) 2 2 σ r 2
where σ s and σ r control spatial and intensity similarity, and W x , y is a normalization factor. This pipeline ensures color constancy, corrects illumination, enhances contrast, and preserves structural details, enabling reliable feature extraction and skin cancer classification.

3.2. Hair Artifact Removal Using Frangi–Gabor Fusion and Iterative Inpainting

Hair artifacts were removed using an iterative multi-scale filtering framework combining Frangi vesselness filtering, Gabor texture filtering, morphological refinement, and image inpainting. We let the preprocessed grayscale image be denoted as I g ( x , y ) . Hair structures were enhanced using Frangi filtering, which detects tubular structures via eigenvalues of the Hessian matrix. The vesselness response is given as Equation (4)
V F x , y = Frangi I g x , y ; σ 1 , σ 2 , , σ n
where multiple scales of σ capture both fine and thick hairs, with the mask shown in Figure 2f. In parallel, Gabor filtering was applied to capture linear-oriented textures. The response for orientation θ is given by Equation (5)
G θ x , y = I g x , y K θ x , y
where K θ is a Gabor kernel. Multi-orientation responses were aggregated using a maximum operation, G ( x , y ) = m a x θ G θ ( x , y ) , for θ { 0 ° , 30 ° , , 150 ° } , producing the mask in Figure 2g. Hair candidate regions were extracted via adaptive percentile thresholding as M F = V F ( x , y ) > T F and M G = G ( x , y ) > T G , where T F and T G are dynamically computed. The final hair mask was obtained as M = M F M G . To enhance spatial coherence, morphological closing and dilation were applied, as given by Equation (6)
M = MorphClose M , M = Dilate M
Detected hair regions were removed using Navier–Stokes-based image inpainting (Telea method): I clean = Inpaint ( I RGB , M ) . This process was iteratively repeated to refine hair suppression while preserving lesion structure. The fusion of Frangi and Gabor responses enables robust detection of both curved and linear hair artifacts, producing cleaner lesion boundaries for downstream analysis, as shown in Figure 2h. The proposed fusion-based hair artifact removal strategy contributes to the robustness of the overall framework by effectively eliminating both linear and curved hair artifacts while preserving diagnostically important lesion structures for subsequent analysis.

3.3. Proposed CutisNet for Lesion Segmentation

Despite many benefits of dermoscopy, accurate lesion segmentation of dermoscopic images is still a challenge because of the ill-defined boundaries of lesions, skin color differences, and artifacts like hairs, shadows, and illumination inconsistencies. Most of the current segmentation methods are unable to simultaneously maintain fine boundary details and high-level semantic context. More down-sampling will result in a loss of spatial precision and less up-sampling will result in a loss of robustness to real-world variations. Recent studies have also shown that performance deteriorates when a domain shift occurs, which further underscores the importance of developing solid, multi-scale architectures [8].
To address these limitations, we propose CutisNet, a specialized encoder–decoder network designed for dermoscopic lesion segmentation. The model is trained using extensive augmentation strategies to simulate real clinical conditions, improving generalization. The architecture is illustrated in Figure 3 and detailed in Table 1. When given an RGB dermoscopic image I R H × W × 3 , CutisNet learns a mapping, which is given as Equation (7)
M = f θ ( I ) , M { 0,1 } H × W
The model is trained on the HAM10000 [14] dataset, which contains dermoscopic RGB images and corresponding expert-annotated binary masks. The dataset is split into 70% training and 30% validation. To enhance robustness, each image–mask pair undergoes augmentation using Equation (8)
I , M ) = T resize T flip T scale-rotate T blur T intensity ( I , M
CutisNet follows an encoder–context–decoder structure. The encoder E ( ) extracts hierarchical features: F e = E ( I ) . A multi-scale context module B captures global dependencies using parallel dilated convolutions: F c = B ( F e ) . Low-level features F l are preserved for spatial refinement: F l = L ( I ) . The decoder D reconstructs the segmentation by fusing semantic and spatial features using Equation (9)
M p = D F c , F l , M = σ M p , σ ( x ) = 1 1 + e x
Training minimizes a hybrid loss by combining Binary Cross-Entropy and Dice loss L , while post-processing refines predictions through thresholding and morphological operations using Equation (10)
L p , y = BCE p , y + 1 2 p σ y + ϵ p σ + y + ϵ ,     M ^ = H ( S ( M t ) ) , M t = 𝟙 ( M > 0.5 )
The architecture diagram is given in Figure 3, and the segmentation results are presented in Figure 4, demonstrating improved boundary preservation and structural consistency, while the detailed architecture is provided in Table 1.
As shown in Table 2, CutisNet achieves the highest Dice Score and IoU, outperforming the baseline models in segmentation accuracy. Although it has a comparable number of parameters to U-Net++, it delivers superior boundary delineation and robustness, particularly in challenging cases involving hair artifacts and low-contrast lesions. This improvement stems from the effective integration of the EfficientNet-B4 encoder with the DeepLabV3+ decoder, which provides richer multi-scale contextual information.
The proposed CutisNet enhances the robustness of the overall framework by providing accurate and reliable lesion boundary delineation, ensuring high-quality lesion masks for subsequent feature extraction and classification.

3.4. Multi-Model Deep Representation Learning

A hybrid deep feature extraction strategy is employed, where a CNN-based MobileNetV2 captures fine-grained local- and texture-level details, while a complementary ViT-based DINO learns global contextual representations. This combination enables robust and discriminative feature learning by effectively modeling both spatial details and long-range dependencies within skin lesions.

3.4.1. CNN-Based Deep Feature Extraction Using MobileNetV2

To learn high-level representations of skin lesions, a pretrained MobileNetV2 [15] network was utilized. Each input image I x , y , c was resized to 224 × 224 and normalized using Equation (11).
I norm = I μ σ
where μ and σ are channel-wise parameters. The normalized image was then passed through the network to extract hierarchical features. MobileNetV2 employs depthwise separable convolutions, where standard convolution is decomposed into depthwise and pointwise operations. The depthwise convolution is defined as Equation (12)
F d x , y , c = i , j K d i , j , c I x + i , y + j , c            
where K d is the depthwise kernel. This is followed by a pointwise 1 × 1 convolution to combine channel information using Equation (13)
F p x , y , k = c K p c , k F d x , y , c    
To capture multi-level representations, activations from the first six expansion blocks were extracted as A l = f l ( I norm ) ,     l = 1,2 , , 6 , where f l denotes the non-linear transformation at layer l . For each activation tensor A l R H l × W l × C l , channel importance was computed using mean activation, as given by Equation (14)
μ k = 1 H l W l x = 1 H l y = 1 W l A l x , y , k
The top K channels with the highest μ k were selected. Each feature map was normalized using Equation (15)
A l x , y , k = A l x , y , k μ k σ k + ϵ  
where σ k is the standard deviation of the k -th channel, and ϵ ensures numerical stability. These intermediate feature maps, as displayed in Figure 5, capture progressively complex patterns, ranging from low-level edges and textures to high-level lesion-specific structures, enabling MobileNetV2 to efficiently learn discriminative local lesion representations that enhance the robustness of the proposed skin cancer classification framework while maintaining computational efficiency.

3.4.2. Self-Supervised Vision Transformer Feature Extraction Using DINO

To capture global contextual representations, a self-supervised Vision Transformer (ViT-S/8) that was pretrained using DINO was employed. Each hair-removed image I x , y was resized, normalized using ImageNet statistics, and divided into non-overlapping 8 × 8 patches. The image was converted into token embeddings as X = [ x cls , x 1 , x 2 , , x N ] , where x cls   is the classification token and N = 28 × 28 is the number of patches, as displayed in Figure 5. Self-attention was computed using Equation (16)
A = softmax Q K T d    
where Q , K , and V are the query, key, and value matrices; and d is the feature dimension. Spatial relevance was obtained using class-to-patch attention A cls , producing a vector of length N , which was reshaped into a spatial grid A grid R 28 × 28 . To improve stability, attention across multiple heads was averaged using Equation (17)
A x , y = 1 H h = 1 H A h x , y
where H is the number of heads. The resulting attention map was normalized to 0 , 1 using Equation (18)
A ( x , y ) = A ( x , y ) m i n ( A ) m a x ( A ) m i n ( A )
Finally, the map was up-sampled to the original image size using nearest-neighbor interpolation to preserve patch boundaries. The resulting attention maps, as shown in Figure 6, highlight diagnostically relevant lesion regions and capture rich global contextual representations with long-range feature dependencies, enabling the self-supervised ViT-based DINO to complement the local texture information extracted by MobileNetV2 and enhance the robustness of the proposed skin cancer classification framework.

3.5. Multi-Strategy Keypoint-Based Feature Extraction

SIFT extracts scale- and rotation-invariant keypoints, while superpixel-based contour analysis captures boundary-aware keypoints, providing complementary structural information.

3.5.1. Superpixel-Based Centroid and Contour Keypoint Extraction

To capture local structural patterns of skin lesions, the segmented lesion image was partitioned into N superpixels S i using the SLIC algorithm, which clusters pixels based on color and spatial proximity by minimizing the distance metric using Equation (19)
D = d c 2 + m S 2 d s 2
where d c is the color distance, d s is the spatial distance, S is the nominal superpixel size, and m is a compactness parameter controlling shape regularity. For each superpixel S i , as shown in Figure 7b, contours C i were extracted using boundary detection. To reduce dimensionality while preserving structural information, keypoints P i j were sampled evenly along each contour by employing Equation (20)
P i j = C i round j · C i n , j = 0,1 , , n 1
where C i is the total number of contour points and n is the number of sampled points per contour. Additionally, the centroid of each superpixel was computed using image moments, as given by Equation (21)
x c , y c = M 10 M 00 , M 01 M 00 , M p q = x y x p y q 1 S i x , y
where 1 S i x , y is the indicator function. This process yields superpixels, contour-based keypoints, and centroids, as displayed in Figure 7c. The extracted superpixel centroid and contour keypoints contribute complementary structural and boundary information by preserving lesion geometry and spatial organization, thereby enhancing the robustness of the proposed framework and improving its feature discrimination for skin lesion classification.

3.5.2. SIFT Keypoint-Based Feature Extraction

To capture scale- and rotation-invariant local features from skin lesions, the Scale-Invariant Feature Transform (SIFT) algorithm was applied to detect keypoints and compute descriptors. SIFT identifies extrema in the Difference-of-Gaussians (DoGs) scale space defined as Equation (22)
D x , y , σ = G x , y , k σ G x , y , σ I x , y
where G x , y , σ is a Gaussian kernel of standard deviation σ , k is a multiplicative scale factor, and denotes convolution. Keypoints are identified as local extrema of D x , y , σ across space and scale. Each keypoint is assigned a dominant orientation θ based on local image gradients using Equation (23)
m x , y = I x ) 2 + ( I y ) 2 , θ x , y = arctan 2 I y , I x
where I x and I y are image gradients in the x and y directions. For each keypoint, a 128-dimensional descriptor is formed from histograms of gradient orientations within a local neighborhood, providing robustness to illumination and rotation. These SIFT features, as displayed in Figure 8, effectively encode edges, corners, and blob-like structures to generate scale- and rotation-invariant local descriptors, improving robustness against variations in lesion size, orientation, and imaging conditions while providing highly discriminative representations for skin lesion classification.

3.6. Hybrid Texture Feature Representation

GLRLM, Tamura, and Gabor features are combined to capture run-length statistics, perceptual texture, and frequency-based patterns for comprehensive lesion texture representation.

3.6.1. Texture Analysis Using Gray-Level Run-Length Matrix (GLRLM)

To extract fine-grained texture information from dermoscopic segmented images, each image was first converted to grayscale I x , y 0,255 using the standard luminance formula of I ( x , y ) = 0.2989 R ( x , y ) + 0.5870 G ( x , y ) + 0.1140 B ( x , y ) , where R , G , B are the color channels. The grayscale image was quantized into L levels using Equation (24)
I q ( x , y ) = I ( x , y ) 256 · L
A w × w sliding window with reflective padding was applied to compute the Gray-Level Run-Length Matrix (GLRLM) [16] of P ( i , j ) , where i is the gray level and j is the run length, counting horizontal runs of length j at gray levels i . From the GLRLM, five texture descriptors were extracted. Short Run Emphasis (SRE) and Long Run Emphasis (LRE) capture short and long texture structures by using Equation (25)
S R E = i j P ( i , j ) / j 2 i j P ( i , j ) , L R E = i j P ( i , j ) j 2 i j P ( i , j )
Gray-Level Non-Uniformity (GLN) and Run-Length Non-Uniformity (RLN) measure intensity and run variability by using Equation (26)
G L N = i ( j P ( i , j ) ) 2 i j P ( i , j ) , R L N = j ( i P ( i , j ) ) 2 i j P ( i , j )
Run Percentage (RP) reflects the run density, and is mathematically expressed as Equation (27). Pixel-wise feature maps were generated using sliding windows and normalized via min–max scaling using Equation (27)
R P = i j P ( i , j ) L R , F n o r m = F F m i n F m a x F m i n
These normalized GLRLM maps, as displayed in Figure 9, capture local texture variations in skin lesions and serve as discriminative features for classification. GLRLM features contribute complementary statistical texture information by capturing gray-level run-length characteristics associated with lesion homogeneity and structural heterogeneity.

3.6.2. Gabor Filter-Based Texture Analysis

Gabor filters, which combine Gaussian envelopes with sinusoidal plane waves, were applied to the enhanced grayscale image. A 2D Gabor filter G x , y ; λ , θ , σ , γ , at wavelength λ , orientation θ , Gaussian standard deviation σ , and spatial aspect ratio γ , is defined as Equation (28)
G ( x , y ) = e x p ( x 2 + γ 2 y 2 2 σ 2 ) c o s ( 2 π x λ )
where   x = x cos θ + y sin θ   a n d   y = x sin θ + y cos θ . The filter was applied at multiple orientations θ { 0 , π / 4 , π / 2,3 π / 4 } and wavelengths corresponding to spatial frequencies f 0.05,0.1,0.2 using 2D convolution as R λ , θ ( x , y ) = ( I G λ , θ ) ( x , y ) , where denotes convolution. The Gabor energy map was then computed using Equation (29), as depicted in Figure 10, by summing the absolute values of all filter responses.
E x , y = λ θ R λ , θ x , y
This was then normalized to the range of 0 , 255 for visualization by using Equation (30)
E norm x , y = E x , y E m i n E m a x E m i n 255
where E m i n and E m a x are the minimum and maximum values of E ( x , y ) , respectively. These Gabor energy maps encode directional and frequency-specific texture patterns of skin lesions, capturing structural variations, such as streaks, ridges, and spots. Gabor features contribute multi-scale and multi-orientation texture representations that effectively characterize directional lesion patterns and fine surface textures, enhancing feature discrimination.

3.6.3. Tamura Texture Feature Extraction

To characterize skin lesion textures, the input image was first converted to grayscale, and Tamura texture descriptors were computed for contrast and directionality. The contrast map, as shown in Figure 11b, captures intensity variation using standard deviation σ , mean μ , and normalized fourth central moment α 4 , as defined by Equation (31)
α 4 = 1 H W I μ ) 4 σ 4 , Contrast = σ α 4 1 / 4
Figure 11c shows the directionality map that captures edge orientation consistency. Image gradients are computed using Sobel operators, as given by Equation (32)
G x = I x , G y = I y , M = G x 2 + G y 2 , θ = t a n 1 G y G x
A magnitude-weighted histogram of θ is constructed, and directionality is defined as the variance of this histogram, i.e., Var Histogram θ , M , as displayed in Figure 11d. These Tamura-based contrast and directionality descriptors provide a compact representation of local intensity variation and edge orientation patterns in skin lesions, supporting effective classification.

3.7. Morphological and Geometric Feature Extraction

To effectively characterize the structural properties of skin lesions, a set of geometric and shape-based descriptors is extracted. These features capture global morphology, invariant shape patterns, and symmetry characteristics, providing complementary information for robust lesion analysis.

3.7.1. Ellipse-Based Geometric Feature Extraction

To characterize global lesion shape, the dermoscopic image I x , y was converted to grayscale I g x , y and smoothed using Gaussian filtering with I s ( x , y ) = G σ ( x , y ) I g ( x , y ) , where G σ is a Gaussian kernel and denotes convolution. A binary lesion mask B ( x , y ) was obtained via Equation (33)
B ( x , y ) = 1 , I s ( x , y ) > 0 0 , otherwise  
ensuring that the lesion region is represented by white pixels. The largest contour C was extracted and fitted with an ellipse using least squares, yielding the center x c , y c , major axis a , minor axis b , and orientation θ . Ellipticity was defined as ϵ = a / b . The resulting mask is given in Figure 12b. These geometric features ( a , b , θ , ϵ ) provide a compact representation of lesion shape, capturing elongation and orientation characteristics for distinguishing benign and malignant lesions. Ellipse fitting contributes geometric characterization of lesion morphology by providing robust shape descriptors that complement texture and deep feature representations.

3.7.2. Symmetry-Based Shape Feature Extraction

To quantify structural asymmetry, binary lesion masks B x , y 0,1 were used, where non-zero pixels represent the lesion. Symmetry was evaluated along vertical and horizontal axes by comparing the mask with its flipped versions. For vertical symmetry, the reflected mask B v x , y is defined as Equation (34) and displayed in Figure 12c.
B v x , y = B x , W 1 y
where W is the image width. The overlap O v and vertical symmetry score S v are computed using Equation (35)
O v ( x , y ) = B ( x , y ) B v ( x , y ) , S v = x , y O v ( x , y ) x , y B ( x , y )
For horizontal symmetry, the flipped mask B h x , y is given as Equation (36), as shown in Figure 12d.
B h x , y = B H 1 x , y
where H is the image height. The overlap O h and symmetry score S h were computed using Equation (37)
O h x , y = B x , y B h x , y , S h = x , y O h ( x , y ) x , y B ( x , y )
The scores S v and S h [ 0,1 ] indicate greater symmetry with higher values. Symmetry analysis contributes clinically relevant morphological information by quantifying lesion asymmetry, an important indicator for distinguishing benign and malignant skin lesions.

3.7.3. Hu Moment Shape Feature Extraction

To capture the global shape characteristics of skin lesions, binary lesion masks B x , y are used.
The raw spatial moments of the binary mask were computed using Equation (38)
m p q = x   y x p y q B ( x , y ) , p , q = 0,1 , 2 ,
From these, the central moments are defined as Equation (39)
μ p q = x y ( x x ¯ ) p ( y y ¯ ) q   B ( x , y ) , x ¯ = m 10 m 00 , y ¯ = m 01 m 00
The normalized central moments are given by Equation (40)
η p q = μ p q μ 00 γ ,   γ = p + q 2 + 1
Using these, the seven Hu invariant moments H 1 , , H 7 were computed, which are invariant to translation, scale, and rotation. For numerical stability, a logarithmic transformation was applied using Equation (41)
H i log = sign ( H i ) l o g 10 ( H i + ϵ ) , i = 1 , , 7
where ϵ = 10 10 avoids singularities. The centroid of the lesion was also computed as x ¯ , y ¯ . These Hu moments, graphically represented in Figure 12e, provide a compact and rotation-invariant descriptor of lesion shape, complementing other geometric and texture features for robust skin cancer classification.

3.8. Feature Fusion Strategy

The proposed framework integrates heterogeneous representations by combining deep embeddings and handcrafted descriptors into a unified feature vector. We let F d 1 R p and F d 2 R q denote deep features from the ViT-based DINO and MobileNetV2, respectively. Texture features F t are extracted using Tamura descriptors, GLRLM, and Gabor responses, while shape features F s include Hu moments, ellipse parameters, and symmetry descriptors. Keypoint features F k are derived from SIFT, superpixel centroids, and contour-based distributions. All feature vectors are first normalized using min–max scaling and computed by Equation (42)
F ^ = F m i n ( F ) m a x ( F ) m i n ( F )
The normalized features are then fused at the feature level using Equation (43), where denotes concatenation.
F f = F ^ d 1         F ^ d 2         F ^ t         F ^ s         F ^ k
The deep and handcrafted features are normalized using min–max scaling and concatenated to form a fused feature vector of 5313 dimensions. Gray Wolf Optimization (GWO) is then applied to select the most discriminative features, resulting in a final optimized feature vector of 1856 dimensions, as given in Table 3.

3.9. Gray Wolf Optimization for Feature Selection and Refinement

To enhance discriminative power and reduce redundancy in the fused feature space F f , Gray Wolf Optimization (GWO) is employed for adaptive feature weighting and selection. Each candidate solution represents a weight vector as w = [ w 1 , w 2 , , w n ] , where w i [ 0,1 ] denotes feature importance. The objective is to minimize classification loss J w with regularization computed using Equation (44). GWO is guided by three leaders α , β   a n d   δ (best solutions), while the remaining wolves update their positions using Equation (44)
J ( w ) = L ( f ( F f w ) ) + λ w 2 2 ,   D = C X p X , X ( t + 1 ) = X p A D
where X p is the best solution. The coefficients are given by Equation (45)
A = 2 a r 1 a , C = 2 r 2
where a decreases linearly from 2 to 0, and r 1 , r 2 [ 0,1 ] ensuresthe exploration–exploitation balance. The optimal weights w are obtained from α , β , δ , producing refined features, as calculated by Equation (46)
F o p t = F f w
This optimization enhances class separability by retaining informative features while suppressing redundant and noisy components, improving the performance of the downstream GNN–CNN classifier.
Gray Wolf Optimization (GWO) was selected for feature selection because the proposed framework generates a high-dimensional fused feature space by integrating deep and handcrafted features, which may contain redundant and correlated information. GWO effectively identifies the most discriminative feature subset while preserving complementary information. Compared with Genetic Algorithm (GA), which relies on computationally intensive crossover and mutation operations, and Particle Swarm Optimization (PSO), which may converge prematurely, GWO achieves a better exploration–exploitation balance through its hierarchical leadership mechanism. Unlike Ant Colony Optimization (ACO), Differential Evolution (DE), and Salp Swarm Algorithm (SSA), GWO requires fewer control parameters and provides stable convergence with lower computational complexity. By reducing redundant features while retaining lesion-specific texture, shape, and structural information, GWO improves classifier generalization and enhances the accuracy and efficiency of the proposed skin cancer classification framework. Table 4 shows the comparison of effect of various optimizers on the overall accuracy of the model.

3.10. Hybrid GNN–CNN Classification Framework

The optimized feature vector F o p t R n is classified using a hybrid GNN–CNN architecture to capture both relational and local feature patterns. First, F o p t is represented as a graph G = ( V , E ) , where each node v i corresponds to feature f i , and edges e i j are defined using similarity, as given by Equation (47). In the GNN, node embeddings are updated via message passing using Equation (47)
e i j = exp f i f j 2 σ 2 , h i l + 1 = σ j N ( i ) 1 c i j W l h j l
In parallel, F o p t is reshaped and processed by a 1D CNN to capture local correlations using Equation (48). The GNN and CNN outputs are fused by concatenation using Equation (48)
z k = ϕ W k F o p t + b k ,               F h y b r i d = F G N N F C N N
Finally, classification is performed using a fully connected layer with softmax, as given by Equation (49)
y ^ = softmax ( W s F h y b r i d + b s )
The hybrid GNN–CNN classifier contributes complementary local feature learning and graph-based relational modeling, enabling more robust discrimination of visually similar skin lesion categories and improving multi-class classification performance. The complete implementation details, including the network configuration, feature dimensions, training hyperparameters, Gray Wolf Optimization parameters, and hardware/software environment, are summarized in Table 5.

4. Results

4.1. Dataset Description

The proposed framework was evaluated on five publicly available skin lesion datasets containing RGB dermoscopic and clinical images with diverse lesion categories and acquisition conditions. The PAD-UFES-20 [17] dataset contains 2298 RGB clinical images from six classes: melanoma, basal cell carcinoma, squamous cell carcinoma, actinic keratosis, seborrheic keratosis, and nevus. The ISIC [6] dataset is a large-scale benchmark dataset comprising RGB dermoscopic images with multiple lesion categories acquired under varying imaging conditions. The Derm7pt [18] dataset contains approximately 2000 RGB dermoscopic images. In this work, five classes were utilized: melanoma, nevus, basal cell carcinoma, seborrheic keratosis, and dermatofibroma. The BCN20000 [12] dataset consists of over 19,000 RGB dermoscopic images from eight classes: melanoma, nevus, basal cell carcinoma, actinic keratosis, benign keratosis, dermatofibroma, vascular lesion, and squamous cell carcinoma. The PH2 [19] dataset contains 200 high-resolution RGB dermoscopic images categorized into common nevus, atypical nevus, and melanoma classes.

4.2. Training, Validation, and Testing Procedure

The training, validation, and testing procedure adopted in this study is described below, including the data splitting strategy, patient-level data handling, and hyperparameter tuning protocol.
Data Splitting: We performed five-fold stratified cross-validation with an 80/20 train–validation split.
Patient-Level Separation: We did not apply patient-level splitting in the current study. This was primarily because most of the publicly available datasets used (such as ISIC, Derm7pt, BCN20000, and PH2) do not provide consistent and reliable patient-level metadata or clear linkage between images and patients. Therefore, data splitting was performed at the image level across all datasets.
Hyperparameter Tuning: Hyperparameters were tuned solely on the validation set of the first fold, and the selected configuration was fixed for all subsequent folds to minimize data leakage.

4.3. Computational Cost Analysis

Table 6 summarizes the computational cost of each module in the proposed framework. While the ViT-based DINO incurs the highest computational complexity and the hair removal stage requires the longest execution time, MobileNetV2 and the handcrafted feature extraction methods maintain relatively low computational overhead. Overall, the proposed framework achieves an effective balance between computational efficiency and robust skin cancer classification performance.

4.4. Confusion Matrices

Figure 13 shows the confusion matrices on the five datasets. The PAD-UFES-20 confusion matrix shows strong recognition for SCC (95%), SEK (91%), and AK (85%). MEL achieved lower accuracy (68%) due to visual similarity and overlapping texture patterns with SEK and SCC, while NV and BCC attained 85% and 80% accuracy, respectively. For the ISIC dataset, high multi-class performance was achieved across all classes, with VASC (99%) and DF (94%) showing the highest accuracy. Minor misclassification occurred among MEL, BKL, AK, and SCC due to similar pigmentation, irregular borders, and lesion morphology. The Derm7pt dataset achieved strong recognition for SK (92%) and NEV (86%), whereas MEL (70%) and MISC (71%) showed higher confusion because of heterogeneous dermoscopic structures and overlapping visual characteristics. BCC achieved 77% accuracy with limited cross-class confusion. The BCN20000 confusion matrix demonstrated strong classification for VASC (98%), SCC (96%), MEL (92%), and BCC (91%). Misclassification among NV, BKL, and AK was mainly caused by high intra-class variability and similar lesion appearance. The PH2 dataset showed highly reliable classification, with MEL, CN, and AN achieving 98%, 94%, and 93% accuracy, respectively. Minor confusion between CN and AN resulted from subtle visual differences in lesion boundaries and pigmentation.

4.5. Results and Discussion

The proposed framework, as shown in Table 7, achieved 88.0% accuracy on the PAD-UFES-20 dataset, with precision, recall, and F1-score of 0.845, 0.84, and 0.841, respectively. On the ISIC dataset, the model achieved 94.5% accuracy, with precision, recall, and F1-score of 0.907, 0.91, and 0.911, demonstrating strong multi-class performance. The Derm7pt dataset achieved 83.6% accuracy with precision, recall, and F1-score of 0.792, 0.79, and 0.792, respectively. For the BCN20000 dataset, the framework obtained 93.2% accuracy, with precision, recall, and F1-score of 0.877, 0.885, and 0.88. The PH2 dataset achieved the highest performance, with 96.7% accuracy, 0.943 precision, 0.95 recall, and 0.947 F1-score. All reported results represent the mean ± standard deviation obtained from five-fold stratified cross-validation (80/20 train–test split). The 95% confidence intervals were calculated as mean ± 1.96 × (SD/√5). The relatively low standard deviations across all datasets demonstrate the robustness and stability of the proposed framework.
Table 7 further demonstrates that model achieved high sensitivity (79.2–94.7%) and specificity (94.8–98.7%), indicating its effectiveness in correctly identifying skin lesion classes while minimizing false-positive predictions. Furthermore, the balanced accuracy values (87.0–96.2%) confirm reliable performance under class-imbalanced conditions. Although PAD-UFES-20 exhibited comparatively lower sensitivity due to the challenging nature of melanoma classification and dataset imbalance, the framework maintained competitive performance on this dataset and consistently strong results across all other benchmarks. The low standard deviations and narrow 95% confidence intervals further demonstrate the robustness and stability of the proposed framework.
The ROC curve analysis for all datasets is presented in Figure 14. The PAD-UFES-20 dataset demonstrates effective class separability, with slight performance degradation for MEL due to overlap with visually similar lesion categories. For the ISIC dataset, the ROC curves remain close to the top-left region, indicating high sensitivity and specificity across all classes. The Derm7pt dataset exhibits comparatively lower ROC performance for the MEL and MISC classes because of heterogeneous dermoscopic structures and inter-class similarity. The ROC curves of the BCN20000 dataset indicate strong discriminative capability, with minor variations among the NV, BKL, and AK classes caused by similar lesion morphology. The PH2 dataset achieved near-ideal ROC characteristics, demonstrating highly reliable lesion discrimination and melanoma detection performance. The training and testing curves of PAD-UFES-20 are shown in Figure 15.
Although the proposed framework achieved an overall competitive performance on the PAD-UFES-20 dataset (88.0%), melanoma exhibited comparatively lower recognition than other lesion categories. This can be attributed to the inherent challenges associated with melanoma classification. Melanoma demonstrates high intra-class variability, with substantial differences in color, pigmentation, border irregularity, size, and texture, while early-stage melanomas often closely resemble benign lesions. Moreover, melanoma shares significant visual characteristics with seborrheic keratosis, basal cell carcinoma, and squamous cell carcinoma, resulting in increased inter-class confusion. Another contributing factor is the relatively limited number of melanoma samples in the PAD-UFES-20 dataset, which restricts the model’s ability to learn sufficiently representative melanoma-specific patterns. Nevertheless, despite these challenges, the proposed framework achieved higher overall accuracy than several existing state-of-the-art methods on the same dataset and demonstrated consistently strong performance across all five benchmark datasets. Future work will focus on improving melanoma sensitivity by leveraging diffusion-based synthetic data generation and adaptive class-balanced focal loss to mitigate dataset imbalance, thereby improving the framework’s robustness and clinical applicability.

4.6. Ablation Study

In Table 8, the ablation study validates the effectiveness of each module in the proposed framework. The full model, integrating preprocessing, deep features, lesion keypoints, textural descriptors, and shape-based features, achieves the highest accuracies of 88.0%, 94.5%, 83.6%, 93.2%, and 96.7% on PAD-UFES-20, ISIC, Derm7pt, BCN20000, and PH2, respectively. Removing preprocessing reduces robustness, while excluding MobileNetV2 and ViT-based DINO features causes the largest performance decline, highlighting the importance of deep semantic representations. Likewise, removing lesion keypoints, texture descriptors, and shape-based features consistently decreases accuracy, confirming the complementary role of structural, textural, and morphological information in skin lesion classification.

4.7. Comparative Analysis

The proposed model consistently outperforms state-of-the-art methods across multiple datasets, as shown in Table 9. On PAD-UFES-20, prior works have reported accuracies, such as Khurshid et al. (0.851), Tang et al. (0.830), and Uliana and Krohling (0.6457), while the proposed model achieves 88.0%. For ISIC, existing methods have included Moodi et al. (0.7142), Pacal et al. (0.9254), Ozdemir et al. (93.60%), and Yang et al. (92.791%). The proposed model attains 94.5%, outperforming them all. On Derm7pt, methods such as Xu et al. (0.813), Tang et al. (0.785), and Bi et al. (0.699) have shown lower performance, whereas the proposed model reaches 83.6%. For BCN20000, prior results have included Agarwal et al. (91.17%), Joshi et al. (92%), and Gunaratne et al. (91.9%), while the proposed model improves to 93.2%. On PH2, existing methods such as Nawaz et al. (95.6%) and Toprak et al. (94.44%) are surpassed by the proposed model, which achieves 96.7%.

4.8. Workflow Integration

The proposed framework is intended to function as a computer-aided decision support system rather than a replacement for dermatologist expertise. In a typical clinical workflow, dermoscopic or clinical skin lesion images would first undergo automated preprocessing, artifact removal, and lesion segmentation, followed by feature extraction and classification. The predicted lesion category, together with attention visualizations and interpretable handcrafted feature descriptors, can provide clinicians with complementary information to support diagnostic decision-making. Final diagnosis and treatment planning would remain under the supervision of dermatologists, who can integrate the model’s predictions with patient history, physical examination, and other clinical findings. Future work will focus on prospective clinical validation, integration with hospital information systems, and evaluation in real-world clinical settings before considering routine clinical deployment.

5. Limitations

While the proposed framework demonstrates strong performance across multiple benchmark datasets, several limitations should be acknowledged. First, patient-level splitting was not implemented in the current study due to the unavailability of consistent and reliable patient metadata in most public datasets (e.g., ISIC, Derm7pt, BCN20000, and PH2), where images often lack clear patient linkage. Consequently, data splitting was performed at the image level, which may introduce a minor risk of data leakage in cases where multiple images from the same patient exist. Furthermore, differences in imaging devices, illumination conditions, patient characteristics, and rare lesion categories may influence the generalizability of the proposed framework in real-world clinical settings. Although the hybrid deep learning architecture demonstrated promising performance, it still lacks robust interpretability mechanisms, making clinical decision explanation and physician trust more challenging. In addition, although Gray Wolf Optimization (GWO) effectively reduced the feature dimensionality from 5313 to 1856 while improving classification performance, it is inherently susceptible to limitations, such as potential premature convergence, which may affect the identification of the globally optimal feature subset.

6. Conclusions and Future Work

This study presented a comprehensive hybrid framework for automated skin cancer classification by integrating advanced preprocessing, lesion segmentation, deep learning, handcrafted feature extraction, optimization, and hybrid classification techniques into a unified pipeline. The proposed CutisNet segmentation architecture effectively preserved lesion boundaries and improved robustness under challenging imaging conditions, while the combination of MobileNetV2, self-supervised ViT-based DINO, and uniquely selected handcrafted descriptors enabled comprehensive representation of local textures, structural properties, and global contextual information. Furthermore, the incorporation of Gray Wolf Optimization and a hybrid GNN–CNN classifier significantly enhanced discriminative feature learning and multi-class classification performance. Experimental evaluations demonstrated strong performance across multiple benchmark datasets, achieving accuracies of 88.0% on PAD-UFES-20, 94.5% on International Skin Imaging Collaboration—ISIC, 83.6% on Derm7pt, 93.2% on BCN20000, and 96.7% on PH2, thereby confirming the robustness and generalization capability of the proposed framework. Comparative evaluations and ablation studies further validated the contribution of each module toward improved diagnostic accuracy. Future work will focus on improving model interpretability, reducing computational complexity, and incorporating attention-based multimodal learning strategies to enhance real-world clinical applicability and diagnostic reliability. In addition, future studies will prioritize the use of datasets with reliable patient-level annotations to enable patient-level data splitting and further validate the generalizability of the proposed framework in real-world clinical settings. Furthermore, hybrid metaheuristic optimization strategies, such as Gray Wolf Optimization (GWO) combined with Particle Swarm Optimization (PSO) or Genetic Algorithms (GAs), will be investigated to achieve a better exploration–exploitation balance, mitigate premature convergence, and further enhance feature selection performance.

Author Contributions

Conceptualization, M.A. (Munazza Aziz), S.N. and A.F.A.; methodology, M.A (Munazza Aziz). and S.N.; software, M.A. (Munazza Aziz) and A.F.A.; validation, M.A.(Munazza Aziz), A.F.A., A.J. and M.A. (Metab Altaf); formal analysis, M.A. (Munazza Aziz) and S.N.; investigation, M.A. (Munazza Aziz) and A.M.; resources, M.A. (Metab Altaf)., A.M. and A.J.; data curation, M.A. and A.F.A.; writing—original draft preparation, M.A. (Munazza Aziz); writing—review and editing, A.F.A., A.J., M.A. (Metab Altaf). and A.M.; visualization, M.A. (Munazza Aziz) and A.F.A.; supervision, A.J. and M.A.(Munazza Aziz); project administration, M.A. (Metab Altaf). and A.J.; funding acquisition, A.A., A.M., A.F.A. and M.A. (Metab Altaf). All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this study are available in the PAD-UFES-20 dataset is available at https://data.mendeley.com/datasets/zr7vgbcyr2/1c (accessed on 7 July 2026), the ISIC dataset is available at https://www.isic-archive.com/ (accessed on 7 July 2026), the Derm7pt dataset is available at https://derm.cs.sfu.ca/Download.html (accessed on 7 July 2026), the BCN20000 dataset is available through the https://challenge.isic-archive.com/data/#2019 (accessed on 7 July 2026), and the PH2 dataset is available at https://www.fc.up.pt/addi/ph2%20database.html (accessed on 7 July 2026).

Conflicts of Interest

The authors declare that they have no conflicts of interest to report regarding the present study.

References

  1. Schadendorf, D.; Van Akkooi, A.C.J.; Berking, C.; Griewank, K.G.; Gutzmer, R.; Hauschild, A.; Stang, A.; Roesch, A.; Ugurel, S. Melanoma. Lancet 2018, 392, 971–984. [Google Scholar] [CrossRef] [PubMed]
  2. Gershenwald, J.E.; Scolyer, R.A.; Hess, K.R.; Sondak, V.K.; Long, G.V.; Ross, M.I.; Lazar, A.J.; Faries, M.B.; Kirkwood, J.M.; McArthur, G.A.; et al. Melanoma staging: Evidence-based changes in the American Joint Committee on Cancer eighth edition cancer staging manual. CA Cancer J. Clin. 2017, 67, 472–492. [Google Scholar] [CrossRef] [PubMed]
  3. He, H.; Schönmann, C.; Schwarz, M.; Hindelang, B.; Berezhnoi, A.; Steimle-Grauer, S.A.; Darsow, U.; Aguirre, J.; Ntziachristos, V. Fast raster-scan optoacoustic mesoscopy enables assessment of human melanoma microvasculature in vivo. Nat. Commun. 2022, 13, 2803. [Google Scholar] [CrossRef] [PubMed]
  4. Celebi, M.E.; Kingravi, H.A.; Uddin, B.; Iyatomi, H.; Aslandogan, Y.A.; Stoecker, W.V.; Moss, R.H. A methodological approach to the classification of dermoscopy images. Comput. Med. Imaging Graph. 2007, 31, 362–373. [Google Scholar] [CrossRef] [PubMed]
  5. Esteva, A.; Kuprel, B.; Novoa, R.A.; Ko, J.; Swetter, S.M.; Blau, H.M.; Thrun, S. Dermatologist-level classification of skin cancer with deep neural networks. Nature 2017, 542, 115–118. [Google Scholar] [CrossRef] [PubMed]
  6. Codella, N.C.F.; Gutman, D.; Celebi, M.E.; Helba, B.; Marchetti, M.A.; Dusza, S.W.; Kalloo, A.; Liopyris, K.; Mishra, N.; Kittler, H.; et al. Skin lesion analysis toward melanoma detection: A challenge at the 2017 International Symposium on Biomedical Imaging (ISBI), hosted by the International Skin Imaging Collaboration (ISIC). In Proceedings of the IEEE 15th International Symposium on Biomedical Imaging (ISBI), Washington, DC, USA, 4–7 April 2018; pp. 168–172. [Google Scholar]
  7. Huang, G.; Liu, Z.; Van Der Maaten, L.; Weinberger, K.Q. Densely connected convolutional networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017; pp. 4700–4708. [Google Scholar]
  8. Al-Masni, M.A.; Al-Antari, M.A.; Choi, M.T.; Han, S.M.; Kim, T.S. Skin lesion segmentation in dermoscopy images via deep full resolution convolutional networks. Comput. Methods Programs Biomed. 2018, 162, 221–231. [Google Scholar] [CrossRef] [PubMed]
  9. Li, Y.; Shen, L. Skin lesion analysis towards melanoma detection using deep learning network. Sensors 2018, 18, 556. [Google Scholar] [CrossRef] [PubMed]
  10. Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; et al. An image is worth 16 × 16 words: Transformers for image recognition at scale. arXiv 2020, arXiv:2010.11929. [Google Scholar]
  11. Harangi, B. Skin lesion classification with ensembles of deep convolutional neural networks. J. Biomed. Inform. 2018, 86, 25–32. [Google Scholar] [CrossRef] [PubMed]
  12. Combalia, M.; Codella, N.C.F.; Rotemberg, V.; Helba, B.; Vilaplana, V.; Reiter, O.; Carrera, C.; Barreiro, A.; Halpern, A.C.; Puig, S.; et al. BCN20000: Dermoscopic lesions in the wild. arXiv 2019, arXiv:1908.02288. [Google Scholar]
  13. Samek, W.; Wiegand, T.; Müller, K.R. Explainable artificial intelligence: Understanding, visualizing and interpreting deep learning models. arXiv 2017, arXiv:1708.08296. [Google Scholar]
  14. Tschandl, P.; Rosendahl, C.; Kittler, H. The HAM10000 dataset, a large collection of multi-source dermatoscopic images of common pigmented skin lesions. Sci. Data 2018, 5, 180161. [Google Scholar] [CrossRef] [PubMed]
  15. Sandler, M.; Howard, A.; Zhu, M.; Zhmoginov, A.; Chen, L.C. MobileNetV2: Inverted residuals and linear bottlenecks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Salt Lake City, UT, USA, 18–23 June 2018; IEEE: New York NY, USA, 2018; pp. 4510–4520. [Google Scholar]
  16. Ouyang, Z.; Zhao, S.; Cheng, Z.; Duan, Y.; Chen, Z.; Zhang, N.; Liang, D.; Hu, Z. Dynamic PET imaging using dual texture features. Front. Comput. Neurosci. 2022, 15, 819840. [Google Scholar] [CrossRef] [PubMed]
  17. Pacheco, A.G.C.; Lima, G.R.; Salomão, A.S.; Krohling, B.; Biral, I.P.; De Angelo, G.G.; Alves, F.C.R., Jr.; Esgario, J.G.; Simora, A.C.; Castro, P.B.; et al. PAD-UFES-20: A skin lesion dataset composed of patient data and clinical images collected from smartphones. Data Brief. 2020, 32, 106221. [Google Scholar] [CrossRef] [PubMed]
  18. Kawahara, J.; Daneshvar, S.; Argenziano, G.; Hamarneh, G. Seven-point checklist and skin lesion classification using multitask multimodal neural nets. IEEE J. Biomed. Health Inform. 2019, 23, 538–546. [Google Scholar] [CrossRef]
  19. Mendonça, T.; Ferreira, P.M.; Marques, J.S.; Marçal, A.R.S.; Rozeira, J. PH2—A dermoscopic image database for research and benchmarking. In Proceedings of the 35th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Osaka, Japan, 3–7 July 2013; pp. 5437–5440. [Google Scholar]
  20. Khurshid, M.; Singh, R.; Vatsa, M. Multimodal dual-stage feature refinement for robust skin lesion classification. Sci. Rep. 2025, 15, 37775. [Google Scholar] [CrossRef] [PubMed]
  21. Pham, N.L.T.; Pham, D.D.; Le, T.D.; Huynh, K.T. A multimodal deep ensemble framework for skin lesion classification. In Proceedings of the International Symposium on Integrated Uncertainty in Knowledge Modelling and Decision Making; Springer: Singapore, 2025; pp. 100–111. [Google Scholar]
  22. Khurshid, M.; Vatsa, M.; Singh, R. Optimizing skin lesion classification via multimodal data and auxiliary task integration. In Proceedings of the IEEE International Symposium on Biomedical Imaging (ISBI), Athens, Greece, 27–30 May 2024; pp. 1–5. [Google Scholar]
  23. Tang, P.; Yan, X.; Nan, Y.; Hu, X.; Menze, B.H.; Krammer, S.; Lasser, T. Joint-individual fusion structure with fusion attention module for multi-modal skin cancer classification. Pattern Recognit. 2024, 154, 110604. [Google Scholar] [CrossRef]
  24. Uliana, J.J.M.; Krohling, R.A. Diffusion models applied to skin and oral cancer classification. arXiv 2025, arXiv:2504.00026. [Google Scholar]
  25. Moodi, V.; Taheri, A.; Mahboubian, A.; Chamanara, M.; Rajaeinejad, M. Advanced melanoma detection using the ConvMixer model on ISIC and PH2 dermatoscopic images. J. Transl. Regen. Med. 2025, 1, E1005. [Google Scholar] [CrossRef]
  26. Aboulmira, A.; Hrimech, H.; Lachgar, M.; Hanine, M.; Garcia, C.O.; Mezquita, G.M.; Ashraf, I. Hybrid model with wavelet decomposition and EfficientNet for accurate skin cancer classification. J. Cancer 2025, 16, 506. [Google Scholar] [CrossRef] [PubMed]
  27. Gamil, S.; Zeng, F.; Alrifaey, M.; Asim, M.; Ahmad, N. An efficient AdaBoost algorithm for enhancing skin cancer detection and classification. Algorithms 2024, 17, 353. [Google Scholar] [CrossRef]
  28. Özdemir, B.; Pacal, I. An innovative deep learning framework for skin cancer detection employing ConvNeXtV2 and focal self-attention mechanisms. Results Eng. 2025, 25, 103692. [Google Scholar]
  29. Yang, J.; Qin, H.; Wang, J.; Yee, L.; Prajapat, S.; Kumar, G.; Balusamy, B.; Bashir, A.K.; Omar, M. IoT-driven skin cancer detection: Active learning and hyperparameter optimization for enhanced accuracy. IEEE J. Biomed. Health Inf. 2025, 1–11. [Google Scholar] [CrossRef]
  30. Pacal, I.; Özdemir, B.; Zeynalov, J.; Gasimov, H.; Pacal, N. A novel CNN-ViT-based deep learning model for early skin cancer diagnosis. Biomed. Signal Process. Control 2025, 104, 107627. [Google Scholar] [CrossRef]
  31. Xu, J.; Gao, Y.; Liu, W.; Huang, K.; Zhao, S.; Lu, L.; Wang, X.; Hua, X.S.; Wang, Y.; Chen, X. RemixFormer: A transformer model for precision skin tumor differential diagnosis via multi-modal imaging and non-imaging data. In Medical Image Computing and Computer-Assisted Intervention (MICCAI); Springer: Cham, Switzerland, 2022; pp. 624–633. [Google Scholar]
  32. Bi, L.; Feng, D.D.; Fulham, M.; Kim, J. Multi-label classification of multi-modality skin lesion via hyper-connected convolutional neural network. Pattern Recognit. 2020, 107, 107502. [Google Scholar] [CrossRef]
  33. Tang, P.; Yan, X.; Nan, Y.; Xiang, S.; Krammer, S.; Lasser, T. FusionM4Net: A multi-stage multi-modal learning algorithm for multi-label skin lesion classification. Med. Image Anal. 2022, 76, 102307. [Google Scholar] [CrossRef] [PubMed]
  34. Agarwal, S.; Mahto, A.K. Skin cancer classification: Hybrid CNN-transformer models with KAN-based fusion. arXiv 2025, arXiv:2508.12484. [Google Scholar]
  35. Sharafudeen, M.; Chandra, V.S.S. An integrated ensemble network model for skin abnormality detection with combined textural features. J. Digit. Imaging 2023, 36, 1723–1738. [Google Scholar] [CrossRef] [PubMed]
  36. Joshi, P.; Ruangrit, C.; Konghuayrob, P. Mitigating racial bias in skin lesion classification with a novel deep learning-driven dataset. In Proceedings of the 17th Biomedical Engineering International Conference (BMEiCON), Chiang Mai, Thailand, 15–18 July 2025; pp. 1–5. [Google Scholar]
  37. Gunaratne, R.D.; Lakmal, H.K.I.S. Seeing beyond the surface: A transformer-based approach to early skin cancer detection. In Proceedings of the 9th SLAAI International Conference on Artificial Intelligence (SLAAI-ICAI), Colombo, Sri Lanka, 19–21 November 2025; pp. 1–6. [Google Scholar]
  38. Srivastava, R.; Ong, E.P.; Lee, J.W.E.; Tan, N.C.; Oh, D.A.Q.; Oh, C.C. Exploring the effect of race in automated skin cancer detection. In Proceedings of the 47th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Copenhagen, Denmark, 14–18 July 2025; pp. 1–4. [Google Scholar]
  39. Nawaz, M.; Mehmood, Z.; Nazir, T.; Naqvi, R.A.; Rehman, A.; Iqbal, M.; Saba, T. Skin cancer detection from dermoscopic images using deep learning and fuzzy k-means clustering. Microsc. Res. Tech. 2022, 85, 339–351. [Google Scholar] [PubMed]
  40. Toprak, A.N.; Aruk, I. A hybrid convolutional neural network model for the classification of multi-class skin cancer. Int. J. Imaging Syst. Technol. 2024, 34, e23180. [Google Scholar] [CrossRef]
Figure 1. Architecture of the proposed skin cancer classification model.
Figure 1. Architecture of the proposed skin cancer classification model.
Diagnostics 16 02351 g001
Figure 2. Preprocessing and hair artifact removal of ISIC (top row) and PAD-UFES-20 (bottom row): (a) original image; (b) resized and color-corrected image; (c) grayscale image (d) illumination-corrected and enhanced image; (e) smoothed image; (f) Frangi mask; (g) Gabor mask; and (h) hair-removed image.
Figure 2. Preprocessing and hair artifact removal of ISIC (top row) and PAD-UFES-20 (bottom row): (a) original image; (b) resized and color-corrected image; (c) grayscale image (d) illumination-corrected and enhanced image; (e) smoothed image; (f) Frangi mask; (g) Gabor mask; and (h) hair-removed image.
Diagnostics 16 02351 g002
Figure 3. Architecture of CutisNet segmentation model. Overview of the proposed CutisNet architecture for dermoscopic lesion segmentation, illustrating the data preprocessing pipeline, augmentation strategy, hierarchical feature encoding backbone, multi-scale context aggregation, and coarse-to-fine decoder for precise lesion mask generation.
Figure 3. Architecture of CutisNet segmentation model. Overview of the proposed CutisNet architecture for dermoscopic lesion segmentation, illustrating the data preprocessing pipeline, augmentation strategy, hierarchical feature encoding backbone, multi-scale context aggregation, and coarse-to-fine decoder for precise lesion mask generation.
Diagnostics 16 02351 g003
Figure 4. Results of CutisNet segmentation model. Segmentation results of (i) PAD-UFES-20 and (ii) ISIC (dermatofibroma) datasets: hair-removed images, overlay masks, and segmented images.
Figure 4. Results of CutisNet segmentation model. Segmentation results of (i) PAD-UFES-20 and (ii) ISIC (dermatofibroma) datasets: hair-removed images, overlay masks, and segmented images.
Diagnostics 16 02351 g004
Figure 5. Results of selected blocks and attention maps (using GRAD-CAM) of MobileNetV2 on ISIC dataset (vascular lesion): (a) original hair-removed image; (b) layer-by-layer results of MobileNet; (c) raw attention map; and (d) overlay attention map.
Figure 5. Results of selected blocks and attention maps (using GRAD-CAM) of MobileNetV2 on ISIC dataset (vascular lesion): (a) original hair-removed image; (b) layer-by-layer results of MobileNet; (c) raw attention map; and (d) overlay attention map.
Diagnostics 16 02351 g005
Figure 6. ViT-based DINO results: (i) PAD-UFES-20—(a) hair-removed image, (b) DINO patch, and (c) attention map; (ii) ISIC (MEL)—(d) hair-removed image, (e) DINO patch, and (f) attention map.
Figure 6. ViT-based DINO results: (i) PAD-UFES-20—(a) hair-removed image, (b) DINO patch, and (c) attention map; (ii) ISIC (MEL)—(d) hair-removed image, (e) DINO patch, and (f) attention map.
Diagnostics 16 02351 g006
Figure 7. Superpixel-based centroid and contour keypoints: (a) segmented lesion images; (b) superpixel-based divisions; and (c) centroids (red) and contour points (green) of PAD-UFES-20 (top row) and ISIC (MEL) (bottom row).
Figure 7. Superpixel-based centroid and contour keypoints: (a) segmented lesion images; (b) superpixel-based divisions; and (c) centroids (red) and contour points (green) of PAD-UFES-20 (top row) and ISIC (MEL) (bottom row).
Diagnostics 16 02351 g007
Figure 8. SIFT results on segmented lesions: (a) ISIC; (b) PAD-UFES-20.
Figure 8. SIFT results on segmented lesions: (a) ISIC; (b) PAD-UFES-20.
Diagnostics 16 02351 g008
Figure 9. GLRLM outputs: (a) segmented lesions; (b) SRE; (c) LRE; (d) GLN; (e) RLN; and (f) RP of ISIC (VASC) (top row) and PAD-UFES-20 (bottom row).
Figure 9. GLRLM outputs: (a) segmented lesions; (b) SRE; (c) LRE; (d) GLN; (e) RLN; and (f) RP of ISIC (VASC) (top row) and PAD-UFES-20 (bottom row).
Diagnostics 16 02351 g009
Figure 10. Gabor-based texture response on ISIC dataset: (a) VASC, (b) MEL, and (c) NV.
Figure 10. Gabor-based texture response on ISIC dataset: (a) VASC, (b) MEL, and (c) NV.
Diagnostics 16 02351 g010
Figure 11. Tamura texture outputs: (a) lesion images; (b) Tamura contrast map; (c) directionality map; and (d) directionality histogram on ISIC (top row) and PAD-UFES-20 (bottom row) datasets.
Figure 11. Tamura texture outputs: (a) lesion images; (b) Tamura contrast map; (c) directionality map; and (d) directionality histogram on ISIC (top row) and PAD-UFES-20 (bottom row) datasets.
Diagnostics 16 02351 g011
Figure 12. Geometric and shape-based features: (a) segmented lesion images; (b) ellipse-fitting results; (c) vertical symmetry; (d) horizontal symmetry; and (e) Hu moments on PAD-UFES-20 (left) and ISIC (NV) (right) datasets.
Figure 12. Geometric and shape-based features: (a) segmented lesion images; (b) ellipse-fitting results; (c) vertical symmetry; (d) horizontal symmetry; and (e) Hu moments on PAD-UFES-20 (left) and ISIC (NV) (right) datasets.
Diagnostics 16 02351 g012
Figure 13. Confusion matrices: (a) PAD-UFES-20; (b) ISIC; (c) Derm7pt; (d) BCN20000; and (e) PH2.
Figure 13. Confusion matrices: (a) PAD-UFES-20; (b) ISIC; (c) Derm7pt; (d) BCN20000; and (e) PH2.
Diagnostics 16 02351 g013
Figure 14. ROC curves of (a) PAD-UFES-20; (b) ISIC; (c) Derm7pt; (d) BCN20000; and (e) PH2.
Figure 14. ROC curves of (a) PAD-UFES-20; (b) ISIC; (c) Derm7pt; (d) BCN20000; and (e) PH2.
Diagnostics 16 02351 g014
Figure 15. Training and testing curves of model on PAD-UFES-20.
Figure 15. Training and testing curves of model on PAD-UFES-20.
Diagnostics 16 02351 g015
Table 1. Architecture of proposed CutisNet.
Table 1. Architecture of proposed CutisNet.
StageBlock IDModule NameLayer CompositionInput SizeOutput SizePurpose
InputIInput ProjectionRGB Image3 × 256 × 2563 × 256 × 256Raw dermoscopic input
EncoderE1Shallow Feature ExtractionConv 3 × 3 → BN → SiLU3 × 256 × 25648 × 128 × 128Initial texture and color feature capture
EncoderE1Down-SamplingStrided Conv (stride = 2)48 × 128 × 12848 × 128 × 128Spatial reduction
EncoderE2Mobile Inverted BottleneckExpansion Conv → Depthwise Conv → SE → Projection Conv48 × 128 × 12832 × 128 × 128Efficient local feature encoding
EncoderE3Hierarchical EncodingMBConv Blocks ×3 (stride 2 in first block)32 × 128 × 12856 × 64 × 64Multi-scale spatial abstraction
EncoderE4Mid-Level RepresentationMBConv Blocks ×4 (stride 2 in first block)56 × 64 × 64160 × 32 × 32Structural pattern learning
EncoderE5High-Level Semantic EncodingMBConv Blocks ×6 (stride 2 in first block)160 × 32 × 32448 × 16 × 16Deep semantic representation
ContextBMulti-Scale Context EncoderParallel 1 × 1 Conv + 3 × 3 Dilated Conv (rates: 6, 12, 18) → Concatenation → 1 × 1 Conv448 × 16 × 16256 × 16 × 16Multi-scale receptive field expansion
Low-LevelLFeature Refinement Path1 × 1 Conv → BN → ReLU48 × 128 × 12848 × 128 × 128Preserves fine spatial details
DecoderD1Up-SamplingBilinear Up-Sampling (×4)256 × 16 × 16256 × 64 × 64Restores coarse spatial resolution
DecoderD1Feature FusionConcatenation (with L) → Conv 3 × 3 → BN → ReLU(256 + 48) × 64 × 64256 × 64 × 64Combines semantic + spatial cues
DecoderD2RefinementConv 3 × 3 → BN → ReLU256 × 64 × 64128 × 64 × 64Feature smoothing and boundary refinement
OutputOChannel Reduction1 × 1 Conv128 × 64 × 641 × 64 × 64Pixel-wise logits
OutputOUp-SamplingBilinear Interpolation (×4)1 × 64 × 641 × 256 × 256Restores original resolution
OutputOActivationSigmoid1 × 256 × 2561 × 256 × 256Binary lesion probability map
Table 2. Quantitative comparison of the proposed CutisNet with established skin lesion segmentation architectures (U-Net, U-Net++, and DeepLabV3+) in terms of Dice Score, IoU (Jaccard Index), model complexity (parameters), and inference time.
Table 2. Quantitative comparison of the proposed CutisNet with established skin lesion segmentation architectures (U-Net, U-Net++, and DeepLabV3+) in terms of Dice Score, IoU (Jaccard Index), model complexity (parameters), and inference time.
ModelDice ScoreIoU (Jaccard)Parameters (M)Inference Time (ms)
U-Net0.892 ± 0.0110.815 ± 0.01431.018.4
U-Net++0.905 ± 0.0090.832 ± 0.01245.126.7
DeepLabV3+ (ResNet50)0.911 ± 0.0080.841 ± 0.01054.731.2
CutisNet (proposed)0.927 ± 0.0070.862 ± 0.00945.828.6
Table 3. Summary of the dimensionality of the extracted deep and handcrafted features, the total fused feature vector before feature optimization, and the final optimized feature vector obtained using Gray Wolf Optimization (GWO).
Table 3. Summary of the dimensionality of the extracted deep and handcrafted features, the total fused feature vector before feature optimization, and the final optimized feature vector obtained using Gray Wolf Optimization (GWO).
FeaturesFeature Vector Dimension
MobileNet1280
DINO (ViT-S/8)384
Tamura6
Gabor24
GLRLM5
Symmetry2
Ellipse Fitting5
Hu Moments7
Superpixel + Contour + Center1280 (640 keypoints ×2D)
SIFT1280 (e.g., 10 keypoints ×128)
Total Before Fusion~5313
After GWO Feature Fusion1856
Table 4. Comparison of final accuracies using different optimizers simultaneously.
Table 4. Comparison of final accuracies using different optimizers simultaneously.
OptimizersGWOGAPSOACO DESSA
Accuracies %88.0083.9084.7077.7078.7086.10
Table 5. Summary of the implementation details, training hyperparameters, Gray Wolf Optimization configuration, and experimental environment used in the proposed framework.
Table 5. Summary of the implementation details, training hyperparameters, Gray Wolf Optimization configuration, and experimental environment used in the proposed framework.
CategoryDetails
Deep FeaturesMobileNetV2: 1280 dims, DINO (ViT-S/8): 384 dims
Handcrafted FeaturesTamura: 6, Gabor: 24, GLRLM: 5, symmetry: 2, ellipse fitting: 5, Hu moments: 7, superpixel + contour + center: 1280 (640 keypoints × 2D), SIFT: 1280
Total Fused Dimension5313
After GWO1856
OptimizerAdam
Initial Learning Rate0.001
Learning Rate SchedulerReduceLROnPlateau (factor = 0.1, patience = 3)
Batch Size32 (classification), 16 (segmentation)
Max Epochs100 with early stopping (patience = 10)
Cross-Validation5-fold stratified (80/20 train–validation split per fold)
Gray Wolf OptimizationPopulation size = 30, max iterations = 50, control parameter linearly decreased from 2 to 0
HardwareGoogle Colab Pro (NVIDIA Tesla T4 GPU, 16 GB VRAM)
Software EnvironmentPython 3.10, PyTorch 2.0.1, CUDA 11.8
Table 6. Computational cost analysis of the proposed framework, reporting the execution time and computational complexity (FLOPs) of each major processing and feature extraction module.
Table 6. Computational cost analysis of the proposed framework, reporting the execution time and computational complexity (FLOPs) of each major processing and feature extraction module.
ModuleTotal Time (per Image) MFLOPS Taken
Preprocessing0.032194 92.03
Hair Removal0.1951648616.04
CutisNet Segmentation0.1412184.92
MobileNetV20.396477300
ViT-Dino0.98321,000
Superpixel Centroid + Contour 0.565464288.44
SIFT0.1217398.83
Tamura Descriptors0.02907212.8451
Gabor Texture0.811491 s311.9514
GLRLM0.7411344.09
Symmetry Analysis0.023911 s6.82
Ellipse Fitting0.0051712.0002
Hu Moments0.0002417.8643
Table 7. Classification metrics of the proposed model on various datasets.
Table 7. Classification metrics of the proposed model on various datasets.
DatasetAccuracyPrecisionRecall F1-ScoreSensitivitySpecificity Balance Accuracy
PAD-UFES-200.880 ± 0.016 (0.864–0.896)0.845 ± 0.021 (0.824–0.866)0.840 ± 0.019 (0.821–0.859)0.841 ± 0.020 (0.821–0.861)0.840 ± 0.019 (0.821–0.859)0.968 ± 0.008 (0.960–0.976)0.900 ± 0.014 (0.886–0.914)
ISIC0.945 ± 0.011 (0.934–0.956)0.907 ± 0.014 (0.893–0.921)0.910 ± 0.012 (0.898–0.922)0.911 ± 0.013 (0.898–0.924)0.911 ± 0.012 (0.899–0.923)0.987 ± 0.006 (0.981–0.993)0.949 ± 0.009 (0.940–0.958)
Derm7pt0.836 ± 0.019 (0.817–0.855)0.792 ± 0.025 (0.767–0.817)0.790 ± 0.023 (0.767–0.813)0.792 ± 0.024 (0.768–0.816)0.792 ± 0.023 (0.769–0.815)0.948 ± 0.010 (0.938–0.958)0.870 ± 0.017 (0.853–0.887)
BCN200000.932 ± 0.013 (0.919–0.945)0.877 ± 0.017 (0.860–0.894)0.885 ± 0.015 (0.870–0.900)0.880 ± 0.016 (0.864–0.896)0.885 ± 0.015 (0.870–0.900)0.984 ± 0.007 (0.977–0.991)0.935 ± 0.011 (0.924–0.946)
PH20.967 ± 0.009 (0.958–0.976)0.943 ± 0.011 (0.932–0.954)0.950 ± 0.010 (0.940–0.960)0.947 ± 0.010 (0.937–0.957)0.947 ± 0.010 (0.937–0.957)0.973 ± 0.007 (0.966–0.980)0.962 ± 0.008 (0.954–0.970)
Table 8. Ablation analysis of each module on various datasets.
Table 8. Ablation analysis of each module on various datasets.
ModuleDescriptionAccuracies (%)
PAD-UFES-20ISICDerm7ptBCN20000PH2
Full ModelModel trained using all feature extraction techniques, including preprocessing, deep features extraction, lesion keypoints, textural descriptors, shape features88.094.583.693.296.7
Without
Preprocessing
Model trained without image preprocessing (resizing, color & illumination correction, contrast enhancement, smoothing)82.0086.9076.9088.1089.20
Without
Hair Removal
Model trained without Frangi and Gabor hair removal and Telea inpainting84.2089.5080.1091.2092.30
Without Deep FeaturesMobileNet V2Model trained without deep features from MobileNetV272.5079.266.775.5080.10
ViT-Based DINOModel trained without ViT-based DINO deep features69.7073.969.271.4077.20
MobileNet+ DinoModel trained without deep features from MobileNetV2 and ViT-based DINO61.9067.5066.0061.8071.40
Without Lesion KeypointsSIFT + Superpixel Contour and CentroidModel trained without SIFT keypoints and superpixel contour and centroid points79.2084.2077.3080.7087.50
SIFTModel trained without SIFT keypoints 85.3090.3081.985.9093.10
Superpixel Contour and CentroidModel trained without superpixel contour and centroid points82.9087.3079.185.7090.4
Without Textural FeaturesGabor response + Tamura + GLRLM Model trained without Gabor response, Tamura descriptors, and GLRLM textures81.4087.3075.9081.588.9
Gabor ResponseModel trained without texture features from Gabor response85.3092.1080.9085.7090.50
Tamura DescriptorsModel trained without texture features from Tamura descriptors83.5090.5078.8088.4092.70
GLRLMModel trained without GLRLM textures85.6092.3078.5089.4092.60
Without Shape-Based FeaturesSymmetry Analysis + Ellipse Fitting + Hu MomentsModel trained without symmetry analysis, ellipse fitting, and Hu moments78.8082.1072.483.591.20
Symmetry Analysis and Ellipse FittingModel trained without symmetry analysis and ellipse fitting 81.2087.7077.4088.1093.80
Hu MomentsModel trained without Hu moments86.4090.2080.2091.4094.80
Gray Wolf OptimizerModel trained without GWO71.9078.4068.9078.6083.70
Table 9. Comparative performance analysis across benchmark datasets.
Table 9. Comparative performance analysis across benchmark datasets.
DatasetAuthorAccuracy
PAD-UFES-20Khurshid et al. [20]0.851
Pham et al. [21]0.8435
Khurshid et al. [22]0.726
Tang et al. [23]0.830
Uliana and Krohling [24]0.6457
Proposed model 88.0
ISICMoodi et al. [25]0.7142
Aboulmira et al. [26]92.2%
Gamil et al. [27]91.00%
Ozdemir et al. [28]93.60%
Yang et al. [29]92.791%
Pacal et al. [30]0.9254
Proposed Model94.5
Derm7ptXu et al. [31]0.813
Bi et al. [32]0.699
Dosovitskiy et al. [10]0.777
Tang et al. [33]0.785
Proposed Model83.6
BCN20000Agarwal et al. [34]91.17%
Sharafudeen et al. [35]87.33%
Joshi et al. [36]92%
Gunaratne et al. [37]91.9
Proposed Model93.2
PH2Moodi et al. [25]0.905
Srivastava et al. [38]0.91
Nawaz et al. [39]95.6%
Toprak et al. [40]94.44%
Proposed Model96.7
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Almjally, A.; Aziz, M.; Najam, S.; Menshawi, A.; Altaf, M.; Aljulayfi, A.F.; Jalal, A. Hybrid Vision Transformer–CNN Architecture with Optimized Feature Selection for Skin Cancer Classification. Diagnostics 2026, 16, 2351. https://doi.org/10.3390/diagnostics16152351

AMA Style

Almjally A, Aziz M, Najam S, Menshawi A, Altaf M, Aljulayfi AF, Jalal A. Hybrid Vision Transformer–CNN Architecture with Optimized Feature Selection for Skin Cancer Classification. Diagnostics. 2026; 16(15):2351. https://doi.org/10.3390/diagnostics16152351

Chicago/Turabian Style

Almjally, Abrar, Munazza Aziz, Shaheryar Najam, Alaa Menshawi, Meteb Altaf, Abdullah Fawaz Aljulayfi, and Ahmad Jalal. 2026. "Hybrid Vision Transformer–CNN Architecture with Optimized Feature Selection for Skin Cancer Classification" Diagnostics 16, no. 15: 2351. https://doi.org/10.3390/diagnostics16152351

APA Style

Almjally, A., Aziz, M., Najam, S., Menshawi, A., Altaf, M., Aljulayfi, A. F., & Jalal, A. (2026). Hybrid Vision Transformer–CNN Architecture with Optimized Feature Selection for Skin Cancer Classification. Diagnostics, 16(15), 2351. https://doi.org/10.3390/diagnostics16152351

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop