# Deep Learning Approaches for the Classification of Keloid Images in the Context of Malignant and Benign Skin Disorders

Olusegun Ekundayo Adebayo, Brice Chatelain, Dumitru Trucu, Raluca Eftimie

► To cite this version:

Olusegun Ekundayo Adebayo, Brice Chatelain, Dumitru Trucu, Raluca Eftimie. Deep Learning Approaches for the Classification of Keloid Images in the Context of Malignant and Benign Skin Disorders. Diagnostics, 2025, 15 (6), pp.710. 10.3390/diagnostics15060710 . hal-05495633

HAL Id: hal-05495633

https://hal.science/hal-05495633v1

Submitted on 5 Feb 2026

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
# Deep learning approaches for the classification of keloid images in the context of malignant and benign skin disorders

O.E. Adebayo¹, B. Chatelain², D. Trucu³, and R. Eftimie¹,³

¹Laboratoire de Mathématiques de Besançon, Université de Franche-Comté, Besançon, 25000, France

²CHU Besançon

³Mathematics, University of Dundee, Dundee, DD1 4HN, UK

February 5, 2026

## Abstract

**Background/Objectives:** Misdiagnosing skin disorders leads to the administration of wrong treatments, sometimes with life-impacting consequences. Deep learning algorithms are becoming more and more used for diagnosis. While many skin cancer/lesion image classification studies focus on datasets containing dermatoscopic images and do not include keloid images, in this study, we focus on diagnosing keloid disorders amongst other skin lesions and combine two publicly available datasets containing non-dermatoscopic images: one dataset with keloid images and one with images of other various benign and malignant skin lesions (melanoma, basal cell carcinoma, squamous cell carcinoma, actinic keratosis, seborrheic keratosis, and nevus).

**Methods:** Different Convolution Neural Network (CNN) models are used to classify these disorders as either malignant or benign, to differentiate keloids amongst different benign skin disorders, and furthermore to differentiate keloids among other similar-looking malignant lesions. To this end, we use the transfer learning technique applied to nine different base models: the VGG16, MobileNet, InceptionV3, DenseNet121, EfficientNetB0, Xception, InceptionRNV2, EfficientNetV2L, and NASNetLarge. We explore and compare the results of these models using performance metrics such as accuracy, precision, recall, F1score, and AUC-ROC.

**Results:** We show that the VGG16 model (after fine-tuning) performs the best in classifying keloid images among other benign and malignant skin lesion images, with the following keloid class performance: an accuracy of 0.985, precision of 1.0, recall of 0.857, F1 score of 0.922 and AUC-ROC value of 0.996. VGG16 also has the best overall average performance (over all classes) in terms of the AUC-ROC and the other performance metrics. Using this model, we further attempt to predict the identification of three new non-dermatoscopic anonymised clinical images, classifying them as either malignant, benign, or keloid, and in the process, we identify some issues related to the collection and processing of such images. Finally, we also show that the DenseNet121 model has the best performance when differentiating keloids from other malignant disorders that have similar clinical presentations.

**Conclusions:** The study emphasised the potential use of deep learning algorithms (and their drawbacks), to identify and classify benign skin disorders such as keloids, which are not usually investigated via these approaches (as opposed to cancers), mainly due to lack of available data.

## 1 Introduction

Correctly identifying and classifying skin disorders is an important topic in the context of malignant vs. benign disorders, when patient treatment needs to start very quickly. There are various clinical examples where patients with certain malignant skin disorders have been misdiagnosed as benign disorders (because of their benign appearance), and thus they were not offered the appropriate treatment [21, 27, 32, 56, 70, 79, 82, 3, 55]. Such misdiagnoses are because clinical images of certain benign disorders are very similar to malignant cancers, and medical practitioners might not have the appropriate expertise to distinguish them.

In this study, we focus on identifying keloid lesions either as a benign skin disorder amongst different malignant and benign skin disorders, simply identifying keloids as keloids, or identifying keloids among other malignant lesions that look similar. Keloids are a particular type of fibroproliferative skin disorder characterised by increased deposition of collagen in the area of an initial wound (i.e., a raised “scar”) and the subsequent invasion of this lesion into the adjacent healthy tissue. This invasion aspect made researchers compare keloids with cancers [57, 65, 18, 43]. Moreover, due to these differences and similarities between keloids and skin cancers [12],
various studies and clinical case reports have mentioned the misdiagnosis of some skin cancers as keloids due to their similar clinical presentation; see, for example [3, 12, 55, 11]. Also, the misdiagnosis of keloids as tumours can lead to improper surgical treatment that could lead to worse outcomes (i.e., patient disfigurement) [77]. Even if we acknowledge that such misdiagnoses are rare, there is the question (and opportunity) of using new computational approaches to improve the diagnosis of different benign and malignant skin disorders (when histopathology tests are not immediately available or when expert dermatologists are not immediately available).

We need to emphasise that the classical approach to diagnose various skin disorders uses dermatoscopy [11, 44, 62]. However, this medical device is perceived to be too complex and quite expensive to use [13? ]. Much less expensive options are classical point-and-shoot cameras or smartphone cameras that produce non-dermatoscopic images. However, the accuracy of the diagnostic results for various skin disorders (in particular for non-dermatoscopic images) is still not consistently optimal, and further research is needed to enhance its reliability and effectiveness in clinical practice [69]. With the rise of artificial intelligence, machine learning and deep learning approaches have been developed and employed to help clinicians diagnose different skin disorders and to provide faster and more accurate diagnostic results.

1.1 Previous work

Studies have shown that deep learning approaches perform better than machine learning approaches when it comes to image classification [45, 33, 16]. Thus, several studies have used deep learning approaches for biomedical image classification, e.g., lesion classification [17, 59], breast cancer classification [10, 64], etc., and for classifying benign and malignant skin disorders [19]. However, to the best of our knowledge, there are no studies that include the classification of keloids as benign or malignant skin disorders, nor do any studies exist involving their identification among benign and malignant skin lesions using non-dermatoscopic (clinical) image datasets.

Nevertheless, we note that there are studies that investigate keloids (and other scars) using machine learning and deep learning approaches. In [39], post-thyroidectomy scars (including keloid) were classified based on their severity. More precisely, the authors in [39] focused on images of post-thyroidectomy scars (which included hypertrophic scars and keloids), along with clinical features such as age, body mass index (BMI), and scar symptoms, and they used a convolutional block attention module integrated with a ResNet-50 model for the image-based severity prediction, achieving an accuracy of 0.733, AUC-ROC of 0.912, and a recall of 0.733 on an external test set when the images were combined with clinical data. However, more datasets are needed to improve model generalisation, and clinical validation is needed to ascertain the performance of the model. In [47], a cascaded vision transformer architecture was proposed for keloid segmentation and identification by focusing on the blood perfusion rate and growth rates of keloid lesions. The data used in this study were intensity and blood perfusion images of 150 untreated keloid patients, with images showing keloids from various body regions like the chest, face, and limbs obtained via Laser Speckle Contrast Imaging (LSCI), and they achieved an average accuracy of 0.927. However, more datasets are needed to improve model generalisation, and clinical validation is needed to ascertain the result of the model.

In addition to these very few keloid-focused studies, there are many more studies that focus on general tissue
lesions (see also Table 1). For example, in [17] a novel Generative Adversarial Networks (GANs) architecture
for generating medical images was introduced and used to generate synthetic liver lesion images (as opposed to
the traditional data augmentation technique). They showed that adding these synthetically generated images
to the original images (containing computed tomography images of 182 liver lesions) and training the model on
these images improved the performance of their convolution neural network (CNN) model (approx. 7% increase
in performance) compared to using the classical augmentation method available in deep learning, achieving an
AUC-ROC of 0.93, a recall of 0.857, and a specificity of 0.924. A limitation to this study is that GAN-generated
images may not fully capture real variations. Another is that the size of the dataset may prevent generalisation..
In [59], a new non-dermatoscopic skin lesion dataset [60] (that has also been used in our current study) was
introduced. The dataset included clinical images and related patient clinical information. The study in [59]
showed that combining these patients' clinical features (i.e., information) of non-dermatoscopic medical data
with their images improved the performance of CNN models. They achieved an accuracy of 0.788 ± 0.025,
a precision of 0.8 ± 0.028, and a recall of 0.788 ± 0.025. Despite the promising result of the proposed model,
the model may be too dependent on patient information, and the size of the data will likely cause the model
not to generalise well, especially when tested on skin lesions found in anatomical regions not present or under-
represented in the training dataset. In [19], a novel CNN model named SkinNet-16 was proposed for accurate
early detection of skin lesions using two public dermatoscopic skin lesion images from [36] and [37]. The images
were cleaned, feature extraction was done, and the proposed model was trained with the extracted features.
The model achieved an accuracy of 0.992 and a recall of 0.98. The limitation of this study includes the fact
that only a binary model was proposed despite the training dataset containing more that two skin lesions. Also,
more training data might be needed for improved generalisation ability of the model.
In this study, we focus on CNN models, since they are the most widely used models. We acknowledge that there are other models such as vision transformers (ViTs) [49], which were originally used in natural language processing (NLP) and now are being used for image classification because they require fewer computations to achieve close enough performance compared to CNN models. Nevertheless, current studies show that they do not outperform CNN models except when trained on very large datasets [71, 38]. For this reason (and because we do not have such large datasets), in this study we decided to focus exclusively on CNN models. The goal of our current article is threefold:

i. To train various CNN models to classify keloid images as benign lesions and not as malignant lesions (and for this, we use a large variety of skin lesion images, from keloids to melanoma, basal cell carcinoma, squamous cell carcinoma, seborrheic keratosis, nevus, etc., which could be either malignant or benign);

ii. To train the CNN models to classify images of various skin disorders in three separate classes: malignant, benign, or keloid;

iii. To train the CNN models to identify keloid images among other malignant lesions that can mimic keloids, e.g., basal cell carcinoma [1, 46] and squamous cell carcinoma [53].

Note also that our focus in this study is on the following:

a. The identification and classification of keloid lesions.

b. Using non-dermatoscopic (clinical) images.

We aim to train the CNN models such that they can be used in communities where dermatoscopes are either rare or unavailable (and where dermatologists might not be available).

<table><caption>Table 1: Summary of some previous studies on medical image classification</caption><thead><tr><td>Study</td><td>Dataset</td><td>Algorithm</td><td>Category</td><td>Results</td><td>Limitation</td></tr></thead><tbody><tr><td>[17]</td><td>Liver lesion images (CT scans)</td><td>GAN + CNN</td><td>Benign vs. Malignant Liver Lesions</td><td>Improved CNN accuracy with GAN augmentation (AUC-ROC = 0.93, recall = 0.857, specificity = 0.924)</td><td>GAN-generated images may not fully capture real variations; limited dataset size</td></tr><tr><td>[59]</td><td>Non dermatoscopic skin lesion images + clinical data</td><td>Several CNN classifiers</td><td>Skin Cancer Detection</td><td>Accuracy=0.788 ±0.025, precision =0.8 ± 0.028, recall =0.788 ± 0.025</td><td>Dependency on patient metadata; limited generalization ability</td></tr><tr><td>[64]</td><td>Mammogram images tested on the MIAS and DDSM</td><td>ResNet101 + Meta-heuristic optimization</td><td>Breast Cancer Classification</td><td>DDSM (Accuracy= 0.986, recall 0.987) MIAS (accuracy = 0.992, recall=0.979)</td><td>High computational cost; possible overfitting</td></tr><tr><td>[19]</td><td>HAM10000 + ISIC dataset</td><td>proposed CNN-based SkinNet-16</td><td>Benign vs. Malignant Skin Lesions</td><td>Accuracy ≈ 0.992, recall ≈ 0.98</td><td>Limited dataset; Only binary classification</td></tr><tr><td>[39]</td><td>Postoperative scar images + clinical data</td><td>proposed CBAM + ResNet50</td><td>Scar Severity Prediction</td><td>Accuracy = 0.733, AUC-ROC = 0.912, recall = 0.733</td><td>Variability in scar assessment; need for real-world validation</td></tr><tr><td>[47]</td><td>Keloid images (Laser Speckle Contrast Imaging)</td><td>proposed a cascaded vision transformer architecture</td><td>Keloid Severity Evaluation</td><td>Average accuracy = 0.927</td><td>Limited dataset; requires clinical validation</td></tr></tbody></table>
The paper is structured as follows. In Section 2, we discuss the data used for the experiments, the deep learning approaches considered, the data preprocessing steps, the architecture of the models, and the performance metrics. In Section 3, we discuss the results of the classification tasks for the three goals mentioned above using the performance metrics from Section 2 while highlighting the best models. In Section 4, we discuss the general overview of this study and its limitations. In Section 5, we present the conclusion, and in Section 6, we conclude with a summary of the results while also comparing them with some results from the published literature.

# 2 Materials and methods

## 2.1 Data

In this study, we make use of two non-dermatoscopic datasets:

