Abstract
Skin cancer is a common disease resulting from genetic defects, and early detection is critical to improve treatment outcomes. Diagnostic programs that use computer aid especially those that use supervised learning are very useful in early diagnosis of skin cancer. This research therefore presents a new approach that integrates optimization methods with supervised learning to improve skin cancer diagnosis using machine vision approach. The presented method is initiated by data pre-processing that involves the removal of unnecessary data. Then, to segment the images, a combination of K-means clustering and social spider optimization technique is employed. The region of interest is then extracted from the segmented image and from this region a convolutional neural network extracts the significant features. To enhance the classification performance as compared with the standard classifiers, this research introduces a new concept of error correcting output codes coupled with a weighted Hamming distance in the group of gamma classifiers. The ability of the proposed approach in segmentation of skin lesions and classifying them was tested using samples from the ISIC-2017 and ISIC-2016 databases. The introduced method obtained state-of-the-art accuracy on both datasets (ISIC-2016: 97.10%, ISIC-2017: 95.17%). In particularly, the accuracy of the introduced approach for both these databases is at least 1.17% higher than the compared methods. This proves the high performance of the suggested method based on the usage of the convolutional neural networks for feature extraction and gamma classifiers with error correcting output codes for classification in skin cancer detection.
Keywords: Skin cancer, Convolutional neural network, Social spider optimization, Gamma classifier
Subject terms: Neuroscience, Mathematics and computing
Introduction
One common kind of cancer that starts in the skin is skin cancer and then, other body parts may experience an invasion by these cells. Skin cell Deoxyribonucleic Acid (DNA) damage that is not repaired leads to cancer and is primarily caused by Ultra Violet (UV) exposure. Skin moles give rise to melanoma cancer cells, which inflame the surrounding area and elevate its temperature1. There are three (3) basic layers of the skin. Squamous, Basal, and melanocyte cells make up the first three outermost layers, which is where skin cancer first appears. Squamous cell and basal cell malignancies are other names for non-melanoma cancers. Non-melanoma Skin cancer reacts well to treatment and seldom spreads to other skin tissues. Compared to most other skin tumors, melanoma is more deadly2.
Traditionally, the diagnosis of melanoma was done by biopsies, the most conclusive test being excision of a small piece of tissue for histopathological examination3. New technologies have been developed to improve the techniques of lesion examination; dermoscopy is one of them, which uses a handheld dermatoscope to improve the visualization of subsurface structures using polarized light and immersion oil4. It is a non-invasive method that assists in locating features that have a likelihood of being melanoma but cannot alone confirm the presence of the disease. Biopsy is still a gold standard in diagnosing melanoma and it is the cornerstone of early diagnosis3.
The ABCDE symptoms, a helpful indicator for melanoma, are one typical and often utilized tip for melanoma diagnosis. Based on five characteristics—(A) symmetry, (B) order irregularity, (C) color variability, (D) diameter higher than 6 mm, and (E) evolution, or any form of change this feature can distinguish among a benign skin lesion and a malignant melanoma5. Cancer diagnosis must be done in a fast and correct manner, with the assistance of some professionals and a variety of necessary equipment. As a result, several computer support systems are deployed to assist the specialists in this field. Machine learning and deep learning techniques are now applied in a wide range of fields other than healthcare6. Non-invasive methods for detecting skin cancer are usually not accurate enough. Invasive sampling methods, although reliable, are not usually accepted by patients due to their difficulties. Recently, machine learning techniques have been used to classify the types of lesions and predict skin cancer through skin images. However, these techniques are far from an ideal model, and we need to use more efficient techniques to more accurately detect skin cancer through images. The majority of research focuses on categorizing lesions as benign or cancerous. However, precise lesion segmentation is essential for treatment planning for confirmed malignancies, therefore it would be beneficial to develop models that are capable of both segmentation and classification.
Therefore, to achieve an efficient model, several research gaps must be filled at the same time. These gaps include: accurate segmentation of lesion, efficient description of features for suspected regions, and also, accurate classification of features. Although some of these issues can be solved individually by taking advantage of recent developments in the field of deep learning; However, the review of recent researches shows that a comprehensive strategy has not been provided to meet these goals at the same time. Presenting a hybrid model to achieve these goals has motivated the current research.
This research presents an innovative image segmentation strategy based on combination of Social Spider Optimization (SSO) and K-means clustering for accurate segmentation of skin lesions. The optimization strategy used in this method minimizes the dependence of its performance on imaging conditions (such as: lighting, noise, distortion) and has made it superior to models based on machine learning. Also, the proposed model utilizes the significant capabilities of convolutional neural networks to effectively extract the features of the lesion. Finally, in order to solve the challenges related to the accuracy of lesion classification, in the proposed method, the combination of gamma classifications has been used in the form of an Error Correcting Output Codes (ECOC) model. This classification model, through the integration of ECOC with an innovative weighted distance measure, significantly improves the performance of classification models compared to individual approaches. Thus, the innovations of the current research can be summarized in the introduced segmentation algorithm as well as the hybrid approach used for feature classification. In brief, our principal contributions are described below:
Presenting a novel image segmentation algorithm based on SSO and K-means for identifying lesions in skin images.
Introducing a light-weight Convolutional Neural Network (CNN) for efficient extraction of features from skin lesions.
Presenting a novel hybrid classification algorithm based on gamma classifier ECOC using weighted hamming distance.
This paragraph, describes the continuation of the article: In section two, we looked at some similar research. In the third portion, the materials and technique were presented. The fourth portion provides an assessment of the findings, and the fifth section concludes.
Related works
Majtner et al.7 pre-processed and extracted features from a dataset from the International Skin Imaging Collaboration (ISIC) using CNN algorithms. The dataset included 379 test samples and 900 training samples that were categorized as malignant and benign. The system employed bounding box techniques, binary masking, and feature extraction using AlexNet. When feature reduction was done using Linear Discriminant Analysis (LDA) approaches, K-Nearest Neighbors (KNN) yielded the best results with 86% precision and 99.9% specificity.
A melanoma diagnosis method was created by Vipin et al.8 with the goal of cutting down on time and human intervention. The 13,000 photos in the ISIC dataset that the algorithm used were reduced to 7353 after irrelevant ones were eliminated. A symmetric U-Net with maximum pooling and convolutional layers was employed in the segmentation step. Deep residual networks with recurrent neural network and CNN approaches were employed in the classification step. The system’s recall was 91% and its accuracy was 88.7%.
A CNN with a Fully Connected (FC) layer, two pooling layers of max. type, and two convolution layers was proposed by Sanketh et al.9 in order to diagnose skin cancer early, start treatment effectively, and lower death rates. The 2719 photos in the dataset—which was acquired from ISIC—were split into training and testing images. The model’s best performance was 98%.
The CNN introduced by Rahi et al.10 was created by combining max-pooling layers with convolution layers of two distinct strides to create nine layers total among the input and FC layer. There were additional dropout layers used. 2967 photos total—trained and test—were used to train the model. It obtained a 78.81% specificity and an accuracy of 84.76%.
Gulati et al.11 extracted features from the PH2 data, and used Visual Geometry Group (VGG-16) and AlexNet pretrained networks for transfer learning. In transfer learning, VGG-16 fared better than AlexNet, achieving 97.5% accuracy and 96.87% specificity.
Using 640 lesions photos, Daghrir et al.5 developed a new method using CNN, KNN, and Support Vector Machine (SVM) models. There were nine layers in the CNN design, and different preprocessing methods were used. The ultimate classification yielded an accuracy of 88.4%; CNN had the highest individual accuracy of 85.5%, followed by 71.8% accuracy achieved by the SVM.
Razmjooy et al.12 provided an optimization-based technique for melanoma cancer diagnosis using soft computing. They applied preprocessing methods to eliminate artifacts and noises, then used the World Cup Optimization (WCO) algorithm for weight and bias optimization, and applied morphological operations for post-processing.
Based on the notion of deep learning and simulation findings, Jadhav et al.13 suggested a boundary recognition system for skin cancer combining SVM and CNN learning models, reaching a 95.5% accuracy with an F-measure of 94.14%.
Despite a high computational cost, Rehman et al.14 proposed a skin lesion recognition and segmentation method that demonstrated improved segmentation and classification accuracy by using graph-cut and seed region growing strategies, speeded-up robust attributes, and Histogram of Oriented Gradients (HOG) descriptors.
Using ResNet152 for pretraining and combining with CNN in region- and mask-based modes, Jojoa Acosta et al.15 classified lesions in the ISIC-2017 data. Two phases of the architecture’s implementation were carried out, with the eVida M6 model—the suggested model—offering a precision boost of 3.66% over the top-performing models.
An SVM based in a kernel function with Gaussian Radial Basis Function (RBF) was used by Mustafa and Kimura16 to provide an intelligent technique for distinguishing melanoma in pictures. With the optimal parameters, the algorithm identified only six criteria for melanoma identification, with an accuracy of 86.67%.
Ilkin et al.17 established a hybrid classification algorithm for melanoma detection using bacterial colony algorithm. The algorithm, hybSVM, uses segmented images and the ABCDE rule to identify nine features. HybSVM proved to be successful and time-efficient as evidenced by its accuracy of 97.50% and 97.56% for the PH2 and ISIC datasets, when compared to Scikit-learn and ThunderSVM.
Arora et al.18 presented a diagnosis method that uses accurate feature extraction approaches to identify lesions as benign or malignant. They applied models such as quadratic SVM, linear discriminant, fine tree, and linear SVM to 100 images from the PH2 dataset.
The chaotic WCO, is a new metaheuristic methodology that Bi et al.19 presented to enhance skin cancer diagnosis systems. It utilizes contrast enhancement for segmentation and a SVM for melanoma boundary identification. The method’s precision is enhanced by choosing useful features and training them to the SVM. The results show the method has the highest effectiveness compared to four other methods. With low rates of erroneous acceptance and rejection, the approach yields the highest correct identification rate for ISIC and American Cancer Society (ACS) images.
Nawaz et al.20 used Fuzzy K-means Clustering (FKM) and faster region-based CNN (RCNN) to offer an intelligent solution for early-stage segmentation of cutaneous melanoma. The technique first preprocesses the photos to eliminate noise and issues with lighting before applying RCNN to produce a feature vector. The afflicted area of skin is then segmented using FKM. With an average accuracy of 95.6%, 93.1%, and 95.40% respectively on the PH2, ISIC-2017, and ISIC-2016 data, the strategy exceeds state-of-the-art approaches.
Tabrizchi et al.21 introduced a new model for early diagnosis of skin cancer based on dermoscopic data and utilizing VGG-16 network. The model improves accuracy in skin cancer detection by employing an enhanced architecture. A comparative study on the international skin image collaboration dataset showed that their model can outperform other techniques in terms of accuracy. Table 1 summarizes the studied works.
Table 1.
Summary of the literature.
| References | Year | Research goal | Method | Limitation |
|---|---|---|---|---|
| Majtner et al. 7 | 2019 | Improve melanoma detection | CNN features, pre-processing | Limited dataset size |
| Vipin et al. 8 | 2021 | Melanoma diagnosis with reduced human intervention | Deep learning on ISIC dataset | Potential bias from reduced dataset |
| Sanketh et al. 9 | 2020 | Early melanoma detection | CNN with 2 convolution, 2 max-pooling, and one final FC layer | Limited details on dataset and architecture |
| Rahi et al. 10 | 2019 | Skin cancer detection using CNN | CNN with dropout layers | Accuracy lower than some other studies (84.76%) |
| Gulati et al. 11 | 2019 | Malignant melanoma detection | Transfer learning (AlexNet, VGG16) on PH2 dataset | Relies on pre-trained models, may not generalize well |
| Daghrir et al. 5 | 2020 | Melanoma detection using hybrid approach | CNN, KNN, SVM | Lower accuracy than some CNN-only models (88.4%) |
| Razmjooy et al. 12 | 2018 | Melanoma diagnosis with optimization | Preprocessing, world cup optimization algorithm, morphological operations | Limited details on method and dataset |
| Jadhav et al. 13 | 2019 | Skin cancer border detection | CNN and SVM classifier | Simulation results, real-world performance unknown |
| Rehman et al. 14 | 2020 | Skin lesion recognition and segmentation | Seed region growing, graph-cut approaches, HOG descriptors | High computational cost |
| Jojoa Acosta et al. 15 | 2021 | Melanoma classification | Mask-based and region-based CNN with ResNet152 | Limited details on dataset and architecture |
| Mustafa and Kimura 16 | 2018 | Automated melanoma detection | SVM with Gaussian RBF kernel | Lower accuracy than some other studies (86.67%) |
| İlkin et al. 17 | 2021 | Melanoma detection with reduced time consumption | hybSVM algorithm with bacterial colony optimization | Relies on pre-defined features (ABCDE rule) |
| Arora et al. 18 | 2022 | Early skin cancer detection | Feature extraction, SVM | Limited dataset size (100 images from PH2) |
| Bi et al. 19 | 2021 | Improve skin cancer diagnosis | Chaotic World Cup Optimization with SVM | Limited details on dataset and architecture |
| Nawaz et al. 20 | 2022 | Skin melanoma segmentation | Faster R-CNN and fuzzy k-means clustering | High computational cost |
| Tabrizchi et al. 21 | 2023 | Early skin cancer detection | Improved VGG-16 network | Limited details on how the VGG model is improved |
Research methodology
This section first outlines the characteristics of the utilized data, then proceeds to explain the processes implemented in the introduced approach for diagnosing skin cancer based on these data.
Data
Samples from the datasets ISIC-201622 and ISIC-201723 are used in this investigation. The datasets made available by ISBI address the problem of diagnosing skin cancer through analysis of skin lesions. Training and test samples comprise the two components of the ISIC-2016 database. There are 900 color photographs in this database that serve as training examples. It also contains 379 test samples, of which 304 are classified as normal and 75 as melanoma. However, the ISIC-2017 database has more samples than that—2000 training samples and 600 test samples—than any other database. This database’s test set includes 117 melanoma samples and 483 normal samples. The instances from both datasets have characteristics that make the detection procedure difficult, like the presence of tiny veins and hair strands, noise, reflection, and blurring. Notably, as of the time this article was written, the ISIC dataset included three more recent databases: ISIC-2018, ISIC-2019, and ISIC-2020. But they weren’t used in the testing procedure because of the large number of samples in these databases.
Proposed method
For efficient skin cancer detection via machine vision techniques, it’s crucial to employ a precise strategy for eliminating image artifacts and pinpointing the Region of Interest (ROI). Concurrently, the deployment of an accurate feature extraction model to supply a robust classification model is highly significant. This research endeavors to fulfill these prerequisites in the issue of skin cancer detection by amalgamating optimization techniques and supervised learning. The proposed method executes the detection process through the subsequent steps:
Preprocessing.
Segmentation and ROI detection: Utilizing a combination of SSO and K-means.
Extracting features from ROI: Employing a convolutional neural network.
Detection: Using gamma classifiers and ECOC with weighted hamming distance.
The sequence of steps in the proposed method is illustrated in a diagram in Fig. 1. As per this figure, the input images undergo preprocessing initially to eliminate extraneous information present within the input image, e.g., hair strands. Following this, each image is segmented utilizing an algorithm that combines SSO and K-means. A collection of segmented images with the ROI recognized as a contiguous region are the result of this stage. A CNN is then used to extract features from the ROI. As a result, the input image’s probable melanoma region is clipped and applied to the suggested CNN. The last FC layer of this CNN model defines the features of the ROI, leaving off the layers required for feature classification. Ultimately, a group of gamma classifiers are used to form an ECOC model for classifying the extracted features. This classification model improves the performance of the conventional ECOC model by utilizing a new weighted hamming distance and ascertains the status of the input sample in terms of susceptibility to skin cancer. The remainder of this section is devoted to elaborating each of these steps.
Fig. 1.
Diagram of the presented approach for detection of skin cancer.
Image preprocessing
Preprocessing the raw images is the first step in the suggested procedure. This preprocessing step’s goal is to remove unnecessary data and offset negative image characteristics, which will improve the detection system’s performance in the next stages. Pictures taken from the skin are adversely affected by two main things:
The existence of hair strands and blood arteries in the skin, which can cause errors in the identification process;
Negative effects resulting from imaging, such as blurring, noise, or light reflection in the skin tissue.
The morphological closure operator and the unsharp filter24 are used in the preprocessing stage of the suggested method to mitigate the effects of the previously described issues. First, the morphological operator is used to try and remove hair strands and blood vessels. The characteristics of this operator are as follows:
![]() |
1 |
where
denotes the initial input image, and
signifies the image resulting from the application of the morphological operator. Additionally,
and
respectively refer to the 10 pixels against each other pixel in the directions of 90° and 180°. The dilation morphological operator is denoted by
, and
represents the erosion morphological operator. Morphological closing operator is obtained through the dilation
with structuring element
and then applying an erosion ⊖ with structuring element
. Closing operator mainly completes small gaps in the foreground objects and links adjacent objects. Therefore, blood vessels and hair strands in the input image are removed by using this operator because of their low thickness and less than 10 pixels. However, this process induces blurring in the image
. Consequently, to counteract the image blur, the unsharp filter is employed. This operation can be expressed as follows24:
![]() |
2 |
where x and y stand for the image’s length and width, respectively. In addition,
represents the result of running the unsharp filter over the image
, which can be utilized to improve the quality of the image. In order to obtain a high-resolution image free of arteries and hair strands, the preprocessing step’s output is obtained by subtracting the image
from the input image
.
![]() |
3 |
the set of images, derived from the execution of the aforementioned steps, serves as the input for the phase two of the presented model. This step performs the segmentation and detection of the lesion based on these images.
Image segmentation based on K-means and SSO
The second phase in the presented model involves the segmentation of preprocessed images and the identification of the ROI, accomplished using a fusion of the K-Means algorithm and SSO. The objective of this phase is to diminish the complexity of the problem, enabling the separation of the region suspected of being a lesion in the image as a cluster from other regions. The segregation of the lesion suspected of skin cancer can be achieved by analyzing the disparity in brightness intensity values. Consequently, by optimally adjusting the threshold values for each region, the accurate method of segregating regions in images can be ascertained. The proposed strategy models this phase as an optimization problem and employs SSO to solve it. The proposed method adopts an approach akin to the basic K-Means algorithm for image segmentation, with the distinction that the center of each region in the image is regarded as an optimization variable, and its optimal value is ascertained using SSO. Additionally, to expedite convergence, the initial population of SSO is formed based on the K-Means algorithm. In this section, the segmentation process is initially formulated as an optimization problem, followed by an explanation of its solving using SSO.
Consider an image, denoted as X, to be segmented into K non-overlapping segments. In any skin image, the differentiation between two tissue regions can only be achieved by examining the positional information and brightness intensity of the pixels that constitute the tissue. Consequently, a segment in image X can be characterized as a set of adjacent pixels that exhibit a smaller intensity difference with each other compared to other adjacent regions (possessing a common border). Conversely, two disconnected regions A and B with analogous intensity values can be regarded as two distinct segments. This definition implies that to identify each segment, both the positional information and brightness intensity of the pixels must be taken into account. In the optimization problem addressed in this research, an optimization variable is assigned for each ROI in the image, which determines the brightness intensity threshold corresponding to that region. Consequently, each solution vector in the proposed algorithm is encoded as a numerical vector of length K, where each value in this vector has search boundaries of (0, 255) and signifies the brightness intensity threshold of the pixels pertaining to its corresponding region.
In the proposed method, the membership of each pixel to a region is ascertained by calculating the difference in brightness intensity with the thresholds established in the solution vector. Consequently, each pixel in the image is associated with a region that exhibits the smallest absolute difference with the threshold corresponding to that region in the solution vector. In this manner, for each solution vector generated by the optimization algorithm, a candidate segmentation for the input image can be formulated. The primary objective of the optimization algorithm is to identify the optimal segmentation state among the generated candidate responses. To achieve this, the preeminence of a segmentation state over others must be ascertained using a fitness evaluation function. The proposed optimization model employs a fusion of three criteria: intra-cluster distance,’ ‘inter-cluster distance,’ and ‘entropy’ to determine the optimal segmentation state for each image. To evaluate the fitness of each solution vector based on these criteria, the image X is initially segmented into K regions based on the solution vector S. During this process, the absolute difference of each pixel with each of the K thresholds determined in S is computed, and that pixel is associated with the region that exhibits the smallest difference with the corresponding threshold. By applying this operator to all pixels, the image X is segmented into K regions to yield the matrix Y. The resulting segmentation solely considers the brightness intensity information of image X and disregards the positional information of the regions. Henceforth, the obtained regions are segregated from each other based on positional information. In this case, the image matrix Y is segmented into its constituent contiguous regions. Subsequently, if the area of a contiguous region exceeds 0.1 of the image area, a new unique identifier is allocated to that region to be recognized as a separate segment. Upon executing this process for all regions, the candidate segmentation image predicated on the solution vector S is segmented into
non-overlapping regions. The quality of this segmentation is assessed using entropy criteria and intra-cluster and inter-cluster distances. In the proposed segmentation algorithm, the quality of the segmentation resulting from each solution vector is computed as follows:
![]() |
4 |
in Eq. (4),
is a parameter for modulating the effect of the distance criterion, which is considered to be 1 in this research.
symbolizes the intra-cluster distance and delineates the average absolute difference in brightness intensity of the pixels of each segment with a unique identifier from its center in the image Y. This criterion can be expressed as follows:
![]() |
5 |
where C, denotes the set of unique segments in Y, and
characterizes the number of pixels affiliated with the (i)th segment. Additionally,
signifies the difference in brightness intensity of the (j)th pixel from the center of the (i)th segment. In relation (4), the parameter
delineates the inter-cluster distance, which indicates the smallest difference in brightness intensity of the center of a segment with other segments of the image. In other words, to compute the inter-cluster distance, the difference in brightness intensity of the center of a segment like i is calculated with other segments possessing a distinct identifier, and subsequently, the smallest resulting difference is regarded as this criterion. This criterion can be expressed as follows:
![]() |
6 |
the parameter
in Eq. (4) represents the average entropy of the unique segments of image Y. The entropy of each segment is calculated separately:
![]() |
7 |
where
represents the probability of the occurrence of brightness intensity value x in a segment. The objective of the proposed segmentation algorithm is to establish a state of image segmentation that minimizes the entropy and intra-cluster distance of each segment while maximizing the inter-cluster distance. Minimizing entropy and intra-cluster distance implies forming segments with maximum pattern uniformity. Conversely, maximizing the inter-cluster distance ensures that a state of segmentation can be achieved where any difference between any two regions is maximized. The proposed method employs SSO to identify a segmentation capable of minimizing Eq. (4).
It is worth noting that a high convergence speed in a segmentation algorithm, based on optimization techniques, carries significant importance. In this context, in addition to the search strategy used, the way the initial population is formed is also important. In the proposed method, the K-means algorithm is utilized to determine a portion of the population. This allows for the provision of approximations of points adjacent to the global optimum for the optimization algorithm. Considering that setting the entire initial population based on the K-means algorithm can heighten the risk of the algorithm falling into a local optimum, the proposed method determines 1/4 of the initial population in SSO based on K-means, while the other solution vectors in the initial population are assigned random values. In this scenario, to determine each initial K-means solution vector, image X is converted into vector form, and the resulting vector is segmented into K clusters. Subsequently, the centers of the resulting clusters are considered as a solution vector. The steps of image segmentation by the SSO algorithm are as follows:
Algorithm 1 Image segmentation by SSO.
Following the segmentation of the image by the aforementioned steps, the largest region is identified as the ROI. This region is cropped from the preprocessed image and utilized as the input for the feature extraction model.
Feature extraction based on convolutional neural network
A CNN is used in the third phase of the suggested method to extract the ROI’s features. Figure 2 shows the CNN structure that is used in the suggested method for obtaining the ROI’s features. An attempt has been made to use the most straightforward structure for feature extraction in the construction of the CNN model. The best results can be obtained by using a CNN model with two convolution layers, two MaxPool layers, and two FC layers, according to an analysis of different CNN model architectures for feature extraction.
Fig. 2.
The employed CNN architecture for extracting features from ROIs.
According to Fig. 2, the return value of the last FC layer of the proposed CNN model is regarded as the features extracted for each sample, and the layers required for feature categorization are absent (these layers are just utilized for training the model). In order to use the ROI matrices from the previous stage as the input for this CNN model on the input layer, they are resized to 100 × 100 dimensions. The appropriate setup for the hyperparameters of the proposed CNN was determined using a grid search strategy. Hyperparameters related to the CNN configuration that were examined in the search process include: the dimensions of the convolution layer, the number of filters in the convolution layer, the type of activation function and the type of pooling function. Also, the performance of the model has been investigated for different training configurations (including optimizer and minimum batch size). In Table 2, the hyperparameters considered to configure the CNN model are listed.
Table 2.
Hyperparameters considered to tune the CNN feature extraction model.
| Hyperparameter | Search values |
|---|---|
| Convolution width/length | {2, 3, 4, 6} |
| Number of filters | {8, 16, 24, 32, 48} |
| Activation | ReLU, PReLU, LeakyReLU |
| Pooling | Max, min, average |
| Optimizer | SGDM, Adam |
| Mini Batch | {8, 16, 32} |
The configuration search and its evaluation have been done based on the validation error criterion. The following configuration led to the minimized validation error and therefore, was applied to the proposed CNN for feature extraction. The two convolution layers that extract feature maps from the input patterns are made up of 32 and 48 filters with dimensions of 5 and 3, respectively. The feature maps’ dimensions are decreased by using MaxPool layers, which have 2 × 2 dimensions. It’s crucial to remember that the convolution and pooling layers’ stride size option is set to 1. Finally, two consecutive FC layers are used to convert the collected patterns into vector form, resulting in a reduction of the feature matrices’ dimensions to 50. The input for the suggested classification model is the feature vectors that were retrieved using this CNN model. On the other hand; CNN model training based on Adam optimizer and minimum batch size of 16 resulted in the best performance in the used data set.
Detection based on gamma classifiers and ECOC
The last stage of the suggested approach uses an ECOC model, which consists of a set of gamma classifiers, to identify skin cancer by classifying the features taken from the ROI. As a result, the structure of the suggested ECOC model is explained in this part before the gamma classifiers that were used are discussed.
ECOC with weighted hamming distance
Using the ECOC model and a coding matrix, the complex classification issues is divided into a number of simpler classification tasks. In the coding matrix, the binary classifiers are represented by columns, while the target classes are represented by rows. The defined codes in each column of the coding matrix are used to train the binary classifiers. Each target category is represented as a binary code string in a unique way.
In the proposed method, the dense random scheme is used to construct the coding matrix. This strategy sets
as the total length of the distinctive code string for every target category. The gamma classifier is the classification model that the suggested approach uses. Using the dense random technique, a coding matrix
is initially built in order to classify the retrieved characteristics. Every row in the matrix corresponds to a target category, and the codes found in one of the training coding matrix’s columns are used to train every gamma classifier model.
During the testing stage, each sample’s attributes are analyzed by a trained gamma classifier to create binary outputs, which are then used to predict the target in the test samples. Next, a code string is created by combining the classifiers’ binary output codes. The instance will ultimately belong to the category whose binary output from the classification algorithms has the lowest distance with the associated string after this code string is contrasted with the rows of the M.
The Hamming distance measure is used in traditional ECOC methods to calculate the disparity between two code sequences. All of the learners are equally important in this scenario. On the other hand, in the introduced model the disparity is determined using the weight values that are assigned to each binary classifier. The exhaustive technique is employed to provide weight for the learners, with each classifier’s weight being computed as a natural number within the interval [0,3].
Following this method of weighting the learners, the disparity between the binary classifiers’ output code sequence and the target category codes is computed using the Hamming function in conjunction with these weight values. The following is the definition of this weighted Hamming distance:
![]() |
12 |
where
denotes the weight given to the (i)th classifier, u and v are code strings, and
is a binary function that yields 1 in the event that
and
are not equal. Also, L denotes the length of code sequence associated to each target class.
Gamma classifier
The generalized Gamma operator is used by the supervised Gamma classifier, which gets its name from the similarity operator. When a positive integer (
) and two binary vectors (x and y) are entered, this operator returns a value of 1 if the two vectors are similar, and 0 otherwise. A binary vector is required as input for the gamma operator. To work with real or integer vectors, a mechanism for representing these vectors in binary form is needed. Typically, the modified Johnson-Möbius code from26 is used in this work. The proposed method uses the mechanism defined in26 to implement the gamma classifier, and therefore, its details are omitted in this section.
Implementation results
In this study, MATLAB software version 2020 was used to conduct experiments on two datasets, ISIC-2016 and ISIC-2017. To avoid the risk of getting a biased performance assessment due to the single random splitting of the dataset, the 10-fold cross validation was done on the entire data. While the initial model development and the tuning of hyperparameters were done using the training, validation, and the testing set, the 10-fold cross-validation was performed on the entire dataset to make the evaluation of the generalization ability of the model accurate. First, the whole dataset is divided into 10 parts with uncommon instances. Then at the start of each fold in cross-validation one of these parts (10%) is taken as the test set. For the rest of the 9 parts, one random part is taken as validation set (10%) while the other 8 parts (80%) are taken as training examples. By means of such selection, all the instances of the dataset are used to test the model at the end of the 10-fold cross-validation. At the end of each fold the evaluation criteria (accuracy, precision, recall and f-measure) are determined based on the predictions made for the test instances. The performance metrics presented in this section are the averages from the 10-fold cross-validation process in the end. This approach increases the validity and reliability of our study. While implementing the SSO optimization algorithm, we considered the population size as 100 and the number of iterations as 300. Also, for the K-Means algorithm, we have considered the number of regions to be 2.
While comparing the predictions made by the proposed algorithm with the ground-truth label of the test instances, one of the following situations may occur:
True Positive (TP): Indicates when the algorithm accurately detects individuals with skin cancer.
False Negative (FN): Occurs when the algorithm incorrectly identifies individuals with skin cancer as healthy.
False Positive (FP): Happens when individuals are healthy, but the algorithm wrongly diagnoses them with cancer.
True Negative (TN): Represents cases where individuals are healthy and the algorithm correctly identifies them as such.
Accuracy is the fundamental performance metric, delineating the proportion of correctly predicted positives and negatives to the overall count of predictions.
![]() |
13 |
precision can be defined as a metric that quantifies the predicted positive observations. It is calculated by dividing the number of correctly predicted positives by the total number of positive predictions.
![]() |
14 |
recall, as a metric, quantifies the accurately anticipated positive observations. It represents the proportion of accurately predicted positives in relation to the overall count of true positive observations.
![]() |
15 |
the F-measure can be defined as the harmonic mean of the precision and recall values that are derived from a specific classification model.
![]() |
16 |
Figure 3 shows the steps involved in pre-processing, segmentation and ROI extraction for some sample images of the ISIC-2016 and ISIC-2017 databases. The first two rows are related to the 2016 data set, and the other two rows are related to the 2017 data set. According to Fig. 3, the proposed method to remove redundant information from the image using the pre-processing steps, has successfully reduced noise and hair from samples. Also, the proposed segmentation technique has been able to provide an appropriate estimate of ROI and accurately separate ROI.
Fig. 3.
Preprocessing, segmentation, and target region extraction steps on a few samples from the ISIC-2016 and ISIC-2017 database images.
In this study, we examined our proposed method in three modes, which we will discuss in detail.
Proposed (ECOCW + GC): It is related to the case that we extracted the features according to the same model mentioned in the third section through CNN and used the gamma classifier-based ECOC with weighted hamming measure to classify the features.
CNN: It is related to the case that when we have extracted a ROI by the proposed method, let’s use the same CNN model for classification. In this case, the CNN architecture is finalized with the necessary layers for classifying instances, and therefore, the ECOC model is not utilized. Comparing the proposed method with this case, demonstrates the effect of using a separate hybrid classifier for diagnosis.
Single GC: It is related to the case that we use a single gamma classifier model (instead of ECOC) for diagnosis. Comparing the proposed method with this case, demonstrates the effect of utilizing ECOC in leveraging the diagnosis accuracy of the single classifiers.
Furthermore, we compared our proposed approach to the CWCO-SVM, DL-FKM, and iVGG16 methods, as cited in Refs.19,20,21, respectively.
Figure 4 shows the average accuracy in skin cancer diagnosis. In Fig. 4a, our proposed method (CNN + GC) can be seen with an accuracy of 97.10%, the CNN method with an accuracy of 93.67%, and the comparative method iVGG1621 with an accuracy of 95.51%. In Fig. 4b, our proposed method with an average accuracy of 95.17%, CNN and iVGG16 methods21 can be seen with 90.50% and 94% accuracy, respectively. As you can see, our method outperformed other methods in the ISIC-2016 database by 1.59% and also in the ISIC-2017 database by 1.17% compared to other methods.
Fig. 4.
Analyzing the average accuracy.
Figures 5 and 6 show the confusion matrix in the ISIC-2016 and 2017 databases. In these figures, the columns act as the actual characteristics of samples and categories. The lines also show the output of each classification algorithm. The results showed that the proposed method performed better than the comparative methods examined in this study in detecting negative and positive samples. Based on the matrices obtained from the ISIC-2016 database, the proposed method has only 7 examples of errors in the negative category, which is less than other methods. Also, for the positive category, the number of errors in the classification of samples is competitive with other methods. Analyzing the results obtained for ISIC-2016 in Fig. 5, the TP is lower than in the CWCO-SVM19 and DL-FKM20 algorithms, but the TN is significantly higher. This highlights the model’s ability to correctly identify negative cases (fewer false positives), contributing to the overall superior accuracy (97.10%) despite the lower TP (0.947) compared to the aforementioned methods (CWCO-SVM19: TP = 0.973, DL-FKM20: TP = 0.96). On the other hand, for the ISIC-2017 dataset as shown in Fig. 6, the proposed method shows higher TP and TN that implies better result in both the positive and the negative cases (higher precision and recall) as compared to the other approaches.
Fig. 5.
Confusion matrix in the ISIC-2016 database.
Fig. 6.
Confusion matrix in the ISIC-2017 database.
In Fig. 7, we examined the performance of different methods based on precision, recall, and f-measure criteria for the ISIC-2016 and ISIC-2017 datasets. The results showed that the proposed method provided better results than other methods. In the recall criterion for the ISIC-2016 database, the recall value is equal to the iVGG1621 method. But in terms of precision, the proposed method has been able to perform better, with a value of 0.91% higher than other methods, which shows that this method has performed better in detecting positive samples more accurately. Also, for the ISIC-2017 database, the proposed method has better performance in terms of recall than other methods, and in the F-measure criterion, it has provided good performance in both databases with an improvement of 0.93% and 0.89%, respectively.
Fig. 7.
Analyzing the classification quality.
Figure 8 illustrates the receiver operating characteristic (ROC) curve of algorithms for evaluating them in terms of detecting positive category or the so-called diagnosis of skin cancer, based on false positive rate (FPR) and true positive rate (TPR) criteria. The goal of a classification model for skin cancer diagnosis is to make more correct diagnoses and have a lower false positive rate. Our proposed method has been able to improve this feature compared to the other methods. This improvement in the results shows the increase of the area under the curve (AUC), which has increased compared to the compared methods. In other words, we can report this increase as 0.98 and 0.97% for the ISIC-2016 and ISIC-2017 databases, respectively.
Fig. 8.
Analyzing the ROC curve.
Table 3 displays the values of accuracy, recall, AUC, F-measure, and precision for various approaches. According to this data, the proposed approach (CNN + GC) has a precision of 91.03%, a readability of 94.67%, an F-measure of 92.81%, and an accuracy of 97.09%. The CNN method has an accuracy value of 79.31% and a readability of 92%, whereas the F-measure is 85.19% and the accuracy is 93.67%. These results indicate that the proposed method (CNN + GC) is more accurate than other methods.
Table 3.
Comparison of different approaches’ performance in the ISIC-2016 database.
| Methods | Precision | Recall | F-measure | Accuracy | AUC |
|---|---|---|---|---|---|
| Proposed (CNN + GC) | 0.9103 | 0.9467 | 0.9281 | 97.0976 | 0.9758 |
| CNN | 0.7931 | 0.9200 | 0.8519 | 93.6675 | 0.9393 |
| GC | 0.6667 | 0.9333 | 0.7778 | 89.4459 | 0.9289 |
| CWCO-SVM 19 | 0.7374 | 0.9733 | 0.8391 | 92.6121 | 0.9700 |
| DL-FKM 20 | 0.7912 | 0.9600 | 0.8675 | 94.1953 | 0.9588 |
| iVGG16 21 | 0.8452 | 0.9467 | 0.8931 | 95.5145 | 0.9567 |
Table 4 shows the performance comparison of the proposed model (CNN + GC) with other models in the field of skin cancer diagnosis. The proposed model (CNN + GC) has high accuracy and appropriate readability, which makes the F criterion and its overall accuracy significantly high. Also, the area under the ROC curve for this model is very close to one, which indicates a good performance in recognizing categories. Comparison with other models also shows that the proposed model has performed better in most of the criteria including accuracy, readability, F-measure and overall accuracy. These results show that the proposed method can effectively detect skin cancer and has a higher performance than the compared methods.
Table 4.
Comparison of different approaches’ performance in the ISIC-2017 database.
| Methods | Precision | Recall | F-measure | Accuracy | AUC |
|---|---|---|---|---|---|
| Proposed (CNN + GC) | 0.8188 | 0.9658 | 0.8863 | 95.1667 | 0.9651 |
| CNN | 0.7000 | 0.8974 | 0.7865 | 90.5000 | 0.9059 |
| GC | 0.5673 | 0.8291 | 0.6736 | 84.3333 | 0.8439 |
| CWCO-SVM 19 | 0.7219 | 0.9316 | 0.8134 | 91.6667 | 0.9302 |
| DL-FKM 20 | 0.7568 | 0.9573 | 0.8453 | 93.1667 | 0.9554 |
| iVGG16 21 | 0.7914 | 0.9402 | 0.8594 | 94 | 0.9402 |
Discussion, limitations and future works
The findings show that the proposed method achieved superior performance compared to baseline approaches (CNN-only and Single GC) and achieved competitive results against recent methods (CWCO-SVM, DL-FKM, iVGG16) on the ISIC-2016 and ISIC-2017 datasets. The CNN plays a crucial role in feature extraction. Tables 3 and 4 show that the CNN-only approach achieves reasonable accuracy (ISIC-2016: 93.67%, ISIC-2017: 90.50%). This indicates the ability of the CNN to learn discriminative features from skin lesion images. While the GC on its own performs moderately well (ISIC-2016: 89.45%, ISIC-2017: 84.33%), in this case, the use of the ECOC-based GCs in conjunction with the CNN (CNN + GC) results in remarkable improvement (at least 7.65% in term of accuracy). This implies that the GCs are able to leverage on the informative features that are generated by the CNN in order to perform a better classification. The incorporation of ECOC with a weighted Hamming measure in the proposed method is therefore advantageous and leads to better performance than Single GC approach and also other methods (Tables 3 and 4). ECOC enables solving multi-class problems by using several binary classifiers and enhancing the model’s stability when there is noise and class imbalance.
The proposed method achieved state-of-the-art accuracy on both datasets (ISIC-2016: 97.10%, ISIC-2017: 95.17%). In comparison with the previously proposed approaches (CWCO-SVM19, DL-FKM20, and iVGG1621), the proposed method showed higher or similar accuracy, precision, recall, F-measure, and AUC rates. This indicates that feature extraction using CNNs and classification using gamma classifiers and ECOC are effective in the diagnosis of skin cancer.
Despite the significant performance in increasing the accuracy of skin cancer diagnosis, the proposed method has limitations:
Limited Dataset Size: Although the proposed models yield good performance, the study is restricted by the sample size of the ISIC-2016 and ISIC-2017 datasets.
Computational Cost: Training deep learning models like CNNs and also, multiple gamma classifiers can sometimes be time consuming.
Explainability: Although the presented method has a high accuracy, a difficulty appears in understanding the decisions made by the CNN model.
According to the findings and the identified limitations of the proposed method, future works can include:
Validation on larger and more diverse datasets.
Exploration of transfer learning.
Development of explainable a.i. techniques.
Conclusion
Skin cancer, a prevalent global malignancy, underscores the critical need for early identification to significantly impact treatment outcomes. This approach involves image preprocessing to eliminate extraneous data, segmentation through a composite SSO and K-Means algorithm, feature extraction via a CNN, and the utilization of a Gamma classifier for detection. The process commences with image preprocessing to remove redundant information, followed by segmentation using a hybrid SSO and K-Means algorithm, feature extraction via a CNN, and subsequent isolation of the suspected melanoma region. The CNN model is then employed to extract features, which are subsequently classified using a Gamma classifier to determine the input sample’s susceptibility to skin cancer. The proposed method clearly demonstrates its efficacy in cancer detection with a precision of 91% on the ISIC-2016 dataset and 82% on the ISIC-2017 dataset. This research presents a promising advancement in the accurate detection of skin cancer, highlighting the potential for improved diagnostic capabilities in clinical settings.
Author contributions
All authors wrote the main manuscript text. All authors reviewed the manuscript.
Funding
Liaoning Provincial Department of Science and Technology “Unveiled” Science and Technology Plan Project (No.2021JH1/10400051).
Data availability
All data generated or analysed during this study are included in this published article.
Declarations
Competing interests
The authors declare no competing interests.
Footnotes
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
References
- 1.Narayanamurthy, V. et al. Skin cancer detection using non-invasive techniques. RSC Adv.8 (49), 28095–28130 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 2.Achakanalli, S. & Sadashivappa, G. Statistical analysis of skin cancer image–a case study. Int. J. Electron. Commun. Eng. (IJECE)3(3), 1–10 (2014). [Google Scholar]
- 3.Singh, P. K., Agarwal, D. & Gupta, A. A systematic review on software defect prediction. In 2015 2nd international conference on computing for sustainable global development (INDIACom) (pp. 1793–1797). IEEE, 2015).
- 4.Jaleel, J. A., Salim, S. & Aswin, R. B. Computer aided detection of skin cancer. In 2013 international conference on circuits, power and computing technologies (ICCPCT) (pp. 1137–1142) (IEEE, 2013).
- 5.Daghrir, J., Tlig, L., Bouchouicha, M. & Sayadi, M. Melanoma skin cancer detection using deep learning and classical machine learning techniques: A hybrid approach. In 2020 5th international conference on advanced technologies for signal and image processing (ATSIP), pp. 1–5 (IEEE, 2020).
- 6.Demir, A., Yilmaz, F. & Kose, O. Early detection of skin cancer using deep learning architectures: resnet-101 and inception-v3. In 2019 medical technologies congress (TIPTEKNO), pp. 1–4 (IEEE, 2019).
- 7.Majtner, T., Yildirim-Yayilgan, S. & Hardeberg, J. Y. Optimised deep learning features for improved melanoma detection. Multimed. Tools Appl.78, 11883–11903 (2019). [Google Scholar]
- 8.Vipin, V. et al. Detection of melanoma using deep learning techniques: A review. In 2021 international conference on communication, control and information sciences (ICCISc), Vol. 1, pp. 1–8 (IEEE, 2021).
- 9.Sanketh, R. S., Bala, M. M., Reddy, P. V. N. & Kumar, G. P. Melanoma disease detection using convolutional neural networks. In 2020 4th international conference on intelligent computing and control systems (ICICCS), pp. 1031–1037 (IEEE, 2020).
- 10.Rahi, M. M. I. et al. Detection of skin cancer using deep neural networks. In 2019 IEEE Asia-pacific conference on computer science and data engineering (CSDE), pp. 1–7 (IEEE, 2019).
- 11.Gulati, S. & Bhogal, R. K. Detection of malignant melanoma using deep learning. In International conference on advances in computing and data sciences, pp. 312–325 (Springer Singapore, Singapore, 2019).
- 12.Razmjooy, N., Sheykhahmad, F. R. & Ghadimi, N. A hybrid neural network–world cup optimization algorithm for melanoma detection. Open Med.13 (1), 9–16 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 13.Jadhav, A. R., Ghontale, A. G. & Shrivastava, V. K. Segmentation and border detection of melanoma lesions using convolutional neural network and SVM. In Computational Intelligence: Theories, Applications and Future directions-volume I: ICCI-2017, pp. 97–108 (Springer, Singapore, 2019).
- 14.Rehman, A. et al. Microscopic melanoma detection and classification: a framework of pixel-based fusion and multilevel features reduction. Microsc. Res. Tech.83 (4), 410–423 (2020). [DOI] [PubMed] [Google Scholar]
- 15.Jojoa Acosta, M. F., Tovar, C., Garcia-Zapirain, L. Y., Percybrooks, W. S. & M. B., & Melanoma diagnosis using deep learning techniques on dermatoscopic images. BMC Med. Imaging. 21 (1), 1–11 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 16.Mustafa, S. & Kimura, A. A SVM-based diagnosis of melanoma using only useful image features. In 2018 international workshop on advanced image technology (IWAIT), pp. 1–4 (IEEE, 2018).
- 17.İlkin, S. et al. hybSVM: bacterial colony optimization algorithm based SVM for malignant melanoma detection. Eng. Sci. Technol. Int. J.24 (5), 1059–1071 (2021). [Google Scholar]
- 18.Arora, G., Dubey, A. K., Jaffery, Z. A. & Rocha, A. Bag of feature and support vector machine based early diagnosis of skin cancer. Neural Comput. Appl. 1–8 (2022).
- 19.Bi, D., Zhu, D., Sheykhahmad, F. R. & Qiao, M. Computer-aided skin cancer diagnosis based on a new meta-heuristic algorithm combined with support vector method. Biomed. Signal Process. Control. 68, 102631 (2021). [Google Scholar]
- 20.Nawaz, M. et al. Skin cancer detection from dermoscopic images using deep learning and fuzzy k-means clustering. Microsc. Res. Tech.85 (1), 339–351 (2022). [DOI] [PubMed] [Google Scholar]
- 21.Tabrizchi, H., Parvizpour, S. & Razmara, J. An improved VGG model for skin cancer detection. Neural Process. Lett.55 (4), 3715–3732 (2023). [Google Scholar]
- 22.Gutman, D. et al. Skin lesion analysis toward melanoma detection: A challenge at the international symposium on biomedical imaging (ISBI) 2016, hosted by the international skin imaging collaboration (ISIC). arXiv preprint arXiv:1605.01397. (2016).
- 23.Codella, N. C. et al. Skin lesion analysis toward melanoma detection: A challenge at the 2017 international symposium on biomedical imaging (ISBI), hosted by the international skin imaging collaboration (ISIC). In 2018 IEEE 15th international symposium on biomedical imaging (ISBI 2018), pp. 168–172 (IEEE, 2018).
- 24.Shi, Z., Chen, Y., Gavves, E., Mettes, P. & Snoek, C. G. Unsharp mask guided filtering. IEEE Trans. Image Process.30, 7472–7485 (2021). [DOI] [PubMed] [Google Scholar]
- 25.Luque-Chang, A., Cuevas, E., Fausto, F., Zaldivar, D. & Pérez, M. Social spider optimization algorithm: modifications, applications, and perspectives. Math. Probl. Eng.2018, 1–29 (2018). [Google Scholar]
- 26.Uriarte-Arcia, A. V., López-Yáñez, I., Yáñez-Márquez, C., Gama, J. & Camacho-Nieto, O. Data stream classification based on the gamma classifier. Math. Probl. Eng. (2015).
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
All data generated or analysed during this study are included in this published article.





















