1.8
1.8
com
Available online at www.sciencedirect.com
Available online at www.sciencedirect.com
ScienceDirect
Procedia Computer Science 00 (2019) 000–000
Procedia
Procedia Computer
Computer Science
Science 24100 (2019)
(2024) 000–000
588–593 www.elsevier.com/locate/procedia
www.elsevier.com/locate/procedia
3rd International Workshop on Mobile4Medicine: Mobile Systems and Pervasive Computing for
3rd International Workshop on Mobile4Medicine: Mobile Systems and Pervasive Computing for
Personalized Medicine
Personalized
August 5-7, 2024, Marshall Medicine
University, Huntington, WV, USA
August 5-7, 2024, Marshall University, Huntington, WV, USA
Multi-classification
Multi-classification of
of skin
skin lesions
lesions using
using aa deep
deep learning-based
learning-based
convolutional neural network
convolutional neural network
Khadija Shahzadaa , Muhammad Wasima,∗ b c,d
a,∗, Ivan Miguel Piresb , Nuno M. Garciac,d
Khadija
a
Shahzad , Muhammad Wasim , Ivan Miguel Pires , Nuno M. Garcia
Department of Computer Science, University of Management and Technology, Lahore (Sialkot Campus), Pakistan
a Department of Computer Science, University of Management and Technology, Lahore (Sialkot
b Instituto Campus), Pakistan
de Telecomunicações, Escola Superior de Tecnologia e Gestão de Águeda, Universidade de Aveiro, Águeda, Portugal
b Instituto
c de Telecomunicações, Escola Superior de Tecnologia e Gestão de Águeda, Universidade de Aveiro, Águeda, Portugal
Institute of Biophysics and Biomedical Engineering (IBEB), Faculty of Sciences, University of Lisbon, Lisbon, Portugal
c Institute of Biophysics and Biomedical Engineering
d Instituto (IBEB), Faculty of Sciences, University of Lisbon, Lisbon, Portugal
de Telecomunicações, Covilhã, Portugal
d Instituto de Telecomunicações, Covilhã, Portugal
Abstract
Abstract
Skin lesions refer to changes or abnormalities on the skin, such as moles, freckles, cysts, warts, and more. While not all skin lesions
Skin lesions refer
are cancerous, someto changes
types canorindicate
abnormalities on the
or develop skin,
into such
skin as moles,
cancer. Skin freckles,
cancer hascysts,
beenwarts,
on theand
risemore. While
in recent not all
years, skin lesions
causing many
are cancerous,
deaths. However,some types examination
manual can indicate or
bydevelop into skiniscancer.
dermatologists Skin and
expensive cancer has been on theResearch
time-consuming. rise in recent years,
in this fieldcausing many
has focused
deaths. However,
on developing an manual
automated examination
system to by dermatologists
detect skin cancerisandexpensive and associated
reduce the time-consuming. Research
mortality in this field
rate. However, has focused
the performance
on developing
of such systemsanneeds
automated system toIndetect
improvement. skin cancer
this study, and reduce
we propose the associated
a Synthetic Minority mortality rate. However,
Over-sampling Techniquethe performance
combined with
of suchNearest
Edited systemsNeighbors
needs improvement.
(SMOTEENN) In this study, we
to augment the propose a Synthetic
data, resulting Minority
in a more Over-sampling
balanced dataset. Then, Technique
we used acombined with
Convolutional
Edited
Neural Nearest
NetworkNeighbors
(CNN) model (SMOTEENN) to augment
on the benchmark the data,dataset.
HAM10000 resulting in dataset
The a more balanced
comprisesdataset. Then,
seven skin we usedincluding
diseases, a Convolutional
Actinic
Neural Network
Keratoses, Basal(CNN) model onBenign
cell carcinoma, the benchmark
keratosis,HAM10000 dataset.Melanocytic
Dermatofibroma, The dataset nevi,
comprises seven skin
Melanoma, diseases, skin
and Vascular including Actinic
lesions. With
Keratoses,
a balanced dataset, the proposed model achieves an accuracy, precision, recall, and f1-score of 99.35%, 99.00%, 99.00%,With
Basal cell carcinoma, Benign keratosis, Dermatofibroma, Melanocytic nevi, Melanoma, and Vascular skin lesions. and
a99.00%,
balanced dataset, the
respectively. proposed
The balancedmodel achieves
dataset performsan22%
accuracy,
better precision, recall, anddataset.
than an unbalanced f1-score of 99.35%, 99.00%, 99.00%, and
99.00%, respectively. The balanced dataset performs 22% better than an unbalanced dataset.
© 2024
© 2020 The
The Authors.
Authors. Published
Published by
by Elsevier
Elsevier B.V.
B.V.
© 2020
This is The Authors. Published by Elsevier B.V.
This is an
an open
open access
access article
article under
under the
the CC
CC BY-NC-ND
BY-NC-ND license
license (http://creativecommons.org/licenses/by-nc-nd/4.0/)
(https://creativecommons.org/licenses/by-nc-nd/4.0)
This is an open
Peer-review access
under article under
responsibility of the
the CC BY-NC-ND
Conference license
Program
of the scientific committee (http://creativecommons.org/licenses/by-nc-nd/4.0/)
Chairs.
of the Conference Program Chair
Peer-review under responsibility of the Conference Program Chairs.
Keywords: Computer-Aided Diagnosis; Multi-classification of Skin lesions; Image-processing; Deep-Learning; Convolutional Neural Network
Keywords: Computer-Aided Diagnosis; Multi-classification of Skin lesions; Image-processing; Deep-Learning; Convolutional Neural Network
1. Introduction
1. Introduction
Skin is the greatest exposed organ that covers the whole body. A skin lesion is defined as a change in the skin’s
Skin is the
appearance. greatest
Skin exposed
lesions organcategorized
are further that coversasthe whole body.
melanocytic andAnon-melanocytic
skin lesion is defined as a change in
[11]. Melanocytic thelesions
skin skin’s
appearance. Skin lesions are further categorized as melanocytic and non-melanocytic [11]. Melanocytic skin lesions
originate from the melanocytes (pigment-containing cells) and can be cancerous (malignant) as well as non-cancerous
originate from the melanocytes (pigment-containing cells) and can be cancerous (malignant) as well as non-cancerous
(benign). Non-melanocytic skin lesions do not originate from melanocytes and can be cancerous (malignant) or non-
cancerous (benign). Cancerous skin lesions, called skin cancer, are the uncontrolled growth of the skin cells [7].
Non-cancerous skin lesions occur due to infections or allergies.
Skin cancer has been more common over the last few years and is now considered a primary chronic disease
globally, causing too many deaths worldwide. About 60% of all cancer diagnoses in the nation are attributable to the
top cancers [4]. According to studies, Melanoma causes the death of about 55,000 people each year [10]. In 2021,
6% of all malignancies diagnosed were melanoma [4]. Melanoma affects one in every forty females and one in every
twenty-seven males.
Ensuring early classification and treatment of skin cancer is crucial in reducing the mortality rate. Skin disease
classification is typically done by health professionals (dermatologists) using manual or computer vision-based tools,
which can cause errors and prolong the analysis process [6]. Therefore, it is crucial to develop a solution that could
assist medical professionals in reducing the epidemic of skin diseases by accurately and rapidly classifying skin le-
sions. This study was conducted to classify skin lesions with an accuracy greater than previous studies. The essential
contributions of our research include the proposal of a deep learning-based model named Convolutional Neural Net-
work (CNN) for the accurate multi-classification of skin lesions, the application of a balancing technique to solve the
issue of an imbalanced dataset, and the enhancement of the model’s performance by increasing the number of layers
like, by adding batch normalization layers, preprocessing the images, and by optimizing the parameters. The created
model is evaluated using the test set.
2. Literature Review
This section provides a comprehensive overview of previous research by organizing it thematically. Jain et al.
[8] presented six distinct transfer learning nets for classifying skin cancer with seven classes and concluded that the
performance achieved by replicating images was higher than that of non-replicated images. Xception net achieved the
highest precision, recall, accuracy, and f1-score of 88.76%, 89.57%, 90.48%, and 89.02%, respectively.
Adegun et al. [1] presented a framework that is composed of two stages: the first stage used a CRF-based encoder-
decoder for the segmentation and detection of skin lesions, and the second stage used FCN-Based DenseNet for the
classification of skin lesions. The authors concluded that their proposed segmentation, detection, and classification
approach outperformed other approaches with an accuracy of 95.5% for segmentation and detection and an accuracy,
precision, recall, and f1-score of 98.30%, 98.00%, 98.50%, and 98.00%, for classification, respectively. Alenezi et
al. [3] proposed a different approach: combining skin lesion segmentation and classification. Three FCNLayer mod-
els were analyzed for segmentation, and VGGNet-FCN16s outperformed the other two models with an accuracy and
precision of 96.99% and 97.65%, respectively. For classification, the ensemble of three pre-trained deep learning mod-
els, named DenseNet, GoogleNet, and MobileNet, was used, which achieved the best performance when compared
to the individual models, with accuracy, precision, recall, and f1-score of 97.73%, 99.83%, 95.67%, and 97.70%,
respectively.
Nigar et al. [11] used a deep-learning approach and a transfer learning model named ResNet-18. In addition to this
model, they presented an explainable artificial intelligence (XAI) system (LIME framework). The authors compared
the performance of ResNet-18 with Inception-V3 and concluded that ResNet-18 outperformed Inception-V3 with
accuracy, precision, recall, and f1-score of 94.47%, 93.57%, 94.01%, and 94.45%, respectively. Kassem et al. [9]
proposed a pre-trained model with GoogleNet and performed the experiment three times: first time with the original
dataset, second time with image augmentation, third time with reduced images of each class to the number of images
of the smallest class and concluded that the proposed model achieved the highest performance when the images
were reduced. The accuracy, precision, recall, and f1-score obtained were 94.92%, 80.36%, 79.80%, and 80.07%,
respectively.
Allugunti et al. [5] built a deep-learning model named CNN and evaluated it using a dataset of 2,475 images
belonging to three different types of Melanoma (superficial spreading Melanoma and nodular Melanoma and lesion
malignant) to efficiently diagnose the type of Melanoma by making a distinction among the types and concluded
that the proposed model outperformed the other machine learning algorithms like Decision Tree, Random Forest, and
Gradient Boosting with accuracy, precision, recall and f1-score of 88.83%, 91.07%, 87.68%, and 89.32%, respectively.
590 Khadija Shahzad et al. / Procedia Computer Science 241 (2024) 588–593
Khadija Shahzad et al. / Procedia Computer Science 00 (2019) 000–000 3
Based on the state of the art, we suggested building a custom CNN model to generalize the features well as in
transfer learning nets. However, there is a high risk of overfitting. Table 1 compares our proposed model (CNN) with
other state-of-the-art models and concludes that our proposed model performed the best.
Table 1: Comparison of performance of the proposed model (CNN) with state-of-the-art models
Ref Model Accuracy (%) Precision (%) Recall (%) F1-score (%)
[8] Xception 90.48 88.76 89.57 89.02
[1] CRF-based encoder-decoder with 98.30 98.00 98.50 98.00
FCN-Based DenseNet
[11] Deep-Learning approach with XAI 94.47 93.57 94.01 94.45
[5] Simple CNN 88.83 91.07 87.68 89.32
[3] VGGNet-FCN16, Ensemble of 97.73 99.83 95.67 97.70
DenseNet, GoogleNet, MobileNet
[9] GoogleNet, GoogleNet with multi- 94.92 80.36 79.80 80.07
class, SVM, GoogleNet with VGG19
CNN (proposed model) 99.35 99.00 99.00 99.00
3. Methodology
In this section, we discuss the methodology of our multiclass skin lesion classification system. The phases in
which we have built our complete system are discussed below. The system was developed using a Deep Learning
Convolutional Neural Network (CNN) model. Fig. 1 shows a CNN architecture for our proposed system.
We used Human Against Machine (HAM10000) dataset, which is publicly available; many researchers have used
this dataset in their studies. The dataset was downloaded from the link provided by Akter et al. [2]. and consists
of 10,015 dermatoscopic images belonging to seven different classes of skin lesions. The data was preprocessed by
resampling (using SMOTEENN), reshaping (converting 3D image data into 4D), and data splitting (training set (75%)
and a test set (25%)).
A multiclass skin lesion classification model, called Convolutional Neural Network (CNN), was built to extract
features from the images and classify the skin lesions. We trained our CNN model using the training set (75%) and
optimized the parameters to improve the training process and reduce the difference between the actual and predicted
class.
After training the model completely, its performance was assessed using a separate test set. Similar to the studies
presented in [8, 1, 11, 9, 5, 3], we also evaluated the effectiveness of our skin lesion classification model using quan-
titative metrics like accuracy, precision, recall, and f1-support. After successfully evaluating the model, it classified
the skin lesions accurately even though it had not seen the data earlier. As the image is inserted, the model learns
the features and produces a probability score. The class with the most significant probability represents the outcome
of the skin lesion classification. We used a Convolutional Neural Network to classify skin lesion images into seven
classes. The CNN architecture consists of the following layers:
Khadija Shahzad et al. / Procedia Computer Science 241 (2024) 588–593 591
4 Khadija Shahzad et al. / Procedia Computer Science 00 (2019) 000–000
In − F s + 2 × Pd
Output = ( )+1 (1)
St
where the input picture, filter size, padding, and stride are represented by the letters In, Fs, Pd, and St, respectively.
(Nh − F s + 1) Nw − F s + 1
Output = × × Nc (2)
St St
In the feature map, Nh, Nw, and Nc represent the feature map’s height, width, and number of channels.
4. Experimental Analysis
The Keras Sequential API was employed. Convolutional layers are the first stage, a filter collection that extracts
image features. All the images have the 2D matrix filters applied to them. These images contain features that the CNN
can extract and use for the classification task. The pooling (MaxPool2D) layer comes next. This layer functions as a
filter for downsampling. It selects the highest value between the two adjacent pixels. Conv2D and Pooling layers are
incorporated to learn both global and local features. The activation function introduces nonlinearity into the system
and is given by max(0,x). The resulting feature map is then transformed into a single 1D vector in the Flattening Layer.
To use fully connected layers, convolution and max pooling must be followed by flattening. The local characteristics
from the previous convolutional layers are combined. We employed an ADAM optimizer for the models. By iteratively
reviewing the kernel values, weights, and bias of the neurons, the parameters are improved significantly, and the
percentage loss is decreased. The code to reproduce the results is available online 1
We proposed a deep learning model called Convolutional Neural Network (CNN) for classifying multiclass skin
lesions and used the HAM10000 dataset to train our model. We split the dataset into training sets (75%) and test sets
(25%). Initially, the model’s performance could have been better due to the imbalanced dataset, but after balancing
the dataset using SMOTEENN, we achieved excellent results as represented in Taef 2. Furthermore, we increased the
number of epochs and used additional layers like batch normalization and activation to improve the performance. Our
proposed model (CNN) achieved a training accuracy, validation accuracy, precision, recall, and f1-score of 99.99%,
99.35%, 99.00%, 99.00%, and 99.00%, respectively. Thus, The training and validation accuracy achieved by the
model is too close, which means the model generalizes the features well.
(a) Actual and predicted classifications: before resampling (b) Actual and predicted classifications: after resampling
1 https://github.com/dijashahzad746/deep-learning
Khadija Shahzad et al. / Procedia Computer Science 241 (2024) 588–593 593
6 Khadija Shahzad et al. / Procedia Computer Science 00 (2019) 000–000
This study proposed a deep learning model called Convolutional Neural Network (CNN) for multi-classifying skin
lesions using the benchmark dataset (HAM10000). The results of the experiments revealed that the proposed model
achieved excellent performance with 99.99%, 99.35%, 99.00%, 99.00%, and 99.00% for training accuracy, validation
accuracy, precision, recall, and f1-score, respectively, by balancing the dataset using SMOTEENN technique and by
increasing the number of epochs and consumed less power, memory and time. This model has limitations: In real-
world clinical settings, gathering large amounts of data may take time and effort. In a centralized system, people do
not share their data due to privacy and security concerns. This will significantly impact the model’s performance. For
this, a decentralized, federated learning system can be developed to ensure patients’ privacy and security. Furthermore,
data heterogeneity may be another problem as images are captured using different devices, which can cause variations
in the quality of images. Different techniques can be applied to make data homogeneous to improve the model’s
performance.
Acknowledgements
This work is funded by FCT/MEC through national funds and co-funded by the FEDER-PT2020 partnership agree-
ment under the project UIDB/50008/2020.
This work was also supported in part by projects: Fundação para a Ciência e Tecnologia (UIDB/00645/2020 and
https://doi.org/10.54499/UIDB/00645/2020).
References
[1] Adegun, A.A., Viriri, S., 2020. Fcn-based densenet framework for automated detection and classification of skin lesions in dermoscopy images.
IEEE Access 8, 150377–150396.
[2] Akter, M.S., Shahriar, H., Sneha, S., Cuzzocrea, A., 2022. Multi-class skin cancer classification architecture based on deep convolutional
neural network, in: 2022 IEEE International Conference on Big Data (Big Data), IEEE. pp. 5404–5413.
[3] Alenezi, F., Armghan, A., Polat, K., 2023. A novel multi-task learning network based on melanoma segmentation and classification with skin
lesion images. Diagnostics 13, 262.
[4] Alfi, I.A., Rahman, M.M., Shorfuzzaman, M., Nazir, A., 2022. A non-invasive interpretable diagnosis of melanoma skin cancer using deep
learning and ensemble stacking of machine learning models. Diagnostics 12, 726.
[5] Allugunti, V.R., 2022. A machine learning model for skin disease classification using convolution neural network. International Journal of
Computing, Programming and Database Management 3, 141–147.
[6] Hashmani, M.A., Jameel, S.M., Rizvi, S.S.H., Shukla, S., 2021. An adaptive federated machine learning-based intelligent system for skin
disease detection: A step toward an intelligent dermoscopy device. Applied Sciences 11, 2145.
[7] Islam, M.K., Kaushal, C., Amin, M.A., Algarni, A.D., Alturki, N., Soliman, N.F., Mansour, R.F., 2022. A secure framework toward iomt-
assisted data collection, modeling, and classification for intelligent dermatology healthcare services. Contrast Media & Molecular Imaging
2022.
[8] Jain, S., Singhania, U., Tripathy, B., Nasr, E.A., Aboudaif, M.K., Kamrani, A.K., 2021. Deep learning-based transfer learning for classification
of skin cancer. Sensors 21, 8142.
[9] Kassem, M.A., Hosny, K.M., Fouad, M.M., 2020. Skin lesions classification into eight classes for isic 2019 using deep convolutional neural
network and transfer learning. IEEE Access 8, 114822–114832.
[10] Mahbod, A., Schaefer, G., Wang, C., Dorffner, G., Ecker, R., Ellinger, I., 2020. Transfer learning using a multi-scale and multi-network
ensemble for skin lesion classification. Computer methods and programs in biomedicine 193, 105475.
[11] Nigar, N., Umar, M., Shahzad, M.K., Islam, S., Abalo, D., 2022. A deep learning approach based on explainable artificial intelligence for skin
lesion classification. IEEE Access 10, 113715–113725.