* The first dataset was taken from [60] and was obtained using a smartphone-based application created to help doctors and medical students collect clinical photos of skin lesions, as well as clinical information about the patient. Each dataset sample contains up to 26 attributes: a clinical diagnosis; a picture of the lesion; the patient's age; the location of the lesion; if the lesion itches, bleeds, or has bled, hurts, has recently risen, has altered its pattern, is elevated, etc. The dataset contains 2298 images taken from 1373 patients between 2018 and 2019, which are available in Portable Network Graphics (PNGs) in raw format (i.e., just as they were taken). Each image in this dataset focused on one of the following six common skin disorders (also summarised in Table 2): melanoma, basal cell carcinoma, squamous cell carcinoma (which are considered malignant), actinic keratosis, seborrheic keratosis, and nevus (which are considered benign). We emphasise that 58.4% of the skin lesions and 100% of the skin cancers in this dataset are histopathology-confirmed (and this is about the same percentage as for the ISIC [23] dataset). For more information on the data, see [60].

<table><caption>Table 2: Pathological classification of the skin disorders image dataset in [60], detailing the total number of images available for each skin disorder, the total images classified as malignant or benign, and the overall number of images in the dataset.</caption><thead><tr><th>Diagnostic Class</th><th>Skin Disease</th><th>Nbr. of Images</th><th>Total nbr. Images</th></tr></thead><tbody><tr><td rowspan="4">Malignant</td><td>Melanoma</td><td>52</td><td rowspan="4">1089</td></tr><tr><td>Basal Cell Carcinoma</td><td>845</td></tr><tr><td>Squamous Cell Carcinoma</td><td>192</td></tr><tr><td>Seborrheic Keratosis</td><td>235</td></tr><tr><td rowspan="2">Benign</td><td>Nevus</td><td>244</td><td rowspan="2">1209</td></tr><tr><td>Actinic Keratosis</td><td>730</td></tr><tr><td colspan="2">Total Images</td><td></td><td>2298</td></tr></tbody></table>

Figure 1i shows an example of some of the images from the first image dataset [60] divided into their respective pathological classification (i.e., either malignant or being), while Figure 1ii shows the anatomical region of these lesions.

* The second dataset is taken from [34] and consists of different non-dermatoscopic keloid images; we chose 274 keloid images and cropped them to ensure that these images are consistent with the (zoomed-in) images in the first dataset. Figure 2 shows a sample of the (keloid) images in this second dataset [34].

Note that there are studies that have shown that some of the skin disorders classified as benign in Table 2 may become malignant [28, 51]; e.g., in [28], the authors showed that seborrheic keratosis can transform into squamous cell carcinoma, and in [51], the authors reported cases of malignant dermatofibroma. In this study, we categorised each of these skin disorders as either malignant or benign, as shown in Table 2. Furthermore, we categorised the keloids as “benign” for the first classification task and as “keloids” for the second classification task.

## 2.2 Deep Learning approaches

While the classical dense (i.e. fully connected) layers were the first used in deep learning, they have been largely replaced by convolutional neural networks (CNN, also known as *covnets*) as they have been shown to perform
<figure><img src="image_2.png" /><figcaption>Figure 1: (i) A sample of the image dataset in [60] (the PAD dataset) for: (a) malignant and (b) benign skin cancers. (ii) The anatomical regions where these skin lesions were found, as specified in [60].</figcaption></figure>
<figure><img src="image_3.png" /><figcaption>Figure 2: A sample of the cropped keloid images from the Kaggle dataset (see [34]). Note that this keloid dataset did not contain any information about anatomical regions where the keloid lesions were found.</figcaption></figure>

better than the densely connected layers [16]. One of the reasons for which convolutional layers tend to perform better is because they can learn local patterns from their input feature space, compared to the dense layers that learn global patterns. Also, the patterns learned by a convolutional layer are translation-invariant, while those of dense layers are not [16].

Due to the high computational cost of training new algorithms with high predictive performance, we decided to use transfer learning approaches for nine different already-published deep learning models—VGG16 [68], InceptionV3 [73], DensNet121 [25], MobileNet [24], EfficientNetB0 [74], Xception [6], InceptionRNV2 [72], EfficientNetV2-L [75], and NASNet-L [84]—which have been shown to perform well on biomedical image classification [31, 54, 83, 9, 66, 76, 42, 48, 63]. These models were pretrained on the Imagenet database, and in this study, we used them as base models. In the beginning, the weights of each base model were frozen, and the models were only trained on an additional dense input layer with 1024 neurons after a 2D global average pooling was done, followed by a unit dense output layer with a sigmoid activation function, as appropriate for binary classification. For a detailed description of these models, see Section 2.2.2 below.

## 2.2.1 Data Preprocessing

In the first step, we loaded images available in the first dataset [60], which sums up to a total of 2298 coloured images with pixel values ranging between 0 and 255. We then recategorised the datasets based on the “diagnostic” feature in relation to each image identified with their “im_id” feature. Next, we split the dataset into train, validation, and test sub-sets using stratified shuffle split from scikit learn library to preserve the percentage of the classes as in the original dataset (i.e., this makes sure the split data contain the proportionate percentage of the skin disorders when compared to the original dataset). We also applied the same split method to the second dataset (containing only keloid lesions) [34] and then added them together. The dataset was then split into train (80%) and test (20%) sets, while 90% of the train set was used for training, and 10% was used to validate the model. On the whole dataset, we applied the following standard preprocessing rules: (i) we rescaled each pixel value for each image matrix to lie between 0 and 1; (ii) we resized each image to a target size of our choice (i.e., 128 × 128). We then categorised each skin disorder as malignant or benign: melanoma, basal cell carcinoma and squamous cell carcinoma were classified as malignant [14] (a total of 1089 such images), while seborrheic keratosis, nevus, and actinic keratosis were classified as benign [81] (a total of 1209 such images).

Since the dataset was imbalanced and small, we first applied random oversampling on the train set to tackle the class imbalance issue and increase the dataset. We also applied data augmentation techniques, e.g., image flip, rotation, zoom, shift, and shear, to a random sample of each class in the original train dataset to introduce some variability and also increase the size. It is important to note that the oversampling and data augmentation methods detailed above were only applied to the train sets, while we kept the original images in the validation and test sets.

## 2.2.2 Model details

Building an efficient custom image classification CNN model from scratch with high accuracy is computationally demanding. Also, insufficient data might lead to inaccurate categorisation, and CNN training could take a while to converge [40]. Hence, most image classification tasks employ transfer learning methods, where already-trained models (considered base models) are reused on new datasets. Figure 3 shows the transfer learning framework used in this study: we removed the top layers containing the classification layers and replaced them with a hidden classification block (containing a dense layer(s) followed by an output layer depending on the number of classes).

Below we introduce the models considered in this study.
<figure><img src="image_4.png" /><figcaption>Figure 3: The transfer learning framework</figcaption></figure>

1. **VGG16:** VGG16 was proposed in [68] by the Visual Geometry Group (VGG) at the University of Oxford. It consists of 13 convolutional layers (with 3 × 3 filter sizes), 5 max-pooling layers, and 3 dense (i.e., fully connected) layers including the output layer. The rectified linear unit (ReLU) activation function is used for each convolutional and dense layer except for the output layer which uses the softmax activation function. Each convolutional layer use a 3 × 3 convolutional filter with a stride of 1 and same padding, which makes the resulting feature maps retain the same spatial dimensions as the input. The convolutional layers are stacked on each other with the number of input filters doubled after each max-pooling layer (with a stride of 2). The depth of the convolutional layers is also increased monotonically. Figure 4 and Table 3 show a summary of the VGG16 architecture.

<figure><img src="image_5.png" /><figcaption>Figure 4: VGG16 architecture [26] highlighting the *classification block* which is usually replaced during transfer learning.</figcaption></figure>

<table><caption>Table 3: Classical VGG16 Architecture</caption><thead><tr><th>Layers</th><th>Output Size</th><th>VGG16</th></tr></thead><tbody><tr><td>Convolution</td><td>224 × 224</td><td>7 × 7 conv</td></tr><tr><td>Pooling</td><td>112 × 112</td><td>2 × 2 max pool</td></tr><tr><td>Convolution</td><td>56 × 56</td><td>3 × 3 conv</td></tr><tr><td>Pooling</td><td>28 × 28</td><td>2 × 2 max pool</td></tr><tr><td>Convolution</td><td>14 × 14</td><td>3 × 3 conv</td></tr><tr><td>Pooling</td><td>7 × 7</td><td>2 × 2 max pool</td></tr><tr><td>Fully Connected</td><td>4096</td><td>Fully connected layer</td></tr><tr><td>Fully Connected</td><td>4096</td><td>Fully connected layer</td></tr><tr><td>Output</td><td>1000 (classes)</td><td>Output layer with softmax activation</td></tr></tbody></table>
2. DenseNet121: This model, which was proposed in [26], is a feed-forward network that connects all layers to all other layers in a feed-forward fashion. It comprises 121 layers and consists of densely connected convolutional layers within dense blocks, promoting feature reuse and gradient flow. The model also consists of transition layers which help to control the growth of complexity between blocks. Figure 5 and Table 4 show a summary of the DenseNet121 architecture.

<figure><img src="image_6.png" /><figcaption>Figure 5: An example of a deep DenseNet architecture with three dense blocks [26], and with a keloid image as input. The layers between two adjacent blocks are referred to as transition layers.</figcaption></figure>

<table><caption>Table 4: Classical DenseNet121 Architecture.</caption><thead><tr><th>Layers</th><th>Output Size</th><th>DenseNet121</th></tr></thead><tbody><tr><td>Convolution</td><td>112 × 112</td><td>7 × 7 conv</td></tr><tr><td>Pooling</td><td>56 × 56</td><td>3 × 3 max pool</td></tr><tr><td>Dense Block</td><td>56 × 56</td><td>6 layers</td></tr><tr><td>Transition Layer</td><td>28 × 28</td><td>1 × 1 conv, 2 × 2 avg pool</td></tr><tr><td>Dense Block</td><td>28 × 28</td><td>12 layers</td></tr><tr><td>Transition Layer</td><td>14 × 14</td><td>1 × 1 conv, 2 × 2 avg pool</td></tr><tr><td>Dense Block</td><td>14 × 14</td><td>24 layers</td></tr><tr><td>Transition Layer</td><td>7 × 7</td><td>1 × 1 conv, 2 × 2 avg pool</td></tr><tr><td>Dense Block</td><td>7 × 7</td><td>16 layers</td></tr><tr><td>Pooling</td><td>1 × 1</td><td>7 × 7 avg pool</td></tr><tr><td>Fully Connected</td><td>1024</td><td>Fully connected layer</td></tr><tr><td>Output</td><td>1000 (classes)</td><td>Output layer with softmax activation</td></tr></tbody></table>

