# A Novel Hybrid Deep Learning Approach for Skin Lesion Segmentation and Classification

Authors: Puneet Thapar; Manik Rakhra; Gerardo Cazzato; Md Shamim Hossain
Journal: Journal of Healthcare Engineering
 (2022)

---

## Abstract

Skin cancer is one of the most common diseases that can be initially detected by visual observation and further with the help of dermoscopic analysis and other tests. As at an initial stage, visual observation gives the opportunity of utilizing artificial intelligence to intercept the different skin images, so several skin lesion classification methods using deep learning based on convolution neural network (CNN) and annotated skin photos exhibit improved results. In this respect, the paper presents a reliable approach for diagnosing skin cancer utilizing dermoscopy images in order to improve health care professionals’ visual perception and diagnostic abilities to discriminate benign from malignant lesions. The swarm intelligence (SI) algorithms were used for skin lesion region of interest (RoI) segmentation from dermoscopy images, and the speeded-up robust features (SURF) was used for feature extraction of the RoI marked as the best segmentation result obtained using the Grasshopper Optimization Algorithm (GOA). The skin lesions are classified into two groups using CNN against three data sets, namely, ISIC-2017, ISIC-2018, and PH-2 data sets. The proposed segmentation and classification techniques’ results are assessed in terms of classification accuracy, sensitivity, specificity, F-measure, precision, MCC, dice coefficient, and Jaccard index, with an average classification accuracy of 98.42 percent, precision of 97.73 percent, and MCC of 0.9704 percent. In every performance measure, our suggested strategy exceeds previous work.


---

## Body

## 1. Introduction

Melanoma is perhaps the most serious kind of skin cancer, and if left untreated, it spreads swiftly. It all starts with melanosomes, the cells that produce melanin, the pigment—producing skin its color. It can enter the circulation and spread to other parts of the body after reaching the dermis (lower layer of the skin). The most common type of melanoma is percutaneous melanoma, which forms on the skin. In certain circumstances, melanoma can develop from a mole, allowing for effective treatment if detected early [1, 2]. Melanoma is a fatal type of skin cancer that speedily spread on the body that appeared through the malignant shift of melanocytes which is imitated in distinction to neural crest neoplasia. Among the deadliest diseases, National Cancer Institute states that cancer posse’s huge global burden is reporting 18.1 million new cancer cases in the year 2018 that leading to 9.5 million deaths. Based on the past reports, according to the National Cancer Institute (NCI), the number of new cancer cases would reach 29.5 million by 2040, with 16.4 million deaths. The National Cancer Institute’s newest SEER (Surveillance, Epidemiology, and End Result programme) report shows that the five-year survival rate for melanoma of the skin was 92.7 percent from 2010 to 2016. According to the published SEER report, it has been observed that melanoma skin cancer was mostly diagnosed in patients between the age group of 20 and 39 years. However, melanoma skin cancer is not age-restricted. Melanoma incidents majorly vary with ethnicity, region, age, and gender. Among various types of cancers, skin or dermoscopic cancer is the most common type of cancer prevailing over a large section of the world. According to the American Cancer Society (ACS) report, it was realized that by 1 January, 2019, 16.9 million cancerous cases were found in America that comprises 8.8 million female and 8.1 million male populations. However, it was forecasted that the number might rise to 22.1 million by the beginning of 1January, 2030, with 684470 skin melanoma cases. [3]. The skin cancer originates in the topmost layer of the skin called the epidermis. However, it is observed that skin cancer shows the highest global cases that not only include melanoma but also basal cell carcinoma (BCC), cutaneous squamous cell carcinoma (SCC), and intraepithelial carcinoma (IC) [4]. It is also an important aspect if during the preparation of data sets for the dermato-pathological diagnosis, the aspects like patient’s age, lesion topography, and color variations are considered. [5]. Usually, brown spots, small moles, or skin surface rash are harmless but should not be neglected. The primary skin examination known as the ABCDE rule should be applied to identify any sign of the transformation of skin lesion into melanoma [6, 7]. Dermoscopy is a benign skin scanning procedure used to create a magnified and lit image of a slice of skin in order to enhance the identification of cancer. Dermoscopy is routinely used in the diagnosis of melanoma, and it is far more accurate than a visual assessment [8–10]. The warning signs of melanoma are ruled as A (Asymmetry), and it represents that the two halves of the lesion should not match in the case of a melanoma lesion. B (Border) says that most of the melanoma exhibit uneven surface and notched borders. C (Color) reflects that the mole exhibiting multiple colors such as blue, red, or tan shows a warning sign. D (Di-ameter/Dark) represents that the melanoma lesions are more extensive and exhibit darker shades. Rarely, amelanotic melanoma is observed to be colorless. E (Evolving) means that any alteration in shape, color, and size, the texture of the skin lesion that may or may not result in itching or bleeding, signs the step towards lethality. The efficient feature extraction is the need to have the efficient multiclass classification in skin cancer detection from dermoscopy images [11]. The approaches based on the faster selection of ROI and classification based on CNN improves the performance and execution speed of training and testing of the data sets [12]. Deep neural networks (CNNs) are one option for efficient lesion classification utilizing the U-net technique. It is a cross between a deconvolutional and fully connected networks (FCNs). A number of color, texture, and structure features from the segmented images were retrieved using successful feature extraction approaches. The local binary pattern (LBP) method is used for texture analysis. It has been discovered to be a very satisfactory completion operator. The edge handbook, gabor, and histogram (HOG) techniques are used to extract form characteristics [10, 13].The technological advances had resulted in the emergence of several interconnected medical applications and tools to revolutionize the medical health care system. This strongly supports the doctors, health care professionals, and patients to share medical information while providing important medical consultations over the Internet. Although rising interest in skin cancer diagnosis had led to the identification of skin lesion patients who are at higher risk of development of skin cancer that is widely used as a personalized surveillance approach [14]. Automated systems for unbiased diagnosis are required for pigment lesion inquiry. It really has piqued the interest of scientists throughout the last many decades. These systems include or before, feature extraction, separation, classification, and postprocessing. The dermatological lesion must still be properly identified and subdivided. Because recent developments in machine learning algorithms and dermoscopic techniques have reduced the frequency of misinterpretation, the emphasis on desktop systems has increased dramatically in recent years [2, 13]. However, the programs to identify the hidden severity of skin lesions that can be globally applied to masses have not been reported [15]. Skin cancer is characterized into three stages, namely, localized, regional, and distant, based on its severity. The distribution of the 5-year survival rate illustrates that when diagnosed at early stages, the overall survival rate can be increased to more than 95% with the involvement of advanced medical care and the latest treatment strategies. The survival rates for patients fighting with skin melanoma exhibit the highest survival rate for localized melanoma that shows no sign of spread beyond the observed lesion area followed by regional melanoma in which cancer is spread to nearby lymph nodes and skin adjacent structures and least in case of distant melanoma where cancer has spread to other parts of the body such as lung and liver [survival rates for melanoma]. Due to visual similarities between benign and malignant skin lesions, melanoma types are very hard to be diagnosed. Therefore, in recent times, several computational intelligence-based techniques have been proposed by numerous researchers to improve the diagnostic ability at the initial stages. In this context, authors have proposed an improved skin lesion segmentation and classification technique taking advantage of swarm intelligence (SI) and neural network architecture. Based on this, the beetle swarm optimization and adaptive neuro-fuzzy inference system (BSO-ANFIS) model is efficient for the disease diagnosis used for skin lesion classification [16]. It is very clear that skin cancer is one of the most serious types of cancer. It is the result of abnormal cellular metabolism. The three primary types of skin are muco, basal, and cells. Skin cancer is classified into two types: melanocytic and nonmelanocytic. Doctors commonly misclassify benign and malignant melanoma due to the difficulty in distinguishing between the two. Melanoma is the nineteenth most frequent cancer, and it is much more hazardous than basel and squamous carcinoma due to its rapid development all through the body. As a result, it is critical to diagnose cancer in its early stages in order to limit the chance of death. It can affect any part of the body; however, the heart, back, or legs are more likely to be affected [17, 18]. Despite this, still, the complexity of the automated skin lesion segmentation as well as classification methods are need to address due to less upgraded dermoscopic images in various aspects.Automated intelligent systems for unbiased diagnosis are required for pigment lesion inquiry. It has piqued the interest of scientists throughout the last many decades. These methods include which was before, extraction and classification, segmentation, classification, or comment. The cutaneous disease must be properly identified and divided. Recent advances in ml algorithms and dermoscopic techniques have been seen to reduce the rate in misinterpretation, leading in an exponential increase in the emphasis on computer-assisted systems [19, 20]. This paper illustrates the implementation of imaging technology for timely detection and categorization of skin lesions to offer timely medical attention with focusing on segmentation and classification techniques. To achieve this, an effective method K-means and SI-inspired skin lesion segmentation is involved to precisely identify the foreground regions. This is followed by the SURF-based feature extraction and GOA-based feature selection process. Finally, the skin lesions are classified into melanoma and nonmelanoma classes using CNN as a machine learning architecture. The proposed skin lesion segmentation and classification technique is then evaluated using performance parameters such as segmentation accuracy, sensitivity, specificity, precision, F-measure, MCC (Matthews Correlation Coefficient), dice coefficient, and jaccard similarity against three skin lesions data sets. This paper is organized into 5 sections; initially, Section 1 provides the global overview of skin cancer and hidden severity behind skin lesions, Section 2 covers the research work done in the field of skin lesion diagnosis, and Section 3 discusses and outlines the proposed methodology involved in the segmentation and classification of skin lesions into melanoma and nonmelanoma classes. The simulation analysis and the performance of the proposed work are evaluated in Section 4 while summarizing the conclusions drawn from the research work in Section 5. This is followed by the list of references cited in the paper.


## 2. Literature Review

