0% found this document useful (0 votes)
3 views11 pages

Adam Optimizer

This document presents a study on an automatic skin cancer classification system using Convolutional Neural Networks (CNN) to differentiate between skin cancer and benign tumors. The proposed model achieves a high accuracy of 99% in classifying skin lesions into four categories using the ISIC dataset. The system aims to improve early detection and diagnosis of skin cancer, which is critical for effective treatment and management.

Uploaded by

Teodora Sumurduc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views11 pages

Adam Optimizer

This document presents a study on an automatic skin cancer classification system using Convolutional Neural Networks (CNN) to differentiate between skin cancer and benign tumors. The proposed model achieves a high accuracy of 99% in classifying skin lesions into four categories using the ISIC dataset. The system aims to improve early detection and diagnosis of skin cancer, which is critical for effective treatment and management.

Uploaded by

Teodora Sumurduc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

IOP Conference Series:

Materials Science and


Engineering

PAPER • OPEN ACCESS You may also like


- Discrimination between Healthy and
Convolutional Neural Network (CNN) for Automatic Unhealthy Mole Lesions using Artificial
Swarm Intelligence
Skin Cancer Classification System Mohanad Aljanabi, Jameel Kaduim Abed,
H.J. Abd et al.

- MetaAttention model: a new approach for


To cite this article: Yunendah Nur Fu’adah et al 2020 IOP Conf. Ser.: Mater. Sci. Eng. 982 012005 skin lesion diagnosis using AB features
and attention mechanism
Hung Duy To, Huy Gia Nguyen, Hang Thi
Thuy Le et al.

- Various Types of Skin Tumors Lesion


View the article online for updates and enhancements. Medical Imaging (STLMI) of Healthy and
Unhealthy Moles a Review and
Computational of: Segmentation,
Classification, Methods and Algorithms
Mohanad H. Aljanabi, Fadhel A. Jumaa,
Ahmed Obaid Aftan et al.

This content was downloaded from IP address 90.95.31.208 on 24/03/2025 at 20:26


ICETIR 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 982 (2020) 012005 doi:10.1088/1757-899X/982/1/012005

Convolutional Neural Network (CNN) for Automatic Skin


Cancer Classification System

Yunendah Nur Fu’adah1,2, NK Caecar Pratiwi1, Muhammad Adnan Pramudito1,


Nur Ibrahim1
1
Electrical Engineering Department - Telkom University, Bandung, Indonesia
2
[email protected]

Abstract. Skin cancer is a type of cancer that grows in the skin tissue, which can cause damage
to the surrounding tissue, disability, and even death. In Indonesia, skin cancer is the third
leading for most cancer cases after cervical and breast cancer. The accuracy of diagnosis and the
early proper treatment can minimize and control the harmful effects of skin cancer. Due to the
similar shape of the lesion between skin cancer and benign tumor lesions, physicians consuming
much more time in diagnosing these lesions. The system was developed in this study could identify
skin cancer and benign tumor lesions automatically using the Convolutional Neural Network
(CNN). The proposed model consists of three hidden layers with an output channel of 16,32,
and 64 for each layer respectively. The proposed model uses several optimizers such as SGD,
RMSprop, Adam, and Nadam with a learning rate of 0.001. Adam optimizer provides the best
performance with an accuracy value of 99% in identifying the skin lesions from the ISIC
dataset into 4 classes, namely dermatofibroma, nevus pigmentosus, squamous cell carcinoma,
and melanoma. The results obtained outperform the performance of the existing skin cancer
classification system.