3. InceptionV3: Inception-V3 is an extension of GoogleNet (a model that has been shown to demonstrate strong classification performance in some biological applications [67, 41]). Inception-V3 uses the inception model to minimize the number of parameters required to be trained, thus lowering the computational cost by concatenating numerous convolutional filters of various sizes into a new filter. Figure 6 and Table 5 summarize the Inception-V3 architecture.
<figure><img src="image_7.png" /><figcaption>Figure 6: Summary of Inception-V3 model architecture (see also Table 5. For explicit details on the structure of Inception Model 1, Inception Model 2 and Inception Model 3, see [73].</figcaption></figure>

<table><caption>Table 5: Classical InceptionV3 Architecture</caption><thead><tr><th>Layers</th><th>Output Size</th><th>InceptionV3</th></tr></thead><tbody><tr><td>Convolution</td><td>149 × 149</td><td>3 × 3 conv</td></tr><tr><td>Convolution</td><td>147 × 147</td><td>3 × 3 conv</td></tr><tr><td>Convolution</td><td>147 × 147</td><td>3 × 3 conv</td></tr><tr><td>Pooling</td><td>73 × 73</td><td>3 × 3 max pool</td></tr><tr><td>Convolution</td><td>71 × 71</td><td>3 × 3 conv</td></tr><tr><td>uses the Convolution</td><td>35 × 35</td><td>3 × 3 conv</td></tr><tr><td>Inception Module</td><td>35 × 35</td><td>Inception A</td></tr><tr><td>Inception Module</td><td>17 × 17</td><td>Inception B</td></tr><tr><td>Inception Module</td><td>8 × 8</td><td>Inception C</td></tr><tr><td>Pooling</td><td>1 × 1</td><td>8 × 8 avg pool</td></tr><tr><td>Fully Connected</td><td>2048</td><td>Fully connected layer</td></tr><tr><td>Output</td><td>1000 (classes)</td><td>Output layer with softmax activation</td></tr></tbody></table>

4. **MobileNet**: The MobileNet model uses depthwise separable convolutions (a form of factorized convolutions that factorize a classical convolution into a depthwise convolution and a 1 × 1 convolution called a pointwise convolution) to reduce computational cost and model size. In one step of these convolutions, the depthwise convolution applies a single filter per input channel and the pointwise convolution applies a 1 × 1 convolution to combine the outputs of the depthwise convolution. For more details on MobileNet see [24]. Table 6 summarizes the MobileNet architecture.
<table><caption>Table 6: MobileNet Architecture</caption><thead><tr><th>Layers</th><th>Output Size</th><th>MobileNet</th></tr></thead><tbody><tr><td>Convolution</td><td>112 × 112</td><td>3 × 3 conv</td></tr><tr><td>Depthwise Separable Conv</td><td>112 × 112</td><td>3 × 3 depthwise, 1 × 1 pointwise</td></tr><tr><td>Pooling</td><td>56 × 56</td><td>2 × 2 max pool</td></tr><tr><td>Depthwise Separable Conv</td><td>56 × 56</td><td>3 × 3 depthwise, 1 × 1 pointwise</td></tr><tr><td>Depthwise Separable Conv</td><td>28 × 28</td><td>3 × 3 depthwise, 1 × 1 pointwise</td></tr><tr><td>Pooling</td><td>14 × 14</td><td>2 × 2 max pool</td></tr><tr><td>Depthwise Separable Conv</td><td>14 × 14</td><td>3 × 3 depthwise, 1 × 1 pointwise</td></tr><tr><td>Depthwise Separable Conv</td><td>7 × 7</td><td>3 × 3 depthwise, 1 × 1 pointwise</td></tr><tr><td>Pooling</td><td>1 × 1</td><td>7 × 7 avg pool</td></tr><tr><td>Fully Connected</td><td>1024</td><td>Fully connected layer</td></tr><tr><td>Output</td><td>1000 (classes)</td><td>Output layer with softmax activation</td></tr></tbody></table>

5. **EfficientNetB0**: EfficientNet is a family of CNN that proposed a new scaling method after carefully identifying that better accuracy could be achieved when the depth, width and resolution of the network are carefully balanced. The proposed scaling approach uses a simple compound coefficient to uniformly scale the depth, width and resolution to reduce the computational cost and the model size. EfficientNet consists of 8 models ranging from B0-B7, where the B1-B7 models are scaled increasingly from the baseline B0 model using different compound coefficients. The baseline model EfficientNetB0 is based on mobile inverted bottleneck convolution (MBConv) blocks [29]. In this study, we focus only on the baseline model (EfficientNetB0) due to limited computational resources. For more details on EfficientNet see [74]. Table 7 summarizes the EfficientNetB0 architecture.

<table><caption>Table 7: EfficientNet-B0 Architecture</caption><thead><tr><th>Layers</th><th>Output Size</th><th>EfficientNet-B0</th></tr></thead><tbody><tr><td>Convolution</td><td>112 × 112</td><td>3 × 3 conv, 32 filters, stride 2</td></tr><tr><td>MBConv1</td><td>112 × 112</td><td>3 × 3 depthwise, 16 filters</td></tr><tr><td>MBConv6</td><td>56 × 56</td><td>3 × 3 depthwise, 24 filters, stride 2</td></tr><tr><td>MBConv6</td><td>28 × 28</td><td>5 × 5 depthwise, 40 filters, stride 2</td></tr><tr><td>MBConv6</td><td>14 × 14</td><td>3 × 3 depthwise, 80 filters, stride 2</td></tr><tr><td>MBConv6</td><td>14 × 14</td><td>5 × 5 depthwise, 112 filters</td></tr><tr><td>MBConv6</td><td>7 × 7</td><td>5 × 5 depthwise, 192 filters, stride 2</td></tr><tr><td>MBConv6</td><td>7 × 7</td><td>3 × 3 depthwise, 320 filters</td></tr><tr><td>Convolution</td><td>7 × 7</td><td>1 × 1 conv, 1280 filters</td></tr><tr><td>Pooling</td><td>1 × 1</td><td>Global average pooling</td></tr><tr><td>Fully Connected</td><td>1280</td><td>Fully connected layer</td></tr><tr><td>Output</td><td>1000 (classes)</td><td>Output layer with softmax activation</td></tr></tbody></table>

6. **Xception**: The Xception model uses depthwise separable convolutions like MobileNets and the Inception models described above. However, this model is based on the hypothesis that cross-channels correlations and spatial correlations mappings in the feature maps of CNNs can be decoupled entirely. This is a stronger assumption than that of the Inception models, and hence the name "Xception" that derived from the phrase "Extreme Inception". For more details on the Xception model see [6]. Table 8 summarizes the Xception architecture.
<table><caption>Table 8: Xception Architecture</caption><thead><tr><th>Layers</th><th>Output Size</th><th>Xception</th></tr></thead><tbody><tr><td>Convolution</td><td>149 × 149</td><td>3 × 3 conv, 32 filters, stride 2</td></tr><tr><td>Convolution</td><td>147 × 147</td><td>3 × 3 conv, 64 filters</td></tr><tr><td>Entry Flow</td><td>73 × 73</td><td>3 × SeparableConv layers, 128 filters, stride 2</td></tr><tr><td>Entry Flow</td><td>37 × 37</td><td>3 × SeparableConv layers, 256 filters, stride 2</td></tr><tr><td>Entry Flow</td><td>19 × 19</td><td>3 × SeparableConv layers, 728 filters, stride 2</td></tr><tr><td>Middle Flow</td><td>19 × 19</td><td>8 × (3 × SeparableConv layers, 728 filters)</td></tr><tr><td>Exit Flow</td><td>10 × 10</td><td>3 × SeparableConv layers, 1024 filters, stride 2</td></tr><tr><td>Exit Flow</td><td>10 × 10</td><td>3 × SeparableConv layers, 2048 filters</td></tr><tr><td>Pooling</td><td>1 × 1</td><td>Global average pooling</td></tr><tr><td>Fully Connected</td><td>2048</td><td>Fully connected layer</td></tr><tr><td>Output</td><td>1000 (classes)</td><td>Output layer with softmax activation</td></tr></tbody></table>

7. **InceptionRNV2**: This is the second version of the InceptionResNet model. It is largely similar to the Inception model already described above (see InceptionV3). However, in InceptionResNet (i.e., a residual version of the Inception model), a cheaper Inception block is used preceded by a filter-expansion layer which scales up the dimension of filter bank hence cushioning the effect of the dimensionality reduction caused by the Inception block. Another distinction between the InceptionResNet models and the vanilla Inception models is that batch-normalization is applied only to the standard layers not the summations hereby increasing the overall number of Inception blocks. In this study we use the second version of the InceptionResNet model. For more details on the InceptionResNet model, see [72]. Table 9 summarizes the InceptionResNetV2 architecture.

<table><caption>Table 9: InceptionResNetV2 Architecture</caption><thead><tr><th>Layers</th><th>Output Size</th><th>InceptionResNetV2</th></tr></thead><tbody><tr><td>Convolution</td><td>149 × 149</td><td>3 × 3 conv, 32 filters, stride 2</td></tr><tr><td>Convolution</td><td>147 × 147</td><td>3 × 3 conv, 32 filters</td></tr><tr><td>Convolution</td><td>73 × 73</td><td>3 × 3 conv, 64 filters, stride 2</td></tr><tr><td>Inception-ResNet-A</td><td>35 × 35</td><td>5 × Inception-ResNet-A modules</td></tr><tr><td>Reduction-A</td><td>17 × 17</td><td>Transition layer (pooling, conv)</td></tr><tr><td>Inception-ResNet-B</td><td>17 × 17</td><td>10 × Inception-ResNet-B modules</td></tr><tr><td>Reduction-B</td><td>8 × 8</td><td>Transition layer (pooling, conv)</td></tr><tr><td>Inception-ResNet-C</td><td>8 × 8</td><td>5 × Inception-ResNet-C modules</td></tr><tr><td>Convolution</td><td>8 × 8</td><td>1 × 1 conv, 1536 filters</td></tr><tr><td>Pooling</td><td>1 × 1</td><td>Global average pooling</td></tr><tr><td>Fully Connected</td><td>1536</td><td>Fully connected layer</td></tr><tr><td>Output</td><td>1000 (classes)</td><td>Output layer with softmax activation</td></tr></tbody></table>

8. **EfficientNetV2-L**: This is an extension of the EfficientNet models described above (see 5) with faster training time because it uses about half the number of parameters used in EfficientNet. In this new family of models, the scaling approach introduced in [74] was combined with a training-aware neural architecture search (NAS) to optimize the training speed and number of parameters. Unlike the original Efficient-Net, which uses depthwise separable convolutions, the fused-MBConv block fuses the initial pointwise and depthwise convolutions, reducing the computational cost. As opposed to the vanilla EfficientNet, EfficientNetV2 utilizes both MBConv and the fused-MBConv [22] in the early layers. This new family of comprises of three variants (i,e., small, medium and large) based on their size and performance. In this
study, we make use of the largest variant (i.e., EfficientNetV2-L). For more details on EfficientNetV2, see [75]. Table 10 summarizes the EfficientNetV2-L architecture.

<table><caption>Table 10: EfficientNetV2-L Architecture</caption><thead><tr><th>Layers</th><th>Output Size</th><th>EfficientNetV2-L</th></tr></thead><tbody><tr><td>Convolution</td><td>224 × 224</td><td>3 × 3 conv, 32 filters, stride 2</td></tr><tr><td>MBConv1</td><td>112 × 112</td><td>3 × 3 depthwise, 32 filters</td></tr><tr><td>MBConv4</td><td>56 × 56</td><td>3 × 3 depthwise, 64 filters, stride 2</td></tr><tr><td>Fused-MBConv4</td><td>28 × 28</td><td>3 × 3 fused conv, 128 filters, stride 2</td></tr><tr><td>Fused-MBConv6</td><td>14 × 14</td><td>3 × 3 fused conv, 256 filters, stride 2</td></tr><tr><td>MBConv6</td><td>7 × 7</td><td>3 × 3 depthwise, 512 filters, stride 2</td></tr><tr><td>MBConv6</td><td>7 × 7</td><td>3 × 3 depthwise, 1280 filters</td></tr><tr><td>Convolution</td><td>7 × 7</td><td>1 × 1 conv, 1280 filters</td></tr><tr><td>Pooling</td><td>1 × 1</td><td>Global average pooling</td></tr><tr><td>Fully Connected</td><td>1280</td><td>Fully connected layer</td></tr><tr><td>Output</td><td>1000 (classes)</td><td>Output layer with softmax activation</td></tr></tbody></table>

9. **NASNet-L**: This model was designed using a proposed search space called NAS (that enables transferability) to find optimal network architectures. It utilizes reinforcement learning to explore a preset search space of architectures while optimizing performance and efficiency and also using a regularization technique called "ScheduledDropPath". It has different variants, NASNet-A, B, and C, tailored for different use cases (where A the most accurate and was designed to deliver high performance, while B and C provide a trade-off between efficiency and accuracy, with B more accurate than C). The model also includes large and small versions depending on the resource available. The large model (i.e., NASNet-L) is particularly effective for high-performance while the small model (i.e., NASNetMobile) is particularly effective in resource-constrained environments like mobile devices. In this study, we use NASNet-L. For more details on NASNet models, see [84]. Table 11 summarizes the NASNet-L architecture.

<table><caption>Table 11: NASNet-L Architecture</caption><thead><tr><th>Layers</th><th>Output Size</th><th>NASNetLarge</th></tr></thead><tbody><tr><td>Convolution</td><td>224 × 224</td><td>3 × 3 conv, 96 filters, stride 2</td></tr><tr><td>Normal Cell</td><td>112 × 112</td><td>5 × Normal cells, 168 filters</td></tr><tr><td>Reduction Cell</td><td>56 × 56</td><td>Transition layer (pooling, conv)</td></tr><tr><td>Normal Cell</td><td>56 × 56</td><td>5 × Normal cells, 336 filters</td></tr><tr><td>Reduction Cell</td><td>28 × 28</td><td>Transition layer (pooling, conv)</td></tr><tr><td>Normal Cell</td><td>28 × 28</td><td>5 × Normal cells, 672 filters</td></tr><tr><td>Reduction Cell</td><td>14 × 14</td><td>Transition layer (pooling, conv)</td></tr><tr><td>Normal Cell</td><td>14 × 14</td><td>5 × Normal cells, 1344 filters</td></tr><tr><td>Reduction Cell</td><td>7 × 7</td><td>Transition layer (pooling, conv)</td></tr><tr><td>Normal Cell</td><td>7 × 7</td><td>5 × Normal cells, 4032 filters</td></tr><tr><td>Pooling</td><td>1 × 1</td><td>Global average pooling</td></tr><tr><td>Fully Connected</td><td>4032</td><td>Fully connected layer</td></tr><tr><td>Output</td><td>1000 (classes)</td><td>Output layer with softmax activation</td></tr></tbody></table>

Generally in transfer learning, we replace the classical output layer of each pretrained model (i.e., 1000 output units) with the number of target classes $n_c$ that our classification tasks require: usually $n_c-1$ for binary classification and $n_c$ for multiclass classification.

In this experiment, we used the pretrained models as feature extractors and built a new neural network on top of them for our specific classification tasks: one binary class classification (benign vs. malignant lesion) and one multiclass classification (here with three classes: benign vs. malignant vs. keloid). We began the
process by first initialising a base model (i.e., VGG16, DenseNet121, InceptionV3, MobileNet, EfficientNetB0, Xception, InceptionRNV2, EfficientNetV2-L, or NASNet-L), with weights pretrained on the ImageNet dataset. As already explained above, we excluded the fully connected layers at the top of the network (with output unit 1000), and specified the input shape parameter, which defines the shape of the input data (which we chose to be 128 × 128 × 3 for our tasks, where “3” corresponds to the number of channels in the images, as given by the RGB format). It is important to note that images were in thedet RGBA format (i.e., 4 channels) and were then converted to the RGB format before use for uniformity in the input shape.

Subsequently, we froze the weights of all layers in the pretrained model (i.e., we did not train them on the new data) and added these base layers to a new output block. This new output block is a Sequential model to which the pretrained model is added. We incorporated the following into this new model: a GlobalAveragePooling2D layer (to reduce the spatial dimensions of the output from the pretrained model), a dense layer with 1024 units, a ReLU activation function (to introduce non-linearity and learn high-level features), and a dropout layer with a rate of 0.5 included to prevent overfitting (by randomly setting half of the input units to zero during training). Lastly, a dense output layer with 3 (or 1) unit(s) and a softmax (or sigmoid) activation function were added for the multiclass (or binary) classification task, where 3 corresponds to the number of target classes for the multiclass classification, and 1 corresponds to binary classification (i.e., two target classes). We made use of the binary cross-entropy loss function for the binary classification task and the categorical cross-entropy loss function for the multiclass task. Throughout these experiments, we made use of the Adam optimiser with a learning rate equal to 0.0001 for model training without fine-tuning and a rate of 0.00001 for model training with fine-tuning. We trained all the CNN models over 50 epochs with a batch size of 32.

When training the models, we considered the following cases regarding the base models and the train dataset:

**Base model:**

1. Freezing the base model (i.e., training only the weights and biases of the added model).

2. Fine-tuning the base model by unfreezing all layers of the base model (i.e., training the weights and biases of the base model alongside the added model).

**Train dataset:**

1. Training the model on the original train data after splitting it into train, validation, and test datasets.

2. Training the model on an oversampled train dataset.

3. Training the model on an augmented train dataset.

Note that for each category of the train dataset considered above, we consider also the two cases as regards
the state of the base-model above.

2.2.3 Evaluation metrics

For the classification of images with the different models, we employed the following evaluation metrics that are given in terms of true positive (TP) values, true negative (TN) values, false positive (FP) values, and false negative (FN) values: accuracy, precision, recall, F1 score, AUC-ROC and the confusion matrix. For more details on the these performance metrics, see Appendix A.1. Note that each model was evaluated only on the out-of-sample dataset, i.e., the test dataset, which had not been exposed to the model at all during the training procedure.

3 Results

Here, we discuss the results obtained after applying the transfer learning technique using the pretrained CNN
models as base models. We start with a binary classification in Section 3.1, followed by multiclass classifications
in Sections 3.2 and 3.4. Regarding the results in the tables below, we note that the values obtained for some of
the pretrained models improved as we fine-tuned them.

## 3.1 Binary Classification: Benign vs. Malignant Lesions

First, we present the performance of the CNN models trained on the original dataset (i.e., before oversampling or applying data augmentation) on the test dataset. Table 12 shows the performance of the CNN models before fine-tuning the base models, while Table 13 shows their performances after fine-tuning (i.e., training all layers of the base models alongside the output layers).
<table><caption>Table 12: Accuracy, precision, recall and F1 score for the pretrained models presented above (rows 1–9). Here, the models were trained and validated on all raw skin lesion data (before any oversampling or data augmentation; see Section 2.1), and before any fine-tuning of the pretrained models. In the “Accuracy” column, we show in bold the largest value indicating the best model.</caption><thead><tr><th>Model</th><th>Accuracy</th><th>Precision</th><th>Recall</th><th>F1<sub>score</sub></th><th>AUC</th></tr></thead><tbody><tr><td>VGG16</td><td>0.7893</td><td>0.7642</td><td>0.7297</td><td>0.7465</td><td>0.8809</td></tr><tr><td>MobileNet</td><td><strong>0.8008</strong></td><td>0.7287</td><td>0.8468</td><td>0.7833</td><td>0.8776</td></tr><tr><td>DenseNet121</td><td>0.7969</td><td>0.7589</td><td>0.7658</td><td>0.7623</td><td>0.8841</td></tr><tr><td>InceptionV3</td><td>0.7356</td><td>0.6721</td><td>0.7387</td><td>0.7039</td><td>0.8123</td></tr><tr><td>EfficientNetB0</td><td>0.5747</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.5608</td></tr><tr><td>Xception</td><td>0.7635</td><td>0.7333</td><td>0.6937</td><td>0.7130</td><td>0.8280</td></tr><tr><td>InceptionRNV2</td><td>0.7165</td><td>0.6761</td><td>0.6396</td><td>0.6574</td><td>0.8131</td></tr><tr><td>EfficientNetV2L</td><td>0.5754</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.5943</td></tr><tr><td>NASNetLarge</td><td>0.6743</td><td>0.625</td><td>0.5856</td><td>0.6047</td><td>0.7370</td></tr></tbody></table>

In Table 12, we observe that MobileNet outperformed the rest of the models in accuracy, recall, and F1<sub>score</sub>. This was followed by DenseNet121 on the same metrics, but this one yielded the highest AUC-ROC score. VGG16 had the highest precision and only performed worse than DenseNet121 in terms of AUC-ROC measure. EfficientNetB0 and EfficientNetV2L had zero precision, recall, and F1<sub>scores</sub>; also, their accuracy and AUC scores were low and close to each other, making them the worse models. The next-worse models were the NASNetLarge and the Inception models (i.e., InceptionV3 and InceptionRNV2). InceptionV3, however, performed better than VGG16 in terms of recall rate. In Table 13, we see that after fine-tuning, VGG16 outperformed the rest of the models in accuracy, recall, F1<sub>score</sub>, and AUC-ROC. DenseNet121 had the highest precision rate and the second-best in AUC-ROC score. We also see that after fine-tuning, the overall performance of MobileNet reduced for almost all metrics except in terms of precision, where it increased slightly. In general, the performance of the other models seems to have increased after this fine-tuning, with the exception of MobileNet. Also, we see that the precision, recall, and F1<sub>scores</sub> of EfficientNetB0 and EfficientNetV2L went from zero to over 77%, implying that their initial weights and biases (i.e., initialised from ImageNet) performed really poorly on the test dataset. Now, the EfficientNetV2L had the second best accuracy and recall score, while the NASNetLarge model had the highest recall score. The Xception model seems to have also performed well, ranking second best in terms of precision.

<table><caption>Table 13: Accuracy, precision, recall, F1 score, and AUC of the pretrained CNN models (rows 1–9). Here, the models were trained and validated on all raw skin lesion data (before any oversampling or data augmentation; see Section 2.1), after fine-tuning the pretrained base models. In the “Accuracy” column, we show in bold the largest value indicating the best model.</caption><thead><tr><th>Model</th><th>Accuracy</th><th>Precision</th><th>Recall</th><th>F1<sub>score</sub></th><th>AUC</th></tr></thead><tbody><tr><td>VGG16</td><td><strong>0.8467</strong></td><td>0.8142</td><td>0.8288</td><td>0.8214</td><td>0.9274</td></tr><tr><td>MobileNet</td><td>0.7816</td><td>0.7455</td><td>0.7387</td><td>0.7421</td><td>0.8633</td></tr><tr><td>DenseNet121</td><td>0.8238</td><td>0.8495</td><td>0.7117</td><td>0.7745</td><td>0.9039</td></tr><tr><td>InceptionV3</td><td>0.8122</td><td>0.7719</td><td>0.7930</td><td>0.7822</td><td>0.8880</td></tr><tr><td>EfficientNetB0</td><td>0.8008</td><td>0.7706</td><td>0.7568</td><td>0.7636</td><td>0.8793</td></tr><tr><td>Xception</td><td>0.8161</td><td>0.8316</td><td>0.7117</td><td>0.7670</td><td>0.8958</td></tr><tr><td>InceptionRNV2</td><td>0.8161</td><td>0.7838</td><td>0.7838</td><td>0.7838</td><td>0.8793</td></tr><tr><td>EfficientNetV2L</td><td>0.8314</td><td>0.7815</td><td>0.8378</td><td>0.8097</td><td>0.8869</td></tr><tr><td>NASNetLarge</td><td>0.7203</td><td>0.6173</td><td>0.9009</td><td>0.7326</td><td>0.8501</td></tr></tbody></table>

Next, we trained the CNN models on the oversampled data (where we randomly increased the number of images for the classes with a lower number of images by adding copies of these randomly selected images). In Table 14, we show their performance on the test dataset without fine-tuning (i.e., without training the layers of the base models), while in Table 15, we show their performance after fine-tuning (i.e., training all layers of the base models). We see from Table 14 that VGG16 had the highest accuracy, and MobileNet had the highest recall and F1<sub>score</sub> while sharing the same accuracy with DenseNet121. VGG16 had the highest AUC-ROC, followed by DenseNet121 and MobileNet. EfficientNetB0 had the lowest recall, F1<sub>score</sub>, and AUC-ROC score, while EfficientNetV2L had the lowest accuracy and precision.

After fine-tuning (Table 15), we see that VGG16 outperformed the other models only in AUC-ROC. EfficientNetB0 had the highest accuracy and the third best AUC score, while NASNetLarge had again the highest
recall score. Hence, overall, VGG16 seems to have the highest ability to distinguish between malignant and benign skin lesions while possessing a good trade-off between precision and recall (see the high F1<sub>score</sub>).

<table><caption>Table 14: Accuracy, precision, recall, F1 score, and AUC of the pretrained CNN models (rows 1–9) trained on oversampled train dataset (to address the issue of imbalanced data classes; see Table 1) on the test data. Here, the pretrained base models were not fine-tuned. In the “Accuracy” column, we show in bold the largest value indicating the best model.</caption><thead><tr><th>Model</th><th>Accuracy</th><th>Precision</th><th>Recall</th><th>F1<sub>score</sub></th><th>AUC</th></tr></thead><tbody><tr><td>VGG16</td><td><strong>0.7969</strong></td><td>0.7900</td><td>0.7117</td><td>0.7488</td><td>0.8787</td></tr><tr><td>MobileNet</td><td>0.7893</td><td>0.7154</td><td>0.8378</td><td>0.7718</td><td>0.8674</td></tr><tr><td>DenseNet121</td><td>0.7893</td><td>0.7188</td><td>0.8288</td><td>0.7699</td><td>0.8742</td></tr><tr><td>InceptionV3</td><td>0.7203</td><td>0.6301</td><td>0.8288</td><td>0.7160</td><td>0.8001</td></tr><tr><td>EfficientNetB0</td><td>0.5785</td><td>0.5785</td><td>0.2162</td><td>0.3038</td><td>0.5615</td></tr><tr><td>Xception</td><td>0.7548</td><td>0.7156</td><td>0.7027</td><td>0.7091</td><td>0.8031</td></tr><tr><td>InceptionRNV2</td><td>0.7471</td><td>0.7064</td><td>0.6937</td><td>0.7000</td><td>0.8250</td></tr><tr><td>EfficientNetV2L</td><td>0.5402</td><td>0.4764</td><td>0.8198</td><td>0.6026</td><td>0.6011</td></tr><tr><td>NASNetLarge</td><td>0.6935</td><td>0.6449</td><td>0.6216</td><td>0.6330</td><td>0.7815</td></tr></tbody></table>

<table><caption>Table 15: Accuracy, precision, recall, F1<sub>score</sub>, and AUC of the transfer learning models (rows 1–9) on the test dataset. Here, the models were trained on oversampled train dataset, and the pretrained base models were fine-tuned. In the “Accuracy” column, we show in bold the largest value indicating the best model.</caption><thead><tr><th>Model</th><th>Accuracy</th><th>Precision</th><th>Recall</th><th>F1<sub>score</sub></th><th>AUC</th></tr></thead><tbody><tr><td>VGG16</td><td>0.8237</td><td>0.7982</td><td>0.7839</td><td>0.7909</td><td>0.9255</td></tr><tr><td>MobileNet</td><td>0.7931</td><td>0.7822</td><td>0.7117</td><td>0.7453</td><td>0.8668</td></tr><tr><td>DenseNet121</td><td>0.8084</td><td>0.8020</td><td>0.7297</td><td>0.7642</td><td>0.8917</td></tr><tr><td>InceptionV3</td><td>0.7854</td><td>0.7391</td><td>0.7658</td><td>0.7522</td><td>0.8641</td></tr><tr><td>EfficientNetB0</td><td><strong>0.8391</strong></td><td>0.8224</td><td>0.7928</td><td>0.8073</td><td>0.8978</td></tr><tr><td>Xception</td><td>0.8352</td><td>0.8269</td><td>0.7748</td><td>0.8000</td><td>0.9031</td></tr><tr><td>InceptionRNV2</td><td>0.8276</td><td>0.8000</td><td>0.7928</td><td>0.7964</td><td>0.8889</td></tr><tr><td>EfficientNetV2L</td><td>0.8199</td><td>0.7963</td><td>0.7748</td><td>0.7854</td><td>0.8591</td></tr><tr><td>NASNetLarge</td><td>0.7050</td><td>0.5966</td><td>0.9459</td><td>0.7317</td><td>0.8762</td></tr></tbody></table>

Finally, we trained the CNN models on the augmented data (obtained by applying rotations, flips, zoom-ins, and shears to randomly selected images), and we present their performance on the test data. This data augmentation approach not only increases the number of images available for training (to solve the class imbalance issue) but also introduces variability in the train dataset. In Table 16, we present the performance of these models (trained on the augmented dataset) before fine-tuning. Here, we see that MobileNet outperformed the other models in all metrics except recall, and it possesses the best trade-off between precision and recall. In contrast, EfficientNetB0 had the worst performance on all metrics.

<table><caption>Table 16: Accuracy, precision, recall, F1 score, and AUC of the transfer learning models (rows 1–9) on the test dataset. Here, we trained all models on augmented train datasets (but before fine-tuning of the base models). In the “Accuracy” column, we show in bold the largest value indicating the best model.</caption><thead><tr><th>Model</th><th>Accuracy</th><th>Precision</th><th>Recall</th><th>F1<sub>score</sub></th><th>AUC</th></tr></thead><tbody><tr><td>VGG16</td><td>0.8084</td><td>0.8081</td><td>0.7207</td><td>0.7619</td><td>0.8808</td></tr><tr><td>MobileNet</td><td><strong>0.8276</strong></td><td>0.8367</td><td>0.7387</td><td>0.7847</td><td>0.8965</td></tr><tr><td>DenseNet121</td><td>0.8084</td><td>0.7798</td><td>0.7658</td><td>0.7727</td><td>0.8962</td></tr><tr><td>InceptionV3</td><td>0.7165</td><td>0.6529</td><td>0.7117</td><td>0.6810</td><td>0.7974</td></tr><tr><td>EfficientNetB0</td><td>0.5057</td><td>0.4505</td><td>0.7387</td><td>0.5597</td><td>0.5575</td></tr><tr><td>Xception</td><td>0.7356</td><td>0.6875</td><td>0.6937</td><td>0.6906</td><td>0.8186</td></tr><tr><td>InceptionRNV2</td><td>0.7356</td><td>0.7100</td><td>0.6396</td><td>0.6730</td><td>0.8191</td></tr><tr><td>EfficientNetV2L</td><td>0.5556</td><td>0.4868</td><td>0.8288</td><td>0.6133</td><td>0.6845</td></tr><tr><td>NASNetLarge</td><td>0.7011</td><td>0.6774</td><td>0.5676</td><td>0.6176</td><td>0.7694</td></tr></tbody></table>

Finally, in Table 17 we show the performance of these CNN models (trained on augmented data) after the fine-
tuning of base models. We see that VGG16 outperformed the other models in accuracy, precision, and AUC-ROC followed by EfficientNetV2L, which yielded the same accuracy, the highest F1<sub>score</sub>, and was the second best in terms of recall and AUC-ROC.

Overall, VGG16 showed the best performance on test data after fine-tuning when the model was trained on raw training data (i.e, Table 13), oversampled training data (i.e., Table 15), and augmented training data (i.e., Table 17).

<table><caption>Table 17: Accuracy, precision, recall, F1 score, and AUC for the transfer learning models (rows 1–9) on the test dataset. Here, we trained these models on augmented training dataset and *fine-tuned* the base models. In the “Accuracy” column, we show in bold the largest value indicating the best model.</caption><thead><tr><th>Model</th><th>Accuracy</th><th>Precision</th><th>Recall</th><th>F1<sub>score</sub></th><th>AUC</th></tr></thead><tbody><tr><td>VGG16</td><td><strong>0.8506</strong></td><td>0.8600</td><td>0.7748</td><td>0.8152</td><td>0.9205</td></tr><tr><td>MobileNet</td><td>0.7854</td><td>0.7570</td><td>0.7297</td><td>0.7431</td><td>0.8728</td></tr><tr><td>DenseNet121</td><td>0.8467</td><td>0.8318</td><td>0.8018</td><td>0.8165</td><td>0.9101</td></tr><tr><td>InceptionV3</td><td>0.8352</td><td>0.8469</td><td>0.7477</td><td>0.7943</td><td>0.9168</td></tr><tr><td>EfficientNetB0</td><td>0.8199</td><td>0.7909</td><td>0.7838</td><td>0.7873</td><td>0.9020</td></tr><tr><td>Xception</td><td>0.8276</td><td>0.8113</td><td>0.7748</td><td>0.7926</td><td>0.9052</td></tr><tr><td>InceptionRNV2</td><td>0.8200</td><td>0.8137</td><td>0.7477</td><td>0.7793</td><td>0.8976</td></tr><tr><td>EfficientNetV2L</td><td><strong>0.8506</strong></td><td>0.8461</td><td>0.7928</td><td>0.8186</td><td>0.9197</td></tr><tr><td>NASNetLarge</td><td>0.8391</td><td>0.8556</td><td>0.7477</td><td>0.7981</td><td>0.9026</td></tr></tbody></table>

In Figure 7, we present the confusion matrices and AUC-ROC curves of the two best models: (a,b) show the VGG16 model trained on the original dataset and fine-tuned; (c,d) show the VGG16 model trained on the augmented dataset and fine-tuned.
<figure><img src="image_8.png" /></figure>

<figure><img src="image_9.png" /></figure>

<figure><img src="image_10.png" /></figure>

<figure><img src="image_11.png" /><figcaption>Figure 7: The (a) confusion matrix and (b) AUC-ROC curve for VGG16 model trained and validated on the original train and validation datasets, respectively (while fine-tuning the base model), and tested on the out-of-sample data (i.e., test data). (c) The confusion matrix and (d) AUC-ROC curve for VGG16 model trained on augmented training data (while fine-tuning the base model).</figcaption></figure>

## 3.2 Identifying keloids as keloids and not only as benign vs. malignant skin disorders

In what follows, we proceed to train the models above not only to identify keloids as “benign” lesions but also to be able to distinctively identify keloids as “keloids” among the various images of benign and malignant skin lesions. To this end, we trained the models again (using transfer learning while maintaining the architecture for multiclass classification, as described in Section 2.2.2) on the two datasets (i.e., the malignant vs. benign lesions, as classified in Table 2 and the keloid lesions, as shown in Figure 2), and fine-tuned them.

We present their performances when trained on: the original train dataset, oversampled train dataset, and augmented train dataset.

(a) **Original train data:** In Table 18, we present the performance of the 10 models considered in this study (on test data) when they were trained for 50 epochs on the original train dataset, validated on the original validation dataset (while fine-tuning all layers of the base models). We see here that VGG16 equally outperforms the rest of the model on all metrics followed by Xception and DenseNet121, respectively.

(b) **Oversampled train data:** In Table 19, we present the performance of the trained model on oversampled data. Here, we see that the performance of each of the models improved in comparison to Table 18. Here again, VGG16 performs better than the rest of the models on all metrics followed by Xception (with a slightly lower AUC that DenseNet121) and DenseNet121.

(c) **Augmented train data:** In an attempt to further improve the result of the models, instead of random oversampling, we apply data augmentation (such as rotations, flips, zooms, etc.) to increase the train dataset, to introduce variability and to help the model generalize better. In Table 20, we see an increase in performance of all the models as expected, in comparison to Tables 18 and 19. We see again that VGG16 outperforms the rest of the models on all metrics, followed by EfficientNetV2L and InceptionV3,
<table><caption>Table 18: Accuracy, precision, recall, F1\_score, and AUC of the models (rows 1–9) on the test dataset. Here, we trained and validated these models on the original train and validation datasets and *fine-tuned* the base models. In the "Accuracy" column, we show in bold the highest value indicating the best model.</caption><thead><tr><th>Model</th><th>Accuracy</th><th>Precision</th><th>Recall</th><th>F1<sub>score</sub></th><th>AUC</th></tr></thead><tbody><tr><td>VGG16</td><td><strong>0.8276</strong></td><td>0.8301</td><td>0.8276</td><td>0.8276</td><td>0.9376</td></tr><tr><td>MobileNet</td><td>0.7471</td><td>0.7534</td><td>0.7471</td><td>0.7480</td><td>0.8914</td></tr><tr><td>DenseNet121</td><td>0.7931</td><td>0.7942</td><td>0.7931</td><td>0.7922</td><td>0.9305</td></tr><tr><td>InceptionV3</td><td>0.7816</td><td>0.7841</td><td>0.7816</td><td>0.7823</td><td>0.9095</td></tr><tr><td>EfficientNetB0</td><td>0.7624</td><td>0.7663</td><td>0.7624</td><td>0.7632</td><td>0.8925</td></tr><tr><td>Xception</td><td>0.8199</td><td>0.8245</td><td>0.8199</td><td>0.8202</td><td>0.9309</td></tr><tr><td>InceptionRNV2</td><td>0.7854</td><td>0.7854</td><td>0.7854</td><td>0.7854</td><td>0.9091</td></tr><tr><td>EfficientNetV2L</td><td>0.7778</td><td>0.7843</td><td>0.7778</td><td>0.7743</td><td>0.9111</td></tr><tr><td>NASNetLarge</td><td>0.6743</td><td>0.7266</td><td>0.6743</td><td>0.6685</td><td>0.8665</td></tr></tbody></table>

<table><caption>Table 19: Accuracy, precision, recall, F1\_score, and AUC of the models on the test dataset. Here, we trained these models on oversampled train dataset and validated them on the original validation datasets. The base models were *fine-tuned*. In the "Accuracy" column, we show in bold the largest value indicating the best model.</caption><thead><tr><th>Model</th><th>Accuracy</th><th>Precision</th><th>Recall</th><th>F1<sub>score</sub></th><th>AUC</th></tr></thead><tbody><tr><td>VGG16</td><td><strong>0.8506</strong></td><td>0.8530</td><td>0.8506</td><td>0.8502</td><td>0.9427</td></tr><tr><td>MobileNet</td><td>0.7625</td><td>0.7650</td><td>0.7625</td><td>0.7634</td><td>0.9032</td></tr><tr><td>DenseNet121</td><td>0.8084</td><td>0.8101</td><td>0.8084</td><td>0.8091</td><td>0.9295</td></tr><tr><td>InceptionV3</td><td>0.8008</td><td>0.8056</td><td>0.8008</td><td>0.8015</td><td>0.9205</td></tr><tr><td>EfficientNetB0</td><td>0.7969</td><td>0.7989</td><td>0.7969</td><td>0.7969</td><td>0.9148</td></tr><tr><td>Xception</td><td>0.8199</td><td>0.8239</td><td>0.8199</td><td>0.8205</td><td>0.9282</td></tr><tr><td>InceptionRNV2</td><td>0.8007</td><td>0.8036</td><td>0.8008</td><td>0.8008</td><td>0.9215</td></tr><tr><td>EfficientNetV2L</td><td>0.7969</td><td>0.7983</td><td>0.7969</td><td>0.7973</td><td>0.9179</td></tr><tr><td>NASNetLarge</td><td>0.7050</td><td>0.7222</td><td>0.7050</td><td>0.7061</td><td>0.8728</td></tr></tbody></table>

respectively, who both have lower AUC ROC score compared to DenseNet121 who has the second best AUC ROC score while its other performances rank below InceptionV3.

We emphasize here that out of the pretrained CNN models used, MobileNet model is the worst-performing model on the test data considered in this study.

<table><caption>Table 20: Accuracy, precision, recall, F1\_score and AUC of the models (rows 1-9) on the test dataset. The models are trained on the augmented train dataset and validated on the original validation datasets, with the base models fine-tuned.</caption><thead><tr><th>Model</th><th>Accuracy</th><th>Precision</th><th>Recall</th><th>F1<sub>score</sub></th><th>AUC</th></tr></thead><tbody><tr><td>VGG16</td><td><strong>0.8774</strong></td><td>0.8813</td><td>0.8774</td><td>0.8778</td><td>0.9519</td></tr><tr><td>MobileNet</td><td>0.8046</td><td>0.8045</td><td>0.8046</td><td>0.8046</td><td>0.9240</td></tr><tr><td>DenseNet121</td><td>0.8391</td><td>0.8399</td><td>0.8391</td><td>0.8394</td><td>0.9452</td></tr><tr><td>InceptionV3</td><td>0.8467</td><td>0.8474</td><td>0.8467</td><td>0.8470</td><td>0.9403</td></tr><tr><td>EfficientNetB0</td><td>0.8429</td><td>0.8422</td><td>0.8429</td><td>0.8424</td><td>0.9406</td></tr><tr><td>Xception</td><td>0.8046</td><td>0.8072</td><td>0.8046</td><td>0.8046</td><td>0.9334</td></tr><tr><td>InceptionRNV2</td><td>0.8199</td><td>0.8222</td><td>0.8199</td><td>0.8206</td><td>0.9359</td></tr><tr><td>EfficientNetV2L</td><td>0.8467</td><td>0.8502</td><td>0.8467</td><td>0.8470</td><td>0.9322</td></tr><tr><td>NASNetLarge</td><td>0.8391</td><td>0.8410</td><td>0.8391</td><td>0.8394</td><td>0.9365</td></tr></tbody></table>

Finally, we show in Figure 8 the confusion matrix and AUC-ROC curves for the best model: the VGG16 model trained on the augmented data. From the confusion matrix and the AUC-ROC curves, we see that the model's ability to distinguish Keloid from the other classes is better than its ability to distinguish the other classes (i.e., the green curve in Figure 8(b)) though it also performs excellently well in distinguishing malignant and benign skin disorders individually with AUCs equal 0.9294 and 0.9289 respectively.
<figure><img src="image_12.png" /></figure>

<figure><img src="image_13.png" /><figcaption>Figure 8: The (a) confusion matrix and (b) AUC-ROC curve for VGG16 trained on the augmented train data, validated on the original validation dataset (while fine-tuning the base model) and tested on the test data.</figcaption></figure>

## 3.3 New test data: clinical images

To conclude the testing of our algorithm, we have finally used three new clinical anonymised images (see Figure 9a provided by B. Chatelain). To classify them, we used the our proposed algorithms (i.e., the VGG16 model trained to classify malignant vs. benign images, as well as the VGG16 model trained to classify malignant vs. benign vs. keloid images). To this end, we zoomed-in the original images (see Figure 9b) to be consistent with the other images in the datasets. We can see that the first two images, i.e., Figure 9b(i,ii), have been correctly identified in both cases as malignant. In contrast, the third zoomed-in image (i.e., Figure 9b(iii)) has been incorrectly identified as “benign” in one case and as “keloid” in the second case.

Since trained clinicians can diagnose the lesions from a distance, we emphasise that we also tried to classify the original images (non-zoomed-in; see Figure 9a). In that case, we obtained a correct result with the binary algorithm for Figure 9a(i,iii). In contrast, with the multiclass algorithm, we obtained a correct prediction for Figure 9a(i,iii) but an incorrect result for Figure 9a(ii).

**Remark 1** There were a few issues with the classification of the new images in Figure 9. First, the original images were taken at a distance, and to use the previous algorithms, we had to crop them so we could zoom-in to focus on the lesions (since the images we trained our algorithm on were focused; see Figure 1i). But this zoom-in led to blurred images.

Second, the trained data were relatively small and might not contain all possible types of lesions and anatomical regions where such lesions can occur (e.g., the eye or close to the eye; see Figure 1). Note that these aspects can impact the performance of the model, as exemplified in Figure 10, where the algorithm classified the lesion as “malignant” (see Figure 10a) when the lower part of the iris and the sclera is obvious in the zoom-in while classifying the lesion as “benign” (see Figure 10b) when only the lower part of the sclera is obvious in the zoom-in.
<figure><img src="image_14.png" /><figcaption>Figure 9: The result of our proposed binary model and multiclass model on (a) three anonymised clinical images of skin lesions (denoted by (i), (ii) and (iii)) and (b) their zoom-ins. The first rows of the tables in (a,b) show their class probabilities when tested with the proposed binary model, while the second rows of (a,b) show their class probabilities when tested with the proposed multiclass model.</figcaption></figure>
<figure><img src="image_15.png" /><figcaption>Figure 10: Result of the binary algorithm on two different levels of zoom-ins for the anonymised image in Figure 9a(iii). More precisely, in (a) we show an approx. 40% zoom-in and in (b) an approx 70% zoom-in of the original image in Figure 9a(iii).</figcaption></figure>

## 3.4 Keloid vs. similarly-looking malignant lesions

As mentioned in the Introduction, previous studies have shown that malignant lesions such as basal cell carcinoma and squamous cell carcinoma are sometimes misdiagnosed as keloid [58, 50, 20]. In this section, we trained the algorithms to be able to differentiate between these skin lesions, and hence, we restricted ourselves only to the basal cell carcinoma and squamous cell carcinoma images in [60], as well as to the keloid dataset from [34] for training, validation, and testing. We returned to all 10 models and trained them on augmented data as well as fine-tuned them (since this approach produced the best performance results). The results are presented in Table 21. We see here that DenseNet121 outperformed the rest of the models except in terms of the AUC score, where it is the fourth-best model. The best AUC score was given by the VGG16 model, followed by InceptionNetRNV2 and EfficientNetV2L. Moreover, the results in this table show that VGG16 is in top three algorithms that can differentiate between keloids and other similar-looking skin lesions.

<table><caption>Table 21: Accuracy, precision, recall, F1\_score, and AUC of the models on the test dataset. The models were trained on the augmented train dataset and validated on the original validation datasets, with the base models fine-tuned. In the “Accuracy” column, we show in bold the largest value indicating the best model.</caption><thead><tr><td>Model</td><td>Accuracy</td><td>Precision</td><td>Recall</td><td>F1 score</td><td>AUC</td></tr></thead><tbody><tr><td>VGG16</td><td>0.8647</td><td>0.8674</td><td>0.8647</td><td>0.8378</td><td>0.8982</td></tr><tr><td>MobileNet</td><td>0.8346</td><td>0.8045</td><td>0.8346</td><td>0.8100</td><td>0.8727</td></tr><tr><td>DenseNet121</td><td><strong>0.9098</strong></td><td>0.9110</td><td>0.9098</td><td>0.8972</td><td>0.8872</td></tr><tr><td>InceptionV3</td><td>0.8797</td><td>0.8956</td><td>0.8797</td><td>0.8559</td><td>0.8848</td></tr><tr><td>EfficientNetB0</td><td>0.8421</td><td>0.8172</td><td>0.8421</td><td>0.8133</td><td>0.8867</td></tr><tr><td>Xception</td><td>0.8346</td><td>0.8045</td><td>0.8346</td><td>0.8100</td><td>0.8836</td></tr><tr><td>InceptionRNV2</td><td>0.8647</td><td>0.8521</td><td>0.8647</td><td>0.8447</td><td>0.8976</td></tr><tr><td>EfficientNetV2L</td><td>0.8571</td><td>0.8343</td><td>0.8571</td><td>0.8344</td><td>0.8942</td></tr><tr><td>NASNetLarge</td><td>0.8571</td><td>0.8551</td><td>0.8571</td><td>0.8297</td><td>0.8819</td></tr></tbody></table>

Finally, in Figure 11 we show the confusion matrix of the performance of DenseNet121, as well as its AUC-ROC curve and score.

# 4 Discussion and research limitation

## 4.1 Discussion

In this study, we trained nine classical base CNN models (VGG16, MobileNet, DenseNet121, InceptionV3, EfficientNetB0, Xception, InceptionRNV2, EfficientNetV2-L, and NASNet-L) to perform three classification
<figure><img src="image_16.png" /></figure>

<figure><img src="image_17.png" /><figcaption>Figure 11: The (a) confusion matrix and (b) AUC-ROC curve for VGG16 trained on the augmented train data, validated on the original validation dataset (while fine-tuning the base model) and tested on the test data.</figcaption></figure>

tasks using two publicly available image datasets. The first classification task was to train the models to classify keloids, melanomas, basal cell carcinomas, squamous cell carcinomas, seborrheic keratosis, nevus, and actinic keratosis as either “malignant“ or “benign” skin lesions. The second task was to train the models to classify these skin disorders as “malignant“, “benign”, or “keloid“, since we wished to distinguish the keloids from other benign lesions. The third classification task was to distinguish keloids from other malignant look-alikes, which sometimes have been misdiagnosed. For the three classification tasks, we employed transfer learning techniques (see Figure 3) to compensate for insufficient image data in biomedicine. It is important to emphasise that the images considered in this study were non-dermatoscopic clinical images (as given by the PAD dataset [60] for benign and malignant lesions and by the Kaggle dataset [34] for keloid lesions), as we aimed to train these models such that they can be used in communities where dermatoscopes are either rare or unavailable and where patients might not be able to have appointments with specialist dermatologists. Note that most of the studies on benign-vs.-malignant classification of skin lesions use the more popular and much larger ISIC dataset of dermatoscopic images from [35, 30] or HAM10000 data [78].

We trained the models on the original train data, an oversampled training data, and augmented training data, and we validated and tested them on the original validation dataset and the test dataset (with this one never being exposed to the models during training). For model performance, we used the following classical metrics: accuracy, precision, recall, F1 score, AUC-ROC, and confusion matrix.

## 4.2 Research Limitations

As much as our proposed model performed well on the test data, we admit it had some limitations when tested on some anonymised clinical images obtained from Dr. Brice Chatelain, as shown in Figure 10. Some of the limitations of this study, especially those of the proposed model, have been highlighted in Remark 1. In what follows, we highlight our perceived limitations of this study, including those already highlighted in Remark 1:

* The image dataset used in this study contained non-dermatoscopic (clinical) images of keloids, some malignant skin cancers/lesions, and other benign lesions (including melanomas, basal cell carcinomas, squamous cell carcinomas, seborrheic keratosis, nevus, and actinic keratosis); hence, it may not perform well when tested on other skin lesions not present in training data or dermatoscopic images of skin lesions present in training data.

* In addition, as we mentioned in Section 2.1, not all data we used were pathologically validated (especially the non-cancerous lesions), which could have impacted the classification results we obtained.

* In Remark 1, we highlighted that the models performed poorly on images taken at a long distance from the skin lesion, as the models were trained on images focused on the skin lesions. Also, zoomed-in images of the same original pictures led to blurred images and possible misclassification.

* Lastly, as previously mentioned in Remark 1, the trained data were relatively small in number and might not contain all possible anatomical regions where such lesions can occur (e.g., the eye or close to the eye; see Figure 1). Note that these aspects can impact the performance of the model, as exemplified in
Figure 10, where the algorithm classified the lesion as "malignant" (see Figure 10a) when the lower part of the iris and the sclera is obvious in the zoom-in, while classifying the lesion as "benign" (see Figure 10b) when only the lower part of the sclera is obvious in the zoom-in.

# 5 Conclusion

The results showed that in first two classification tasks, VGG16 outperformed the rest of the models after fine-tuning (see Tables 13 and 20), while for the third classification task, DenseNet121 outperformed the rest of the models. The VGG16 model (i.e., the best models for the first two classification tasks) was also tested on three new clinical images (graciously provided by B. Chatelain), which were not available on the public datasets used for training/validation/testing. We showed that VGG16 performed well on the binary classification of the original images but not on the classification of the zoom-in images (where at least one image was misclassified). This is probably the result of a lack of similar data (from similar anatomical regions) used for training. Hence, more image data available for training will likely improve the results. Moreover, combining the clinical features of each skin lesion with the images of these lesions has been reported to improve the performance of CNN models [59]. We will consider such an approach in the future (knowing that at this moment only the benign/malignant dataset [60] also contains clinical features; the keloid dataset [34] does not contain such detailed information). As mentioned in the Introduction, we also plan to further explore the use of vision transformers (ViTs), as they show potential in image classification, since they use fewer computational resources compared to CNN models, even though they do not currently outperform the CNN models [71], especially when trained on small datasets. We also hope to delve into mechanistic learning approaches, where we can leverage knowledge-driven modelling with data-driven modelling to improve the interpretability of such models [?]. We will also explore the ablation study of each considered architecture and further investigate how feature selection/extraction using algorithms such as principal component analysis (PCA), minimum redundancy maximum relevance (mRMR), autoencoder (AE), linear discriminant analysis (LDA), etc., could improve model performance and computational efficiency. We will also explore how the use of Generative Adversarial Network (GAN) for data augmentation [17] affects the performance of the models.

# 6 Comparison with published literature.

As we mentioned in the Introduction, we are not aware of any studies classifying keloid images among benign and malignant skin lesion images. However, some studies classify other skin lesions using dermatoscopic data [5, 2] or non-dermatoscopic data [59, 80]. To position our study within the published literature, we compared our results with those in studies that equally classify the skin lesions as either malignant or benign. In [5], a CNN-based model was trained on the publicly available dermoscopic datasets of skin lesions [78, 7, 8] to classify benign vs malignant skin lesions and returned an accuracy of 0.854 ± 0.032, a precision of 0.936 ± 0.017, and a recall of 0.88 ± 0.048. The same study [5] also considered a machine learning-based approach and arrived at an accuracy of 0.738 ± 0.011, a precision of 0.854 ± 0.01, and a recall of 0.811 ± 0.013. In [2], a deep learning (DL) model was built using a public dermatoscopic dataset from [78] and a Kaggle dataset from the ISIC archive [36], and the researchers obtained an accuracy of 0.88, a precision of 0.93, a recall of 0.83, and an F1 score of 0.88. Our proposed model for the binary classification based on the VGG16 model (see first row in Table 17) yielded an accuracy of 0.85, a precision of 0.86, and a recall of 0.77. It is important to emphasise that the models in [5] and [2] were trained on dermatoscopic image datasets (which are more available publicly, thanks to the ISIC and HAM10000 datasets, which, when combined, have over 400,000 images of different skin lesions as of 2024). In this study, our focus was to train a deep learning model on non-dermatoscopic images of skin lesions to provide ways of diagnosing these skin lesions using just phone camera pictures (clinical images) in areas where dermatoscopes are not available or are too expensive to consider. To the best of our knowledge, very few machine learning and deep learning models have been used to classify skin lesions using non-dermatoscopic images [59, 80], with [60] (i.e., the dataset used in [59]) being the only one available publicly. While [59] considered similar datasets, we emphasise that we added a keloid dataset from Kaggle [34]. In [59], the clinical images and the clinical features provided in the metadata were combined, while in this study, we only considered the clinical images, and the addition of the clinical features will be a focus of future work. The performance of the multiclass classification model in [59], when clinical images were combined with clinical features (i.e., patient information), yielded an accuracy of 0.788 ± 0.025, precision of 0.800 ± 0.028, a recall of 0.788 ± 0.025, and an F1 of 0.790 ± 0.027; our proposed model for the binary classification (i.e., benign vs. malignant) yielded an accuracy of 0.851, a precision of 0.860, a recall of 0.775, and an F1 of 0.815; the multiclass VGG-based model (i.e., benign vs. malignant vs. keloid; see Table 20), yielded an accuracy of 0.877, a precision of 0.881, a recall of 0.877, and an F1 of 0.878; and finally, the multiclass DenseNet-based model (i.e., keloid vs. basal cell carcinoma vs. squamous cell carcinoma; see Table 21), yielded an accuracy of 0.910, a precision
of 0.911, a recall of 0.910, and an F1 of 0.897. In Table 22, we present a summary of the comparisons with previous work.

It is evident that for a model based on less than 3000 non-dermatoscopic images, our model has better performance, with an ≈ 9% increase in performance compared to [59], as seen in Table 22. We recognise that our models were trained for fewer classes (i.e., two and three classes) compared to the six-class models in [59], which might explain the difference in the results.

<table><caption>Table 22: Comparing accuracy, precision, and recall of our proposed models for the three classification tasks with result of previous works.</caption><thead><tr><th>Authors</th><th>Dataset</th><th>Category</th><th>Accuracy</th><th>Precision</th><th>Recall</th></tr></thead><tbody><tr><td>[5]</td><td>Dermatoscopic image dataset from [78, 8, 7]</td><td>Benign vs. Malignant</td><td>0.854±0.032</td><td>0.936±0.017</td><td>0.88 ± 0.048</td></tr><tr><td>[2]</td><td>Dermatoscopic image dataset from [78, 36]</td><td>Benign vs. Malignant</td><td>0.88</td><td>0.93</td><td>0.83</td></tr><tr><td>[59]</td><td>Non-dermatoscopic image dataset from [60]</td><td>Multiple (six) skin lesion class</td><td>0.788 ± 0.025</td><td>0.8 ± 0.028</td><td>0.79 ± 0.027</td></tr><tr><td>[80]</td><td>Non-dermatoscopic image dataset (private)</td><td>Unspecified</td><td>unavailable</td><td>unavailable</td><td>0.951</td></tr><tr><td rowspan="3">Ours</td><td rowspan="3">Non-dermatoscopic image dataset from [60] and [34]</td><td>Benign vs. Malignant;</td><td>0.851</td><td>0.860</td><td>0.775</td></tr><tr><td>Benign vs. Malignant vs. Keloid;</td><td>0.877</td><td>0.881</td><td>0.877</td></tr><tr><td>Keloid vs. BCC vs. SCC</td><td>0.91</td><td>0.911</td><td>0.91</td></tr></tbody></table>

Conceptualisation, O.E.A., D.T. and R.E.; software, O.E.A.; writing—original draft preparation, O.E.A., D.T and R.E.; writing—review and editing, O.E.A., D.T. and R.E.; resources, B.C, supervision, R.E., D.T.; project administration, R.E. and D.T.; funding acquisition, R.E. All authors have read and agreed to the published version of the manuscript.

**Funding:** R.E and O.E.A acknowledge funding from a French Agence Nationale de Recherche (ANR) grant number ANR-21-CE45-0025-01. O.E.A also acknowledges the 2024 international mobility funding (from the University of Franche Comte research commission) for his visit to the University of Dundee, United Kingdom from where this project was conceptualised.

**Data availability:** The data and code for this project are available at https://github.com/OEAdebayo/skin-project

**Hardware and software specification:** We implemented our models on an high performance computing (HPC) cluster with compute nodes equipped with dual Intel Xeon Silver 4314 CPUs where each CPU has 16 cores (totaling 32 cores per node) with varying node RAM capacity and operates at a base frequency of 2.4 GHz, with a maximum turbo frequency of 3.4 GHz. The software stack included Ubuntu 20.04 LTS OS, Python 3.12, Keras 3.3 with TensorFlow 2.16.1 backend. The training jobs were submitted via Slurm 19.05.5 and the jobs were assigned based on node availability. The jobs were run without GPU acceleration, relying entirely on CPU-based training. The rest of the software dependencies can be found in the requirements.txt file available in the GitHub link provided in the "Data availability statement" above.

**Conflict of Interest:** The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

# A Appendix

## A.1 Details of the performance metrics

As explained in Section 2.2.3, we made use of the following performance metrics:
* Accuracy, which measures the proportion of correct predictions made by the model defined as

$$ accuracy = \frac{TP + TN}{TP + FP + TN + FN}. \qquad (1) $$

* Precision, which measures the ratio of TP predictions among all positive predictions (TP and FP), is given by

$$ precision = \frac{TP}{TP + FP}. \qquad (2) $$

This metric indicates how many of the predicted positive cases are correctly identified.

* Recall (also known as sensitivity or TP rate), which measures the proportion of correctly predicted positive cases (TP) out of all actual positive cases (TP + FN), is given by

$$ recall = \frac{TP}{TP + FN}. \qquad (3) $$

In other words, it denotes how many of the actual positive cases were correctly identified by the model. Note that using precision and recall separately might not provide the full picture, since these metrics are subjective of the classification task at hand. Thus, it is better to use metrics that combine both precision and recall.

* A metric that combines the precision and recall is the F1\_score. It provides a good evaluation of model performance and is defined below as

$$ F1_{score} = 2 \frac{precision \times recall}{precision + recall}. \qquad (4) $$

will not account for the imbalance in the dataset.

* We can also evaluate the performance of each model using the Area Under the Receiver Operating Characteristic Curve (AUC-ROC). AUC-ROC measures the ability of a classifier to differentiate between the positive and negative classes across different threshold values while the ROC curve itself is a plot of FP rate (x-axis) against TP rate (i.e., the recall, on the y-axis).

* Confusion matrix is another (visual) metric that describes the performance of a classification model by comparing the actual values with the predicted values.

## References

[1] E.M. Acar, A. Kilitci, Z. Kaya, O.L. Abbas, and F. Kemeriz. Basal cell carcinoma presenting as an excoriated cicatricial plaque: A case report. *Dermatologica Sinica*, 36(4):211-213, 2018.

[2] Stefania Bechelli and Jerome Delhommelle. Machine learning and deep learning algorithms for skin cancer classification from dermoscopic images. *Bioengineering*, 9(3):97, 2022.

[3] D. Behera, I. Debata, D. Mohapatra, and A. Agarwal. Appearances can be deceptive: An intriguing case of a keloidal mass. *Indian J Dermatol.*, 67(5):629, 2022.

[4] S. Bostanci, B.N. Akay, M. Alizada, and A.H. Okcu. Cutaneous leiomyosarcoma misdiagnosed as a keloid: A case report with dermatoscopy. *Turkderm-Turk Arch Dermatol Venereol*, 57:154-156, 2023.

[5] Francesca Brutti, F. La Rosa, Linda Lazzeri, Chiara Benvenuti, Giovanni Bagnoni, Daniela Massi, and Marco Laurino. Artificial intelligence algorithms for benign vs. malignant dermoscopic skin lesion image classification. *Bioengineering*, 10, 2023.

[6] F. Chollet. Xception: Deep learning with depthwise separable convolutions. *arXiv preprint*, 2017.

[7] Noel Codella, Veronica Rotemberg, Philipp Tschandl, Mehmet E. Celebi, Stephen Dusza, David Gutman, Brian Helba, Adarsh Kalloo, Konstantinos Liopyris, Michael Marchetti, et al. Skin lesion analysis toward melanoma detection 2018: A challenge hosted by the international skin imaging collaboration (isic). *arXiv preprint arXiv:1902.03368*, 2019.
[8] Noel C Codella, David Gutman, Mehmet E Celebi, Brian Helba, Michael A Marchetti, Stephen W Dusza, Adarsh Kalloo, Konstantinos Liopyris, Nabin Mishra, Harald Kittler, 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)*, pages 168–172. IEEE, 2018.

