Skin Lesion Analysis for Melanoma Detection Using the Novel Deep Learning Model Fuzzy GC-SCNN

Melanoma is easily detectable by visual examination since it occurs on the skin’s surface. In melanomas, which are the most severe types of skin cancer, the cells that make melanin are affected. However, the lack of expert opinion increases the processing time and cost of computer-aided skin cancer detection. As such, we aimed to incorporate deep learning algorithms to conduct automatic melanoma detection from dermoscopic images. The fuzzy-based GrabCut-stacked convolutional neural networks (GC-SCNN) model was applied for image training. The image features extraction and lesion classification were performed on different publicly available datasets. The fuzzy GC-SCNN coupled with the support vector machines (SVM) produced 99.75% classification accuracy and 100% sensitivity and specificity, respectively. Additionally, model performance was compared with existing techniques and outcomes suggesting the proposed model could detect and classify the lesion segments with higher accuracy and lower processing time than other techniques.


Introduction
The skin's vital role is to regulate body temperature as well as to protect against infections and injuries. Melanoma is a malignant growth of skin cells that typically develops on body parts that receive little or no sun exposure [1]. The number of skin cancer cases across the globe is reported to be around 5.4 million every year [2]. Several studies report an increase in the number of skin cancer cases in the United States from 95,360 in 2017 to 207,390 in 2021 [3,4].
Early detection and prevention of skin cancer reduce mortality rates [5]. The diagnosis of skin cancer is dependent on dermatoscopic training and experience. The patient's clinical information is needed to screen the skin lesion due to the need to visualize morphological features not visible to the naked eye because of similar pixels and textures [6][7][8].
Dermatologists diagnose skin cancer based on conventional approaches such as color, diameter, and asymmetry. In comparison to conventional models, imaging technology allows more accurate and manual inspection of images while reducing time consumption and costs [9,10].
Each skin lesion has its shape, size, and border. Due to their intrinsic naivety, locality, and lack of adaptability, low-level hand-crafted features used by traditional methods and machine learning (ML) methods have limited discriminative properties. The existing literature highlighted the automatic detection of skin lesions by different ML models including gradient boosting [11], support vector machine (SVM) [12], and Quadtree [13]. SVM is used to classify the features extracted from the grey level co-occurrence matrix [14]. In [15], K-Nearest Neighbor (KNN) with a Gaussian filter is used to extract the region of interest (ROI) which is classified using SVM [15]. In the framework of medical image analysis, deep learning (DL) automates systems to detect, classify, and diagnose several diseases. These DL models are very effective for large sample datasets and, especially, they have become more viable for skin image analysis [16]. Some studies have compared the performance of DL models in the detection of skin lesions in several categories [17]. It is highlighted from the reports of [18,19] that the convolution neural network (CNN) is better performed than dermatologists in the segmentation of skin lesions [19][20][21]. These studies involved feature extraction techniques from segmented images that enabled quick diagnosis.
Other models such as deep neural networks (DNN), CNN, long short-term memory (LSTM), and recurrent neural networks (RNN) also help to detect malignant skin cells [22,23]. It is highlighted that CNN helps to detect dangerous skin cells from dermoscopy images which were found to be difficult to screen for nonmelanocytic and non-pigmented lesions [22]. In [23], a stacked CNN model with improved loss function was proposed to detect skin lesions from given datasets, and 94.8-98.4% classification accuracy was reported. The main drawbacks of previous approaches are that visual characteristics of skin lesion images contain inhomogeneous features and fuzzy boundaries, and the processing time.
Therefore, in this paper, we proposed an approach called fuzzy-based GrabCut-stacked convolutional neural networks (GC-SCNN) model with enhanced loss function in support vector machines (SVM). Additionally, we test the accuracy of the generated model and compare the outcomes of the enhanced Fuzzy GC-SCNN with existing techniques in lesion classification. Furthermore, this study aimed to understand the model's effectiveness in the detection and classification of the lesion segments with better accuracy and lower processing time than other models.