1. Introduction
Skin cancer is a disease caused by changes in the properties of normal skin cells to
become malignant, in which cells will continue to divide into abnormal shapes that are
uncontrolled due to DNA damage. Based on histopathology view, skin cancer has an
irregular structure with cell differentiation in various levels of chromatin, nucleus, and
cytoplasm [1]. Skin cancer is a malignancy disease that is often found in Indonesia in
addition to cervical cancer and breast cancer. Skin cancer found 5.9 to 7.8% for all types
of skin cancer per year. The most common skin cancers in Indonesia are basal cell
carcinoma (65.5%), followed by squamous cell carcinoma (23%), malignant melanoma
(7.9%), and other skin cancers [2]. Even though the number of Malignant Melanoma
incidents is smaller than Basal Cell Carcinoma and Squamous Cell Carcinoma, the death
rate tends to be greater, which causes 75% of deaths from skin cancer [1]. The most
invasive skin cancer is melanoma, which has a high mortality rate, especially if it is not
early detected. Non-melanoma skin cancers, such as basal cell carcinoma and squamous
cell carcinoma are more common but less metastatic, and only partially leads to disability
or death. Accurate diagnosis and early detection of skin cancer can help the healing process,
proper medical treatment, and avoid the worst effects of skin cancer. Therefore, an early
detection system is needed that can facilitate and increase public awareness in identifying
types of skin cancer or other skin disorders such as a benign tumor on the skin that
look very similar to skin cancer.
Content from this work may be used under the terms of the Creative Commons Attribution 3.0 licence. Any further distribution
of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.
Published under licence by IOP Publishing Ltd 1
ICETIR 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 982 (2020) 012005 doi:10.1088/1757-899X/982/1/012005

The automatic skin disorders classification can help people in identifying skin disorders
that occur and immediately consult with medical personnel to get appropriate medical
treatment. Several related studies based on digital image processing for the detection and
classification of skin cancers were developed as a tool for medical personnel to diagnose skin
disorders more accurately with fast computing time. The previous research [3] was
developed using an edge detection method with K-NN and C-NN algorithms provide an
accuracy of 75% and 75.6% respectively to classify skin disorders that potentially benign
cancer and skin disorders that have the potential to be malignant cancer by using the
International Skin Imaging dataset Collaboration (ISIC). In research [4], using the ISIC
dataset for the conditions of skin cancer and skin benign tumors, an automatic skin disease
classification system was developed based on deep learning with PNASNet-5-Large
architecture which gives the best performance accuracy of 76%. Furthermore, other studies
using CNN for the detection of skin diseases [5] [6] [7] provide performance accuracy of
80.52%, 86.21%, 87.25% respectively. To increase the amount of data and to improve the
performance of the skin cancer detection system, the ISIC data augmentation process was
performed [8]. The best accuracy was obtained by 95.91% using Alexnet. In the study [9],
the CNN method with random regulators gave performance accuracy of 97.49% to
distinguish some lesions of skin disorders such as nevus lesions, carcinomas, and
melanomas. In this study, augmentation data from the ISIC dataset will be used to recognize
the condition of skin cancer lesions or benign tumor lesions that look similar to cancer. The
proposed method in this study uses CNN with various optimizer methods such as SGD,
RMSprop, Adam, and Nadam optimizer to find out which optimizer provides the best
performance.

2. Skin Cancer ISIC Dataset


This study uses the International Skin Imaging Collaboration (ISIC) data set shown in
Figure 1 [10]. The data set consists of squamous cell carcinoma and melanoma for skin
cancer, while for tumor conditions, there are dermatofibroma and nevus pigmentosus.

2.1. Dermatofibroma
Dermatofibromas include the category of benign tumors caused by an overgrowth of a
mixture of various types of cells in the dermis layer of the skin. The skin growth that causes
dermatofibroma usually occurs after experiencing several types of minor trauma to the
skin, such as stab wounds caused by glass splinters or insect bites. Characteristics of
dermatofibromas measuring around 2-3 mm, purplish brown, hard structure, and painful
when pressed [11].

2.2. Nevus Pigmentosus