[9] M. Costa, J. Sousa, and P. Almeida. Classification of x-ray images for detection of childhood pneumonia using mobilenet. *IEEE Trans. Med. Imaging*, 39:1123–1135, 2020.

[10] Houfani D., S. Slatnia, I. Remadna, Noureddine Zerhouni, and Hamza Saouli. Breast cancer classification using machine learning techniques: a comparative study. *Medical Technologies Journal*, 4:535–544, 2020.

[11] Sgouros D, Theofili M, Zafeiropoulou T, Lallas A, Apalla Z, Zaras A, Liopyris K, Pappa G, Polychronaki E, Kousta F, Panagiotopoulos A, Stratigos A, Rigopoulos D, and Katoulis AC. Dermoscopy of actinic keratosis: Is there a true differentiation between non-pigmented and pigmented lesions? *J Clin Med*, 12:1063, 2023.

[12] R. Eftimie, G. Rollin, O. Adebayo, S. Urcun, and S.P.A. Bordas. Modelling keloids dynamics: a brief review and new mathematical perspectives. *Bull. Math. Biol.*, 85(12):117, 2023.

[13] J. A. Fee, F. P. McGrady, and N. D. Hart. Dermoscopy use in primary care: a qualitative study with general practitioners. *BMC Primary Care*, 23:47, 2022.