The time since 2015, the involvement of swarm intelligence has been observed in the field of medical imaging. Aljanabi et al. implemented Artificial Bee Colony (ABC) as a skin lesion segmentation approach lesion approach to recognize the skin lesions from dermoscopy images with improved melanoma detection [21]. In most of the segmentation approaches, preprocessing was the major step that prepares the skin images for further processing. The unwanted artifacts such as illumination levels and surface hairs are removed to improve the segmentation quality [22]. Among various proposed methods, edge or border detection in digital images was the major challenge.A comprehensive survey was conducted by Chauhan et al. for skin lesion segmentation using computational intelligence techniques in which various soft computing approaches, namely, fuzzy C-means convolutional neural network and genetic algorithm (GA) were studied. It was observed that these approaches were widely used to resolve image segmentation issues not only in the medical imaging field but also in various applications, including scientific analysis, engineering, and humanities [23]. However, it was established that the ABCDE rule proved to be best for the initial assessment of skin lesions. In this context, Mabrouk and co-researchers had presented a fully automated approach for the early diagnosis of lethality hidden in pigmented skin lesions. Finally, the total dermoscopy score (TDS) is assigned to the skin lesions based on the ABCDE assessment [24]. The CNN mainly utilized in deep learning has certain shortcomings that need to be considered illustrated by the author efficiently taking four main data sets and propounded that accuracy enhancements usually mask corruption robustness problems to an extent also the evaluation of classifiers affected distorted images [25, 26]. In a systematic survey of all the approaches used in skin lesion classification such as ANNs, CNNs, KNNs, and RBFNs, it was propounded that the right choice of algorithm is an important aspect to attain good classification efficiency. The survey reveals CNN provides a better skin cancer detection approach, and also, the acquisition phase of images plays a vital role in the performance of algorithms [27].The MobileNet V2 and Long Short-Term Memory (LSTM)-based deep learning approach is also effective for skin lesion classification [28]. The segmentation classification model effectiveness is very important in the detection of malignant melanoma. The deep learning models such as U-Net for segmentation and CNN classifier are a good approach to achieve better detection [3]. The results of executing a learning methodology based on U-Net revealed that sufficient segmentation performance was attained in most photos, with the exception of a rare photos in which the tumor portions were unlikely to be characterized using dermoscopy [29]. To enhance cooperation in wsns actor networks, a new reliable power conscious SEGaT mechanism has also been suggested [30]. Shabaz et al. anticipate future diseases based on current medical services and also how long the link survives, along with SULP, which aids in lowering site traffic and disease overlap, hence reducing node isolation from the network [31]. LeCun et al. applied backpropagation to large real-world tasks. They also show how such limits can be included into the training algorithm network via network’s architecture [32].A more comparative analysis of some of the latest skin lesion segmentation work is tabulated in Table1.Table 1
Skin lesion segmentation approaches.
SourceClassesMethods usedContributions and performance measureLimitationsYuan et al. [33]2, Skin lesion and surrounding skin19-layer deep convolutional neural networks (Deep-CNN) with jaccard distanceIt reduced the requirement of data rebalancing in case of unbalanced numbers of foreground and background pixels that were majorly observed in the case of binary medical image segmentationUsually, more training samples are required by a deeper network to minimize the overfitting.It’s challenging to design an approach by using a limited available data set in skin lesion segmentation as compared to natural images.Al-Masni et al. [34]3, Benign, Melanoma and Seborrheic KeratosisFull-resolution convolutional networks (FrCN)The overall segmentation accuracy of 94.03% and 95.08% was exhibited for the ISBI 2017 and PH2 data sets, respectively.Although this FrCN segmentation method outperforms previous deep learning approaches, it needs improvement, particularly in terms of sensitivity.For deep-learning architecture, it also necessitates a larger training sample for better results.In addition, some failures, such as skin or oversegmented skin lesions, must be addressed to improve segmentation.Mirikharaji et al. [35]2, skin lesion and surrounding tissueIntroduced a new loss term that encoded the star-shape prior for the training of fully convolutional network (FCN)It resulted in highly accurate and conceivable skin lesion segmentation while being computationally less expensive as compared to other energy minimization techniques.However, the star shape enhanced results for several target objects in the past, one limiting condition of the Veksler technique and its modifications have that the centre of foreground objects be known.Filali and Belkadi [36]2, melanoma and nonmelanomaMultiscale contrast-based algorithm followed by graph cut refinementThe overall segmentation accuracy reaches 97.34% with 89.31% sensitivity.Because this approach has mostly dependent on regional contrast and background directions, it may hinder lesion areas from being effectively segmented with their surrounding areas as well as lesion areas that have highly similar to the background template. Some skin portions that contrast visually with the majority of the background can be returned as lesion sites as well.Dash et al. [37]2, skin lesion and surrounding tissueCombination of SI with K-means and fuzzy C-means (FCMs) clusteringIt was concluded that seeker optimization (SO) demonstrated better lesion detection accuracy ranging from 89.42% to 90.89% as compare to ant colony optimization (ACO), PSO, and artificial bee colony (ABC).Only 2D color space for enhanced accuracy including higher processing speed has requires in this presented approach which limits its 3D RGB color space.Garg and Balkrishan [22]2, skin lesion and surrounding tissueK-means in combination with firefly algorithmK-means with FFA outperformed the traditional K-means and K-means with PSO in terms of lesion segmentation accuracy.Focused on only two steps; preprocessing and segmentation for automatically recognition of skin lesion. Do not focus on classification along with different feature extraction techniques that based on texture, color, and shape.Abd et al. [38]2, skin lesion and surrounding tissueContrast was improved at preprocessing stage followed by feature optimization using ABCThe prototype proved to be very effective for accurate boundary detection of skin lesions.Do not focus on classification along with different feature extraction techniques that based on texture, color, and shape.The limited image classification work in the field of skin lesions had significantly challenged the precise diagnosis of the lethality of skin lesions. The challenge is addressed by Zhang and coresearchers with the attention residual learning convolutional neural Network (ARL-CNN). The evaluation over ISIC skin 2017 data set shows that ARL-CNN successfully addressed the discriminative parts of the skin lesions with a classification accuracy of 85% for melanoma and 86.8% for seborrheic keratosis [39]. A number of existing NN methods had demonstrated that the performance is highly dependent on the depth of the network [40]. The computational tricks to normalize or optimize the data further had proved to be very efficient in improving the overall classification accuracies of the automated skin lesion classification models. Tschandl et al. evaluated the accuracy of machine learning against the human tendency to identify pigmented skin lesion to rate seven classes of skin lesions into grades of benign and melanoma. The issues such as overfitting during distribution of images during training were also considered in addition to the sensitivity of human experts [41, 42] had propounded DCNN approach for classification of skin lesions replacing the activation layer of output with sigmoid function resulting in less execution time per epoch as compared to several mostly utilized pre trained models. The RDCNN suggested by Hosny et al. outperforms conventional deep convolutional networks by a large margin. In terms of classifying skin lesions, the suggested RDCNN classification model beats previous techniques. The novel RDCNN can be applied to a variety of skin cancer problems and diagnosis and to classify distinct types of tumours [43]. The study by Kassem et al. looks at papers published in the recent five years in the databases Science-Direct, IEEE, and Springer-Link. There are 53 papers that use classical machine learning approaches and 49 articles that use deep learning approaches in this collection. The researchers are contrasted in terms of their contributions, methodology used, and outcomes [44]. The skin lesion classification proposed by Hosny et al. is based on the deep learning model AlexNet and learning algorithms. To compare with the state of the art, the proposed technique was designed and evaluated using the public data set ISIC 2018 [45]. Kassem et al. created a model for both the Alex-net, ResNet101, and GoogleNet architectures that uses principle of supervised learning to classify whether a cancer is melanoma or not [46]. The proposed model by Abayomi-Alli et al. is an improved data augmentation strategy which is focused on invariance SMOTE to handle the problem of class imbalance. The usefulness of the suggested data augmentation method has been demonstrated through comparisons with other current methodologies and conventional data augmentation techniques [47]. The data augmentation is given importance to improve the classification accuracy. Some of the noteworthy skin lesion classification work is discussed in Table 2.Table 2
Skin lesion classification approaches.
ReferenceClassesPreprocessing and segmentationMethods usedContributions and performance measureLimitationsOzkan and Koklu [48]3, Normal, abnormal, and melanoma.ABCDE ruleANN, SVM, KNN, and decision TreeCorrect classification of 92.50% for ANN, 89.50% for SVM, 82.00% for KNN, and 90.00% for DT were achieved.Do not focus on multiple image texture organizationThompson and Jeyakumar [49]4, Homogenous patterns, reticular patterns, globular patterns, and multicomponent patterns of skin lesionLab color space and SURFANN, multiclass SVM, and KNNBest results were obtained using ANN with a classification accuracy of 86.37%, sensitivity of 86.52%, and specificity of 96.42%.Only the texture feature of the patterns has used in this work and not produced efficient outcome to achieve this color and geometric features needs to be consideredAbbas and Celebi [50]2, Benign and malignantMultilayered architecture using visual featuresDeep neural network (DNN)The DermoDeep demonstrated sensitivity and specificity of 93% and 95% with an AUC of 0.96.Only focused on dermoscopic images for automatic lesion classification that have not applied for any domain of images; Industrial, MRI, satellite, and CT imagesSikkandar et al. [51]7, Angioma, Nevus, lentigo NOS, solar lentigo, melanoma, seborrheic keratosis, and BCCTop hat filter and inpainting technique for preprocessing followed by GrabCut algorithm for segmentationadaptive neuro-fuzzy classifier (ANFC)The highest accuracy of 97.91% was observed with 93.4% sensitivity and 98.7% specificity.This segmentation-based classification model for skin lesion only used Inception v4 to enhance the performance; other deep learning models need to be utilized.Almaraz-Damian et al. [52]2, Benign and malignantABCD ruleDeep learning CNNThe highest accuracy of 92.40% with specificity, precision, F-score, and MCC of 90%, 92.08%, 89.16%, and 0.795 was achieved.In comparison to the use of a fully in-depth learning approach that is extremely computationally expensive to train.Ali et al. [41]2, Benign and malignantFilter or kernel to remove noise and artifacts; and data augmentation.Deep learning CNN with the sigmoid output activation layerOn the HAM10000 dataset the highest 93.16% of training and 91.93% of testing accuracy were obtained, respectively.In comparison to other pretrained models the proposed DCNN takes less training time of about 9-10 sec per epoch.The above-discussed survey illustrates that despite technical advances and numerous research works being carried on in the field of image processing, a considerable scope of improvement still exists in the field of skin lesion image processing. Further, timely detection and categorization of skin lesions to offer timely medical attention also requires highly accurate classification methods. To achieve this, the segmentation and classification methods used by various researchers have been discussed in this section that guides and motivates the author for the involvement of swarm intelligence to improve the overall skin lesion classification as the existing works:(1)
Do not focus on multiple image texture organization.(2)
Only the texture feature of the patterns has been used in this work and has not produced an efficient outcome to achieve this color and geometric features need to be considered.(3)
Only focused on dermoscopic images for automatic lesion classification that have not applied for any domain of images such as industrial, MRI, satellite, and CT images.(4)
This segmentation-based classification model for skin lesion only used Inception v4 to enhance the performance; other deep learning models need to be examined.(5)
The system improves the recognition of melanoma and nevus lesions when compared to the use of a fully in-depth learning approach that is extremely computationally expensive to train, requires significant amounts of labelled data, and does not recognize the dermoscopic characteristics in the ABCD algorithm.


## 3. Research Methodology

In this research article, the authors had proposed an automatic skin lesion segment and intelligent classification model using the dermoscopic images. Here, we used the combination of swarm-based Grasshopper Optimization Algorithm (GOA) with convolutional neural network (CNN) as a machine learning technique.


### 3.1. Data set Description

Three different dermoscopic skin lesion data sets were utilized to simulate and evaluate the efficiency of the proposed model.(i)
ISIC-2018: The data set is in the form of dermoscopic images and incorporates skin lesion analysis for melanoma detection [53]. Dermoscopy is a type of imaging that eliminates skin’s surface reflection. It improves diagnostic precision and includes a sample of the ISIC-2018 data set is shown in Figure 1(a).(ii)
PH-2: It is a database of dermoscopic picture skin lesion information. The PH-2 data set comprises a significant number of manual skin lesion segmentation images for clinical diagnosis and research. Dermatologists, or skin disease specialists, perform the identification of different skin lesion dermoscopic structures [54]. The PH-2 data set of dermoscopic images, as well as a sample of the PH-2 data set dermoscopic image, will be made publicly available for scientific inquiry is shown in Figure 1(b).(iii)
ISBI-2017: It is a data set of dermoscopic skin lesion images with over 10,000 photos for medical diagnosis and scientific study [55]. Recognized skin cancer experts have annotated and marked up a portion of the dermoscopic images of skin lesions. The ISIC-2017 data set’s sample skin lesion dermoscopic pictures are shown in Figure 1(c).Figure 1
Sample dermoscopic images (a) ISIC-2018 data set, (b) PH-2 data set, and (c) ISIC-2017 data set.
(a)(b)(c)


### 3.2. Proposed Methodology

On the basis of discussed data sets, an automatic skin lesion segment and intelligent classification models were designed and the overall process of the proposed method is shown in Figure2. The suggested model’s whole operational procedure depicts the working architecture of the module that aids in the segmentation and classification of skin cancer from dermoscopic images of skin lesions.Figure 2
Process of automatic skin lesion segment and intelligent classification model.Preprocessing, K-means with GOA-based segmentation, SURF-based feature extraction, and SURF-based feature extraction are the five steps of the described model’s operation and feature selection using GOA and CNN-based training as well as classification. Initially, preprocessing step is carried out using the hair removal technique with image quality enhancement that is named as the HR-IQE algorithm.Then, the K-means algorithm with GOA is used to segment the exact skin lesion region from the preprocessed dermoscopic images known as the region of lesion (ROL). When ROI segmentation is done, the next, SURF-based feature extraction with feature selection process occurs by using GOA as a feature optimization technique. Finally, CNN is used to train and classify skin cancer from the dermoscopic image for automatic skin lesion and intelligent classification models into different classes.Based on the given process of automatic skin lesion segment and intelligent classification model, each step is described in detail in the following sections of the research article.