Nevus pigmentosus is a benign tumor originating from melanocytes, dendritic cells that
produce pigment, normally found between keratinocytes in the basal layer of the
epidermis. The developing Nevus Pigmentosus is very dangerous and quite difficult to
handle. Nevus Pigmentosus has characteristics such as birthmarks or moles, if not early
detected and exposure to pollution, ultraviolet light, and harmful chemicals, its potential
to develop into melanoma which is very deadly skin cancer. Other effects of this disease
for patients affected by complications will experience nerve disorders, such as seizures,
fainting, and vomiting [12].

2.3. Squamous Cell Carcinoma


Squamous Cell Carcinoma is a type of skin cancer that attacks parts of the body that are
often exposed to sunlight, such as legs, arms, lips, ears, face, neck, and head [13]. This
disease is not too aggressive as like as other skin cancers. This disease tends to grow slowly
and it can be treated easily through non-surgical therapy if early diagnosed. The benign

2
ICETIR 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 982 (2020) 012005 doi:10.1088/1757-899X/982/1/012005

tumor can continue to grow to be cancer which can spread to bones, tissues, and even
lymph nodes due to the lateness of treatment. The more widespread the spread, the more
difficult the cancer is to be treated.

2.4. Melanoma
Melanoma is a type of skin cancer that is very dangerous. This condition starts with
human skin and can spread to other organs in the body. This disease is a type of skin
cancer originating from melanocyte cells, melanin-producing cells that are usually found
in the skin. Melanoma has an irregular shape and more than one color. Moles affected by
melanoma can feel itchy and can bleed, also, their size can exceed normal moles [14].

Figure 1. ISIC Dataset

3. Convolutional Neural Network (CNN)

Figure 2. The Architecture of CNN

Convolutional Neural Network (CNN) is a development of the Multilayer Perceptron


(MLP) which is designed to process two-dimensional data. CNN is included in the type
of Deep Neural Network because it has a high network depth and has been widely
applied to image data [15]. CNN has an architecture as like as neural networks in
general, neurons in CNN have a weight, bias, and activation function. CNN architecture
as shown in Figure 2, which consists of the convolution layer with ReLU activation,
pooling layer as feature extraction layer, and fully connected layer with softmax
activation as classification layer.

3.1. Convolution Layer


In the Convolution layer, the convolution process is the main process that underlies
CNN. Convolution layer is the first layer that will process the image as an input system
model. The image will be convoluted with a filter to extract features from the input
image that is called the feature map. Figure 3 shows an illustration of the convolution
process.

3
ICETIR 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 982 (2020) 012005 doi:10.1088/1757-899X/982/1/012005

Figure 3. Illustration of the convolution process

3.2. Activation Rel-U


ReLU (Rectified Linear Unit) is an activation layer in CNN to increase the training stage
on neural networks that have advantages to minimize errors. Rel-U activation makes all
pixel values to be zero when a pixel image has a value of less than zero [16].