[14] L. Feller, R. A. G. Khammissa, B. Kramer, M. Altini, and J. Lemmer. Basal cell carcinoma, squamous cell carcinoma and melanoma of the head and face. *Head and face medicine*, 12:11, 2016.

[15] A. M. Forsea, P. Tschandl, I. Zalaudek, V. Del Marmol, H. P. Soyer, G. Argenziano, and A. C. Geller. Dermatoscopy of melanoma according to type, anatomic site and stage. *Eur. J. Dermatol.*, 30:524–531, 2020.

[16] Chollet Francois. Deep learning with python, 2018.

[17] Maayan Frid-Adar, Idit Diamant, Michal Amitai Eyal Klang, Jacob Goldberger, and Hayit Greenspan. Gan-based synthetic medical image augmentation for increased cnn performance in liver lesion classification. *Neurocomputing*, 321:321–331, 2018.

[18] Gauglitz G. G., Korting H. C., Pavicic T., Ruzicka T., and Jeschke M. G. Hypertrophic scarring and keloids: pathomechanisms and current and emerging treatment strategies. *Mol Med.*, 17:113–25, 2011.

[19] P. Ghosh, S. Azam, Quadir R., A. Karim, F. M. J. M. Shamrat, S. K. Bhowmik, M. Jonkman, K. M. Hasib, and K. Ahmed. Skinnet-16: A deep learning approach to identify benign and malignant skin lesions. *Front. Oncol.*, 12:535–544, 2022.