#### 3.2.1. Preprocessing

It necessitated improving the quality of dermoscopic pictures and reducing various types of noise from the skin lesion images used in the proposed method. Selection of correct lesion location is a crucial aspect in designing an accurate skin lesion segment and classification model, as is the necessity to eliminate an excess part from the images known as background. In this step, first, we perform a hair removal approach to clear the lesion region from the hair and then intensity based image quality enhancement is used to improve the specific pixel points of a hair-free dermoscopy images. The HR-IQE method is employed in the proposed work to increase the image quality, which aids in the removal of hair from the lesion location, allowing for suitable feature extraction from the skin lesion. The HR-IQE algorithm1 is given as:Algorithm 1: HR-IQE
Input: SIMAGE←Skin lesion image.Output: PIMAGE ← Pre-processed skin lesion image.(1)
Start(2)
If SIMAGE is color(3)
GIMAGE = color to gray (SIMAGE)(4)
Else(5)
GIMAGE = SIMAGE(6)
End–if(7)
GIMAGE = Resize (GIMAGE, [512 512])(8)
Set radius,r = 7//To create a circular mask to store image(9)
[Row, Column, Plane] = Size (GIMAGE)(10)
Create a coordinates, [X, Y] = mesh grid (1 ⟶ Row)(11)
Create a mask,Mask=X−2802+Y−2802<2802(12)
Set, threshold, thresh = 5//To identify hair pixel in image(13)
CIMAGE = Close (GIMAGE, structure element)//Apply morphological operation to close extra part of image like hair(14)
Diff = double (CIMAGE)–double (GIMAGE)(15)
DIMAGE = Dilated (Diff > thresh)//Apply dilation on image(16)
For each Row(17)
For each Column(18)
If DIMAGE = false then(19)
PIMAGE ← GIMAGE(20)
Else(21)
PIMAGE ← Modification in GIMAGE and store with Mask(22)
End–If(23)
End–For(24)
End–For(25)
PIMAGE = Intensity Enhancement (PIMAGE, Limit (PIMAGE))(26)
Return: PIMAGE as a preprocessed skin lesion image(27)
EndThe preprocessing of skin lesion dermoscopic pictures is done in two steps, with the first stage being the most important; the concept of hair removal is performed based on the morphological operation that helps to select exact ROL. In another preprocessing step, we perfume intensity-based image quality enhancement which is carried out after the hair removal process. After preprocessing, we obtained an enhanced and hair-free image that helps to segment the exact ROL of dermoscopic images. Figure3 shows the outcome of the preprocessing process using HR-IQE algorithm, and the images are displayed in a clear manner.Figure 3
Preprocessing results (a) original image and (b) preprocessed Image.
(a)(b)In order to validate a processed image, entropy has been considered as the best evaluation parameter. The entropy of any data is the measure of disorder in the data. As per the definitions recognized worldwide, entropy is the uncertainty between the micrological elements [5].Mathematically, it can be defined as(1)S=kb⋅lnW.where kb is the Boltzmann constant and stands a value of 1.38064852 × 10−23 m2 kg s−2 K−1, in represents natural log, and W is the micrological distribution. If the entropy of the processed image is close to the entropy of the original image, the processing can be counted as positive processing. The preprocessing threshold of the mask is stored after every entropy calculation. When the entropy difference starts to increase, the mask threshold is set to be constant. For reference, Table 3 presents the calculation of entropy with mask variation of {1 : 3}% incremental growth.Table 3
Entropy of original image and processed image.
Mask variation percentageEntropy originalEntropy processed% difference107.1737266.12894514.564127.3298366.59132310.07543157.0400486.02019414.48645207.8672836.15665421.74358257.8534346.65505115.25936277.0144256.763243.580981307.0645026.14743212.98137To ensure the best processing outcome is attained, the reading has been taken after taking 10000 simulations. In the trend of the percentage difference, the minimum attainable entropy is 3.58% as shown in Figure4.Figure 4
Maximum attainable entropy based on the used data set.The data set comes with the ground truth value, and hence, if the preprocessed image is passed to training and classification mechanism using a binary class classifier to validate the best possible solution for future processing.The validation process is divided into some steps as follows.Step 1.
Organize the data into two segments as highly affected (Ha) and partially affected (Pa). Define regression value (Rv)Step 2.
Apply the round-robin method to select data from “Ha” and “Pa” with a validation percentage chosen from a set of valid range (Vr) Vr = {0.70–0.90}.Step 3.
Apply another round-robin to choose data from the Vr range.Step 4.
Pass selected data to Support Vector Machine.Step 5.
Monitor selected support vectors.Step 6.
Valid Select Range for Test (Vrt) of dataStep 7.
Store mask value to the repository to finalize the mask valueStep 8.
Calculate the Rv test as RvtStep 9.
Repeat Step1 to Step 8 until Rvt is smaller than Rv.
Support Vector Machine (SVM) has been used as the judgmental classifier to validate the preprocessed image. SVM is a binary classifier and can identify or signify the data into two segments. The ordinal measures of SVM are as follows. The key idea of SVM is to build a system with hyper planes based on the kernels. There are different kernel functions which can be applied to segregate the data as shown in Figure5.
SVM is a controlled AI algorithm used to isolate two types of information based on learning capability. The SVM approach works on several mathematical functions as presented in Table4.
The maximum value for attained accuracy is 64.32% for semisupervised and the least attained accuracy.Figure 5
Types of kernel functions in SVM [27].Table 4
List of kernel functions.
Kernel nameDescriptionEquationPolynomial kernelIt represents the correlation between the features of data during the training of SVM in the form of a polynomial variable.P (a, b) = αaTb+kdBy adjusting these parameters slope of the kernel can be adjusted using “k” as constant with degree “d.”Linear KernelIt is applicable for the linear separation of data, which is separated by a single line. Training is faster compared to other kernelsPa,b=aTb+kRadial Basis FunctionIt is used in SVM to separate two classesP (a, b) = exp(−γ‖a − b‖2)Sigmoid KernelIt comes from the neural network structure where it is used as an activation function. In SVM, it works like a two layer structure of the neural network.Pa=1/1+e−aGaussian KernelIt is the extended form of the RBF kernel.Pa,b=expa−b2/2σ2


#### 3.2.2. ROL Segmentation

After preprocessing on images, a segmentation process is performed to segment the ROL from the dermoscopy image. It is clear by comparative analysis of various segmentation methods that the segmentation of ROL using K-means with GOA is better as compared to other combinations or hybridization. We will discuss comparative analysis of various segmentation approaches in the result and discussion section. GOA-based K-means (improved K-means) is used to choose ROL from dermoscopic pictures, and it is dependent on morphological procedures such as binarization, thinning, filling opening, dilatation, and so on. A morphological operation is a set of nonlinear operations that deal with the shape or morphology of picture features.Using some fundamental procedures, we apply morphological operations to the binary picture to determine the exact ROL from the dermoscopic images. An improved K-means method is built on the basis of morphological operations and the algorithm for improved K-means utilizing GOA is as follows in algorithm2:Algorithm 2: Improved K-means using GOA
Input: PIMAGE ← Preprocessed skin lesion imageOutput: ROL ← Region of the lesion from dermoscopic image(1)
Start(2)
[Row, Column, Plane] = Size (PIMAGE)(3)
Convert into double, PIMAGE = double (PIMAGE)(4)
Define centroid, NPART = 2//For front and backdrop classes(5)
Apply K-means(6)
ForM in range of each Row(7)
ForN in range of each column(8)
If PIMAGE (M, N) == NPART (1)(9)
ROL (M, N) = PIMAGE (M, N)//Front class data (Foreground)(10)
Else(11)
Non-ROL (M, N) = PIMAGE (M, N)//Back drop data (Background)(12)
End–If(13)
Adjust Centroid C using their mean(14)
C = Average (ROL and Non-ROL)(15)
End–For(16)
End–For(17)
Initialize GOA parameter–Iterations (T)–Population Size (S)–Lower Bound (LB)–Upper Bound (UB)–Fitness function (Fit fun)–Number of selection (N)(18)
Define fitness function:fitfun=1if pixel is lies in ROL0otherwise(19)
ForT in rage of each Row × Columnfs=∑i=1PROLT(20)
ft=∑i=1PROLT/Length of ROL(21)
fitfun=fitness function, which defines by above-given equation Thresholdvalue=GOAP,T,LB,UB,N,fitfun(22)
End–For(23)
Threshold=Thresholdvalue(24)
If ROL mixed(25)
ROL = Morphological (ROL, Threshold)(26)
End–If(27)
Return: ROL as a region of the lesion from dermoscopic image(28)
End–AlgorithmROL is segmented from improved and preprocessed dermoscopy skin lesion images using the aforementioned technique.


#### 3.2.3. Feature Extraction

Using the SURF descriptor, we may extract the feature pattern based on their pixel pattern after ROL segmentation. Due to the stability and invariance nature of features, we choose the SURF descriptor as a feature pattern extraction strategy in this case, and SURF returns a more appropriate feature set for segmented ROL. The SURF descriptor is a fast and reliable algorithm for extracting the local, invariant, and oriented feature set from the ROL of dermoscopic images. The SURF descriptor algorithm3 is written as:Algorithm 3: Feature extraction using SURF descriptor
Input: ROL ← Region of the lesion from dermoscopic imageOutput: F-pattern ← SURF feature pattern of ROL(1)
Start(2)
[Row, Column, Plane] = Size (ROL)(3)
ForM in range of Row(4)
ForN in range of column(5)
E-point (M, N) = Extrema-detection (ROL (M, N))(6)
Key-point-localization (m, n) = Ex-point (E-point (M, N))(7)
If orientation required for localized data(8)
O-point (M, N) = Orientation (Key-point-localization (M, N))(9)
End–If(10)
F-pattern (M, N) = Filtered (O-points)(11)
End–For(12)
End–For(13)
Return: F-pattern as a SURF feature pattern of ROL(14)
End–AlgorithmWe employ the notion of feature selection utilizing the GOA as an optimization strategy with fitness function after extracting feature patterns from the ROL of dermoscopic pictures using the SURF descriptor, and the full description is given in the section below.


#### 3.2.4. Feature Selection

This step is performed to choose the optimal feature set from the high-dimensional feature data supplied by the SURF descriptor in order to improve the classification accuracy of the proposed skin lesion segment and classification model. Because numerous features data are present in the SURF feature and it should be considered as irrelevant data and do not involve in the training scenario because they increase the chances of error in the model. Hence, for the selection of appropriate feature pattern, GOA is used with a novel fitness function and algorithm of GOA as feature selection is written as algorithm4 as under:Algorithm 4: Feature Selection using GOA
Input: F-pattern ← SURF feature pattern of ROLOutput: OF-pattern ← Optimized SURF feature pattern of ROL(1)
Start(2)
Initialize GOA Parameters:G–Grasshopper population based on the F-patternGP–Grasshopper PositionOF-pattern–Optimized Feature PatternFitness Function:Ff=1True;ifFs∗Gp≥Ft=ThresholdData0False;Otherwise,Where,Fs: It is the currently selected feature pattern form the F-patternFt: It is the threshold of all data and it is the average of all F-pattern(3)
[Row, Column, Plane] = Size (F-pattern)(4)
Set, OF-pattern = []//Set as empty initially(5)
ForI in range of Row × Column(6)
Fs = F-pattern (I) = SelectedData//Current data from F-pattern(7)
Ft = ThresholdData=∑i=1RFSI//Average of all data (F-pattern)(8)
Fitfun=Fit FunFs,Ft(9)
NVAR = Number of variables//Number of selection(10)
OF-pattern (I) = GOA (Fit (fun), NVAR, Set up of GOA)(11)
End–For(12)
If OF-pattern = 1 then(13)
OF-pattern = Select feature form F-pattern(14)
Else(15)
OF-pattern = Null(16)
End–If(17)
Return: OF-pattern as an optimized feature pattern(18)
End–AlgorithmSelect an only relevant collection of features based on the skin cancer classes and fitness requirements using the information provided above. We used these features as input to the CNN classifier to train the suggested skin lesion segment and cancer classification model, and we employed the pattern net-based CNN as a classifier or deep learning strategy in this case.


