© 2026 The authors. This article is published by IIETA and is licensed under the CC BY 4.0 license (http://creativecommons.org/licenses/by/4.0/).
OPEN ACCESS
Skin cancer has various forms and has widely spread throughout the world, with an increasing case rate lately. Diagnosis through visual inspection or more enhanced images can be misleading due to the similarity of mixed cases. Due to the great challenge of this problem, researchers have attempted to extract different features of lesions and feed them into machine learning models or directly apply images to deep learning models in order to increase accuracy. Although they were partially successful, the problem has still not been fully resolved due to the lack of accuracy in complicated lesions. We propose a novel feature called slope via energy spectral analysis of Fourier shape descriptors, supported additionally with lesion features such as average color and a few shape properties. This feature set was applied to a small-size ANN model for binary classification. The public complicated dataset, International Skin Imaging Collaboration (ISIC), has been used to train and test the model. The accuracy was promising, balanced within the classes, and as high as 94%.
melanoma, energy spectral analysis, fourier descriptors, lesion features, artificial neural network
Skin cancers are the most common cancer throughout the world. In 2022, approximately 1.5 million new cases were reported. Approximately 330,000 of these new cases are melanoma. The Global Cancer Observatory estimates 331,722 new cases of melanoma and 58,667 deaths worldwide. Globally, melanoma comprises only 20% of all skin cancers, but causes the majority of skin cancer deaths. The corresponding mortality rates are about 0.53 per 100,000, respectively. Incidence is much higher in fair-skinned populations. For example, Australia, New Zealand, and Western Europe have the highest rates compared to Asia and Africa. An estimated 1.26 million people have been diagnosed with melanoma in the past five years, predominantly in Europe and North America. Melanoma occurs more frequently in men than in women in most regions. As an illustration of the geographic burden, Europe and North America together account for 78% of melanoma cases and 60% of deaths [1].
Skin cancer also imposes a heavy economic burden. Detailed global cost data are scarce, but country-level analyzes highlight the scale. In the United States, for example, nearly 6 million people are treated annually for skin cancer, at an annual medical cost of about 9 billion USD. Melanoma in particular causes substantial loss of productivity from premature deaths and morbidity. A US review estimated that melanoma mortality alone (and its associated years of life lost) corresponds to on the order of 2 to 3 billion dollars per year in lost productivity. Extrapolating to the global scale (with many more cases and much higher treatment costs in absolute terms) implies a global economic toll that is likely to be in the tens of billion annually. These figures do not count out-of-non-medicals or non-medical impacts of skin cancer [1].
Skin cancer begins when skin cells undergo changes in their DNA. This DNA contains instructions that guide how cells function. In normal cells, these instructions regulate growth, division, and when cells should naturally die. However, in cancer cells, DNA mutations alter these signals, causing cells to grow and divide uncontrollably. Unlike healthy cells, cancer cells don't die when they should, leading to an excessive buildup of cells. While the exact cause of skin cancer is not always known, it is generally linked to exposure to ultraviolet (UV) radiation from the sun. UV radiation can damage the DNA in skin cells, which may trigger cancer development. Globally, cutaneous malignant melanoma form of skin cancer occurs more frequently in people with fair skin.
Visual observation of a lesion is the most common method because melanoma lesions have non-symmetrical and irregular shapes, multicolor in different regions and larger sizes. However, examination of a physician with the naked eye may affect examination performance negatively because for some cases there are similarities, and differences may not be noticeable by the naked eye. It is reported that using computer-aided diagnostic tools improves diagnostic sensitivity by 20–30% compared with the examination of a doctor with the naked eye [2]. Therefore, many studies have been carried out using machine learning (ML) and deep learning (DL) techniques to diagnose the melanoma exceeding the performance of experienced dermatologists in detecting and diagnosing skin lesions. ML techniques include Decision Trees (DT) [3], Support Vector Machines (SVMs) [4], K-Nearest Neighbour (KNN) [5] and Artificial Neural Networks (ANNs) [6]. DL techniques include Convolutional Neural Networks (CNNs or ConvNet) and pre-trained models such as GoogLeNet, InceptionV3, ResNet, SqueezeNet, DarkNet, DenseNet, Xception, Inception-ResNet, Nasnet, and EfficientNet. Some of these studies have been examined by Grignaffini et al. with a systematic review [7].
In this paper, we contribute a computer-aided decision support system to identify melanoma skin cancer. We have extracted a novel feature from lesion image Fourier Descriptor’s (FD) energy spectrum using Ordinary Least Squares (OLS) method filtering out low frequency components of FDs using PCA + HMM. SHAP (Shapley Additive Explanations) analysis has proved the effectiveness of this feature [8]. We have included average color and shape parameters such as major/minor axis, eccentricity, compactness and perimeter as additional features. This way, we have minimized the number of features obtaining a moderate size ANN model. High accuracy with short train time and low processing power have been achieved compared to the models being used in the previous researches in literature. From the point of model complexity, training load and inference time, we observe that our ANN model has many advantages over recent deep learning models.
The organization of this paper is as follows: In the Related Works section, we will provide an overview of literature survey classified as machine learning and deep learning studies. In the Materials and Methodology section, we provide general information about how we selected dataset from the International Skin Imaging Collaboration (ISIC) database [9] as well as the cleaning of the lesion images in the Dataset Preparation subsection. In the Feature Extraction subsection, a novel approach will be introduced to extract a feature using Fourier Descriptors energy spectrum. ANN model details will be provided in this section as well. Our research’s performance results will be provided compared with previous studies in the Experimental Results and Analysis Section. In the Conclusion Section we will give the final suggestions as well as providing a guide for future research.
Related works in literature focus on mainly 3 properties of the image which are shape, color and texture. Shape parameters include comparison with a circle, compactness, area, eccentricity, perimeter, rectangularity, major and minor diameters, symmetry maps, etc. Color parameters include average RGB, standard deviation, variance, skewness, maximum, minimum, entropy and 1D or 3D color histograms. Texture parameters include Asymmetry, Border Irregularity, Color and Diameter of lesion parameters (ABCD), computation of the gray-level co-occurrence matrix (GCLM), wavelet and Fourier transforms, fractal dimension, multidimensional receptive fields histograms and Markov random fields.
While ML techniques generally require preprocessing operations such as image processing, in DL, on the other hand, features are automatically extracted from the datasets without the need for prior domain knowledge resulting increase of processor load and process time. So, we grouped the related works in literature according to ML and DL techniques being used.
2.1 ML based studies
Fatima et al. [10] introduced a Multi-Parameter Extraction and Classification System (MPECS) involving 21 features across six phases to support early melanoma detection. Key features included lesion borders, color, symmetry, area, perimeter, and eccentricity. They applied Sobel edge detection for border extraction and assessed symmetry via vertical and horizontal axes. Color spread was analyzed through neighborhood pixel similarity. Their findings indicated that relying solely on statistical analysis of extracted features was insufficient for accurate lesion classification, suggesting that advanced classification techniques like support vector machines or decision trees would yield better performance.
Barata et al. [11] proposed two melanoma detection systems using dermatoscopic images focused on extracting color and texture features. The first system employs global classification methods, while the second utilizes local features with a bag-of-features approach. The study aimed to evaluate which system yields better classification results. Findings showed that color features performed better than texture features when used individually. Both systems achieved high performance, with 96% sensitivity and 80% specificity, highlighting the importance of color information in skin lesion classification.
Tan et al. [12] developed an intelligent decision support system for distinguishing between benign and malignant skin lesions. The approach involves multiple stages: noise removal during pre-processing, lesion segmentation, feature extraction, feature selection, and final classification. Selected feature subsets are fed into a Support Vector Machine (SVM) classifier. Using a dataset of 100 dermoscopic images (50 benign, 50 malignant), the system achieved encouraging results—averaging 92% accuracy for benign cases and 84% for malignant cases—demonstrating its potential for reliable skin lesion classification.
Zghal and Derbel [13] presented an image processing approach for melanoma detection, involving preprocessing, segmentation, feature extraction based on ABCD parameters, and classification using Total Dermoscopic Value (TDV). Implemented in MATLAB, the method achieved 90% accuracy on the PH2 dataset.
Albay and Kamaşak [14] used Fourier Descriptors of the lesion contours as the only input for the ANN. They have achieved 83% accuracy. They have proposed using additional features like color, pattern, etc.
Kanca and Ayas [15] first applied a Gaussian filter to smooth the images, followed by the use of an active contour model to detect lesion boundaries. Based on these boundaries, they created a segmentation mask to extract shape-related features of the lesion. They then replaced the lesion pixels in the mask with corresponding pixels from the original image to extract color and texture features. For classification, they employed a KNN algorithm, achieving 77% accuracy.
Bansal et al. [16] carried out lesion segmentation in the grayscale domain, while texture features were extracted in the RGB color space using both global and local methods. Global texture features include measures from the gray-level co-occurrence matrix (GLCM)—such as entropy, contrast, correlation, angular second moment, inverse difference moment, and sum of squares. For color feature extraction, histograms are generated from five color spaces and statistical metrics, resulting in 52 color features per image. Support Vector Machine (SVM) is employed for classifying the images into melanoma and non-melanoma categories obtaining 89% accuracy.
2.2 DL based studies
Da Costa Nascimento et al. [17] introduced a deep learning-based system for automatic detection and segmentation of melanomas in dermoscopic images. Combining deep networks with Parzen windowing and clustering, the method achieved over 96% accuracy, highlighting its potential for real-world clinical applications.
Montaha et al. [18] proposed a lightweight deep learning model to classify skin lesions as benign or malignant. To overcome overfitting problem with the limited data, data augmentation was applied to the dataset of 16,485 images. The model uses a shallow architecture with box blur downscaling for efficiency, achieving 98.87% accuracy on the ISIC dataset. Ablation studies and k-fold cross-validation confirmed optimal hyper-parameters and no overfitting. The model also maintained performance on noisy data, demonstrating that effective and efficient training is feasible with limited medical image data.
In Girdhar et al.’s [19] study, several convolutional neural network (CNN) architectures—ResNet, DenseNet, InceptionV3, and VGG16—pre-trained on the ImageNet dataset were utilized to assess their effectiveness in skin cancer diagnosis. Based on the feature selection from InceptionV3 and DenseNet, the authors design a new model called DenseNet-II, which features two parallel branches of convolutional layers. To address class imbalance, they employ focal loss, which assigns greater penalties to the majority class, thereby minimizing its dominance and enhancing the model's ability to detect minority class instances. They have obtained a maximum accuracy of 97.35%.
Tabrizchi et al. [20] have introduced a novel deep learning model as a modified version of the VGG16 architecture. The authors reduce the number of trainable parameters by removing redundant convolutional layers, and they enhance performance by adding a batch normalization (BN) layer after each pooling layer and replacing the fully connected (FC) layer with a global average pooling (GAP) layer. These modifications improve model efficiency without increasing parameter count. As a result, the overall architecture is optimized, leading to faster computation times compared to the original VGG16 model, achieving 85.41% accuracy.
Guergueb and Akhloufi [21] proposed an ensemble learning strategy that leverages the strengths of three deep convolutional neural network (DCNN) models commonly used in medical image classification—EfficientNetB8, SEResNeXt10, and DenseNet264—all of which are pre-trained on the ImageNet dataset. The study introduces two novel techniques: the multi-sample dropout approach, where the dropout, fully connected (FC), and softmax layers following each pre-trained model are duplicated, and the final loss—based on a modified binary cross-entropy called focal loss used for dense object detection—is computed as the average across all dropout samples; and the multi-penalty approach, which applies different penalty rates to each duplicated layer to improve model regularization and performance. They have obtained a maximum accuracy of 98.85%.
Sharma et al. [22] employed adversarial training to improve skin tumor classification accuracy despite limited available data. Using the fast gradient sign method (FGSM), adversarial example images are generated to maximize the loss for each input image. These augmented images are incorporated into both the training and testing phases. Several pre-trained networks—including VGG16, VGG19, DenseNet101, and ResNet101—are retrained with this data, with ResNet101, achieving 84.77% the highest accuracy among them, albeit requiring greater computational resources and longer training times compared to the others.
In this section, we will first introduce the dataset where we obtained our lesion images. Next, we will explain how the novel feature is extracted. After the feature extraction we will present our classification method based on machine learning model: ANN. Figure 1 summarizes the method used in this study.
Figure 1. Methodology of this study
3.1 Dataset preparation
Total of 1000 images used in this study were downloaded from ISIC (The International Skin Imaging Collaboration) website [9]. Classes were not balanced in ISIC’s datasets. Majority of the lesions were labeled benign. In the ISIC’s dataset, while most of the melanoma lesions have irregular shapes, some of them were regular, similarly most of the benign lesions have regular shapes but some of them were irregular. Although we could collect equal number of examples from both classes randomly, we have manually selected images that have different shape characteristics to compose more robust model for training and testing. Our dataset is made available publicly [23].
The images are 224 × 224 pixels and are labeled as benign and melanoma with binary specifiers. 2 examples are shown in Figures 2 (a) and (b).
Figure 2. (a) Benign skin image, (b) Melanoma lesion image
In this research, we focused on analyzing lesion images using Fourier Descriptors. Descriptors are the mathematical representation of the contour of an image using the Fourier transform. This technique captures the shape's essential features and can be used for shape analysis, recognition, and classification. Contour extracting operation is mostly tolerable to different acquisition conditions so from the frequency analysis point of view, model’s generalization ability is superior however color features are dependent on lighting. This is a big problem especially for deep learning models like CNN which processes the whole images and fully depends on their characteristics. On the other hand, ISIC is also working on establishing digital imaging standards. ISIC promotes the adoption of the Digital Imaging and Communications in Medicine (DICOM) standard for dermatology. DICOM, widely used in medical imaging fields such as radiology, cardiology, and oncology, enables standardized metadata, image formats, and device interoperability.
Figure 3. An unclear lesion image
Since contour plays the most important role, images must be cleaned to have correct form of contour. However, the lesion images obtained from ISIC database have hair, ruler shape and dark regions at the corners as shown in Figure 3.
Ruler and dark regions at the corners mostly were outside of the lesion and easy to clean but hairs generally cover lesion regions causing different contour formation therefore they must be cleaned before they are processed. To clean hairs, black hat filter method is applied [24]. This filter is used to remove dark regions over light regions. The background of images has always light color shines while hair has black therefore filter worked without a problem. A Python library function [25] has been used to apply black hat filter and has been executed for all the images which contain hairs on lesion.
3.2 Feature extraction
Feature extraction plays an important role in the overall success of the detection of cancer. In this section, first we propose a novel feature from FD’s energy and later add more selected discriminative features extracted from the shape of the lesions.
3.2.1 Fourier descriptor analysis
Fourier descriptors are derived by applying the Fourier transform to an image boundary, typically represented by its contour [26]. The resulting Fourier coefficients, known as Fourier descriptors (FD), defines the contour shape in the frequency domain. Low-frequency components describe the overall structure, while higher frequencies capture finer details of the shape. FDs are being calculated in 3 steps as:
Step 1: Contour extraction
Step 2: Expressing contour points by complex numbers
Step 3: Taking the Fourier transform from these complex numbers.
To extract contour images automatically, Sezgin and Taşaltı́n [27, 28] have implemented several effective methods defining thresholds and providing quantitative performance evaluation. Among those, Otsu’s method proposed by Otsu [29] has been used. It is a global thresholding technique that automatically selects the threshold value by minimizing the intra-class variance (or equivalently maximizing the between-class variance) between foreground and background. Firstly, image has been converted to grayscale with intensity levels [0, L-1] where L is 256. The goal here is find a threshold t that separates the image into two classes as C0 and C1:
C0: pixels with intensities [0, t] (background).
C1: pixels with intensities [t +1, L−1](foreground).
Then we compute the normalized histogram of the image using:
$p(i)=\frac{n_i}{N}$ (1)
where, niis the number of pixels with intensity i, and N is the total pixels.
For a candidate threshold t, class probabilities:
$\omega_0(t)=\sum_{i=0}^t p(i)$ (2)
and
$\omega_1(t)=\sum_{i=t+1}^{L-1} p(i)$ (3)
Class means:
$\mu_0(t)=\frac{1}{\omega_0(t)} \sum_{i=0}^t i p(i)$ (4)
$\mu_1(t)=\frac{1}{\omega_1(t)} \sum_{i=t+1}^{L-1} i p(i)$ (5)
Otsu [29] defines the between-class variance as:
$\sigma_b^2(t)=\omega_0(t) \omega_1(t)\left(\mu_0(t)-\mu_1(t)\right)^2$ (6)
The value of t that maximizes $\sigma_b^2(t)$ gives the optimal threhold value t* for the contour:
$t^*=\arg \max _t \sigma_b^2(t)$ (7)
Otsu [29] tries every possible threshold. The threshold that makes the groups most distinct (highest between-class variance) is chosen.
To express the contour points by complex numbers, let the contour of the shape be represented by a set of N points P0, P1, P2, …… PN where each point Pn = (xn, yn) is a pair of coordinates. We treat these coordinates as complex numbers:
$z_n=x_n+i y_n$ (8)
where, i is imaginary unit. By applying the discrete Fourier transform (DFT) to this sequence of complex numbers, we obtain the Fourier descriptors Zk as:
$Z_k=\frac{1}{N} \sum_{n=0}^{N-1} Z_n e^{-2 \pi i k n / N}$ (9)
where, k = 0, 1, ....., N-1.
The Fourier descriptors Zk represent the frequency components of the shape, with lower-frequency descriptors capturing the overall shape and higher-frequency descriptors capturing finer details or irregularities. To make the Fourier descriptors invariant to translation, scaling, and rotation, we normalize them as follows:
We set Z0 = 0 (the DC component) to remove the effect of translation. Then we normalize the descriptors by dividing them by |Z1|, the magnitude of the first non-zero descriptor. We used the magnitudes |Zk| of the descriptors, since the phase is affected by rotation. In this study, we have calculated 100 FDs using the explained method for 1000 images.
Irregularities in a shape’s contour are often captured by the higher-order Fourier descriptors. By analyzing the frequency domain energy distribution of the Fourier descriptors, we can identify whether a shape is more regular or irregular. The energy E of the Fourier descriptors is computed as:
$E=\sum_{k=1}^{N-1}\left|Z_k\right|^2$ (10)
When we plot the energy of the descriptors in the frequency domain, we observe that the energy will be concentrated in the lower frequencies that do not differ much between benign and melanoma lesions; however for melanoma lesions which have irregular shapes, the energy has still strong components in the high frequencies as shown in Figures 4 (a) and (b).
Therefore, energy at higher frequencies can be used as discriminative property. Energy distribution shows exponential decay in relation to lower frequencies for both benign and melanoma lesions while more like linear at higher frequencies.
(a)
(b)
Figure 4. Energy spectrum of (a) benign (b) melanoma
3.2.2 Frequency change-point evaluation
To find the frequency change-point (threshold) from exponential decay to linear, we employed a dimensionality-reduced probabilistic modeling approach to detect change-points in multivariate time series data. First, Principal Component Analysis (PCA) [30] was applied to the dataset (100 FD series for 1000 image data set) to extract the first principal component, representing the dominant shared temporal trend. 1st principal component is taken for PCA. The related parameter is n_component and selected as 1. The principal components which explains 80% of the variance in the dataset were extracted and treated as a univariate representation of the collective behavior of all signals. This step reduces noise and aligns the temporal dynamics of the series into a single trajectory suitable for sequential modeling.
This univariate signal was then modeled using a Gaussian Hidden Markov Model (HMM) [31] with two latent states. The HMM captures changes in the statistical properties of the signal over time by assuming a latent Markov process and Gaussian emission distributions. The model was trained using the Expectation-Maximization (EM) [32] algorithm to maximize the likelihood of the observed sequence. The most probable sequence of hidden states was inferred using the Viterbi algorithm [33]. The change-point was defined as the first point at which the inferred hidden state transitioned. This method enables robust detection of regime changes in high-dimensional temporal data by leveraging both variance-based dimensionality reduction and probabilistic state modeling.
A Python program has been developed using hmmlearn library [34] to find the change-point. There were 4 parameters for HMM as model, n_components, covariance_type and algorithm. The model was selected as GaussianHMM, which uses HMM with Gaussian emissions. Since 2 latent states were selected, the parameter n_components was set to 2 which represents number of states. Covariance_type was set to “diag” which means each state uses a diagonal covariance matrix. Viterbi algorithm finds the most likely sequence of states, so algorithm parameter was set to “viterbi”. The change-point was identified as the first temporal index at which the predicted hidden state changed, indicating a statistically significant transition in the underlying generative process of the data. This transition corresponds to a qualitative change in the regime of the signal a shift from exponential decay to linear behavior. The change-point occurred at around 40 Hz, as shown in Figure 5.
Figure 5. Change-point detected by PCA + HMM
3.2.3 Novel feature extraction
After the change point, energy decay shows linear characteristic. Given that energy |Zk|2 changes as the frequency index k increases, we propose modeling the squared magnitudes of FDs as a function of the frequency index:
$\left|Z_k\right|^2=\beta_0+\beta_1 k+\epsilon_k \quad k=1,2, \ldots \ldots \ldots . N-1$ (11)
Here, β0 is the intercept, β1 represents the slope (rate of energy decay), and ϵk is an error term. For regular shapes, the slope β1 will be more negative, indicating rapid energy decay. For irregular shapes, β1 will be closer to zero, reflecting a slower decay or more evenly distributed energy.
We now introduce an OLS [35] model to analyze the energy decay across Fourier descriptors after 40 Hz. The OLS approach given in Eq. (11) fits the regression model. In the model, we minimize the sum of squared residuals:
$\tilde{\beta}_0, \tilde{\beta}_1=\arg \min \sum_{k=1}^{N-1}\left(\left|Z_k\right|^2-\left(\beta_0+\beta_1 k\right)\right)^2$ (12)
The parameters $\tilde{\beta}_0$ and $\tilde{\beta}_1$ are estimated using standard OLS techniques by a Python program. Model parameter was selected as Linear Regression from Sklearn library. The key aspect of this model is the slope, $\tilde{\beta}_1$, which provides a quantitative measure of energy concentration.
Albay and Kamaşak [14] have used Fourier Descriptors as well. They have used limited number of Fourier Descriptors mainly in low frequencies achieving 83% accuracy but as we have shown with the spectral analysis in Figure 4(b), irregular shapes (mainly melanoma lesions) have significant components in the higher frequencies. Instead of including all frequency components, by this method we have managed to decrease hundreds of Fourier descriptors to one feature named as slope.
3.2.4 Statistical performance of this novel feature
Following hypothesis is used for the testing of the slope $\tilde{\beta}_1$:
H0: $\tilde{\beta}_1$ = 0 (no energy decay, high-frequency behavior)
H1: $\tilde{\beta}_1$ < 0 (significant energy decay, low-frequency behavior)
The test statistic is:
$t=\frac{\tilde{\beta}_1}{S E\left(\tilde{\beta}_1\right)}$ (13)
where, SE($\tilde{\beta}_1$) is the standard error of $\tilde{\beta}_1$. If the test statistic is sufficiently negative, we reject H0, indicating significant low-frequency behavior.
A 95% confidence interval for $\tilde{\beta}_1$is given by:
$\tilde{\beta}_1 \mp t_{\frac{\alpha}{2}, N-2} . S E\left(\tilde{\beta}_1\right)$ (14)
If the confidence interval contains only negative values, it confirms that energy is concentrated in low frequencies, indicating a regular shape.
The goodness of fit is measured by the R2 statistic, which captures the proportion of variance in |Zk|2 explained by the frequency index k:
$R^2=1-\frac{\sum_{k=1}^{N-1}\left(\left|Z_k\right|^2-\left(\widetilde{\beta}_0+\widetilde{\beta}_1 k\right)\right)^2}{\sum_{k=1}^{N-1}\left(\left|Z_k\right|^2-\left|\widetilde{Z}_k\right|^2\right)^2}$ (15)
High R2 indicates that the OLS model provides a good fit for the energy decay.
The fitted slope $\tilde{\beta}_1$ is the main discriminator for distinguishing between low and high-frequency behavior:
$\tilde{\beta}_1$ < 0 (dominant low-frequency components, regular shape)
$\tilde{\beta}_1$ ≈ 0 (balanced low and high frequencies, irregular shape)
Provided with the statistical testing, estimated $\tilde{\beta}_1$ is calculated for every image and selected as a primary feature for classification analysis.
3.3 The ANN model
An ANN is a computational framework inspired by the structure and functioning of biological network composed of many neurons. The flow of information through the network influences its structure, as the ANN adapts—or “learns”—based on the given inputs and resulting outputs. ANN consists of many simple, interconnected processors (neurons). It processes input signals by dynamically adjusting adaptive weights through a learning method known as backpropagation, which uses predefined training data and desired outputs. The network updates these weights by minimizing errors between predicted and actual outputs using an error function.
Our dataset was composed of 1000 224 × 224 pixel images from equally distributed between benign and melanoma cancer lesion. In addition to the extracted feature from FDs, average RGB (Red Green Blue) color values and shape parameters (major/minor diameters, eccentricity, compactness and perimeter) are calculated from images and provided as input to the ANN. We have used ANN with supervised manner by adding labels marking melanoma and benign skin lesions. Our moderate size model has 1 input layer, 2 hidden layers and 1 output layer created using the Tensorflow library in Python [36]. Early stopping is also used to improve the performance of the model. Model parameters are given in Table 1.
Model was performed with core i7 CPU @ 1.80 GHz processor with 8 Mb memory. Model execution has been completed in a few minutes.
Table 1. ANN layers and parameters
|
Layer (Type) |
Output Shape |
Param # |
|
dense_3 |
(None, 16) |
176 |
|
dense_4 |
(None, 8) |
136 |
|
dropout_1 |
(None, 8) |
0 |
|
dense_5 |
(None, 1) |
9 |
|
Total Trainable params: 321 (1.25 KB) |
||
The performance of machine learning models is measured using the confusion matrix. As shown in Table 2, the error matrix consists of the following values: TP, which shows the number of true positives, FN, which shows the number of false negatives, FP, which shows the number of false positives, and TN, which shows the number of true negatives.
Table 2. The confusion matrix
|
|
|
Prediction |
|
|
|
|
Negative |
Positive |
|
Reality |
Negative |
TN |
FP |
|
Positive |
FN |
TP |
|
Performance measures calculated from the confusion matrix are:
Accuracy $=\frac{(T P+T N)}{(T P+T N+F P+F N)}$ (16)
Precision $=\frac{\mathrm{TP}}{(T P+F P)}$ (17)
Recal $=\frac{\mathrm{TP}}{(T P+F N)}$ (18)
Specificity $=\frac{\mathrm{TN}}{(T N+F P)}$ (19)
To evaluate the performance of the model, 30% of the dataset was separated for validation which corresponds to 300 images, 160 of them are melanoma and 140 of them are benign images. Another 200 images were also selected to test the final model. For the randomization and cross validation K-fold (n=5) is selected. The ANN classified 155 of them as true positive (melanoma) and 126 of them as true negative (benign). 5 melanoma lesions were classified as false negative and 14 of benign as false positive which is given in the confusion matrix in Table 3. The precision, recall and F1-score parameters have also been provided in this table.
Table 3. Confusion matrix and performance metrics of the model
|
Class |
Precision |
Recall |
F1-score |
|
benign |
0.96 |
0.90 |
0.93 |
|
melanoma |
0.92 |
0.97 |
0.94 |
|
Overall accuracy:
|
0.94
|
|
|
(a)
(b)
Figure 6. Model (a) accuracy (b) loss
In order to provide a more balanced assessment, Matthews correlation coefficient (MCC) and Cohen’s kappa were also calculated as measures of the quality of binary and multiclass classifications. MCC was 0.9008 and Cohen's Kappa was 0.8991. With these results, performance of the model falls into category of “very strong / excellent model”.
While the overall accuracy is 94%, the success rate of positively predicted melanoma lesions is 97% among melanoma lesions. The change of model accuracy and loss are given in Figures 6 (a) and (b).
The Receiver Operating Characteristic (ROC) curve evaluates the performance of a binary classifier. ROC curve and area under the curve (AUC) of the model are given in Figure 7. ROC curve’s steep rise toward the top-left corner indicates the classifier achieves high True Positive Rates (TPR) while keeping False Positive Rates (FPR) relatively low. The curve hugs the top-left boundary for most of its path — a sign of strong discriminative ability between the two classes. The AUC score of between 0.90–1.00 is generally considered as excellent discrimination. ROC curve and AUC of 0.98 show a strong classifier with high separability and excellent generalization performance. The model effectively distinguishes between the two classes with only minimal overlap between positive and negative class predictions.
Figure 7. Receiver Operating Characteristic (ROC) curve and area under the curve (AUC)
Figure 8. Shapley Additive Explanations (SHAP) analysis of the features
We have also performed Shapley Additive Explanations (SHAP) analysis [8], which utilizes game theoretical approach in order to find out the effectiveness of the features. SHAP calculates each feature’s contribution to the final outcome, and it is given in Figure 8. In this chart, X-axis represents the SHAP value which can have negative or positive effect on the classification. Y-axis gives the list of features according to the importance from top to bottom. The result of the SHAP analysis verifies that our novel feature slope, , which is obtained from the energy spectrum of the FDs is the most effective feature in the melanoma classification. However Colors G, R and circularity features are also very effective on discrimination.
In order to provide statistical verification, a permutation feature importance model was applied. It is a model inspection technique that measures the contribution of each feature to a fitted model’s statistical performance on a given tabular dataset. Model randomly permutes one feature at a time and measure performance drop. It uses the MCC (Matthews correlation coefficient) scorer and calculates ΔMCC parameter. The result of this verification is given in Table 4.
Permutation-based importance analysis using MCC demonstrated that the novel feature slope is the most critical features for predictive performance. Afterwards comes the color R and G intensity.
Table 4. Parameter importance analysis
|
Feature |
ΔMCC |
Interpretation |
|
slope |
0.45 |
Model strongly relies on this feature |
|
R |
0.21 |
Major color driver |
|
G |
0.20 |
Major color driver |
|
circularity |
0.095 |
Shape refinement |
|
major_axis |
0.075 |
|
|
perimeter |
0.067 |
|
|
minor_axis |
0.061 |
|
|
eccentricity |
0.021 |
Marginal |
|
B |
0.008 |
Nearly redundant |
To evaluate the performance of our model, recent important research that uses different ML and DL methods has been provided in Table 5.
Our model shows fairly good performance compared to some of these studies. Among these, Montaha et al. [18] had the highest accuracy. They have performed image augmentation techniques for lesion images. They have used gamma correction, morphological dilation, and four-color space data augmentation techniques to achieve this result. Models which utilize customized CNN generally achieve high accuracy as shown in Table 5. However, we have also tested our dataset with classical CNN model. We have designed CNN model with single and multiple convolutional layers having more than 10K parameters. The maximum accuracy we have achieved was 79%. This clearly shows that our small size ANN model performs very well especially with this novel feature achieving 94% accuracy under same conditions. In order to reach this performance, CNN needs special customization techniques as applied in different researches that we have presented in the comparison Table 5.
If we compare these models with our ANN model from the point of model complexity, training load and inference time, we observe that our ANN model has some advantages over CNN. If we consider model complexity and training load, our ANN model offers superior advantages over CNN on input size, model size, number of parameters, training time and processing power.
Our ANN model has 10 features requiring approximately less than 1K operations. In the case of 224 × 224 × 3 image, CNN models have millions of operations some of which were listed by Grignaffini et al. [7]. Also, ANN has a moderate overfitting risk while CNN has a high one. The details of this comparison from the point of model size, training time, processing power and inference time are provided in Table 6.
Table 5. Summary of the recent studies
|
Authors |
Year |
ML/DL Method |
Accuracy |
|
Oliveira et al. [37] |
2018-2019 |
Optimum Path Forest classifier |
91.6% |
|
Moradi et al. [38] |
2019 |
Kernel sparse representation based model |
91.3% |
|
Kwiatkowska et al. [39] |
2021 |
CNN ensemble |
Precision 0.88, Recall 0.83 |
|
Priya and RajaRajeswari [40] |
2024 |
Max-Voting with GA search |
95.8% |
|
Montaha et al. [18] |
2022 |
Shallow CNN |
98.87% |
|
Hosseinzadeh et al. [41] |
2024 |
TransferLearning +ML ensemble |
87.72% |
|
Unnisa et al. [42] |
2025 |
Custom CNN |
85.0% |
|
Nawaz et al. [43] |
2025 |
Custom CNN (FCDS-CNN) |
96.0% |
|
The proposed work |
2025 |
ANN |
94% |
Table 6. Comparison of Artificial Neural Network (ANN) and Convolutional Neural Network (CNN) models
|
Metric |
ANN (Tabular) |
CNN (Images) |
|
Input Size |
Low: 10–1000 |
High: 1k–200k (e.g., 224 × 224 × 3 = 150k) |
|
Model Size |
Small to Medium |
Large to Very Large (deep layers) |
|
Parameters |
Thousands |
Millions |
|
Training Time |
Fast (minutes) |
Slow (hours or more on CPU) |
|
Hardware |
Usage Light: CPU sufficient |
Heavy: GPU almost mandatory |
|
Speed |
Milliseconds |
10–100 x slower |
|
Latency |
Low |
Higher |
|
Real-time Suitability |
Very good for real-time classification |
Acceptable only if using lightweight CNNs |
As can be seen from Table 6, the proposed ANN model has many advantages compared to CNN models. On the other hand, ANN requires explicit feature engineering, which is offline but computationally non-trivial. Thus, according to these comparisons, we can clearly say that our moderate size ANN model ensures a similar performance compared to more complex CNN models with the listed advantages.
Simple and interpretable yet very effective pipeline for the detection of melanoma with a novel feature based on the spectral energy distribution of Fourier shape descriptors, called slope, supplemented by color and shape features of the lesion is proposed. The proposed efficiency has been approved by AI explainability tool SHAP. It has so balancing and separable power of melanoma and health lesion, it needs only a few features to be supported better accuracy. As far as we know, it has not been announced yet.
Slope feature efficiency leads to a small size ANN which doesn’t require more powerful computer resources for developing, even an applicable model to electronic devices with limited resources such as cell phones. The model accuracy is nearly as high as the best models obtained in literature in addition to such advantages it has. The reason is the feature we discovered, the spectral energy distribution of Fourier shape descriptors, what the scientist has been researching to find a shape feature on the lesion boundary they feel heuristically.
The contribution of current work has three important outputs to literature: a novel feature that brings powerful information to separate binary classes efficiently, the spectral energy distribution of Fourier shape descriptors; lightweight a machine learning model with minimized parameters; and high balanced class accuracy which is important in such health problems.
The only criticism for the features is the color properties which seem dominant in the classification with vision of SHAP analysis. However, color may have differences depending on the environmental conditions and devices used. Considering this instability, it would be better to further experiments with other data sets obtained from real hospital environments.
Even though lesion area edge features are very important, the dimension is also another issue. Three-dimensional vision brings the height of the lesion area, which is another important property that should be considered together with slope in further works.
The lesion images that we have used in our research have been downloaded from public dataset obtained from ISIC (The International Skin Imaging Collaboration) organization which provides an open source platform for the contribution of images of skin lesions under Creative Commons licenses. The organization says, I quote, "The images are associated with ground-truth diagnoses and other clinical metadata and available for use in the public domain."
Home web page and the web page that these above information is provided are listed below. Therefore, ethical approval is not needed. (https://www.isic-archive.com/; https://www.isic-archive.com/mission)
Data is available online:
https://www.kaggle.com/datasets/cengizriva/benign
https://www.kaggle.com/datasets/cengizriva/melanoma
https://www.kaggle.com/datasets/cengizriva/feature-set
The codes which show the performance results of this article will be made available by the authors on request.
|
C0, C1 |
Classes - dimensionless |
|
E |
Energy |
|
FN |
False negative - dimensionless |
|
FP |
False positive - dimensionless |
|
H |
Hypothesis - dimensionless |
|
L |
Grayscale intensity level - dimensionless |
|
MCC |
Matthews correlation coefficient - dimensionless |
|
n |
Number of pixels - dimensionless |
|
N |
Number of points - dimensionless |
|
p(i) |
Normalized histogram - dimensionless |
|
SE |
Standard error - dimensionless |
|
TN |
True negative - dimensionless |
|
TP |
True positive - dimensionless |
|
x, y |
Complex coordinates - dimensionless |
|
z |
Point in complex coordinates - dimensionless |
|
Z |
Fourier Descriptor - dimensionless |
|
Greek symbols |
|
|
$\alpha$ |
Level of significance |
|
$\beta$ |
Coefficient of the line equation |
|
$\tilde{\beta}$ |
Estimated coefficient |
|
$\varepsilon$ |
Error term |
|
$\mu(t)$ |
Class means |
|
$\sigma(t)$ |
Class variance |
|
$\omega(t)$ |
Class probability |
[1] World Health Organization. (2020). International Agency for Research on Cancer. https://gco.iarc.who.int.
[2] Baldi, A., Quartulli, M., Murace, R., Dragonetti, E., Manganaro, M., Guerra, O., Bizzi, S. (2010). Automated dermoscopy image analysis of pigmented skin lesions. Cancers, 2(2): 262-273. https://doi.org/10.3390/cancers2020262
[3] Reddya, K.V., Parvathyb, L.R., Sımats, C. (2022). Accurate detection and classification of melanoma skin cancer using decision tree algorithm over CNN. Advances in Parallel Computing Algorithms, Tools and Paradigms, 41: 321. https://doi.org/10.3233/APC220044
[4] Rayan, Z., Hegazy, I., Roushdy, M., Salem, A.B.M. (2024). Melanoma of the skin cancer dıagnosis usıng support vector machine. International Journal of Intelligent Computing and Information Sciences, 24(1): 12-19. https://doi.org/10.21608/ijicis.2024.260141.1313
[5] Krishnan, A., Bridjith, A., Kumar, M., Priyadharshini, K. (2025). Skin cancer prediction using KNN. International Research Journal on Advanced Engineering and Management, 3(4): 76-84. https://doi.org/10.47392/IRJAEM.2025.0212
[6] Shah, A., Shah, M., Pandya, A., Sushra, R., Sushra, R., Mehta, M., Patel, K., Patel, K. (2023). A comprehensive study on skin cancer detection using artificial neural network (ANN) and convolutional neural network (CNN). Clinical eHealth, 6: 74-86. https://doi.org/10.1016/j.ceh.2023.08.002
[7] Grignaffini, F., Barbuto, F., Piazzo, L., Troiano, M., Simeoni, P., Mangini, F., Pellacani, G., Cantisani, C., Frezza, F. (2022). Machine learning approaches for skin cancer classification from dermoscopic images: A systematic review. Algorithms, 15(11): 438. https://doi.org/10.3390/a15110438
[8] Lundberg, S.M., Lee, S.I. (2017). A unified approach to interpreting model predictions. arXiv preprint arXiv:1705.07874. https://doi.org/10.48550/arXiv.1705.07874
[9] The International Skin Imaging Collaboration. https://www.isic-archive.com.
[10] Fatima, R., Khan, M.Z.A., Govardhan, A., Dhruve, K.D. (2012). Computer aided multi-parameter extraction system to aid early detection of skin cancer melanoma. International Journal of Computer Science and Network Security, 12(10): 74-86.
[11] Barata, C., Ruela, M., Francisco, M., Mendonça, T., Marques, J.S. (2013). Two systems for the detection of melanomas in dermoscopy images using texture and color features. IEEE Systems Journal, 8(3): 965-979. https://doi.org/10.1109/JSYST.2013.2271540
[12] Tan, T.Y., Zhang, L., Jiang, M. (2016). An intelligent decision support system for skin cancer detection from dermoscopic images. In 2016 12th International Conference on Natural Computation, Fuzzy Systems and Knowledge Discovery (ICNC-FSKD), Changsha, China, pp. 2194-2199. https://doi.org/10.1109/FSKD.2016.7603521
[13] Zghal, N.S., Derbel, N. (2020). Melanoma skin cancer detection based on image processing. Current Medical Imaging Reviews, 16(1): 50-58. https://doi.org/10.2174/1573405614666180911120546
[14] Albay, E., Kamaşak, M. (2015). Skin lesion classification using fourier descriptors of lesion borders. In 2015 Medical Technologies National Conference (TIPTEKNO), Bodrum, Turkey, pp. 1-4. https://doi.org/10.1109/TIPTEKNO.2015.7374547
[15] Kanca, E., Ayas, S. (2022). Learning hand-crafted features for K-NN based skin disease classification. In 2022 International Congress on Human-Computer Interaction, Optimization and Robotic Applications (HORA), Ankara, Turkey, pp. 1-4. https://doi.org/10.1109/HORA55278.2022.9799834
[16] Bansal, P., Vanjani, A., Mehta, A., Kavitha, J.C., Kumar, S. (2022). Improving the classification accuracy of melanoma detection by performing feature selection using binary Harris hawks optimization algorithm. Soft Computing, 26(17): 8163-8181. https://doi.org/10.1007/s00500-022-07234-1
[17] Da Costa Nascimento, J.J., Marques, A.G., Adelino Rodrigues, Y.O., Brilhante Severiano, G.F., Rodrigues, I.D.S., Dourado Jr, C., De Freitas Souza, L.F. (2024). Health of things melanoma detection system—Detection and segmentation of melanoma in dermoscopic images applied to edge computing using deep learning and fine-tuning models. Frontiers in Communications and Networks, 5: 1376191. https://doi.org/10.3389/frcmn.2024.1376191
[18] Montaha, S., Azam, S., Rafid, A.K.M.R.H., Islam, S., Ghosh, P., Jonkman, M. (2022). A shallow deep learning approach to classify skin cancer using down-scaling method to minimize time and space complexity. PloS One, 17(8): e0269826. https://doi.org/10.1371/journal.pone.0269826
[19] Girdhar, N., Sinha, A., Gupta, S. (2023). DenseNet-II: An improved deep convolutional neural network for melanoma cancer detection. Soft Computing, 27(18): 13285-13304. https://doi.org/10.1007/s00500-022-07406-z
[20] Tabrizchi, H., Parvizpour, S., Razmara, J. (2023). An improved VGG model for skin cancer detection. Neural Processing Letters, 55(4): 3715-3732. https://doi.org/10.1007/s11063-022-10927-1
[21] Guergueb, T., Akhloufi, M.A. (2022). Multi-scale deep ensemble learning for melanoma skin cancer detection. In 2022 IEEE 23rd International Conference on Information Reuse and Integration for Data Science (IRI), San Diego, CA, USA, pp. 256-261. https://doi.org/10.1109/IRI54793.2022.00063
[22] Sharma, P., Gautam, A., Nayak, R., Balabantaray, B.K. (2022). Melanoma detection using advanced deep neural network. In 2022 4th International Conference on Energy, Power and Environment (ICEPE), Shillong, India, pp. 1-5. https://doi.org/10.1109/ICEPE55035.2022.9798123
[23] Cengiz Riva. https://www.kaggle.com/datasets/cengizriva.
[24] Sultana, A., Ciuc, M., Radulescu, T., Wanyu, L., Petrache, D. (2012). Preliminary work on dermatoscopic lesion segmentation. In 2012 Proceedings of the 20th European Signal Processing Conference (EUSIPCO), Bucharest, Romania, pp. 2273-2277.
[25] OpenCV. https://docs.opencv.org/4.x/d9/d61/tutorial_py_morphological_ops.html.
[26] Zahn, C.T., Roskies, R.Z. (1972). Fourier descriptors for plane closed curves. IEEE Transactions on Computers, 100(3): 269-281. https://doi.org/10.1109/TC.1972.5008949
[27] Sezgin, M., Taşaltı́n, R. (2000). A new dichotomization technique to multilevel thresholding devoted to inspection applications. Pattern Recognition Letters, 21(2): 151-161. https://doi.org/10.1016/S0167-8655(99)00142-7
[28] Sezgin, M., Sankur, B.L. (2004). Survey over image thresholding techniques and quantitative performance evaluation. Journal of Electronic İmaging, 13(1): 146-168. https://doi.org/10.1117/1.1631315
[29] Otsu, N. (1979). A threshold selection method from gray-level histograms. Automatica, 9(1): 62-66. https://doi.org/10.1109/TSMC.1979.4310076
[30] Jolliffe, I. (2002). Principal Component Analysis. Springer. https://doi.org/10.1007/978-3-662-69359-9_483
[31] Rabiner, L.R. (1989). A tutorial on Hidden Markov Models and selected applications in speech recognition. Proceedings of the IEEE, 77(2): 257-286. https://doi.org/10.1109/5.18626
[32] McLachlan, G.J., Krishnan, T. (2008). The EM Algorithm and Extensions. John Wiley & Sons.
[33] Viterbi, A. (2003). Error bounds for convolutional codes and an asymptotically optimum decoding algorithm. IEEE Transactions on Information Theory, 13(2): 260-269. https://doi.org/10.1109/TIT.1967.1054010
[34] HMMlearn. https://hmmlearn.readthedocs.io/.
[35] Stigler, S.M. (1981). Gauss and the invention of least squares. The Annals of Statistics, 465-474. https://doi.org/10.15611/sps.2014.12.01
[36] TensorFlow. https://www.tensorflow.org/.
[37] Oliveira, R.B., Pereira, A.S., Tavares, J.M.R.S. (2018). Computational diagnosis of skin lesions from dermoscopic images using combined features. Neural Computing and Applications, 31: 6091-6111. https://doi.org/10.1007/s00521-018-3439-8
[38] Moradi, N., Mahdavi Amiri, N. (2019). Kernel sparse representation based model for skin lesions segmentation and classification. Computer Methods and Programs in Biomedicine, 182: 105038. https://doi.org/10.1016/j.cmpb.2019.105038
[39] Kwiatkowska, D., Kluska, P., Reich, A. (2021). Convolutional neural networks for the detection of malignant melanoma in dermoscopy images. Advances in Dermatology and Allergology/Postępy Dermatologii i Alergologii, 38(3): 412-420. https://doi.org/10.5114/ada.2021.107927
[40] Priya, N., RajaRajeswari, P. (2024). Advancing skin cancer prediction using ensemble models. Computers, 13: 157. https://doi.org/10.3390/computers13070157
[41] Hosseinzadeh, M., Hussain, D., Zeki Mahmood, F.M., Alenizi, F., Varzeghani, A.N., Asghari, P., Darwesh, A., Malik, M.H., Lee, S.W. (2024). A model for skin cancer using combination of ensemble learning and deep learning. PLOS One, 19(5): e0301275. https://doi.org/10.1371/journal.pone.0301275
[42] Unnisa, Z., Tariq, A., Sarwar, N., Din, I., Serhani, M.A., Trabelsi, Z. (2025). Impact of fine-tuning parameters of convolutional neural network for skin cancer detection. Scientific Reports, 15(1): 14779. https://doi.org/10.1038/s41598-025-99529-0
[43] Nawaz, K., Zanib, A., Shabir, I., Li, J., Wang, Y., Mahmood, T., Rehman, A. (2025). Skin cancer detection using dermoscopic images with convolutional neural network. Scientific Reports, 15(1): 7252. https://doi.org/10.1038/s41598-025-91446-6