[20] M. Goder, R. Kornhaber, D. Bordoni, E. Winkler, J. Haik, and A. Tessone. Cutaneous basal cell carcinoma arising within a keloid scar: a case report. *OncoTargets and Therapy*, 9:4793–4796, 2016.

[21] J.M. Grant-Kels, E.T. Bason, and C.M. Grin. The misdiagnosis of malignant melanoma. *J. Am Acad Dermatol.*, 40(4):539–548, 1999.

[22] S. Gupta and M. Tan. Efficientnet-edgetpu: Creating accelerator-optimized neural networks with automl, 2019. Available at https://ai.googleblog.com/2019/08/efficientnetedgetpu-creating.html.

[23] D. Gutman, N.C.F. Codella, E. Celebi, B. Helba, M. Marchetti, N. Mishra, and A. Halpern. "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)". *eprint arXiv:1605.01397*, 2016.

[24] Andrew G. Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. *ArXiv*, 2017.

[25] Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q. Weinberger. Densely connected convolutional networks. In *2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR)*, pages 2261–2269, 2017.

[26] Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q. Weinberger. Densely connected convolutional networks. In *2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR)*, pages 2261–2269, 2017.
[27] S.-M. Hwang, H.-C. Pan, M.-K. Hwang, M.-W. Kim, and J.-S. Lee. Malignant skin tumor misdiagnosed as a benign skin lesion. *ArchCraniofacSurg*, 17(2):86–89, 2016.