#### 3.2.5. Model Training Using CNN

In this case, CNN was used as a classifier to train the model using three different skin lesion dermoscopic picture data sets. Hence, with distinct skin cancer kinds such as melanoma or nonmelanoma from basal cell carcinoma (BCC), squamous cell carcinoma (SCC), Merkel cell carcinoma (MCC), cutaneous T-cell lymphoma, and Kaposi sarcoma, an optimum set of feature patterns is considered as an input set of CNN.This section of CNN details the suggested classification technique, which aids in improving the proposed model’s classification accuracy, as well as the proposed CNN architecture is shown in Figure6.Figure 6
Architecture of CNN for the skin cancer classification model.CNN is the more advanced type of artificial neural networks, with its architecture based on deep architectures (ANNs). In 1989, LeCun et al. introduced the concept of CNN that is an improved and complex type of ANNs with deep architecture, and the architecture consists of convolutional, pooling, and fully connected layers as shown in Figure6. In the convolutional layer of CNN, SURF feature points of the segmented ROL are passed as a set of input data that is convolved with learnable filters to map the features. To map the feature, an activation function is used with each filter and then transfer towards the pooling layers. Here, pooling layers of CNN is spatially aiding in the subsampling of features of SURF feature points. In CNN, there are lots of activation functions are available but we use sigmoid activation functions for the fully connected layers of CNN. The algorithm 5 of CNN is written as:Algorithm 5: CNN
Input: OF-pattern ← Optimized SURF feature pattern of ROLG ← Class as a category or group for skin cancerN ← Neurons to carry the dataOutput: Model-Structure ← CNN trained structureOutput ← Classified results of the model(1)
Start(2)
Initialize the Pattern-based CNN: –Number of Epochs (E)//Iterations used by CNN–Number of Neurons (N)//Used as a carrier–Performance: Cross entropy of classes, Gradient, Validation check for the data, Error Histogram during the training and reverse operating characteristic–Training Data Division: Based on Random(3)
[Row, Column, Plane] = Size (OF-pattern)(4)
ForI in range of Row × Column(5)
If OF-pattern belongs to melanoma(6)
Group (1) = Feature from the OF-pattern of 1st Part//ALL gene expression data(7)
Else (Nonmelanoma)(8)
Group (2) = Feature from the OF-pattern of 2nd Part//AML gene expression data(9)
End–If(10)
End–For(11)
Initialized the pattern net, Model-Structure = Pattern-based CNN (N)(12)
Set the training parameters according to the requirements and train the system(13)
Model -Structure = Train (Model -Structure, OF-pattern, Group)(14)
Test Result = Sim (Model-Structure, Test ROL Feature)(15)
If Test Result = 1 (Melanoma)(16)
Classified Results = melanoma with performance evaluation parameters(17)
Else(18)
Classified Results = Non-melanoma with performance evaluation parameters(19)
End–If(20)
Output = Classified Results(21)
Return: Model-Structure as a trained structure with output as a classified result of model(22)
EndBoth scenarios for skin cancer training and classification model with optimized SURF features use the same algorithms and procedural methods. For the investigation of the suggested automatic skin lesion section and intelligent classification model, an extensive series of experiments is carried out. The proposed method was tested using the MATLAB Programming Language and toolboxes for image processing, neural networks, and optimization. In the following section of this study paper, the experimental results based on the various data sets are briefly described.


## 3.1. Data set Description

Three different dermoscopic skin lesion data sets were utilized to simulate and evaluate the efficiency of the proposed model.(i)
ISIC-2018: The data set is in the form of dermoscopic images and incorporates skin lesion analysis for melanoma detection [53]. Dermoscopy is a type of imaging that eliminates skin’s surface reflection. It improves diagnostic precision and includes a sample of the ISIC-2018 data set is shown in Figure 1(a).(ii)
PH-2: It is a database of dermoscopic picture skin lesion information. The PH-2 data set comprises a significant number of manual skin lesion segmentation images for clinical diagnosis and research. Dermatologists, or skin disease specialists, perform the identification of different skin lesion dermoscopic structures [54]. The PH-2 data set of dermoscopic images, as well as a sample of the PH-2 data set dermoscopic image, will be made publicly available for scientific inquiry is shown in Figure 1(b).(iii)
ISBI-2017: It is a data set of dermoscopic skin lesion images with over 10,000 photos for medical diagnosis and scientific study [55]. Recognized skin cancer experts have annotated and marked up a portion of the dermoscopic images of skin lesions. The ISIC-2017 data set’s sample skin lesion dermoscopic pictures are shown in Figure 1(c).Figure 1
Sample dermoscopic images (a) ISIC-2018 data set, (b) PH-2 data set, and (c) ISIC-2017 data set.
(a)(b)(c)


## 3.2. Proposed Methodology

On the basis of discussed data sets, an automatic skin lesion segment and intelligent classification models were designed and the overall process of the proposed method is shown in Figure2. The suggested model’s whole operational procedure depicts the working architecture of the module that aids in the segmentation and classification of skin cancer from dermoscopic images of skin lesions.Figure 2
Process of automatic skin lesion segment and intelligent classification model.Preprocessing, K-means with GOA-based segmentation, SURF-based feature extraction, and SURF-based feature extraction are the five steps of the described model’s operation and feature selection using GOA and CNN-based training as well as classification. Initially, preprocessing step is carried out using the hair removal technique with image quality enhancement that is named as the HR-IQE algorithm.Then, the K-means algorithm with GOA is used to segment the exact skin lesion region from the preprocessed dermoscopic images known as the region of lesion (ROL). When ROI segmentation is done, the next, SURF-based feature extraction with feature selection process occurs by using GOA as a feature optimization technique. Finally, CNN is used to train and classify skin cancer from the dermoscopic image for automatic skin lesion and intelligent classification models into different classes.Based on the given process of automatic skin lesion segment and intelligent classification model, each step is described in detail in the following sections of the research article.


### 3.2.1. Preprocessing

It necessitated improving the quality of dermoscopic pictures and reducing various types of noise from the skin lesion images used in the proposed method. Selection of correct lesion location is a crucial aspect in designing an accurate skin lesion segment and classification model, as is the necessity to eliminate an excess part from the images known as background. In this step, first, we perform a hair removal approach to clear the lesion region from the hair and then intensity based image quality enhancement is used to improve the specific pixel points of a hair-free dermoscopy images. The HR-IQE method is employed in the proposed work to increase the image quality, which aids in the removal of hair from the lesion location, allowing for suitable feature extraction from the skin lesion. The HR-IQE algorithm1 is given as:Algorithm 1: HR-IQE
Input: SIMAGE←Skin lesion image.Output: PIMAGE ← Pre-processed skin lesion image.(1)
Start(2)
If SIMAGE is color(3)
GIMAGE = color to gray (SIMAGE)(4)
Else(5)
GIMAGE = SIMAGE(6)
End–if(7)
GIMAGE = Resize (GIMAGE, [512 512])(8)
Set radius,r = 7//To create a circular mask to store image(9)
[Row, Column, Plane] = Size (GIMAGE)(10)
Create a coordinates, [X, Y] = mesh grid (1 ⟶ Row)(11)
Create a mask,Mask=X−2802+Y−2802<2802(12)
Set, threshold, thresh = 5//To identify hair pixel in image(13)
CIMAGE = Close (GIMAGE, structure element)//Apply morphological operation to close extra part of image like hair(14)
Diff = double (CIMAGE)–double (GIMAGE)(15)
DIMAGE = Dilated (Diff > thresh)//Apply dilation on image(16)
For each Row(17)
For each Column(18)
If DIMAGE = false then(19)
PIMAGE ← GIMAGE(20)
Else(21)
PIMAGE ← Modification in GIMAGE and store with Mask(22)
End–If(23)
End–For(24)
End–For(25)
PIMAGE = Intensity Enhancement (PIMAGE, Limit (PIMAGE))(26)
Return: PIMAGE as a preprocessed skin lesion image(27)
EndThe preprocessing of skin lesion dermoscopic pictures is done in two steps, with the first stage being the most important; the concept of hair removal is performed based on the morphological operation that helps to select exact ROL. In another preprocessing step, we perfume intensity-based image quality enhancement which is carried out after the hair removal process. After preprocessing, we obtained an enhanced and hair-free image that helps to segment the exact ROL of dermoscopic images. Figure3 shows the outcome of the preprocessing process using HR-IQE algorithm, and the images are displayed in a clear manner.Figure 3
Preprocessing results (a) original image and (b) preprocessed Image.
(a)(b)In order to validate a processed image, entropy has been considered as the best evaluation parameter. The entropy of any data is the measure of disorder in the data. As per the definitions recognized worldwide, entropy is the uncertainty between the micrological elements [5].Mathematically, it can be defined as(1)S=kb⋅lnW.where kb is the Boltzmann constant and stands a value of 1.38064852 × 10−23 m2 kg s−2 K−1, in represents natural log, and W is the micrological distribution. If the entropy of the processed image is close to the entropy of the original image, the processing can be counted as positive processing. The preprocessing threshold of the mask is stored after every entropy calculation. When the entropy difference starts to increase, the mask threshold is set to be constant. For reference, Table 3 presents the calculation of entropy with mask variation of {1 : 3}% incremental growth.Table 3
Entropy of original image and processed image.
Mask variation percentageEntropy originalEntropy processed% difference107.1737266.12894514.564127.3298366.59132310.07543157.0400486.02019414.48645207.8672836.15665421.74358257.8534346.65505115.25936277.0144256.763243.580981307.0645026.14743212.98137To ensure the best processing outcome is attained, the reading has been taken after taking 10000 simulations. In the trend of the percentage difference, the minimum attainable entropy is 3.58% as shown in Figure4.Figure 4
Maximum attainable entropy based on the used data set.The data set comes with the ground truth value, and hence, if the preprocessed image is passed to training and classification mechanism using a binary class classifier to validate the best possible solution for future processing.The validation process is divided into some steps as follows.Step 1.
Organize the data into two segments as highly affected (Ha) and partially affected (Pa). Define regression value (Rv)Step 2.
Apply the round-robin method to select data from “Ha” and “Pa” with a validation percentage chosen from a set of valid range (Vr) Vr = {0.70–0.90}.Step 3.
Apply another round-robin to choose data from the Vr range.Step 4.
Pass selected data to Support Vector Machine.Step 5.
Monitor selected support vectors.Step 6.
Valid Select Range for Test (Vrt) of dataStep 7.
Store mask value to the repository to finalize the mask valueStep 8.
Calculate the Rv test as RvtStep 9.
Repeat Step1 to Step 8 until Rvt is smaller than Rv.
Support Vector Machine (SVM) has been used as the judgmental classifier to validate the preprocessed image. SVM is a binary classifier and can identify or signify the data into two segments. The ordinal measures of SVM are as follows. The key idea of SVM is to build a system with hyper planes based on the kernels. There are different kernel functions which can be applied to segregate the data as shown in Figure5.
SVM is a controlled AI algorithm used to isolate two types of information based on learning capability. The SVM approach works on several mathematical functions as presented in Table4.
The maximum value for attained accuracy is 64.32% for semisupervised and the least attained accuracy.Figure 5
Types of kernel functions in SVM [27].Table 4
List of kernel functions.
Kernel nameDescriptionEquationPolynomial kernelIt represents the correlation between the features of data during the training of SVM in the form of a polynomial variable.P (a, b) = αaTb+kdBy adjusting these parameters slope of the kernel can be adjusted using “k” as constant with degree “d.”Linear KernelIt is applicable for the linear separation of data, which is separated by a single line. Training is faster compared to other kernelsPa,b=aTb+kRadial Basis FunctionIt is used in SVM to separate two classesP (a, b) = exp(−γ‖a − b‖2)Sigmoid KernelIt comes from the neural network structure where it is used as an activation function. In SVM, it works like a two layer structure of the neural network.Pa=1/1+e−aGaussian KernelIt is the extended form of the RBF kernel.Pa,b=expa−b2/2σ2