( ) { (1)

3.3. Activation Rel-U


Polling layers in the CNN method usually will be inserted regularly after several convolution
layers, There are several advantages of the pooling layer, which can progressively reduce
the size of the output volume on the Feature Map so that it can control over-fitting [15].
Pooling Layer is used to reduce data using max-pooling or mean Pooling. The max-pooling
will select the maximum value, whereas the main pooling finds the average value. The
pooling process illustration using the four by four-pixel input image is shown in Figure 4.

Figure 4. Pooling Process Illustration

3.4. Fully Connected Layer


The Fully-Connected Layer is the layer at the end of the architecture used in the multi-
layer perceptron. This layer will connect all the neurons of the previous activation layer.
In this stage, all neurons in the input layer need to be transformed into one-dimensional
data (flatten process) [17]. After that softmax activation as another form of the logistic
regression algorithm can be used to classify more than two classes.

3.5. Hyperparameter
Hyperparameter has variable values that remain during the model training process and
can affect the performance of the model trains. In this study, the hyperparameter that
used is an optimizer, such as Stochastic Gradient Descent (SGD), Root Mean
Square Propagation (RMSprop), Adaptive Moment Estimation (Adam), and Nesterov-
accelerated Adaptive Moment Estimation (Nadam). Stochastic Gradient Descent (SGD)
is a repetitive optimization method that functions to optimize the model using better
functions such as differential or subdifferential [18]. SGD uses each training sample as a
new parameter. Root Mean Square Propagation (RMSprop) is widely used in the design

4
ICETIR 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 982 (2020) 012005 doi:10.1088/1757-899X/982/1/012005

of deep learning models [19]. This optimizer is an improvisation from Root Propagation
(Rprop). Initially, Rprop cannot be used on files with large amounts of data. The
essence of RMSprop is moving the average gradient at the time of the model. Adam
optimizer is a combination of RMSprop and momentum. This optimizer also uses an
average gradient of weight [20]. The advantage of Adam over other optimizers is efficient
in computing time, consume less memory, and can handle sparse gradients on noisy
problems. Nadam (Nesterov-accelerated Adaptive Moment Estimation) thus combines
Adam and NAG (Nesterov accelerated gradient).

4. System Design

4.1. Proposed System Model

Figure 5. The Proposed System Model

In this study, the dataset used is an augmentation of the ISIC dataset for the conditions of
dermatofibroma, nevus pigmentosus, squamous cell carcinoma, and melanoma.
Dermatofibroma and nevus pigmentosus are benign tumors, while squamous cell

5
ICETIR 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 982 (2020) 012005 doi:10.1088/1757-899X/982/1/012005

carcinoma and melanoma are skin cancers. The total amount of augmentation data is
4000 images consisting of 1000 images for each class. The distribution of training data
and validation data were 75% and 25% so that the training data used were 3000 images
and the validation data used were 1000 images.
Based on Figure 5 and Table 1, the resolution of skin images is changed to 128 × 128
pixels as an input of the CNN model which consists of 3 hidden layers. The image is
convoluted using 3 × 3 filters on each hidden layer with the number of output channels on
each layer is 16, 32, 64 respectively. At each layer, the activation process uses Rel-U
activation and Max pooling. The result of Maxpooling reduces the size of the image as
can be seen in Figure 5 and Table 1. After that, the flatten process will change image
features from 3 dimensions became 1 dimension. The last, softmax activation function
will be used to classify the condition of skin image into four classes namely,
dermatofibroma, nevus pigmentosus, squamous cell carcinoma, and melanoma.

Table 1. Details of CNN Model Proposed


Layer (type) Output Shape Parameter
Input Image 128,128,3 0
Convolution 128,128,16 448
ReLU 128,128,16 0
Max-Pooling 64,64,16 0
Convolution 64,64,32 4640
ReLU 64,64,32 0
Max Pooling 32,32,32 0
Convolution 32,32,64 18496
ReLU 32,32,64 0
Max Pooling 16,16,64 0
Dropout 16,16,64 0
Flatten 16384 0
Dense 4 65540
Softmax 4 0

4.2. System Performance


System performance in classifying the conditions of dermatofibroma, nevus
pigmentosus, squamous cell carcinoma, and melanoma was measured using a confusion
matrix to obtain accuracy, recall, precision, and F1 scores. The equation is used to
determine the accuracy of the system in classifying skin cancer lesions and benign tumor
lesions.

(2)

(3)

(4)

(5)

6
ICETIR 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 982 (2020) 012005 doi:10.1088/1757-899X/982/1/012005

True Positive (TP) indicates the condition while the data is positive and correctly
predicted as positive. True Negative (TN) indicates the condition where the data is
negative and correctly predicted as negative. False Positive (FP) indicates the conditions
where the data is negative but incorrectly detected as positive. Whereas False Negative
(FN) indicates the conditions where the data is positive, but incorrectly detected as
negative.

5. Result and Discussion


In this study, 3000 training images and 1000 validation images were used in the training
model. The images obtained from the ISIC dataset, consist of four classes;
dermatofibroma, nevus pigmentosus, squamous cell carcinoma, and melanoma. These
images were trained using the CNN model with various optimizer methods such as SGD,
RMSprop, Adam, and Nadam optimizer with a learning rate of 0.001, and use loss
categorical cross-entropy. The performance parameters measured in this study are
accuracy, recall, precision, F1 scores, and loss. After training with 100 iterations (epoch),
it can be seen the comparison of the accuracy and loss performance of the proposed
model for each optimizer used in Figure 6.

Figure 6. Confusion Matrix

Table 2. Details Performance of Model Proposed


Class Precision Recall F1-Score No of Images
Dermatofibroma 1.00 1.00 1.00 257
Nevus Pigmentosus 0.98 0.98 0.98 246
Squamous Cell 1.00 1.00 1.00 255
Carcinoma
Melanoma 0.98 0.98 0.98 242
Total 0.91 0.91 0.91 114

Based on the results shown in Figure 7, it shows the performance comparison of each
optimizer used, Adam optimizer provides the best accuracy performance and loss
performance when compared to other optimizers. The performance accuracy using SGD,
RMSprop, and Nadam optimizer for training and validation data can decrease suddenly so
that the loss also rises at certain epochs. This is indicated by the appearance of many spikes
on the accuracy and the loss graph. Whereas, the system model that uses Adam optimizer

7
ICETIR 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 982 (2020) 012005 doi:10.1088/1757-899X/982/1/012005

continues to show an increase in accuracy at each iteration (epoch) and the difference in
accuracy between the training data and the validation data is not much different, as well as
for the system loss continues to decrease at each iteration. This condition shows that the
proposed model is not overfitting and the system model used can recognize the condition
of dermatofibroma, nevus pigmentosus, squamous cell carcinoma, and melanoma with
the best accuracy performance of 99% and loss of 0.0346.
Confusion Matrix for system models with Adam optimizer can be seen in Figure 6. It
can be seen that from 1000 validation images used, 990 images were successfully
classified according to their class. The error occurs in four images on nevus pigmentosus
detected as melanoma and six images on melanoma detected as nevus pigmentosus. Other
parameters used to evaluate system

8
ICETIR 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 982 (2020) 012005 doi:10.1088/1757-899X/982/1/012005

Figure 7. System Performance Comparison

performance are Precision, Recall, and F1-score, which has a range of values from 0 to 1
(a value of 1 indicates no error). Based on the data shown in Table 2, the value of system
performance parameters obtained is close to 1, so it can be concluded that the CNN
model proposed can classify the conditions of dermatofibroma, nevus pigmentosus,
squamous cell carcinoma and melanoma with high accuracy and provides a minimum
error.

6. Conclusion
In this study, an automatic system was designed to classify the conditions of
dermatofibroma, nevus pigmentosus, squamous cell carcinoma, and melanoma based on
digital image processing. The CNN model used in this study consists of 3 hidden layers,
using 3 × 3 filter sizes with 16, 32, and 64 channel outputs in sequence, a fully connected
layer, and softmax activation. The optimization is performed on the proposed model
using SGD, RMSprop, Adam, and Nadam optimizer. Based on testing that has been
carried out the CNN model proposed with Adam optimizer provides the best
performance in classifying the dataset of skin cancer lesions and benign tumor lesions
with 99% accuracy, loss of 0.0346 and the value of precision, recall, F1- score is almost
1. Based on the performance results, the system shows that the proposed model is
promising to use as an existing tool for medical personnel in determining the diagnosis of
skin cancer or benign tumors. In further research, systems can be developed to classify
the various types of skin cancer and other skin diseases.

References
[1] Buljan M, Bulana V and Sandra S 2008 Variation in Clinical Presentation of Basal Cell Carcinoma
(Kroasia: University Department of Dermatology and Venereology Zagreb Croatia) p 25-30.
[2] Cipto H, Suriadiredja AS. Tumor kulit. Dalam: Menaldi SL, Bramono K, Indriatmi W, editor. Ilmu
penyakit kulit dan kelamin. Edisi ketujuh. Jakarta: Badan Penerbit FKUI; 2016. h.262-276.
[3] Teresia R, Savera, Winsya H, Suryawan and Agung WS 2020 Deteksi Dini Kanker Kulit
Menggunakan K-NN dan Convolutional Neural Network J. JTIIK. 7 2 p 373-378.
[4] Md Ashraful Alam Milton 2018 Automated Skin Lesion Classification Using Ensemble of Deep Neural
Networks in ISIC: Skin Lesion Analysis Towards Melanoma Detection Challenge.
[5] Serban Radu SJ, Loretta Ichim, et al 2019 Automatic Diagnosis of Skin Cancer Using Neural
Networks (Bucharest, Romania: The XIth International Symposium on Advanced Topics in
Electrical Engineering March 28-30).
[6] Nazia Hameed, et al Multi-Class Skin Diseases Classification Using Deep Convolutional Neural
Network and Support Vector Machine.
[7] Xinyuan Zhang, et al 2018 Towards Improving Diagnosis of Skin Diseases by Combining Deep Neural
Network and Human Knowledge BMC Medical Informatics and Decision Making 18(Suppl 2) p
59
[8] Khalid M. Hosny, et al 2019 Classification of skin lesions using transfer learning and
augmentation with Alex-net PLOS ONE.
[9] Marwan AA 2019 Skin Lesion Classification Using Convolutional Neural Network With Novel
Regularizer IEEE Access.
[10] The International Skin Imaging Collaboration (ISIC).Accessed: June 2020. [Online].
Available: https:
//www.isicarchive.com/#!/topWithHeader/onlyHeaderTop/gallery
[11] Mousumi Roy, et al 2016 Dermatofibroma: Atypical Presentations Indian J. Dermatology.
[12] R. Delila Tsaniyah, Aspitriani and Fatmawati “Prevalensi dan Gambaran Histopatologi Nevus
Pigmentosus di Bagian Patologi Anatomi Rumah Sakit Dr. Mohammad Hoesin Palembang,”
Periode 1 Januari 2009-31 Desember 2013.
[13] Syril Keena T. Cutaneous squamous cell carcinoma. Journal of The American Academy of

9
ICETIR 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 982 (2020) 012005 doi:10.1088/1757-899X/982/1/012005

Dermatology. Volume 78, Issue 2, p237-432, e33-e55.


[14] Marco Rastrelli, et al 2014 Melanoma: Epidemiology, Risk Factors, Pathogenesis,
Diagnosis, and Classification 28 no. 6 p 1005-1011
[15] P. Kim, 2017 MATLAB Deep Learning: With Machine Learning, Neural Networks, and Artificial
Intelligence.
[16] A. F. Agarap 2008 Deep Learning using Rectified Linear Units (ReLU) 1 p 2–8 [Online].
Available: http://arxiv.org/abs/1803.08375.
[17] S. Khan, H. Rahmani, S. A. A. Shah, M. Bennamoun, G. Medioni and S. Dickinson 2018 A
Guide to Convolutional Neural Networks forComputer Vision. Morgan Claypool [Online]
Available: https: //ieeexplore.ieee.org/document/8295029
[18] H. Robbins and S. Monro 1985 A Stochastic Approximation Method” in Springer
[19] J. Duchi, E. Hasan and Y. Singer 2011 Subgradient Methods for Online Learning and
Stochastic Optimization J. of Machine Learning Research
[20] Y. Yunlong, L. Fuxian. 2019 Effective Neural Network Training with a New Weighting
Mechanism-Based Optimition Algorithm IEEE Access.

10

You might also like