[28] Cimpean I, Theate I, and Vanhooghem O. Seborrheic keratosis evolution into squamous cell carcinoma: A truly modified sun-related tumor? a case report and review of the literature. *Dermatol Reports*, 11:7999, 2019.

[29] S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift, 2015. arXiv preprint, arXiv:1502.03167, available at https://arxiv.org/abs/1502.03167.

[30] International Skin Imaging Collaboration (ISIC). Isic gallery, 2024. Available online: https://gallery.isic-archive.com (accessed on 25 October 2024).

[31] M. Ismail, F. Nisa, and R. Ahmad. Utilising vgg16 of convolutional neural network for brain tumor and alzheimer's classification. *J. Adv. Med. Sci.*, 10:123–135, 2024.

[32] J. Jia, M. Wang, L. Song, and Y. Feng. A melanotic malignant melanoma presenting as a keloid. a case report. *Medicine*, 96:49(e9047), 2017.

[33] T. Jo, K. Nho, and A. Saykin. Deep learning in alzheimer's disease: Diagnostic classification and prognostic prediction using neuroimaging data. *Frontiers in Aging Neuroscience*, 2019.

[34] Kaggle. keloid scars vs hypertrophic scars. Available online: https://www.kaggle.com/datasets/quratulainislam/keloid-vs-scar(accessedon16February2024).