### 3.2.2. ROL Segmentation

After preprocessing on images, a segmentation process is performed to segment the ROL from the dermoscopy image. It is clear by comparative analysis of various segmentation methods that the segmentation of ROL using K-means with GOA is better as compared to other combinations or hybridization. We will discuss comparative analysis of various segmentation approaches in the result and discussion section. GOA-based K-means (improved K-means) is used to choose ROL from dermoscopic pictures, and it is dependent on morphological procedures such as binarization, thinning, filling opening, dilatation, and so on. A morphological operation is a set of nonlinear operations that deal with the shape or morphology of picture features.Using some fundamental procedures, we apply morphological operations to the binary picture to determine the exact ROL from the dermoscopic images. An improved K-means method is built on the basis of morphological operations and the algorithm for improved K-means utilizing GOA is as follows in algorithm2:Algorithm 2: Improved K-means using GOA
Input: PIMAGE ← Preprocessed skin lesion imageOutput: ROL ← Region of the lesion from dermoscopic image(1)
Start(2)
[Row, Column, Plane] = Size (PIMAGE)(3)
Convert into double, PIMAGE = double (PIMAGE)(4)
Define centroid, NPART = 2//For front and backdrop classes(5)
Apply K-means(6)
ForM in range of each Row(7)
ForN in range of each column(8)
If PIMAGE (M, N) == NPART (1)(9)
ROL (M, N) = PIMAGE (M, N)//Front class data (Foreground)(10)
Else(11)
Non-ROL (M, N) = PIMAGE (M, N)//Back drop data (Background)(12)
End–If(13)
Adjust Centroid C using their mean(14)
C = Average (ROL and Non-ROL)(15)
End–For(16)
End–For(17)
Initialize GOA parameter–Iterations (T)–Population Size (S)–Lower Bound (LB)–Upper Bound (UB)–Fitness function (Fit fun)–Number of selection (N)(18)
Define fitness function:fitfun=1if pixel is lies in ROL0otherwise(19)
ForT in rage of each Row × Columnfs=∑i=1PROLT(20)
ft=∑i=1PROLT/Length of ROL(21)
fitfun=fitness function, which defines by above-given equation Thresholdvalue=GOAP,T,LB,UB,N,fitfun(22)
End–For(23)
Threshold=Thresholdvalue(24)
If ROL mixed(25)
ROL = Morphological (ROL, Threshold)(26)
End–If(27)
Return: ROL as a region of the lesion from dermoscopic image(28)
End–AlgorithmROL is segmented from improved and preprocessed dermoscopy skin lesion images using the aforementioned technique.


### 3.2.3. Feature Extraction

Using the SURF descriptor, we may extract the feature pattern based on their pixel pattern after ROL segmentation. Due to the stability and invariance nature of features, we choose the SURF descriptor as a feature pattern extraction strategy in this case, and SURF returns a more appropriate feature set for segmented ROL. The SURF descriptor is a fast and reliable algorithm for extracting the local, invariant, and oriented feature set from the ROL of dermoscopic images. The SURF descriptor algorithm3 is written as:Algorithm 3: Feature extraction using SURF descriptor
Input: ROL ← Region of the lesion from dermoscopic imageOutput: F-pattern ← SURF feature pattern of ROL(1)
Start(2)
[Row, Column, Plane] = Size (ROL)(3)
ForM in range of Row(4)
ForN in range of column(5)
E-point (M, N) = Extrema-detection (ROL (M, N))(6)
Key-point-localization (m, n) = Ex-point (E-point (M, N))(7)
If orientation required for localized data(8)
O-point (M, N) = Orientation (Key-point-localization (M, N))(9)
End–If(10)
F-pattern (M, N) = Filtered (O-points)(11)
End–For(12)
End–For(13)
Return: F-pattern as a SURF feature pattern of ROL(14)
End–AlgorithmWe employ the notion of feature selection utilizing the GOA as an optimization strategy with fitness function after extracting feature patterns from the ROL of dermoscopic pictures using the SURF descriptor, and the full description is given in the section below.


### 3.2.4. Feature Selection

This step is performed to choose the optimal feature set from the high-dimensional feature data supplied by the SURF descriptor in order to improve the classification accuracy of the proposed skin lesion segment and classification model. Because numerous features data are present in the SURF feature and it should be considered as irrelevant data and do not involve in the training scenario because they increase the chances of error in the model. Hence, for the selection of appropriate feature pattern, GOA is used with a novel fitness function and algorithm of GOA as feature selection is written as algorithm4 as under:Algorithm 4: Feature Selection using GOA
Input: F-pattern ← SURF feature pattern of ROLOutput: OF-pattern ← Optimized SURF feature pattern of ROL(1)
Start(2)
Initialize GOA Parameters:G–Grasshopper population based on the F-patternGP–Grasshopper PositionOF-pattern–Optimized Feature PatternFitness Function:Ff=1True;ifFs∗Gp≥Ft=ThresholdData0False;Otherwise,Where,Fs: It is the currently selected feature pattern form the F-patternFt: It is the threshold of all data and it is the average of all F-pattern(3)
[Row, Column, Plane] = Size (F-pattern)(4)
Set, OF-pattern = []//Set as empty initially(5)
ForI in range of Row × Column(6)
Fs = F-pattern (I) = SelectedData//Current data from F-pattern(7)
Ft = ThresholdData=∑i=1RFSI//Average of all data (F-pattern)(8)
Fitfun=Fit FunFs,Ft(9)
NVAR = Number of variables//Number of selection(10)
OF-pattern (I) = GOA (Fit (fun), NVAR, Set up of GOA)(11)
End–For(12)
If OF-pattern = 1 then(13)
OF-pattern = Select feature form F-pattern(14)
Else(15)
OF-pattern = Null(16)
End–If(17)
Return: OF-pattern as an optimized feature pattern(18)
End–AlgorithmSelect an only relevant collection of features based on the skin cancer classes and fitness requirements using the information provided above. We used these features as input to the CNN classifier to train the suggested skin lesion segment and cancer classification model, and we employed the pattern net-based CNN as a classifier or deep learning strategy in this case.


### 3.2.5. Model Training Using CNN

In this case, CNN was used as a classifier to train the model using three different skin lesion dermoscopic picture data sets. Hence, with distinct skin cancer kinds such as melanoma or nonmelanoma from basal cell carcinoma (BCC), squamous cell carcinoma (SCC), Merkel cell carcinoma (MCC), cutaneous T-cell lymphoma, and Kaposi sarcoma, an optimum set of feature patterns is considered as an input set of CNN.This section of CNN details the suggested classification technique, which aids in improving the proposed model’s classification accuracy, as well as the proposed CNN architecture is shown in Figure6.Figure 6
Architecture of CNN for the skin cancer classification model.CNN is the more advanced type of artificial neural networks, with its architecture based on deep architectures (ANNs). In 1989, LeCun et al. introduced the concept of CNN that is an improved and complex type of ANNs with deep architecture, and the architecture consists of convolutional, pooling, and fully connected layers as shown in Figure6. In the convolutional layer of CNN, SURF feature points of the segmented ROL are passed as a set of input data that is convolved with learnable filters to map the features. To map the feature, an activation function is used with each filter and then transfer towards the pooling layers. Here, pooling layers of CNN is spatially aiding in the subsampling of features of SURF feature points. In CNN, there are lots of activation functions are available but we use sigmoid activation functions for the fully connected layers of CNN. The algorithm 5 of CNN is written as:Algorithm 5: CNN
Input: OF-pattern ← Optimized SURF feature pattern of ROLG ← Class as a category or group for skin cancerN ← Neurons to carry the dataOutput: Model-Structure ← CNN trained structureOutput ← Classified results of the model(1)
Start(2)
Initialize the Pattern-based CNN: –Number of Epochs (E)//Iterations used by CNN–Number of Neurons (N)//Used as a carrier–Performance: Cross entropy of classes, Gradient, Validation check for the data, Error Histogram during the training and reverse operating characteristic–Training Data Division: Based on Random(3)
[Row, Column, Plane] = Size (OF-pattern)(4)
ForI in range of Row × Column(5)
If OF-pattern belongs to melanoma(6)
Group (1) = Feature from the OF-pattern of 1st Part//ALL gene expression data(7)
Else (Nonmelanoma)(8)
Group (2) = Feature from the OF-pattern of 2nd Part//AML gene expression data(9)
End–If(10)
End–For(11)
Initialized the pattern net, Model-Structure = Pattern-based CNN (N)(12)
Set the training parameters according to the requirements and train the system(13)
Model -Structure = Train (Model -Structure, OF-pattern, Group)(14)
Test Result = Sim (Model-Structure, Test ROL Feature)(15)
If Test Result = 1 (Melanoma)(16)
Classified Results = melanoma with performance evaluation parameters(17)
Else(18)
Classified Results = Non-melanoma with performance evaluation parameters(19)
End–If(20)
Output = Classified Results(21)
Return: Model-Structure as a trained structure with output as a classified result of model(22)
EndBoth scenarios for skin cancer training and classification model with optimized SURF features use the same algorithms and procedural methods. For the investigation of the suggested automatic skin lesion section and intelligent classification model, an extensive series of experiments is carried out. The proposed method was tested using the MATLAB Programming Language and toolboxes for image processing, neural networks, and optimization. In the following section of this study paper, the experimental results based on the various data sets are briefly described.


## 3.2.1. Preprocessing