Dataset
Various datasets of skin images were used including PH2 (http://www.fc.up.pt/ addi/, accessed on 18 March 2022), and International Skin Imaging Collaboration (ISIC) 2018-2019 archives (http://isic-archive.com, accessed on 18 March 2022) for skin melanoma detection. There are 10,015 training images and 1512 test images in ISIC 2018, including lesion categories of melanoma, melanocytic nevus, basal cell carcinoma, actinic keratosis, benign keratosis, dermatofibroma, and vascular regions. The ISIC 2019 dataset contains 25,531 training images and 8238 test images divided into nine categories, including melanoma, melanocytic nevus, basal cell carcinoma, actinic keratosis, and benign keratosis, dermatofibroma, vascular regions, and an unknown class. PH2 datasets aimed at melanoma diagnosis and ISIC datasets are biased towards melanocytic lesions. They both focus on melanocytic lesions and disregarded the non-melanocytic lesions. The images available in the datasets are clinical images of skin images but not the dermoscopic images, so there is a mismatch between the available training images and the real-life data, which deviates the automated diagnostic system's performance and builds a classifier for multiple skin diseases that is more challenging.

Data Preprocessing
The original dermoscopy image sizes varied from 540 × 576 to 2016 × 3024. We applied the image resizing and maintained the uniform image size of 256 × 256. The morphological filtering and marker concepts were adopted to highlight the melanoma region and skin hair removal. These morphological filters are used for image sharpening. Erosion and dilation are the two basic morphological operators, where dilation selects the brightest value near the structuring element. The membership functions of dermoscopic images with different channels can be observed in Figure 1. The preprocessing of the dermoscopy images (Refer to Figure 2) for enhancement and detection of the lesion boundaries was conducted as mentioned below. and µM (p, q) is the intensity level degree of the image ranging from zero to one.  Assign the fuzzy plane pixels to the logarithmic function to map to the fuzzy domain f (M (p, q)) = log ((1 +

Image Segmentation
In this work, the segmentation phase has done by the GrabCut (GC) segmentation that is used to segment the fuzzy preprocessed image. Figure 3 shows the results of segmenting the data and identifying the necessary areas.

O
The pixels of the skin lesion domain are taken to a fuzzy domain. Let M be an image of p × q, and M (p,q) represent the intensity of the skin lesion image pixels that must be mapped to the fuzzy characteristic plane. It can be expressed as follows M(i,j) , p = 1, . . . , m and q = 1, . . . , n; where M(i,j) represent the pixels and µM (p, q) is the intensity level degree of the image ranging from zero to one. To enhance the portions of the skin lesion images, transform the image using the trigonometric series with fuzzy principles as mentioned f (T (p, q)) = T (p, q) The defuzzification can be expressed as Later, enhance the image quality by skin lesion image channel-wise.

Image Segmentation
In this work, the segmentation phase has done by the GrabCut (GC) segmentation that is used to segment the fuzzy preprocessed image. Figure 3 shows the results of segmenting the data and identifying the necessary areas.

Image Segmentation
In this work, the segmentation phase has done by the GrabCut (GC) segmentation that is used to segment the fuzzy preprocessed image. Figure 3 shows the results of segmenting the data and identifying the necessary areas. The function for the segmentation can be expressed as , , , = , , , + R , ; where P represents the probability distribution Z of the gaussian mixture model and R represents the regularizing of the segregated regions concerning the color and the neighborhood pixels and R assumes the neighborhood E over the pixels Let the color image be represented with x and the array of pixels represented as the y = (y 1 , y 2 , . . . , y n ) where each zi = (R i , G i , B i ), i ∈ [1, . . . , n]. During the segmentation, the label of the pixels is represented as the β = (β 1 , β 2 , . . . , β n ) where β i ∈ {0,1}. The trimap with a semiautomated direction can be applied to three regions called the background, foreground, and the uncertain pixels and they can be represented as Z B , Z F , and Z U . The covariance of the gaussian mixture model of n elements is determined using the background pixels and the foreground pixels.
where Π, µ, Σ are the weight, mean and covariance matrices and k = {k 1 , k 2 , . . . , k n } where k i ∈ {1, . . . , n} for the elements of the gaussian mixture model of the pixels y i .
The function for the segmentation can be expressed as F(β, k, α, y) = P(β, k, α, y) + R (β, y); where P represents the probability distribution Z of the gaussian mixture model and R represents the regularizing of the segregated regions concerning the color and the neighborhood pixels and R assumes the neighborhood E over the pixels

Feature Extraction
After performing the segmentation, we applied the stacked CNN technique to extract the corresponding features in the segmented image. The proposed hybrid approach learns nonlinear discriminative features from the dermoscopy images at different levels. Algorithm 1 discusses the GC-SCNN Algorithm. CNN automatically learns the valuable features, and we integrated three modules, Inception-V3 [25], Xception [26], and VGG- 19 [27]. In the first module, pre-trained Inception-V3, Xception, and VGG-19 models are tuned for dermoscopy images to extract features from the segmented image. The second model of the stacked CNN obtained six sub-models during the training of the CNN models. We stacked together all the sub-models and then applied the SVM classification to build a model to classify the lesions. The Algorithm 1 for GC-SCNN is written as Input: Segmented Images Output: Skin cancer Classification results for k = 1 to length (segmented images) do for j = 1 to 3 do sub-model j. predicts (segmented image) end for final = concatenation (P 1 , P 2 , P 3 ) end for assess the SoftMax classifier on the feature vector final stacked CNN = Train (final, label) classification of skin cancer images prediction = classification (stacked CNN, testset) return prediction

Lesion Classification
The SVM classifier takes the extracted features and classifies the lesion. First, the SVM calculates the feature score by using the linear mapping on feature vectors and uses this feature score to calculate the loss. The loss should be minimal to get better accuracy; we use an improved loss function [28] to calculate the weighted score for each pixel in the segmented lesion image. The Algorithm 2 for the enhanced SVM is described as Algorithm 2: Enhanced SVM algorithm.
Initialize the values in the training set Repeat for every i = 1 to N calculate the loss function for all values compare the extracted patches in the images end for Repeat for every score vector i-1 to N Compute SVM with imputed labels argmax((w × xi) + b), i end for Evaluate for different weights and compute output.
Enhanced SVM reduces the number of neurons, leading to overfitting minimization, increasing accuracy, and reducing processing time. The enhanced loss function reduces the load of the segmented dermoscopy images fed to the enhanced SVM classifier, which reduces the processing time. The improved loss function in the existing SVM algorithm improves the performance in classifying the lesion segments depending on the intensity and the score vectors.

Experimental Framework
The proposed methodology discusses the classification of skin lesions. First, we fed the input data for preprocessing using fuzzy logic to enhance the image and identify the lesion boundaries. We then applied the morphological operators to remove the hair on the skin. Then the images were sent for segmentation using the GrabCut technique. Later, the features were selected using the stacked CNN. Finally, to classify the lesions, we used the improved SVM classifier. The proposed experimental framework is illustrated in Figure 4.
The proposed methodology discusses the classification of skin lesions. First, we fed the input data for preprocessing using fuzzy logic to enhance the image and identify the lesion boundaries. We then applied the morphological operators to remove the hair on the skin. Then the images were sent for segmentation using the GrabCut technique. Later, the features were selected using the stacked CNN. Finally, to classify the lesions, we used the improved SVM classifier. The proposed experimental framework is illustrated in Figure 4.

Performance Metrics
The performance metrics can help measure the model presented in terms of the different parameters mentioned below. For instance,  Accuracy measures the portion of the true results among the total number of the cases and is written as accuracy =

Results
The performance of the stacked CNN frameworks is assessed in this section and compared to the performance of the existing models, and the dataset is decomposed into an 80:20 ratio. For simulation, the enhanced fuzzy-SCNN was implemented in Python with IDE Anaconda on the Intel Core i5 3.4 GHz processor.
Deep learning models require a robust set of hyperparameters. Hyperparameter tuning enhances deep learning performance. Various optimization techniques exist for hyperparameters and the manual search technique is one of them. A variety of hyperparameter combinations have been tested and the best model has been selected. Various hyperparameters were set for optimizers, learning rate, weight decay value, and dense layers. Hyperparameters in the network include the learning rate, optimizer, dense layers, Different hyperparameters were varied for each optimizer and accuracy was compared. With both Adam and RMS prop tuned with various hyperparameters, the Adam optimizer had the best performance, followed by AdaGrad and Adadelta. We used two values of the learning rates, 0.01, 0.001, weight decay constants of 0.01 and 0.001, and dense layers of 4 and 5, which required a batch size of 64. With all of these settings, the performance was highest with the least amount of computing resources. With batch size 32, optimizer ADAM, dense layers 4 with learning rate and weight decay constants of 0.0001 and 0.0001, we achieved low loss. These hyperparameters were used to classify skin lesions. The model training included seven categorical skin lesions and the model performance was assessed with the confusion matrix outcome shown in Figure 5. AKIEC, BCC, and BKL lesion classes were predicted with 99.21%, 99.34%, and 100% accuracy, respectively. In contrast, DF, MEL, NV, and VASC had 98.437%, 99.83%, 99.78%, and 100% prediction accuracy. The overall model accuracy was reported as 99.75%. Other metrics such as sensitivity (true positive rate) and specificity (true negative rate) were achieved at 100% which is higher than other previous studies. Table 2 presents the comparison of different existing models with the GC-SCNN over the test dataset. In Tables 3 and 4, we compare the proposed model to the state-of-the-art approaches to the ISIC2018 and ISIC2019 datasets. Based on the accuracy figures of 99.78% (for ISIC 2018) and 99.81% (for ISIC 2019), as a result, the proposed model outperforms by 1% and 2.5%.

Discussion
An automatic skin lesion detection method based on fuzzy GC-SCNN is presented in this paper. For boundary detection and segmentation, we used fuzzy logic, stacked CNNs for feature extraction, and enhanced SVMs for lesion segmentation. At different stages of lesion classification, the enhanced fuzzy GC-SCNN with SVM was compared with existing techniques. It was proven that the proposed model was more accurate and faster at classifying the lesion segments than other models, and produces very few false positives and false negatives.
A skin lesion's detection and classification performance are typically affected by discriminant feature selection [48]. Existing literature on this topic does not elaborate on image processing steps and does not address the uncertainty of detecting lesion boundaries. For example, in [49], the authors proposed the use of orthogonal matching with a fixed wavelet grid network to enhance, segment, and classify demographic images and obtained an accuracy of 91.82%. By combining SVM, SMOTE, and ensemble classifiers in combination with extracting color texture features from dermoscopy images, 93.83% accuracy was achieved [50]. It was also possible to extract color, texture, and SVM features by using the Gray Level Co-Occurring Matrix (GLCM) technique [51].
Some studies have achieved improved accuracy in skin malignant cell prediction through threshold-based segmentation, ABCD feature extraction, and multiscale lesionbiased techniques [52][53][54]. A CNN model comprised of multiple tracks was developed to resolve the issue of skin lesion classification. The model achieved 85.8% and 79.15% accuracy over five and ten classes respectively [55,56]. In contrast, ensemble-based deep learning demonstrated improved performance in skin lesion classification and reported approximately 90% accuracy [57,58]. Despite this, all of the above-mentioned studies applied a single model, which can affect the accuracy of the model. By stacking different models, we could improve the accuracy.
Based on the Delaunay triangulation, a study with two parallel processes was able to detect skin lesions [59]. The backpropagation multilayer neural network was used to detect and classify melanoma using 3D color texture features from dermoscopy images [60]. On ImageNet datasets, the transfer learning approaches with the CNN model produced 88.33% of accuracy thanks to pre-trained models like Resnet-101, BASNet large, and Google Net [61]. All of these approaches have the disadvantage that in medical diagnosis they require prolonged real-time analysis. Our method of detecting lesion boundaries via fuzzy image processing overcame these limitations.
Additionally, our study is in line with [62] as the authors applied transfer learning to train the model with the HAM1000 dataset. They implemented Resnet50 models with no data preprocessing and manual feature selection which resulted in a significant decrease in the model accuracy and high processing time. The enhanced fuzzy-SCNN with SVM improved the classification accuracy by reducing the loss and achieved 99.75% accuracy.
By minimizing the overfitting of training datasets in the SVM classifier, we improved the classification performance by using the same data set for the newly developed and existing models. A modified loss function improved lesion classification by reducing processing time by 25-35 milli seconds and increasing accuracy by 2-5%.
Identifying and classifying seven significant lesions in dermoscopy images was possible with the proposed solution. Although our solution produced the best possible accuracy, we have focused on only a limited set of lesions while neglecting minute lesions. Future work will involve improving the feature extraction techniques with latent factor analysis to detect negligible minute lesions [63,64]. Incorporating more lesion types with lower noise by neural network architecture can enhance the model's significance.

Conclusions
Human beings are protected by their skin against environmental pollution, but the adverse effects of ultraviolet radiation increase the risk of melanoma. We propose a deep learning framework to segment, detect, and classify skin lesions in dermoscopy images for melanoma detection. Based on the publicly available dataset HAM10000, which consists of seven lesion categories, we evaluated the proposed framework. Our model outperformed the existing models in terms of performance. As a result of the current study, the uncertainties in boundary detection were removed, reducing the loss and the processing time. We calculated the prediction time of the proposed model and lesion detection takes 2.513 ms. In conclusion, the results suggest that the proposed model is computationally efficient.

Conflicts of Interest:
No author has any potential conflict of interest during the preparation and submission of the manuscript.