[35] Kaggle. Skin cancer isic. Available online: https://www.kaggle.com/datasets/nodoubttome/skin-cancer9-classesisic/data(accessedon8February2024).

[36] Kaggle. Skin cancer: Malignant vs. benign. https://www.kaggle.com/datasets/fanconic/skin-cancermalignant-vs-benign. Accessed on 1 November 2021.

[37] Kaggle. Skin cancer mnist: Ham10000. https://www.kaggle.com/datasets/kmader/skin-cancer-mnist-ham10000. Accessed 05/06/2022.

[38] S. Khan, M. Naseer, M. Hayat, S. W. Zamir, F. S. Khan, and M. Shah. Transformers in vision: A survey. *Association for Computing Machinery*, 54(10s), 2022.

[39] J. Kim, I. Oh, and Y.N. et al. Lee. Predicting the severity of postoperative scars using artificial intelligence based on images and clinical data. *Sci Rep*, 13:13448, 2023.

[40] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. *Commun. ACM*, 60:84–90, 2017.

[41] A. Kumar, J. Kim, D. Lyndon, M. Fulham, and D. Feng. An ensemble of fine-tuned convolutional neural networks for medical image classification. *IEEE Journal of Biomedical and Health Informatics*, 21:31–40, 2017.

[42] V.A.T. Kurniawan, E.C. Niswary, and D.R. Chandranegara. Brain tumor classification using inceptionres-netv2 and transfer learning. *J. Comput. Biol. Med.*, 18:98–110, 2024.

[43] Satish L., Lyons-Weiler J., Hebda P. A., and Wells A. Gene expression patterns in isolated keloid fibroblasts. *Wound Repair Regen.*, 14:463–470, 2006.

[44] A. Lallas, E. Paschou, S. M. Manoli, C. Papageorgiou, I. Spyridis, K. Liopyris, M. Bobos, A. Moutsoudis, E. Lazaridou, and Z. Apalla. Dermatoscopy of melanoma according to type, anatomic site and stage. *Italian journal of dermatology and venereology*, 156:274–288, 2021.

[45] Y. Lecun, Y. Bengio, and G. Hinton. Deep learning. *Nature*, 521, 2015.

[46] J. Lewis. Keloidal basal cell carcinoma. *The American Journal of Dermatopathology*, 29(5):485, 2007.

[47] S. Li, H. Wang, Y. Xiao, M. Zhang, N. Yu, A. Zeng, and X. Wang. A workflow for computer-aided evaluation of keloid based on laser speckle contrast imaging and deep learning. *Journal of personalized medicine*, 12:981, 2022.

[48] D. Liu, W. Wang, X. Wu, and J. Yang. Efficientnetv2 model for breast cancer histopathological image classification. In *IEEE Int. Conf. Electr. Eng. Comput. Sci.*, volume 7, pages 384–387, 2022.
[49] J. Lu. Convolutional neural network and vision transformer for image classification. *Applied and Computational Engineering*, 5:104–108, 2023.

[50] A. Majumder, S. Srivastava, and P. Ranjan. Squamous cell carcinoma arising in a keloid scar. *Medical Journal, Armed Forces India*, 75:222–224, 2019.

[51] T. Mentzel, T. Wiesner, L. Cerroni, M. Hantschke, H. Kutzner, A. Rütten, M. Häberle, M. Bisceglia, F. Chibon, and J. M. Coindre. Malignant dermatofibroma: clinicopathological, immunohistochemical, and molecular analysis of seven cases. *Modern pathology : an official journal of the United States and Canadian Academy of Pathology, Inc*, 26:256–267, 2013.

[52] J. Metzcar, C.R. Jutzeler, P. Macklin, A. Köhn-Luque, and S.C. Brüningk. A review of mechanistic learning in mathematical oncology. *Front. Immunol.*, 15:1363144, 2024.

[53] H. Mizuno, A.C. Uysal, and Hiko Hyakusoku S. Koike. Squamous cell carcinoma of the auricle arising from keloid after radium neddle therapy. *Journal of Craniofacial Surgery*, 2:360–362, 2006.

[54] R.F. Mulya, E. Utami, and D. Ariatmanto. Classification of acute lymphoblastic leukemia based on white blood cell images using inceptionv3 model. *Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi)*, 7:5182, 2023.

[55] J.B. Newcomer, A. Durbin, and C. Wilson. Cutaneous metastasis of lung adenocarcinoma: Initially mimicking and misdiagnosed as keloids. *Cureus*, 14(7):e27285, 2022.

[56] R. Spenser Nicholas and M. Stodell. An important case of misdiagnosis: keloid scar or high-grade soft-tissue sarcoma? *BMJ Case Rep.*, 2014:bcr2014203600, 2014.

[57] F. B Niessen, Spauwen P. H, Schalkwijk J., and M. Kon. On the nature of hypertrophic scars and keloids: a review. *Plast. Reconstr. Surg.*, 104:1435–1458, 1999.

[58] R. Ogawa, S. Yoshitatsu, K. Yoshida, and T. Miyashita. Is radiation therapy for keloids acceptable? the risk of radiation-induced carcinogenesis. *Plastic and Reconstructive Surgery*, 124:1196–1201, 2009.

[59] Andre G.C. Pacheco and Renato A. Krohling. The impact of patient clinical information on automated skin cancer detection. *Computers in Biology and Medicine*, 116:103545, 2020.

[60] Andre G.C. Pacheco, Gustavo R. Lima, Amanda S. Salomão, Breno Krohling, Igor P. Biral, Gabriel G. de Angelo, Fábio C.R. Alves Jr, José G.M. Esgario, Alana C. Simora, Pedro B.C. Castro, Felipe B. Rodrigues, Patricia H.L. Frasson, Renato A. Krohling, Helder Knidel, Rachel B. do Espírito Santo Maria C.S. Santos, Telma L.S.G. Macedo, Tania R.P. Canuto, and Luíz F.S. de Barros. Pad-ufes-20: A skin lesion dataset composed of patient data and clinical images collected from smartphones. *Data in Brief*, 32:106221, 2020.

[61] E.H. Portugal, J.C.R.R. Alves, R.P.L. Da Fonseca, J. De Souza Andrade, A.C. De Melo Alemida, I.C. Araujo, N.A. Pereira, and R.L.F. Da Silva. Dermatofibrosarcoma protuberans misdiagnosed as keloid and treated with triamcinolone acetonide. *Rev. Bras. Cir. Plast.*, 31(1):82–87, 2016.

[62] S. Puig, N. Cecilia, and J Malvehy. Dermoscopic criteria and basal cell carcinoma. *Giornale italiano di dermatologia e venereologia : organo ufficiale, Societa italiana di dermatologia e sifilografia*, 147:135–140, 2012.

[63] M.A. Rahman, E. Bazgir, S.M.S. Hossain, and M. Maniruzzaman. Skin cancer classification using nasnet. *Int. J. Sci. Res. Arch.*, 11:23–36, 2024.

[64] Thirumalaisamy S., Thangavilou K., Rajadurai H., Saidani O., Alturki N., Mathivanan Sk., Jayagopal P., and Gochhait S. Breast cancer classification using synthesized deep learning model with metaheuristic optimization algorithm. *Diagnostics*, 13:2925, 2023.

[65] Vincent A. S., Phan T. T., Mukhopadhyay A., Lim H. Y., Halliwell B., and Wong K. P. Human skin keloid fibroblasts display bioenergetics of cancer cells. *J. Invest Dermatol.*, 128:702–709, 2008.

[66] N.A. Sait and J. Kathirvelan. Detection and classification of progressive supranuclear palsy from mri images using deep learning. *Journal of Applied Research and Technology*, 22:2228, 2024.

[67] H. C. Shin, H. R. Roth, M. Gao, and L. Lu. Deep convolutional neural networks for computer-aided detection: Cnn architectures, dataset characteristics and transfer learning. *IEEE Transactions on Medical Imaging*, 35:1285–1298, 2016.
[68] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In *International Conference on Learning Representations*, 2015.

[69] H. Skvara, L. Teban, M. Fiebiger, M. Binder, and H. Kittler. Limitations of dermoscopy in the recognition of melanoma. *Arch. of Dermatol.*, 141:155-160, 2005.

[70] W. Sondermann, L. Zimmer, D. Schadendorf, A. Roesch, J. Klode, and J. Dissemond. Initial misdiagnosis of melanoma located on the foot is associated with poorer prognosis. *Medicine*, 95:29(e4332), 2016.

[71] A. Steiner, A. Kolesnikov, X. Zhai, R. Wightman, J. Uszkoreit, and L. Beyer. How to train your vit? data, augmentation, and regularization in vision transformers, 2022. arXiv preprint, arXiv:2106.10270, available at https://arxiv.org/abs/2106.10270.

[72] C. Szegedy, S. Ioffe, V. Vanhoucke, and A. Alemi. Inception-v4, inception-resnet and the impact of residual connections on learning. *arXiv preprint*, arXiv:1602.07261, 2016. Available at https://arxiv.org/abs/1602.07261.

[73] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In *2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR)*, pages 2818-2826, 2016.

[74] M. Tan and Q. V. Le. Efficientnet: Rethinking model scaling for convolutional neural networks. *arXiv preprint*, arXiv:1905.11946, 2020. Available at https://arxiv.org/abs/1905.11946.

[75] M. Tan and Q. V. Le. Efficientnetv2: Smaller models and faster training. *arXiv preprint*, arXiv:2104.00298, 2021. Available at https://arxiv.org/abs/2104.00298.

[76] M. Tejada, R. Espinoza, and L. Hinojosa. Use of xception architecture for the classification of skin lesions. *Int. J. Comput. Vis.*, 12:145-160, 2024.

[77] William Tiong and Normala Basiron. Challenging diagnosis of a rare case of spontaneous keloid scar. *Journal of Medical Cases*, 5(8):466-469, 2014.

[78] Philipp Tschandl, Cliff Rosendahl, and Harald Kittler. The ham10000 dataset, a large collection of multi-source dermatoscopic images of common pigmented skin lesions. *Scientific Data*, 5:180161, 2018.

[79] M. Ucak. A rare case of misdiagnosis: recurrence of dermatofibrosarcoma protuberans that was treated surgically as keloid. *Med. Arch.*, 72(1):75-75, 2018.

[80] Alexandru Udrea, Gaurang Mitra, Darius Costea, Erik Noels, Maja Wakkee, Danielle M. Siegel, Tatiana M. de Carvalho, and Tamar Nijsten. Accuracy of a smartphone application for triage of skin lesions based on machine learning algorithms. *Journal of the European Academy of Dermatology and Venereology*, 34(3):648-655, 2020.

[81] A.L. Udristoiu, A.E. Stanca, A.E. Ghenea, C.M. Vasile, M. Popescu, Ş.C. Udriştoiu, A.V. Iacob, S. Cas-travete, L.G. Gruionu, and G. Gruionu. Skin diseases classification using deep learning methods. *Curr. Health Sci. J.*, 46:136-140, 2020.

[82] Y. Wang, F. Yang, X.L. Wu, F. Liu, R. Jin, C. Gu, T. Ni, X. Wang, Q. Yang, X. Luo, and J. Yang. On the diagnosis and treatment of cutaneous and soft tissue tumours misdiagnosed as scars: Lessons from four cases. *Int Wound J.*, 16:793-799, 2019.

[83] H. Zerouaoui and A. Idri. Classifying breast cytological images using deep learning architectures. In *Proceedings of the International Conference on Data Science and Artificial Intelligence*, pages 557-564, 2022.

[84] B. Zoph, V. Vasudevan, J. Shlens, and Q. V. Le. Learning transferable architectures for scalable image recognition. *arXiv preprint*, arXiv:1707.07012, 2018. Available at https://arxiv.org/abs/1707.07012.