It necessitated improving the quality of dermoscopic pictures and reducing various types of noise from the skin lesion images used in the proposed method. Selection of correct lesion location is a crucial aspect in designing an accurate skin lesion segment and classification model, as is the necessity to eliminate an excess part from the images known as background. In this step, first, we perform a hair removal approach to clear the lesion region from the hair and then intensity based image quality enhancement is used to improve the specific pixel points of a hair-free dermoscopy images. The HR-IQE method is employed in the proposed work to increase the image quality, which aids in the removal of hair from the lesion location, allowing for suitable feature extraction from the skin lesion. The HR-IQE algorithm1 is given as:Algorithm 1: HR-IQE
Input: SIMAGE←Skin lesion image.Output: PIMAGE ← Pre-processed skin lesion image.(1)
Start(2)
If SIMAGE is color(3)
GIMAGE = color to gray (SIMAGE)(4)
Else(5)
GIMAGE = SIMAGE(6)
End–if(7)
GIMAGE = Resize (GIMAGE, [512 512])(8)
Set radius,r = 7//To create a circular mask to store image(9)
[Row, Column, Plane] = Size (GIMAGE)(10)
Create a coordinates, [X, Y] = mesh grid (1 ⟶ Row)(11)
Create a mask,Mask=X−2802+Y−2802<2802(12)
Set, threshold, thresh = 5//To identify hair pixel in image(13)
CIMAGE = Close (GIMAGE, structure element)//Apply morphological operation to close extra part of image like hair(14)
Diff = double (CIMAGE)–double (GIMAGE)(15)
DIMAGE = Dilated (Diff > thresh)//Apply dilation on image(16)
For each Row(17)
For each Column(18)
If DIMAGE = false then(19)
PIMAGE ← GIMAGE(20)
Else(21)
PIMAGE ← Modification in GIMAGE and store with Mask(22)
End–If(23)
End–For(24)
End–For(25)
PIMAGE = Intensity Enhancement (PIMAGE, Limit (PIMAGE))(26)
Return: PIMAGE as a preprocessed skin lesion image(27)
EndThe preprocessing of skin lesion dermoscopic pictures is done in two steps, with the first stage being the most important; the concept of hair removal is performed based on the morphological operation that helps to select exact ROL. In another preprocessing step, we perfume intensity-based image quality enhancement which is carried out after the hair removal process. After preprocessing, we obtained an enhanced and hair-free image that helps to segment the exact ROL of dermoscopic images. Figure3 shows the outcome of the preprocessing process using HR-IQE algorithm, and the images are displayed in a clear manner.Figure 3
Preprocessing results (a) original image and (b) preprocessed Image.
(a)(b)In order to validate a processed image, entropy has been considered as the best evaluation parameter. The entropy of any data is the measure of disorder in the data. As per the definitions recognized worldwide, entropy is the uncertainty between the micrological elements [5].Mathematically, it can be defined as(1)S=kb⋅lnW.where kb is the Boltzmann constant and stands a value of 1.38064852 × 10−23 m2 kg s−2 K−1, in represents natural log, and W is the micrological distribution. If the entropy of the processed image is close to the entropy of the original image, the processing can be counted as positive processing. The preprocessing threshold of the mask is stored after every entropy calculation. When the entropy difference starts to increase, the mask threshold is set to be constant. For reference, Table 3 presents the calculation of entropy with mask variation of {1 : 3}% incremental growth.Table 3
Entropy of original image and processed image.
Mask variation percentageEntropy originalEntropy processed% difference107.1737266.12894514.564127.3298366.59132310.07543157.0400486.02019414.48645207.8672836.15665421.74358257.8534346.65505115.25936277.0144256.763243.580981307.0645026.14743212.98137To ensure the best processing outcome is attained, the reading has been taken after taking 10000 simulations. In the trend of the percentage difference, the minimum attainable entropy is 3.58% as shown in Figure4.Figure 4
Maximum attainable entropy based on the used data set.The data set comes with the ground truth value, and hence, if the preprocessed image is passed to training and classification mechanism using a binary class classifier to validate the best possible solution for future processing.The validation process is divided into some steps as follows.Step 1.
Organize the data into two segments as highly affected (Ha) and partially affected (Pa). Define regression value (Rv)Step 2.
Apply the round-robin method to select data from “Ha” and “Pa” with a validation percentage chosen from a set of valid range (Vr) Vr = {0.70–0.90}.Step 3.
Apply another round-robin to choose data from the Vr range.Step 4.
Pass selected data to Support Vector Machine.Step 5.
Monitor selected support vectors.Step 6.
Valid Select Range for Test (Vrt) of dataStep 7.
Store mask value to the repository to finalize the mask valueStep 8.
Calculate the Rv test as RvtStep 9.
Repeat Step1 to Step 8 until Rvt is smaller than Rv.
Support Vector Machine (SVM) has been used as the judgmental classifier to validate the preprocessed image. SVM is a binary classifier and can identify or signify the data into two segments. The ordinal measures of SVM are as follows. The key idea of SVM is to build a system with hyper planes based on the kernels. There are different kernel functions which can be applied to segregate the data as shown in Figure5.
SVM is a controlled AI algorithm used to isolate two types of information based on learning capability. The SVM approach works on several mathematical functions as presented in Table4.
The maximum value for attained accuracy is 64.32% for semisupervised and the least attained accuracy.Figure 5
Types of kernel functions in SVM [27].Table 4
List of kernel functions.
Kernel nameDescriptionEquationPolynomial kernelIt represents the correlation between the features of data during the training of SVM in the form of a polynomial variable.P (a, b) = αaTb+kdBy adjusting these parameters slope of the kernel can be adjusted using “k” as constant with degree “d.”Linear KernelIt is applicable for the linear separation of data, which is separated by a single line. Training is faster compared to other kernelsPa,b=aTb+kRadial Basis FunctionIt is used in SVM to separate two classesP (a, b) = exp(−γ‖a − b‖2)Sigmoid KernelIt comes from the neural network structure where it is used as an activation function. In SVM, it works like a two layer structure of the neural network.Pa=1/1+e−aGaussian KernelIt is the extended form of the RBF kernel.Pa,b=expa−b2/2σ2


## 3.2.2. ROL Segmentation

After preprocessing on images, a segmentation process is performed to segment the ROL from the dermoscopy image. It is clear by comparative analysis of various segmentation methods that the segmentation of ROL using K-means with GOA is better as compared to other combinations or hybridization. We will discuss comparative analysis of various segmentation approaches in the result and discussion section. GOA-based K-means (improved K-means) is used to choose ROL from dermoscopic pictures, and it is dependent on morphological procedures such as binarization, thinning, filling opening, dilatation, and so on. A morphological operation is a set of nonlinear operations that deal with the shape or morphology of picture features.Using some fundamental procedures, we apply morphological operations to the binary picture to determine the exact ROL from the dermoscopic images. An improved K-means method is built on the basis of morphological operations and the algorithm for improved K-means utilizing GOA is as follows in algorithm2:Algorithm 2: Improved K-means using GOA
Input: PIMAGE ← Preprocessed skin lesion imageOutput: ROL ← Region of the lesion from dermoscopic image(1)
Start(2)
[Row, Column, Plane] = Size (PIMAGE)(3)
Convert into double, PIMAGE = double (PIMAGE)(4)
Define centroid, NPART = 2//For front and backdrop classes(5)
Apply K-means(6)
ForM in range of each Row(7)
ForN in range of each column(8)
If PIMAGE (M, N) == NPART (1)(9)
ROL (M, N) = PIMAGE (M, N)//Front class data (Foreground)(10)
Else(11)
Non-ROL (M, N) = PIMAGE (M, N)//Back drop data (Background)(12)
End–If(13)
Adjust Centroid C using their mean(14)
C = Average (ROL and Non-ROL)(15)
End–For(16)
End–For(17)
Initialize GOA parameter–Iterations (T)–Population Size (S)–Lower Bound (LB)–Upper Bound (UB)–Fitness function (Fit fun)–Number of selection (N)(18)
Define fitness function:fitfun=1if pixel is lies in ROL0otherwise(19)
ForT in rage of each Row × Columnfs=∑i=1PROLT(20)
ft=∑i=1PROLT/Length of ROL(21)
fitfun=fitness function, which defines by above-given equation Thresholdvalue=GOAP,T,LB,UB,N,fitfun(22)
End–For(23)
Threshold=Thresholdvalue(24)
If ROL mixed(25)
ROL = Morphological (ROL, Threshold)(26)
End–If(27)
Return: ROL as a region of the lesion from dermoscopic image(28)
End–AlgorithmROL is segmented from improved and preprocessed dermoscopy skin lesion images using the aforementioned technique.


## 3.2.3. Feature Extraction

Using the SURF descriptor, we may extract the feature pattern based on their pixel pattern after ROL segmentation. Due to the stability and invariance nature of features, we choose the SURF descriptor as a feature pattern extraction strategy in this case, and SURF returns a more appropriate feature set for segmented ROL. The SURF descriptor is a fast and reliable algorithm for extracting the local, invariant, and oriented feature set from the ROL of dermoscopic images. The SURF descriptor algorithm3 is written as:Algorithm 3: Feature extraction using SURF descriptor
Input: ROL ← Region of the lesion from dermoscopic imageOutput: F-pattern ← SURF feature pattern of ROL(1)
Start(2)
[Row, Column, Plane] = Size (ROL)(3)
ForM in range of Row(4)
ForN in range of column(5)
E-point (M, N) = Extrema-detection (ROL (M, N))(6)
Key-point-localization (m, n) = Ex-point (E-point (M, N))(7)
If orientation required for localized data(8)
O-point (M, N) = Orientation (Key-point-localization (M, N))(9)
End–If(10)
F-pattern (M, N) = Filtered (O-points)(11)
End–For(12)
End–For(13)
Return: F-pattern as a SURF feature pattern of ROL(14)
End–AlgorithmWe employ the notion of feature selection utilizing the GOA as an optimization strategy with fitness function after extracting feature patterns from the ROL of dermoscopic pictures using the SURF descriptor, and the full description is given in the section below.


## 3.2.4. Feature Selection

This step is performed to choose the optimal feature set from the high-dimensional feature data supplied by the SURF descriptor in order to improve the classification accuracy of the proposed skin lesion segment and classification model. Because numerous features data are present in the SURF feature and it should be considered as irrelevant data and do not involve in the training scenario because they increase the chances of error in the model. Hence, for the selection of appropriate feature pattern, GOA is used with a novel fitness function and algorithm of GOA as feature selection is written as algorithm4 as under:Algorithm 4: Feature Selection using GOA
Input: F-pattern ← SURF feature pattern of ROLOutput: OF-pattern ← Optimized SURF feature pattern of ROL(1)
Start(2)
Initialize GOA Parameters:G–Grasshopper population based on the F-patternGP–Grasshopper PositionOF-pattern–Optimized Feature PatternFitness Function:Ff=1True;ifFs∗Gp≥Ft=ThresholdData0False;Otherwise,Where,Fs: It is the currently selected feature pattern form the F-patternFt: It is the threshold of all data and it is the average of all F-pattern(3)
[Row, Column, Plane] = Size (F-pattern)(4)
Set, OF-pattern = []//Set as empty initially(5)
ForI in range of Row × Column(6)
Fs = F-pattern (I) = SelectedData//Current data from F-pattern(7)
Ft = ThresholdData=∑i=1RFSI//Average of all data (F-pattern)(8)
Fitfun=Fit FunFs,Ft(9)
NVAR = Number of variables//Number of selection(10)
OF-pattern (I) = GOA (Fit (fun), NVAR, Set up of GOA)(11)
End–For(12)
If OF-pattern = 1 then(13)
OF-pattern = Select feature form F-pattern(14)
Else(15)
OF-pattern = Null(16)
End–If(17)
Return: OF-pattern as an optimized feature pattern(18)
End–AlgorithmSelect an only relevant collection of features based on the skin cancer classes and fitness requirements using the information provided above. We used these features as input to the CNN classifier to train the suggested skin lesion segment and cancer classification model, and we employed the pattern net-based CNN as a classifier or deep learning strategy in this case.


## 3.2.5. Model Training Using CNN

In this case, CNN was used as a classifier to train the model using three different skin lesion dermoscopic picture data sets. Hence, with distinct skin cancer kinds such as melanoma or nonmelanoma from basal cell carcinoma (BCC), squamous cell carcinoma (SCC), Merkel cell carcinoma (MCC), cutaneous T-cell lymphoma, and Kaposi sarcoma, an optimum set of feature patterns is considered as an input set of CNN.This section of CNN details the suggested classification technique, which aids in improving the proposed model’s classification accuracy, as well as the proposed CNN architecture is shown in Figure6.Figure 6
Architecture of CNN for the skin cancer classification model.CNN is the more advanced type of artificial neural networks, with its architecture based on deep architectures (ANNs). In 1989, LeCun et al. introduced the concept of CNN that is an improved and complex type of ANNs with deep architecture, and the architecture consists of convolutional, pooling, and fully connected layers as shown in Figure6. In the convolutional layer of CNN, SURF feature points of the segmented ROL are passed as a set of input data that is convolved with learnable filters to map the features. To map the feature, an activation function is used with each filter and then transfer towards the pooling layers. Here, pooling layers of CNN is spatially aiding in the subsampling of features of SURF feature points. In CNN, there are lots of activation functions are available but we use sigmoid activation functions for the fully connected layers of CNN. The algorithm 5 of CNN is written as:Algorithm 5: CNN
Input: OF-pattern ← Optimized SURF feature pattern of ROLG ← Class as a category or group for skin cancerN ← Neurons to carry the dataOutput: Model-Structure ← CNN trained structureOutput ← Classified results of the model(1)
Start(2)
Initialize the Pattern-based CNN: –Number of Epochs (E)//Iterations used by CNN–Number of Neurons (N)//Used as a carrier–Performance: Cross entropy of classes, Gradient, Validation check for the data, Error Histogram during the training and reverse operating characteristic–Training Data Division: Based on Random(3)
[Row, Column, Plane] = Size (OF-pattern)(4)
ForI in range of Row × Column(5)
If OF-pattern belongs to melanoma(6)
Group (1) = Feature from the OF-pattern of 1st Part//ALL gene expression data(7)
Else (Nonmelanoma)(8)
Group (2) = Feature from the OF-pattern of 2nd Part//AML gene expression data(9)
End–If(10)
End–For(11)
Initialized the pattern net, Model-Structure = Pattern-based CNN (N)(12)
Set the training parameters according to the requirements and train the system(13)
Model -Structure = Train (Model -Structure, OF-pattern, Group)(14)
Test Result = Sim (Model-Structure, Test ROL Feature)(15)
If Test Result = 1 (Melanoma)(16)
Classified Results = melanoma with performance evaluation parameters(17)
Else(18)
Classified Results = Non-melanoma with performance evaluation parameters(19)
End–If(20)
Output = Classified Results(21)
Return: Model-Structure as a trained structure with output as a classified result of model(22)
EndBoth scenarios for skin cancer training and classification model with optimized SURF features use the same algorithms and procedural methods. For the investigation of the suggested automatic skin lesion section and intelligent classification model, an extensive series of experiments is carried out. The proposed method was tested using the MATLAB Programming Language and toolboxes for image processing, neural networks, and optimization. In the following section of this study paper, the experimental results based on the various data sets are briefly described.


## 4. Result and Discussion

The results of the projected automatic skin lesion segment and intelligent classification model are examined in this part using three different data sets. The number of images used by the projected model during segmentation and classification of skin lesion dermoscopic images is presented in Table5.Table 5
Data set description for automatic skin lesion segment and intelligent classification model.
ClassISIC-2018PH-2ISIC-2017TrainingTestingTrainingTestingTrainingTestingMelanoma60010004006006001000Nonmelanoma60010004006006001000ISIC-2018, PH-2, and ISIC-2017 are the three data sets used in the proposed research for training and testing. 1000 photos are gathered for training and testing in the ISIC-2017 and ISIC-2018 data sets, with 60% of images (600 images) used for training and 40% used for testing. In PH-2 data set, 600 images are collected where 60% of images (400 image) are used for testing and 40% images are used for testing. In the proposed work, two classes of cancer are used that are melanoma and nonmelanoma. In this work, two subclasses of nonmelanoma are used that are common nevus and atypical nevus.Skin cancer class distribution of the dermoscopic images in different skin lesion data sets is presented in Table5 as well as Figure 7. That indicates the set of 1600, 1000, and 1600 images taken from the ISIC-2018, PH-2, and ISIC-2017, respectively, for training and the model. Based on these data sets, a comparative analysis is made to verify the performance of the proposed model by utilizing the concept of improved K-means using GOA as segmentation for the CNN-based skin cancer classification model, and the simulation results are provided in the below section based on different parameters such as accuracy, sensitivity, precision, F-measure, specificity, MCC, dice coefficient, and jaccard.Figure 7
Data set descriptions for the skin cancer classification model.Accuracy: The computation of accuracy is done by utilizing True Positive TP, True Negative TN, False Positive FP, and False Negative FN.(2)Accuracy=TPTP+TN+FP+FN.Sensitivity: This metric quantifies the number of correct positive generated test data from all positive test data. It provides an indication of missed positive test data.(3)Sensitivity=TPTP+FN.Precision: The number of positive class forecasts that truly belong to the positive class is quantified by this parameter.(4)Precision=TPTP+FP.F-Measure: This parameter provides a way in order to express both challenges in a single measure. After getting the value of precision and recall, the two score can be combined into the computation of F-measure.(5)F−measure=2×Precision×RecallPrecision+RecallPrecision=TPTP+FP.Specificity: This parameter is defined the negative results as in the form of true negative rate.(6)Specificity=TNTN+FP.MCC: The Matthews correlation coefficient (MCC) is applied in machine learning that measure the quality based on binary classifications.(7)MCC=TP×TN−FP×FNTP+FP+TP+FN+TN×FPTN×FN.Dice Coefficient: This parameter is applied for statistic used, and it is able to find out the similarity of two samples.(8)DSC=2TP2TP+FP+FN.Jaccard: The true negatives (TN) are ignored, and the true positives are related to the number of pairings that belong to the same class or cluster.(9)Jaccard=TPTP+FP+FN.


### 4.1. Comparative Analysis against Different Segmentation Approaches

In the proposed work, for achieving maximum classification accuracy segmentation must be greater so, different segmentation approaches are available. A comparative analysis is performed that describes different segmentation approaches and also helps to choose one of the better approach that is suitable for the proposed work.Here, the traditional K-means segmentation technique is used to segment the ROL in terms of fore front class and discard the rest of the data from the assumed image as a backdrop. However, the K-means algorithm faced the mixing problem of pixel for front class and backdrop data.In Figure8, K-means’ pixel mixing problem is shown where the backdrop is mixed with front class data. In Figure 8, the pixel mixing problem of the K-means algorithm is represented with a red color line. It needs to minimize it by utilizing the swarm-based optimization technique’s concept due to their searching ability. Here, we present a comparative analysis to select the GOA as a swarm-based optimization technique from the different methods such as Particle Swarm Optimization (PSO) and Firefly Algorithm (FFA).Figure 8
K-means pixels mixing problems.Table6 below presents the average accuracy comparison for K-means with these three algorithms to verify the effectiveness of GOA for skin lesion dermoscopic images.Table 6
Comparative analysis of K-means with PSO, FFA, and GOA based on segmentation accuracy.
No. of imagesK-meansK-means with PSOK-means with FFAK-means with GOA10061.2381.4785.6795.6920071.8485.1784.6296.4730076.2488.6485.7297.8940065.4890.1786.7498.3750069.3789.7488.7499.2860071.8487.9889.8998.2470075.8488.4591.8699.3680076.4292.8792.4799.8790082.6893.4195.8599.54100087.2895.8798.8799.76We represent the efficiency of the GOA as a swarm-based optimization technique to handle the pixel mixing problem of K-means based on the average acquired segmentation accuracy for 1000 different dermoscopic images. In Figure9, the graphical representation of segmentation accuracy is shown to better understand the effectiveness of GOA and the K-means technique.Figure 9
Segmentation accuracy comparative analysis.We obtained below given results which are useful in the next process of the proposed work. Here, we present a comparison of obtained segmented output or ROL using a different combination with K-means in Figure6.From Figure10, we differentiate the segmentation efficiency of K-means with GOA is better than the other hybridization of K-means with swarm-based approaches. Hence, the combination of K-means with GOA is taken into consideration for the proposed automatic skin lesion segment and intelligent classification model.Figure 10
Segmentation results (a) K-means, (b) K-means with PSO, (c) K-means with FFA, and (d) K-means with GOA.


### 4.2. Performance Analysis against Different Data sets

The parametric value of various parameters used for the performance analysis of the proposed work using three different data sets, namely, ISIC-2018, PH2, and ISIC-2017 are summarized in Tables7–9, respectively, for 1000 image samples.Table 7
Performance evaluation of model using ISIC-2018 data set.
SamplesAccuracy (%)SensitivityF-measurePrecisionMCCDiceJaccardSpecificity10097.8450.96410.96470.96540.95460.95230.92220.986120097.5420.95940.96330.96740.93780.93770.93480.984930097.5430.97510.96480.95480.94590.94590.94690.992740098.0030.96450.96990.97540.90460.92920.94190.993950098.1340.95620.96800.98010.94960.95070.91450.987560098.1840.98460.98290.98130.95390.94240.91350.991870098.5760.96740.97520.98320.96320.95830.94070.994380098.6540.96540.97750.99010.97260.96720.92650.995490099.2460.97230.98510.99820.98610.95660.93230.9958100099.5450.98450.99110.99790.99390.96470.94110.9963Average98.19180.96760.97240.97730.95200.94890.93030.9913Bold shows the average for the column.Table 8
Performance evaluation of model using PH-2 data set.
SamplesAccuracy (%)SensitivityF-measurePrecisionMCCDiceJaccardSpecificity10098.4250.97420.95800.94250.98140.91380.91080.984720098.1240.96240.96400.96580.94630.94070.91840.986530098.4750.93640.95210.96840.92550.95750.91830.987440097.6120.95640.96720.97840.91650.91980.90830.983250097.4510.94850.96620.98470.93470.92150.91050.984560097.9860.96840.97730.98650.94360.93110.92340.9845Average98.0120.95770.96420.97100.94130.93070.91490.9851Table 9
Performance evaluation of model using ISIC-2017 data set.
SamplesAccuracy (%)SensitivityF-measurePrecisionMCCDiceJaccardSpecificity10098.1560.93540.94380.95240.94010.94780.92840.982220098.2480.93450.95590.97840.94330.95270.93840.987330098.1020.94850.95700.96580.95750.95540.91850.980240097.8450.95650.96240.96840.96250.95980.93830.981750098.0140.97450.97230.97020.97870.96150.91050.985360098.3410.96410.97120.97850.97460.93110.92610.988170098.6540.97680.98210.98750.97580.96480.94640.990180098.8130.95610.97020.98480.98740.96120.92920.992490098.8740.98420.98710.99010.99130.98230.94840.9894100099.2430.98250.98730.99230.99280.97810.96830.9954Average98.4290.96130.96890.97680.97040.95940.93520.9872Bold shows the average for the column.The graphical comparison of accuracy for the classification of skin lesions is illustrated in Figure11 with the number of samples along the X-axis and observed accuracy of each sample for different data sets along the Y-axis. It is observed that highest average classification accuracy of 98.42% was achieved when simulations are performed using ISIC-2018 data set, 98.01% using the PH-2 data set, and 98.19% using the ISIC-2018 data set. This shows that using ISIC-2017 data set, the proposed work higher average accuracy as compared to ISIC-2017 and to PH-2 data set.Figure 11
Accuracy analysis.The sensitivity of the proposed work for skin lesion classification is compared in Figure12 that shows that nearly similar parametric values of sensitivity are obtained for three data sets. However, again, the average value of sensitivity using the ISIC-2018 data set is observed to be the highest with an average sensitivity of 0.9676, 0.9613, and 0.9577 observed using ISIC-2018, PH2, and ISIC-2017 data set, respectively. This means that the proposed technique reflected high sensitivity by using skin lesion images present in the ISIC-2018 data set as compared to the ISIC-2017 and to PH2 data set.Figure 12
Sensitivity analysis.Precision of classification using skin lesion images from three data sets is graphically compared in Figure13. It is observed that the proposed work demonstrated higher average precision 0.9710 using the PH-2 data set with 0.9768 using ISIC-2017 and 0.9773 using the ISIC-2018 data set. In other words, these observations depict that the precision observed using the ISIC-2018 data set is higher than the ISIC-2017 data set and higher than the PH2 data set.Figure 13
Precision analysis.Figure14 presents the comparison of the observed F-measure of the proposed work using three different data sets for evaluation of the strength of skin lesion classification. F-measure depicts the harmonic mean values of precision and sensitivity of the proposed work. The average F-measure observed using ISIC-2018, ISIC-2017, and PH-2 data sets are 0.9724, 0.9689, and 0.9642, respectively. This observation illustrates the proposed work using the ISIC-2018 data set exhibits and higher F-measure in comparison to using ISIC-2017 and PH2 datasets, respectively. Further, similar observations were also inferred for specificity analysis. Figure 15 shows that the proposed work’s average specificity using ISIC-2017, ISIC-2018, and PH-2 data sets is 0.9872, 0.9913, and 0.9851, respectively. In other words, the observed average specificity of the proposed work using the ISIC-2018 data set is higher than using ISIC-2017 and PH-2 data sets.Figure 14
F-measure analysis.Figure 15
Specificity analysis.The variation observed for MCC, dice, and jaccard of the proposed work using three different data sets is shown in Figures16–18, respectively. MCC analysis shown in Figure 16 over 1000 image samples used for the evaluation shows that the highest average MCC of 0.9704 is observed using the ISIC-2017 data set followed by 0.9520 using ISIC-2018 and 0.9413 using the PH2 data set. This reflects that MCC computed using ISIC-2017 data set is higher than ISIC-2018 and higher than PH-2 data set.Figure 16
MCC analysis.Figure 17
Dice coefficient analysis.Figure 18
Jaccard analysis.Figure17 presents the dice analysis of the proposed work for skin lesion classification using three data sets with the number of samples along the X-axis and observed dice along Y-axis. It is observed that the proposed work achieved the dice of 0.9595, 0.9489, and 0.9307 using ISIC-2017, ISIC-2018, and PH2 data sets, respectively. This shows that the dice coefficient for simulation analysis using skin lesion images from the ISIC-2017 data set is and higher than the ISIC-2018 and PH-2 data sets, respectively. Similar results are also observed for jaccard analysis. Figure 18 shows that the highest average dice coefficient of 0.9595 for the proposed work is achieved using the ISIC-2017 data set, which is and better than using ISIC-2018 and PH2 data sets, respectively.


### 4.3. Comparative Analysis against Existing Work

The simulation analysis summarized in the last section shows that the proposed work exhibits the best performance against the ISIC-2018 data set.The effectiveness of the proposed work is further justified with comparative analysis of performance parameters against the existing work of Almaraz-Damian et al. who had also implemented CNN as a machine learning technique for skin lesion segmentation work using the ISIC-2018 data set. Figure19 shows that the proposed work not only outperformed the existing work in terms of classification accuracy by 6.12% but also exhibits 9.21%, 5.78%, and 8.34% higher specificity, precision, and F-measure, respectively. The MCC of the existing work is 0.795 which is nearly 18% less than the proposed work. All these observations add to the success of the proposed work in terms of an improved skin lesion segmentation approach.Figure 19
Comparative analysis with the existing work.


## 4.1. Comparative Analysis against Different Segmentation Approaches

In the proposed work, for achieving maximum classification accuracy segmentation must be greater so, different segmentation approaches are available. A comparative analysis is performed that describes different segmentation approaches and also helps to choose one of the better approach that is suitable for the proposed work.Here, the traditional K-means segmentation technique is used to segment the ROL in terms of fore front class and discard the rest of the data from the assumed image as a backdrop. However, the K-means algorithm faced the mixing problem of pixel for front class and backdrop data.In Figure8, K-means’ pixel mixing problem is shown where the backdrop is mixed with front class data. In Figure 8, the pixel mixing problem of the K-means algorithm is represented with a red color line. It needs to minimize it by utilizing the swarm-based optimization technique’s concept due to their searching ability. Here, we present a comparative analysis to select the GOA as a swarm-based optimization technique from the different methods such as Particle Swarm Optimization (PSO) and Firefly Algorithm (FFA).Figure 8
K-means pixels mixing problems.Table6 below presents the average accuracy comparison for K-means with these three algorithms to verify the effectiveness of GOA for skin lesion dermoscopic images.Table 6
Comparative analysis of K-means with PSO, FFA, and GOA based on segmentation accuracy.
No. of imagesK-meansK-means with PSOK-means with FFAK-means with GOA10061.2381.4785.6795.6920071.8485.1784.6296.4730076.2488.6485.7297.8940065.4890.1786.7498.3750069.3789.7488.7499.2860071.8487.9889.8998.2470075.8488.4591.8699.3680076.4292.8792.4799.8790082.6893.4195.8599.54100087.2895.8798.8799.76We represent the efficiency of the GOA as a swarm-based optimization technique to handle the pixel mixing problem of K-means based on the average acquired segmentation accuracy for 1000 different dermoscopic images. In Figure9, the graphical representation of segmentation accuracy is shown to better understand the effectiveness of GOA and the K-means technique.Figure 9
Segmentation accuracy comparative analysis.We obtained below given results which are useful in the next process of the proposed work. Here, we present a comparison of obtained segmented output or ROL using a different combination with K-means in Figure6.From Figure10, we differentiate the segmentation efficiency of K-means with GOA is better than the other hybridization of K-means with swarm-based approaches. Hence, the combination of K-means with GOA is taken into consideration for the proposed automatic skin lesion segment and intelligent classification model.Figure 10
Segmentation results (a) K-means, (b) K-means with PSO, (c) K-means with FFA, and (d) K-means with GOA.


## 4.2. Performance Analysis against Different Data sets

The parametric value of various parameters used for the performance analysis of the proposed work using three different data sets, namely, ISIC-2018, PH2, and ISIC-2017 are summarized in Tables7–9, respectively, for 1000 image samples.Table 7
Performance evaluation of model using ISIC-2018 data set.
SamplesAccuracy (%)SensitivityF-measurePrecisionMCCDiceJaccardSpecificity10097.8450.96410.96470.96540.95460.95230.92220.986120097.5420.95940.96330.96740.93780.93770.93480.984930097.5430.97510.96480.95480.94590.94590.94690.992740098.0030.96450.96990.97540.90460.92920.94190.993950098.1340.95620.96800.98010.94960.95070.91450.987560098.1840.98460.98290.98130.95390.94240.91350.991870098.5760.96740.97520.98320.96320.95830.94070.994380098.6540.96540.97750.99010.97260.96720.92650.995490099.2460.97230.98510.99820.98610.95660.93230.9958100099.5450.98450.99110.99790.99390.96470.94110.9963Average98.19180.96760.97240.97730.95200.94890.93030.9913Bold shows the average for the column.Table 8
Performance evaluation of model using PH-2 data set.
SamplesAccuracy (%)SensitivityF-measurePrecisionMCCDiceJaccardSpecificity10098.4250.97420.95800.94250.98140.91380.91080.984720098.1240.96240.96400.96580.94630.94070.91840.986530098.4750.93640.95210.96840.92550.95750.91830.987440097.6120.95640.96720.97840.91650.91980.90830.983250097.4510.94850.96620.98470.93470.92150.91050.984560097.9860.96840.97730.98650.94360.93110.92340.9845Average98.0120.95770.96420.97100.94130.93070.91490.9851Table 9
Performance evaluation of model using ISIC-2017 data set.
SamplesAccuracy (%)SensitivityF-measurePrecisionMCCDiceJaccardSpecificity10098.1560.93540.94380.95240.94010.94780.92840.982220098.2480.93450.95590.97840.94330.95270.93840.987330098.1020.94850.95700.96580.95750.95540.91850.980240097.8450.95650.96240.96840.96250.95980.93830.981750098.0140.97450.97230.97020.97870.96150.91050.985360098.3410.96410.97120.97850.97460.93110.92610.988170098.6540.97680.98210.98750.97580.96480.94640.990180098.8130.95610.97020.98480.98740.96120.92920.992490098.8740.98420.98710.99010.99130.98230.94840.9894100099.2430.98250.98730.99230.99280.97810.96830.9954Average98.4290.96130.96890.97680.97040.95940.93520.9872Bold shows the average for the column.The graphical comparison of accuracy for the classification of skin lesions is illustrated in Figure11 with the number of samples along the X-axis and observed accuracy of each sample for different data sets along the Y-axis. It is observed that highest average classification accuracy of 98.42% was achieved when simulations are performed using ISIC-2018 data set, 98.01% using the PH-2 data set, and 98.19% using the ISIC-2018 data set. This shows that using ISIC-2017 data set, the proposed work higher average accuracy as compared to ISIC-2017 and to PH-2 data set.Figure 11
Accuracy analysis.The sensitivity of the proposed work for skin lesion classification is compared in Figure12 that shows that nearly similar parametric values of sensitivity are obtained for three data sets. However, again, the average value of sensitivity using the ISIC-2018 data set is observed to be the highest with an average sensitivity of 0.9676, 0.9613, and 0.9577 observed using ISIC-2018, PH2, and ISIC-2017 data set, respectively. This means that the proposed technique reflected high sensitivity by using skin lesion images present in the ISIC-2018 data set as compared to the ISIC-2017 and to PH2 data set.Figure 12
Sensitivity analysis.Precision of classification using skin lesion images from three data sets is graphically compared in Figure13. It is observed that the proposed work demonstrated higher average precision 0.9710 using the PH-2 data set with 0.9768 using ISIC-2017 and 0.9773 using the ISIC-2018 data set. In other words, these observations depict that the precision observed using the ISIC-2018 data set is higher than the ISIC-2017 data set and higher than the PH2 data set.Figure 13
Precision analysis.Figure14 presents the comparison of the observed F-measure of the proposed work using three different data sets for evaluation of the strength of skin lesion classification. F-measure depicts the harmonic mean values of precision and sensitivity of the proposed work. The average F-measure observed using ISIC-2018, ISIC-2017, and PH-2 data sets are 0.9724, 0.9689, and 0.9642, respectively. This observation illustrates the proposed work using the ISIC-2018 data set exhibits and higher F-measure in comparison to using ISIC-2017 and PH2 datasets, respectively. Further, similar observations were also inferred for specificity analysis. Figure 15 shows that the proposed work’s average specificity using ISIC-2017, ISIC-2018, and PH-2 data sets is 0.9872, 0.9913, and 0.9851, respectively. In other words, the observed average specificity of the proposed work using the ISIC-2018 data set is higher than using ISIC-2017 and PH-2 data sets.Figure 14
F-measure analysis.Figure 15
Specificity analysis.The variation observed for MCC, dice, and jaccard of the proposed work using three different data sets is shown in Figures16–18, respectively. MCC analysis shown in Figure 16 over 1000 image samples used for the evaluation shows that the highest average MCC of 0.9704 is observed using the ISIC-2017 data set followed by 0.9520 using ISIC-2018 and 0.9413 using the PH2 data set. This reflects that MCC computed using ISIC-2017 data set is higher than ISIC-2018 and higher than PH-2 data set.Figure 16
MCC analysis.Figure 17
Dice coefficient analysis.Figure 18
Jaccard analysis.Figure17 presents the dice analysis of the proposed work for skin lesion classification using three data sets with the number of samples along the X-axis and observed dice along Y-axis. It is observed that the proposed work achieved the dice of 0.9595, 0.9489, and 0.9307 using ISIC-2017, ISIC-2018, and PH2 data sets, respectively. This shows that the dice coefficient for simulation analysis using skin lesion images from the ISIC-2017 data set is and higher than the ISIC-2018 and PH-2 data sets, respectively. Similar results are also observed for jaccard analysis. Figure 18 shows that the highest average dice coefficient of 0.9595 for the proposed work is achieved using the ISIC-2017 data set, which is and better than using ISIC-2018 and PH2 data sets, respectively.


## 4.3. Comparative Analysis against Existing Work

The simulation analysis summarized in the last section shows that the proposed work exhibits the best performance against the ISIC-2018 data set.The effectiveness of the proposed work is further justified with comparative analysis of performance parameters against the existing work of Almaraz-Damian et al. who had also implemented CNN as a machine learning technique for skin lesion segmentation work using the ISIC-2018 data set. Figure19 shows that the proposed work not only outperformed the existing work in terms of classification accuracy by 6.12% but also exhibits 9.21%, 5.78%, and 8.34% higher specificity, precision, and F-measure, respectively. The MCC of the existing work is 0.795 which is nearly 18% less than the proposed work. All these observations add to the success of the proposed work in terms of an improved skin lesion segmentation approach.Figure 19
Comparative analysis with the existing work.


## 5. Conclusion

Dermoscopy images are available that help in the diagnosis of skin lesions by the computer-aided diagnosis systems based on CNN, a deep learning approach that can automatically extract features inside patterns that help in efficient classification. In this study, utilizing the ISIC-2017, ISIC-2018, and PH-2 data sets, images of skin lesions were classified. The model obtained a classification accuracy of 98.42%. To achieve this, various existing SI techniques are evaluated, and GOA is found to exhibit the best performance for skin lesion segmentation work. Further, SURF is taken for the feature extraction of the segmented regions and the CNN for classification of the skin lesion images into melanoma and nonmelanoma classes. The proposed work exhibits the best performance with 98.42% classification accuracy, 97.73% precision, MCC of 0.9704, and also outperformed the existing work by 6.12% accuracy. It was observed that the proposed approach improves the existing work with 9.21%, 5.78%, and 8.34% higher specificity, precision, and F-measure, respectively. The MCC of the existing work is 0.795 which is nearly 18% less than the proposed work. This shows that the approach has a broader scope for melanoma diagnosis, and in future work, higher success can be obtained by enhancing the model and upgrading the data set and also further evaluated for more classes to address the practical challenges in healthcare and diagnosis.



---

*Source: 1709842-2022-04-18.xml*